blob: e3091eaa2ffe8a83be42795d49d0a0279b0a35c1 [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
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700684LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
698RANLIB
699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
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
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_threads
834with_thread
835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_fpectl
841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700898runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899includedir='${prefix}/include'
900oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 ac_prev=
919 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200923 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *=) ac_optarg= ;;
925 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Accept the important Cygnus configure options, so we can diagnose typos.
929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_dashdash$ac_option in
931 --)
932 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -bindir | --bindir | --bindi | --bind | --bin | --bi)
935 ac_prev=bindir ;;
936 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
939 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 -cache-file | --cache-file | --cache-fil | --cache-fi \
945 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946 ac_prev=cache_file ;;
947 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 cache_file=$ac_optarg ;;
950
951 --config-cache | -C)
952 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960 | --dataroo | --dataro | --datar)
961 ac_prev=datarootdir ;;
962 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964 datarootdir=$ac_optarg ;;
965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981
982 -docdir | --docdir | --docdi | --doc | --do)
983 ac_prev=docdir ;;
984 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985 docdir=$ac_optarg ;;
986
987 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988 ac_prev=dvidir ;;
989 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200996 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010 | --exec | --exe | --ex)
1011 ac_prev=exec_prefix ;;
1012 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --with-gas.
1019 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 -help | --help | --hel | --he | -h)
1022 ac_init_help=long ;;
1023 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024 ac_init_help=recursive ;;
1025 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034 ac_prev=htmldir ;;
1035 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036 | --ht=*)
1037 htmldir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -includedir | --includedir | --includedi | --included | --include \
1040 | --includ | --inclu | --incl | --inc)
1041 ac_prev=includedir ;;
1042 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -infodir | --infodir | --infodi | --infod | --info | --inf)
1047 ac_prev=infodir ;;
1048 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libdir | --libdir | --libdi | --libd)
1052 ac_prev=libdir ;;
1053 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057 | --libexe | --libex | --libe)
1058 ac_prev=libexecdir ;;
1059 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -localedir | --localedir | --localedi | --localed | --locale)
1064 ac_prev=localedir ;;
1065 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066 localedir=$ac_optarg ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 ac_prev=localstatedir ;;
1071 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076 ac_prev=mandir ;;
1077 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 # Obsolete; use --without-fp.
1082 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 no_create=yes ;;
1087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094 | --oldin | --oldi | --old | --ol | --o)
1095 ac_prev=oldincludedir ;;
1096 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102 ac_prev=prefix ;;
1103 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107 | --program-pre | --program-pr | --program-p)
1108 ac_prev=program_prefix ;;
1109 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114 | --program-suf | --program-su | --program-s)
1115 ac_prev=program_suffix ;;
1116 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-transform-name | --program-transform-name \
1121 | --program-transform-nam | --program-transform-na \
1122 | --program-transform-n | --program-transform- \
1123 | --program-transform | --program-transfor \
1124 | --program-transfo | --program-transf \
1125 | --program-trans | --program-tran \
1126 | --progr-tra | --program-tr | --program-t)
1127 ac_prev=program_transform_name ;;
1128 -program-transform-name=* | --program-transform-name=* \
1129 | --program-transform-nam=* | --program-transform-na=* \
1130 | --program-transform-n=* | --program-transform-=* \
1131 | --program-transform=* | --program-transfor=* \
1132 | --program-transfo=* | --program-transf=* \
1133 | --program-trans=* | --program-tran=* \
1134 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138 ac_prev=pdfdir ;;
1139 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140 pdfdir=$ac_optarg ;;
1141
1142 -psdir | --psdir | --psdi | --psd | --ps)
1143 ac_prev=psdir ;;
1144 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145 psdir=$ac_optarg ;;
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148 | -silent | --silent | --silen | --sile | --sil)
1149 silent=yes ;;
1150
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001151 -runstatedir | --runstatedir | --runstatedi | --runstated \
1152 | --runstate | --runstat | --runsta | --runst | --runs \
1153 | --run | --ru | --r)
1154 ac_prev=runstatedir ;;
1155 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1156 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1157 | --run=* | --ru=* | --r=*)
1158 runstatedir=$ac_optarg ;;
1159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 export $ac_envvar ;;
1268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001269 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001274 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ;;
1276
1277 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278done
1279
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283fi
1284
Matthias Kloseb9621712010-04-24 17:59:49 +00001285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1290 esac
1291fi
1292
1293# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001297 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001312done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
1329
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342
1343
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373 srcdir=..
1374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402
Martin v. Löwis11437992002-04-12 09:54:03 +00001403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001410\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
Martin v. Löwis11437992002-04-12 09:54:03 +00001430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001450 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --libdir=DIR object code libraries [EPREFIX/lib]
1452 --includedir=DIR C header files [PREFIX/include]
1453 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1454 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1455 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1456 --infodir=DIR info documentation [DATAROOTDIR/info]
1457 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1458 --mandir=DIR man documentation [DATAROOTDIR/man]
1459 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1460 --htmldir=DIR html documentation [DOCDIR]
1461 --dvidir=DIR dvi documentation [DOCDIR]
1462 --pdfdir=DIR pdf documentation [DOCDIR]
1463 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465
1466 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001467
1468System types:
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001471 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001477 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001491 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1492 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001505 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001506 --with-framework-name=FRAMEWORK
1507 specify an alternate name of the framework built
1508 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001510 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001511 --with-cxx-main=<compiler>
1512 compile main() and link python executable with C++
1513 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-suffix=.exe set executable suffix
1515 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001516 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001517 --with-lto Enable Link Time Optimization in PGO builds.
1518 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001519 --with-hash-algorithm=[fnv|siphash24]
1520 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001521 --with-address-sanitizer
1522 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001523 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001524 --with-system-expat build pyexpat module using an installed expat
1525 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001526 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001527 --with-system-libmpdec build _decimal module using an installed libmpdec
1528 library
Ned Deilyd819b932013-09-06 01:07:05 -07001529 --with-tcltk-includes='-I...'
1530 override search for Tcl and Tk include files
1531 --with-tcltk-libs='-L...'
1532 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001533 --with-dbmliborder=db1:db2:...
1534 order to check db backends for dbm. Valid value is a
1535 colon separated string with the backend names
1536 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001537 --with(out)-threads[=DIRECTORY]
1538 disable/enable thread support
1539 --with(out)-thread[=DIRECTORY]
1540 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001541 --with(out)-doc-strings disable/enable documentation strings
1542 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001543 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001544 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001545 --with-fpectl enable SIGFPE catching
1546 --with-libm=STRING math library
1547 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001548 --with(out)-computed-gotos
1549 Use computed gotos in evaluation loop (enabled by
1550 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001551 --with(out)-ensurepip=[=upgrade]
1552 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
1554Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001555 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CC C compiler command
1557 CFLAGS C compiler flags
1558 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1559 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001564 PKG_CONFIG path to pkg-config utility
1565 PKG_CONFIG_PATH
1566 directories to add to pkg-config's search path
1567 PKG_CONFIG_LIBDIR
1568 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001569
1570Use these variables to override the choices made by `configure' or to help
1571it to find libraries and programs with nonstandard names/locations.
1572
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001573Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001574_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001576fi
1577
1578if test "$ac_init_help" = "recursive"; then
1579 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 test -d "$ac_dir" ||
1582 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1583 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_builddir=.
1585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586case "$ac_dir" in
1587.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 case $ac_top_builddir_sub in
1593 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1594 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1595 esac ;;
1596esac
1597ac_abs_top_builddir=$ac_pwd
1598ac_abs_builddir=$ac_pwd$ac_dir_suffix
1599# for backward compatibility:
1600ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001601
1602case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 ac_top_srcdir=$ac_top_builddir_sub
1606 ac_abs_top_srcdir=$ac_pwd ;;
1607 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001608 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 ac_top_srcdir=$srcdir
1610 ac_abs_top_srcdir=$srcdir ;;
1611 *) # Relative name.
1612 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1613 ac_top_srcdir=$ac_top_build_prefix$srcdir
1614 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001615esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 cd "$ac_dir" || { ac_status=$?; continue; }
1619 # Check for guested configure.
1620 if test -f "$ac_srcdir/configure.gnu"; then
1621 echo &&
1622 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1623 elif test -f "$ac_srcdir/configure"; then
1624 echo &&
1625 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001626 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001627 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 fi || ac_status=$?
1629 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 done
1631fi
1632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001634if $ac_init_version; then
1635 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001636python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001638
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001639Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001640This configure script is free software; the Free Software Foundation
1641gives unlimited permission to copy, distribute and modify it.
1642_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001645
1646## ------------------------ ##
1647## Autoconf initialization. ##
1648## ------------------------ ##
1649
1650# ac_fn_c_try_compile LINENO
1651# --------------------------
1652# Try to compile conftest.$ac_ext, and return whether this succeeded.
1653ac_fn_c_try_compile ()
1654{
1655 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1656 rm -f conftest.$ac_objext
1657 if { { ac_try="$ac_compile"
1658case "(($ac_try" in
1659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1660 *) ac_try_echo=$ac_try;;
1661esac
1662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1663$as_echo "$ac_try_echo"; } >&5
1664 (eval "$ac_compile") 2>conftest.err
1665 ac_status=$?
1666 if test -s conftest.err; then
1667 grep -v '^ *+' conftest.err >conftest.er1
1668 cat conftest.er1 >&5
1669 mv -f conftest.er1 conftest.err
1670 fi
1671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1672 test $ac_status = 0; } && {
1673 test -z "$ac_c_werror_flag" ||
1674 test ! -s conftest.err
1675 } && test -s conftest.$ac_objext; then :
1676 ac_retval=0
1677else
1678 $as_echo "$as_me: failed program was:" >&5
1679sed 's/^/| /' conftest.$ac_ext >&5
1680
1681 ac_retval=1
1682fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001683 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001684 as_fn_set_status $ac_retval
1685
1686} # ac_fn_c_try_compile
1687
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001688# ac_fn_c_try_cpp LINENO
1689# ----------------------
1690# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1691ac_fn_c_try_cpp ()
1692{
1693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694 if { { ac_try="$ac_cpp conftest.$ac_ext"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1702 ac_status=$?
1703 if test -s conftest.err; then
1704 grep -v '^ *+' conftest.err >conftest.er1
1705 cat conftest.er1 >&5
1706 mv -f conftest.er1 conftest.err
1707 fi
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } > conftest.i && {
1710 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1711 test ! -s conftest.err
1712 }; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: failed program was:" >&5
1716sed 's/^/| /' conftest.$ac_ext >&5
1717
1718 ac_retval=1
1719fi
1720 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1721 as_fn_set_status $ac_retval
1722
1723} # ac_fn_c_try_cpp
1724
Matthias Kloseb9621712010-04-24 17:59:49 +00001725# ac_fn_c_try_link LINENO
1726# -----------------------
1727# Try to link conftest.$ac_ext, and return whether this succeeded.
1728ac_fn_c_try_link ()
1729{
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1731 rm -f conftest.$ac_objext conftest$ac_exeext
1732 if { { ac_try="$ac_link"
1733case "(($ac_try" in
1734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1735 *) ac_try_echo=$ac_try;;
1736esac
1737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1738$as_echo "$ac_try_echo"; } >&5
1739 (eval "$ac_link") 2>conftest.err
1740 ac_status=$?
1741 if test -s conftest.err; then
1742 grep -v '^ *+' conftest.err >conftest.er1
1743 cat conftest.er1 >&5
1744 mv -f conftest.er1 conftest.err
1745 fi
1746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1747 test $ac_status = 0; } && {
1748 test -z "$ac_c_werror_flag" ||
1749 test ! -s conftest.err
1750 } && test -s conftest$ac_exeext && {
1751 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001752 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001753 }; then :
1754 ac_retval=0
1755else
1756 $as_echo "$as_me: failed program was:" >&5
1757sed 's/^/| /' conftest.$ac_ext >&5
1758
1759 ac_retval=1
1760fi
1761 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1762 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1763 # interfere with the next link command; also delete a directory that is
1764 # left behind by Apple's compiler. We do this before executing the actions.
1765 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 as_fn_set_status $ac_retval
1768
1769} # ac_fn_c_try_link
1770
Matthias Kloseb9621712010-04-24 17:59:49 +00001771# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1772# -------------------------------------------------------
1773# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1774# the include files in INCLUDES and setting the cache variable VAR
1775# accordingly.
1776ac_fn_c_check_header_mongrel ()
1777{
1778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001779 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1781$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001782if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001783 $as_echo_n "(cached) " >&6
1784fi
1785eval ac_res=\$$3
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1787$as_echo "$ac_res" >&6; }
1788else
1789 # Is the header compilable?
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1791$as_echo_n "checking $2 usability... " >&6; }
1792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1793/* end confdefs.h. */
1794$4
1795#include <$2>
1796_ACEOF
1797if ac_fn_c_try_compile "$LINENO"; then :
1798 ac_header_compiler=yes
1799else
1800 ac_header_compiler=no
1801fi
1802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1804$as_echo "$ac_header_compiler" >&6; }
1805
1806# Is the header present?
1807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1808$as_echo_n "checking $2 presence... " >&6; }
1809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1810/* end confdefs.h. */
1811#include <$2>
1812_ACEOF
1813if ac_fn_c_try_cpp "$LINENO"; then :
1814 ac_header_preproc=yes
1815else
1816 ac_header_preproc=no
1817fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001818rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1820$as_echo "$ac_header_preproc" >&6; }
1821
1822# So? What about this header?
1823case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1824 yes:no: )
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1826$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1829 ;;
1830 no:yes:* )
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1832$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1834$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1836$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1838$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1840$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001841( $as_echo "## --------------------------------------- ##
1842## Report this to https://bugs.python.org/ ##
1843## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001844 ) | sed "s/^/$as_me: WARNING: /" >&2
1845 ;;
1846esac
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1848$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001849if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001850 $as_echo_n "(cached) " >&6
1851else
1852 eval "$3=\$ac_header_compiler"
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
1857fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001859
1860} # ac_fn_c_check_header_mongrel
1861
1862# ac_fn_c_try_run LINENO
1863# ----------------------
1864# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1865# that executables *can* be run.
1866ac_fn_c_try_run ()
1867{
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 if { { ac_try="$ac_link"
1870case "(($ac_try" in
1871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1872 *) ac_try_echo=$ac_try;;
1873esac
1874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1875$as_echo "$ac_try_echo"; } >&5
1876 (eval "$ac_link") 2>&5
1877 ac_status=$?
1878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1879 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1880 { { case "(($ac_try" in
1881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1882 *) ac_try_echo=$ac_try;;
1883esac
1884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1885$as_echo "$ac_try_echo"; } >&5
1886 (eval "$ac_try") 2>&5
1887 ac_status=$?
1888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889 test $ac_status = 0; }; }; then :
1890 ac_retval=0
1891else
1892 $as_echo "$as_me: program exited with status $ac_status" >&5
1893 $as_echo "$as_me: failed program was:" >&5
1894sed 's/^/| /' conftest.$ac_ext >&5
1895
1896 ac_retval=$ac_status
1897fi
1898 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001899 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001900 as_fn_set_status $ac_retval
1901
1902} # ac_fn_c_try_run
1903
1904# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1905# -------------------------------------------------------
1906# Tests whether HEADER exists and can be compiled using the include files in
1907# INCLUDES, setting the cache variable VAR accordingly.
1908ac_fn_c_check_header_compile ()
1909{
1910 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1912$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001913if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001914 $as_echo_n "(cached) " >&6
1915else
1916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1917/* end confdefs.h. */
1918$4
1919#include <$2>
1920_ACEOF
1921if ac_fn_c_try_compile "$LINENO"; then :
1922 eval "$3=yes"
1923else
1924 eval "$3=no"
1925fi
1926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1927fi
1928eval ac_res=\$$3
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001931 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001932
1933} # ac_fn_c_check_header_compile
1934
Matthias Kloseb9621712010-04-24 17:59:49 +00001935# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1936# -------------------------------------------
1937# Tests whether TYPE exists after having included INCLUDES, setting cache
1938# variable VAR accordingly.
1939ac_fn_c_check_type ()
1940{
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001944if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001945 $as_echo_n "(cached) " >&6
1946else
1947 eval "$3=no"
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954if (sizeof ($2))
1955 return 0;
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$4
1964int
1965main ()
1966{
1967if (sizeof (($2)))
1968 return 0;
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973if ac_fn_c_try_compile "$LINENO"; then :
1974
1975else
1976 eval "$3=yes"
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982eval ac_res=\$$3
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1984$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001986
1987} # ac_fn_c_check_type
1988
Matthias Kloseb9621712010-04-24 17:59:49 +00001989# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1990# --------------------------------------------
1991# Tries to find the compile-time value of EXPR in a program that includes
1992# INCLUDES, setting VAR accordingly. Returns whether the value could be
1993# computed
1994ac_fn_c_compute_int ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 if test "$cross_compiling" = yes; then
1998 # Depending upon the size, compute the lo and hi bounds.
1999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$4
2002int
2003main ()
2004{
2005static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002006test_array [0] = 0;
2007return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002008
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_compile "$LINENO"; then :
2014 ac_lo=0 ac_mid=0
2015 while :; do
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002023test_array [0] = 0;
2024return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002025
2026 ;
2027 return 0;
2028}
2029_ACEOF
2030if ac_fn_c_try_compile "$LINENO"; then :
2031 ac_hi=$ac_mid; break
2032else
2033 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2034 if test $ac_lo -le $ac_mid; then
2035 ac_lo= ac_hi=
2036 break
2037 fi
2038 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2039fi
2040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041 done
2042else
2043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044/* end confdefs.h. */
2045$4
2046int
2047main ()
2048{
2049static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002050test_array [0] = 0;
2051return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=-1 ac_mid=-1
2059 while :; do
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002067test_array [0] = 0;
2068return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002102test_array [0] = 0;
2103return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid
2111else
2112 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115done
2116case $ac_lo in #((
2117?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2118'') ac_retval=1 ;;
2119esac
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124static long int longval () { return $2; }
2125static unsigned long int ulongval () { return $2; }
2126#include <stdio.h>
2127#include <stdlib.h>
2128int
2129main ()
2130{
2131
2132 FILE *f = fopen ("conftest.val", "w");
2133 if (! f)
2134 return 1;
2135 if (($2) < 0)
2136 {
2137 long int i = longval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%ld", i);
2141 }
2142 else
2143 {
2144 unsigned long int i = ulongval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%lu", i);
2148 }
2149 /* Do not output a trailing newline, as this causes \r\n confusion
2150 on some platforms. */
2151 return ferror (f) || fclose (f) != 0;
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_run "$LINENO"; then :
2158 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2159else
2160 ac_retval=1
2161fi
2162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2163 conftest.$ac_objext conftest.beam conftest.$ac_ext
2164rm -f conftest.val
2165
2166 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002167 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_compute_int
2171
2172# ac_fn_c_check_func LINENO FUNC VAR
2173# ----------------------------------
2174# Tests whether FUNC exists, setting the cache variable VAR accordingly
2175ac_fn_c_check_func ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002180if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 $as_echo_n "(cached) " >&6
2182else
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2187#define $2 innocuous_$2
2188
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $2 (); below.
2191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2192 <limits.h> exists even on freestanding compilers. */
2193
2194#ifdef __STDC__
2195# include <limits.h>
2196#else
2197# include <assert.h>
2198#endif
2199
2200#undef $2
2201
2202/* Override any GCC internal prototype to avoid an error.
2203 Use char because int might match the return type of a GCC
2204 builtin and then its argument prototype would still apply. */
2205#ifdef __cplusplus
2206extern "C"
2207#endif
2208char $2 ();
2209/* The GNU C library defines this for functions which it implements
2210 to always fail with ENOSYS. Some functions are actually named
2211 something starting with __ and the normal name is an alias. */
2212#if defined __stub_$2 || defined __stub___$2
2213choke me
2214#endif
2215
2216int
2217main ()
2218{
2219return $2 ();
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_link "$LINENO"; then :
2225 eval "$3=yes"
2226else
2227 eval "$3=no"
2228fi
2229rm -f core conftest.err conftest.$ac_objext \
2230 conftest$ac_exeext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002235 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002236
2237} # ac_fn_c_check_func
2238
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002239# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2240# ---------------------------------------------
2241# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2242# accordingly.
2243ac_fn_c_check_decl ()
2244{
2245 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246 as_decl_name=`echo $2|sed 's/ *(.*//'`
2247 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2249$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2250if eval \${$3+:} false; then :
2251 $as_echo_n "(cached) " >&6
2252else
2253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254/* end confdefs.h. */
2255$4
2256int
2257main ()
2258{
2259#ifndef $as_decl_name
2260#ifdef __cplusplus
2261 (void) $as_decl_use;
2262#else
2263 (void) $as_decl_name;
2264#endif
2265#endif
2266
2267 ;
2268 return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272 eval "$3=yes"
2273else
2274 eval "$3=no"
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277fi
2278eval ac_res=\$$3
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2280$as_echo "$ac_res" >&6; }
2281 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2282
2283} # ac_fn_c_check_decl
2284
Matthias Kloseb9621712010-04-24 17:59:49 +00002285# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2286# ----------------------------------------------------
2287# Tries to find if the field MEMBER exists in type AGGR, after including
2288# INCLUDES, setting cache variable VAR accordingly.
2289ac_fn_c_check_member ()
2290{
2291 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2293$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002294if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002295 $as_echo_n "(cached) " >&6
2296else
2297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2298/* end confdefs.h. */
2299$5
2300int
2301main ()
2302{
2303static $2 ac_aggr;
2304if (ac_aggr.$3)
2305return 0;
2306 ;
2307 return 0;
2308}
2309_ACEOF
2310if ac_fn_c_try_compile "$LINENO"; then :
2311 eval "$4=yes"
2312else
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314/* end confdefs.h. */
2315$5
2316int
2317main ()
2318{
2319static $2 ac_aggr;
2320if (sizeof ac_aggr.$3)
2321return 0;
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_compile "$LINENO"; then :
2327 eval "$4=yes"
2328else
2329 eval "$4=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334fi
2335eval ac_res=\$$4
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002338 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002339
2340} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002341cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002342This file contains any messages produced by compilers while
2343running configure, to aid debugging if configure makes a mistake.
2344
Ned Deily4829bc62016-09-12 17:29:04 -04002345It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002346generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
2348 $ $0 $@
2349
2350_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002352{
2353cat <<_ASUNAME
2354## --------- ##
2355## Platform. ##
2356## --------- ##
2357
2358hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2359uname -m = `(uname -m) 2>/dev/null || echo unknown`
2360uname -r = `(uname -r) 2>/dev/null || echo unknown`
2361uname -s = `(uname -s) 2>/dev/null || echo unknown`
2362uname -v = `(uname -v) 2>/dev/null || echo unknown`
2363
2364/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2365/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2366
2367/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2368/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2369/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002371/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2372/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2373/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2374
2375_ASUNAME
2376
2377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2378for as_dir in $PATH
2379do
2380 IFS=$as_save_IFS
2381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002382 $as_echo "PATH: $as_dir"
2383 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002385
2386} >&5
2387
2388cat >&5 <<_ACEOF
2389
2390
2391## ----------- ##
2392## Core tests. ##
2393## ----------- ##
2394
2395_ACEOF
2396
2397
2398# Keep a trace of the command line.
2399# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002403ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_configure_args0=
2405ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002406ac_must_keep_next=false
2407for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002408do
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 for ac_arg
2410 do
2411 case $ac_arg in
2412 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2413 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2414 | -silent | --silent | --silen | --sile | --sil)
2415 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002416 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 esac
2419 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002426 case $ac_arg in
2427 *=* | --config-cache | -C | -disable-* | --disable-* \
2428 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2429 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2430 | -with-* | --with-* | -without-* | --without-* | --x)
2431 case "$ac_configure_args0 " in
2432 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2433 esac
2434 ;;
2435 -* ) ac_must_keep_next=true ;;
2436 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002438 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 ;;
2440 esac
2441 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002442done
Matthias Kloseb9621712010-04-24 17:59:49 +00002443{ ac_configure_args0=; unset ac_configure_args0;}
2444{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446# When interrupted or exit'd, cleanup temporary files, and complete
2447# config.log. We remove comments because anyway the quotes in there
2448# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449# WARNING: Use '\'' to represent an apostrophe within the trap.
2450# 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 +00002451trap 'exit_status=$?
2452 # Save into config.log some information that might help in debugging.
2453 {
2454 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002455
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002457## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002458## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 echo
2460 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461(
2462 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2463 eval ac_val=\$$ac_var
2464 case $ac_val in #(
2465 *${as_nl}*)
2466 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2468$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac
2470 case $ac_var in #(
2471 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2473 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac ;;
2475 esac
2476 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2479 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 "s/'\''/'\''\\\\'\'''\''/g;
2482 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2483 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002486 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 esac |
2488 sort
2489)
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002491
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002493## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 echo
2496 for ac_var in $ac_subst_vars
2497 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 eval ac_val=\$$ac_var
2499 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 done | sort
2504 echo
2505
2506 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 echo
2511 for ac_var in $ac_subst_files
2512 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 eval ac_val=\$$ac_var
2514 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 done | sort
2519 echo
2520 fi
2521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 fi
2530 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$as_me: caught signal $ac_signal"
2532 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 rm -f core *.core core.conftest.* &&
2535 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002538for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541ac_signal=0
2542
2543# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002545
Matthias Kloseb9621712010-04-24 17:59:49 +00002546$as_echo "/* confdefs.h */" > confdefs.h
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548# Predefined preprocessor variables.
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_NAME "$PACKAGE_NAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_VERSION "$PACKAGE_VERSION"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_STRING "$PACKAGE_STRING"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2568_ACEOF
2569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_URL "$PACKAGE_URL"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
2575# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002576# Prefer an explicitly selected file to automatically selected ones.
2577ac_site_file1=NONE
2578ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580 # We do not want a PATH search for config.site.
2581 case $CONFIG_SITE in #((
2582 -*) ac_site_file1=./$CONFIG_SITE;;
2583 */*) ac_site_file1=$CONFIG_SITE;;
2584 *) ac_site_file1=./$CONFIG_SITE;;
2585 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$prefix/share/config.site
2588 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589else
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 ac_site_file1=$ac_default_prefix/share/config.site
2591 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002593for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 test "x$ac_site_file" = xNONE && continue
2596 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2598$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 . "$ac_site_file" \
2601 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2603as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002604See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605 fi
2606done
2607
2608if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 # Some versions of bash will fail to source /dev/null (special files
2610 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2611 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 esac
2618 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619else
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 >$cache_file
2623fi
2624
2625# Check that the precious variables saved in the cache have kept the same
2626# value.
2627ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 case $ac_old_set,$ac_new_set in
2634 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636$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 +00002637 ac_cache_corrupted=: ;;
2638 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 ac_cache_corrupted=: ;;
2642 ,);;
2643 *)
2644 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 # differences in whitespace do not lead to failure.
2646 ac_old_val_w=`echo x $ac_old_val`
2647 ac_new_val_w=`echo x $ac_new_val`
2648 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651 ac_cache_corrupted=:
2652 else
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655 eval $ac_var=\$ac_old_val
2656 fi
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2658$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2660$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 fi;;
2662 esac
2663 # Pass precious variables to config.status.
2664 if test "$ac_new_set" = set; then
2665 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 *) ac_arg=$ac_var=$ac_new_val ;;
2668 esac
2669 case " $ac_configure_args " in
2670 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
2674done
2675if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002680 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002682## -------------------- ##
2683## Main body of script. ##
2684## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685
Guido van Rossum7f43da71994-08-01 12:15:30 +00002686ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691
Guido van Rossum627b2d71993-12-24 10:39:16 +00002692
Michael W. Hudson54241132001-12-07 15:38:26 +00002693
Trent Nelson4d4ec652012-10-16 08:51:24 -04002694
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002695if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002696 # If we're building out-of-tree, we need to make sure the following
2697 # resources get picked up before their $srcdir counterparts.
2698 # Objects/ -> typeslots.inc
2699 # Include/ -> Python-ast.h, graminit.h
2700 # Python/ -> importlib.h
2701 # (A side effect of this is that these resources will automatically be
2702 # regenerated when building out-of-tree, regardless of whether or not
2703 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2704 # off.)
2705 BASECPPFLAGS="-IObjects -IInclude -IPython"
2706else
2707 BASECPPFLAGS=""
2708fi
2709
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710
2711
2712
2713
Victor Stinner9ed34a82017-05-02 22:35:58 +02002714if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716# Extract the first word of "git", so it can be a program name with args.
2717set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2719$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 $as_echo_n "(cached) " >&6
2722else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723 if test -n "$HAS_GIT"; then
2724 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725else
2726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2727for as_dir in $PATH
2728do
2729 IFS=$as_save_IFS
2730 test -z "$as_dir" && as_dir=.
2731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002733 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2735 break 2
2736 fi
2737done
2738 done
2739IFS=$as_save_IFS
2740
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742fi
2743fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744HAS_GIT=$ac_cv_prog_HAS_GIT
2745if test -n "$HAS_GIT"; then
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2747$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748else
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2750$as_echo "no" >&6; }
2751fi
2752
2753
2754else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758then
Ned Deily554626a2017-03-20 23:41:52 -04002759 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2760 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763 GITVERSION=""
2764 GITTAG=""
2765 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766fi
2767
2768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002772ac_aux_dir=
2773for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2774 if test -f "$ac_dir/install-sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install-sh -c"
2777 break
2778 elif test -f "$ac_dir/install.sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install.sh -c"
2781 break
2782 elif test -f "$ac_dir/shtool"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/shtool install -c"
2785 break
2786 fi
2787done
2788if test -z "$ac_aux_dir"; then
2789 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2790fi
2791
2792# These three variables are undocumented and unsupported,
2793# and are intended to be withdrawn in a future Autoconf release.
2794# They can cause serious problems if a builder's source tree is in a directory
2795# whose full name contains unusual characters.
2796ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2797ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2798ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2799
2800
2801# Make sure we can run config.sub.
2802$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2803 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2806$as_echo_n "checking build system type... " >&6; }
2807if ${ac_cv_build+:} false; then :
2808 $as_echo_n "(cached) " >&6
2809else
2810 ac_build_alias=$build_alias
2811test "x$ac_build_alias" = x &&
2812 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2813test "x$ac_build_alias" = x &&
2814 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2815ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2816 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2817
2818fi
2819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2820$as_echo "$ac_cv_build" >&6; }
2821case $ac_cv_build in
2822*-*-*) ;;
2823*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2824esac
2825build=$ac_cv_build
2826ac_save_IFS=$IFS; IFS='-'
2827set x $ac_cv_build
2828shift
2829build_cpu=$1
2830build_vendor=$2
2831shift; shift
2832# Remember, the first character of IFS is used to create $*,
2833# except with old shells:
2834build_os=$*
2835IFS=$ac_save_IFS
2836case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2837
2838
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2840$as_echo_n "checking host system type... " >&6; }
2841if ${ac_cv_host+:} false; then :
2842 $as_echo_n "(cached) " >&6
2843else
2844 if test "x$host_alias" = x; then
2845 ac_cv_host=$ac_cv_build
2846else
2847 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2849fi
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2853$as_echo "$ac_cv_host" >&6; }
2854case $ac_cv_host in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2857esac
2858host=$ac_cv_host
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_host
2861shift
2862host_cpu=$1
2863host_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867host_os=$*
2868IFS=$ac_save_IFS
2869case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2870
2871
2872
doko@python.orga10e4a92013-01-25 18:45:12 +01002873
2874
Ned Deilyfcbc2462014-08-22 13:32:49 -07002875# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2876rm -f pybuilddir.txt
2877
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002878for ac_prog in python$PACKAGE_VERSION python3 python
2879do
2880 # Extract the first word of "$ac_prog", so it can be a program name with args.
2881set dummy $ac_prog; ac_word=$2
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2883$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885 $as_echo_n "(cached) " >&6
2886else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002887 if test -n "$PYTHON_FOR_REGEN"; then
2888 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889else
2890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891for as_dir in $PATH
2892do
2893 IFS=$as_save_IFS
2894 test -z "$as_dir" && as_dir=.
2895 for ac_exec_ext in '' $ac_executable_extensions; do
2896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002897 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2899 break 2
2900 fi
2901done
2902 done
2903IFS=$as_save_IFS
2904
2905fi
2906fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002907PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2908if test -n "$PYTHON_FOR_REGEN"; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2910$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911else
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2913$as_echo "no" >&6; }
2914fi
2915
2916
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002919test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921
2922
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002923if test "$cross_compiling" = yes; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2925$as_echo_n "checking for python interpreter for cross build... " >&6; }
2926 if test -z "$PYTHON_FOR_BUILD"; then
2927 for interp in python$PACKAGE_VERSION python3 python; do
2928 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002929 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 +02002930 break
2931 fi
2932 interp=
2933 done
2934 if test x$interp = x; then
2935 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2936 fi
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2938$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002939 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 +02002940 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2945fi
2946
2947
Martin v. Löwis11437992002-04-12 09:54:03 +00002948
Benjamin Petersond23f8222009-04-05 19:13:16 +00002949if test "$prefix" != "/"; then
2950 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
2955
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002956# We don't use PACKAGE_ variables, and they cause conflicts
2957# with other autoconf-based packages that include Python.h
2958grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2959rm confdefs.h
2960mv confdefs.h.new confdefs.h
2961
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002962
Ned Deily4829bc62016-09-12 17:29:04 -04002963VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002964
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002965# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002966
2967SOVERSION=1.0
2968
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969# The later defininition of _XOPEN_SOURCE disables certain features
2970# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2971
Matthias Kloseb9621712010-04-24 17:59:49 +00002972$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002973
2974
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2977# them.
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002980
2981
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002987
2988
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2990# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002993
2994
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002995# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2996# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2997# them.
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003000
3001
3002
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003003define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003004
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003005# Arguments passed to configure.
3006
3007CONFIG_ARGS="$ac_configure_args"
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3010$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003011# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003012if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003013 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003014 case $enableval in
3015 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003016 # Locate the best usable SDK, see Mac/README.txt for more
3017 # information
3018 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003019 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003021 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3022 if test ! -d "${enableval}"
3023 then
3024 enableval=/
3025 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003027 ;;
3028 esac
3029 case $enableval in
3030 no)
3031 UNIVERSALSDK=
3032 enable_universalsdk=
3033 ;;
3034 *)
3035 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036 if test ! -d "${UNIVERSALSDK}"
3037 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003038 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040 ;;
3041 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003042
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044else
3045
3046 UNIVERSALSDK=
3047 enable_universalsdk=
3048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051if test -n "${UNIVERSALSDK}"
3052then
Matthias Kloseb9621712010-04-24 17:59:49 +00003053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3054$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055else
Matthias Kloseb9621712010-04-24 17:59:49 +00003056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3057$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003061
Ned Deily87adb6e2013-10-18 21:09:56 -07003062ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003063
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064# For backward compatibility reasons we prefer to select '32-bit' if available,
3065# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003066UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003067if test "`uname -s`" = "Darwin"
3068then
3069 if test -n "${UNIVERSALSDK}"
3070 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003071 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072 then
3073 UNIVERSAL_ARCHS="intel"
3074 fi
3075 fi
3076fi
3077
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003078
Matthias Kloseb9621712010-04-24 17:59:49 +00003079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3080$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081
3082# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003083if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085 UNIVERSAL_ARCHS="$withval"
3086
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087fi
3088
Ned Deily87adb6e2013-10-18 21:09:56 -07003089if test -n "${UNIVERSALSDK}"
3090then
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3092$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3093else
3094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3095$as_echo "no" >&6; }
3096fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003097
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003098
3099# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003100if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003101 withval=$with_framework_name;
3102 PYTHONFRAMEWORK=${withval}
3103 PYTHONFRAMEWORKDIR=${withval}.framework
3104 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3105
3106else
3107
3108 PYTHONFRAMEWORK=Python
3109 PYTHONFRAMEWORKDIR=Python.framework
3110 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3111
3112fi
3113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003115if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003117 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003118 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003119 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003120 esac
3121 case $enableval in
3122 no)
3123 PYTHONFRAMEWORK=
3124 PYTHONFRAMEWORKDIR=no-framework
3125 PYTHONFRAMEWORKPREFIX=
3126 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003127 FRAMEWORKINSTALLFIRST=
3128 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003129 FRAMEWORKALTINSTALLFIRST=
3130 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003131 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003132 if test "x${prefix}" = "xNONE"; then
3133 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3134 else
3135 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3136 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003137 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003138 ;;
3139 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003141 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003142 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003143 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003144 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3145 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003146 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003148
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003149 if test "x${prefix}" = "xNONE" ; then
3150 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003152 else
3153 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3154 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155
3156 case "${enableval}" in
3157 /System*)
3158 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3159 if test "${prefix}" = "NONE" ; then
3160 # See below
3161 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3162 fi
3163 ;;
3164
3165 /Library*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 ;;
3168
3169 */Library/Frameworks)
3170 MDIR="`dirname "${enableval}"`"
3171 MDIR="`dirname "${MDIR}"`"
3172 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3173
3174 if test "${prefix}" = "NONE"; then
3175 # User hasn't specified the
3176 # --prefix option, but wants to install
3177 # the framework in a non-default location,
3178 # ensure that the compatibility links get
3179 # installed relative to that prefix as well
3180 # instead of in /usr/local.
3181 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3182 fi
3183 ;;
3184
3185 *)
3186 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3187 ;;
3188 esac
3189
Jack Jansen127e56e2001-09-11 14:41:54 +00003190 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003192 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003194 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003198 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3199
3200 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3201
Jack Jansene578a632001-08-15 01:27:14 +00003202 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003203
Guido van Rossum563e7081996-09-10 18:20:48 +00003204else
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Jack Jansene578a632001-08-15 01:27:14 +00003206 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003207 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003208 PYTHONFRAMEWORKPREFIX=
3209 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003210 FRAMEWORKINSTALLFIRST=
3211 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003212 FRAMEWORKALTINSTALLFIRST=
3213 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003214 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 if test "x${prefix}" = "xNONE" ; then
3216 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3217 else
3218 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3219 fi
Jack Jansene578a632001-08-15 01:27:14 +00003220 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003221
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223fi
3224
Thomas Wouters477c8d52006-05-27 19:21:47 +00003225
3226
Michael W. Hudson54241132001-12-07 15:38:26 +00003227
3228
3229
3230
Jack Jansene578a632001-08-15 01:27:14 +00003231
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003232
3233
3234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003236
Ned Deilyb8f944f2013-11-21 22:42:25 -08003237
Jack Jansene578a632001-08-15 01:27:14 +00003238##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003239## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003240## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003241##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242# Set name for machine-dependent library files
3243
Matthias Kloseb9621712010-04-24 17:59:49 +00003244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3245$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246if test -z "$MACHDEP"
3247then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 # avoid using uname for cross builds
3249 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003250 # ac_sys_system and ac_sys_release are used for setting
3251 # a lot of different things including 'define_xopen_source'
3252 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003254 *-*-linux-android*)
3255 ac_sys_system=Linux-android
3256 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 *-*-linux*)
3258 ac_sys_system=Linux
3259 ;;
3260 *-*-cygwin*)
3261 ac_sys_system=Cygwin
3262 ;;
3263 *)
3264 # for now, limit cross builds to known configurations
3265 MACHDEP="unknown"
3266 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3267 esac
3268 ac_sys_release=
3269 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003271 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003272 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003274 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 fi
3278 ac_md_system=`echo $ac_sys_system |
3279 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3280 ac_md_release=`echo $ac_sys_release |
3281 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3282 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003283
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003285 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003286 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003287 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003288 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003289 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291fi
Guido van Rossum91922671997-10-09 20:24:13 +00003292
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003293
3294if test "$cross_compiling" = yes; then
3295 case "$host" in
3296 *-*-linux*)
3297 case "$host_cpu" in
3298 arm*)
3299 _host_cpu=arm
3300 ;;
3301 *)
3302 _host_cpu=$host_cpu
3303 esac
3304 ;;
3305 *-*-cygwin*)
3306 _host_cpu=
3307 ;;
3308 *)
3309 # for now, limit cross builds to known configurations
3310 MACHDEP="unknown"
3311 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3312 esac
3313 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3314fi
3315
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003316# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3317# disable features if it is defined, without any means to access these
3318# features as extensions. For these systems, we skip the definition of
3319# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3320# some feature, make sure there is no alternative way to access this
3321# feature. Also, when using wildcards, make sure you have verified the
3322# need for not defining _XOPEN_SOURCE on all systems matching the
3323# wildcard, and that the wildcard does not include future systems
3324# (which may remove their limitations).
3325case $ac_sys_system/$ac_sys_release in
3326 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3327 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003328 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003329 # In addition, Stefan Krah confirms that issue #1244610 exists through
3330 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003331 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332 define_xopen_source=no
3333 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3334 # also defined. This can be overridden by defining _BSD_SOURCE
3335 # As this has a different meaning on Linux, only define it on OpenBSD
3336
Matthias Kloseb9621712010-04-24 17:59:49 +00003337$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338
3339 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003340 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003346
3347 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003348 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3349 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3350 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003351 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 +00003352 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003353 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3354 # request to enable features supported by the standard as a request
3355 # to disable features not supported by the standard. The best way
3356 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3357 # entirely and define __EXTENSIONS__ instead.
3358 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003359 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3361 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003362 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003363 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 define_xopen_source=no;;
3365 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003366 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003368 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003369 # On FreeBSD 4, the math functions C89 does not cover are never defined
3370 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3371 FreeBSD/4.*)
3372 define_xopen_source=no;;
3373 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3374 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3375 # identifies itself as Darwin/7.*
3376 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3377 # disables platform specific features beyond repair.
3378 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3379 # has no effect, don't bother defining them
3380 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003381 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003382 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003383 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003384 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3385 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3386 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003387 AIX/4)
3388 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003389 AIX/5)
3390 if test `uname -r` -eq 1; then
3391 define_xopen_source=no
3392 fi
3393 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003394 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3395 # defining NI_NUMERICHOST.
3396 QNX/6.3.2)
3397 define_xopen_source=no
3398 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003399
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003400esac
3401
3402if test $define_xopen_source = yes
3403then
Victor Stinner14d098d2011-09-07 22:29:43 +02003404 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
Victor Stinner14d098d2011-09-07 22:29:43 +02003406$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
3409 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3410 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3411 # several APIs are not declared. Since this is also needed in some
3412 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Matthias Kloseb9621712010-04-24 17:59:49 +00003414$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
3416
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003417
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003418$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420fi
3421
Christian Heimes647cd872013-12-07 23:39:33 +01003422# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3423case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003424 hp*|HP*)
3425 define_stdc_a1=yes;;
3426 *)
3427 define_stdc_a1=no;;
3428esac
3429
3430if test $define_stdc_a1 = yes
3431then
Christian Heimes647cd872013-12-07 23:39:33 +01003432
3433$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3434
Christian Heimesb02bcae2013-12-08 15:21:08 +01003435fi
Christian Heimes647cd872013-12-07 23:39:33 +01003436
Guido van Rossum91922671997-10-09 20:24:13 +00003437#
3438# SGI compilers allow the specification of the both the ABI and the
3439# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003440# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003441#
3442# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3443# thus supply support for various ABI/ISA combinations. The MACHDEP
3444# variable is also adjusted.
3445#
3446
3447if test ! -z "$SGI_ABI"
3448then
3449 CC="cc $SGI_ABI"
3450 LDFLAGS="$SGI_ABI $LDFLAGS"
3451 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3454$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003455
Jack Jansen6b08a402004-06-03 12:41:45 +00003456# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3457# it may influence the way we can build extensions, so distutils
3458# needs to check it
3459
Thomas Wouters477c8d52006-05-27 19:21:47 +00003460
Jack Jansen6b08a402004-06-03 12:41:45 +00003461CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003462EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003463
Guido van Rossum627b2d71993-12-24 10:39:16 +00003464# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003465
3466# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3467# for debug/optimization stuff. BASECFLAGS is for flags that are required
3468# just to get things to compile and link. Users are free to override OPT
3469# when running configure or make. The build should not break if they do.
3470# BASECFLAGS should generally not be messed with, however.
3471
3472# XXX shouldn't some/most/all of this code be merged with the stuff later
3473# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3475$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003478if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003480 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003481 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003482 without_gcc=yes;;
3483 yes) CC=gcc
3484 without_gcc=no;;
3485 *) CC=$withval
3486 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003487 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003488else
Martin v. Löwis11437992002-04-12 09:54:03 +00003489
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003490 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003491 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003492 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003493 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003494 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003495fi
3496
Matthias Kloseb9621712010-04-24 17:59:49 +00003497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3498$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003499
Zachary Ware5af85642015-12-21 12:09:17 -06003500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3501$as_echo_n "checking for --with-icc... " >&6; }
3502
3503# Check whether --with-icc was given.
3504if test "${with_icc+set}" = set; then :
3505 withval=$with_icc;
3506 case $withval in
3507 no) CC=${CC:-cc}
3508 with_icc=no;;
3509 yes) CC=icc
3510 CXX=icpc
3511 with_icc=yes;;
3512 *) CC=$withval
3513 with_icc=$withval;;
3514 esac
3515else
3516
3517 with_icc=no
3518fi
3519
3520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3521$as_echo "$with_icc" >&6; }
3522
Guido van Rossum8b131c51995-03-09 14:10:13 +00003523# If the user switches compilers, we can't believe the cache
3524if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3525then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003526 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003527(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003528fi
3529
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003530# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3531# when the compiler supports them, but we don't always want -O2, and
3532# we set -g later.
3533if test -z "$CFLAGS"; then
3534 CFLAGS=
3535fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003536
3537if test "$ac_sys_system" = "Darwin"
3538then
3539 # Compiler selection on MacOSX is more complicated than
3540 # AC_PROG_CC can handle, see Mac/README.txt for more
3541 # information
3542 if test -z "${CC}"
3543 then
3544 found_gcc=
3545 found_clang=
3546 as_save_IFS=$IFS; IFS=:
3547 for as_dir in $PATH
3548 do
3549 IFS=$as_save_IFS
3550 if test -x $as_dir/gcc; then
3551 if test -z "${found_gcc}"; then
3552 found_gcc=$as_dir/gcc
3553 fi
3554 fi
3555 if test -x $as_dir/clang; then
3556 if test -z "${found_clang}"; then
3557 found_clang=$as_dir/clang
3558 fi
3559 fi
3560 done
3561 IFS=$as_save_IFS
3562
3563 if test -n "$found_gcc" -a -n "$found_clang"
3564 then
3565 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3566 then
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3568$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3569 CC="$found_clang"
3570 CXX="$found_clang++"
3571 fi
3572
3573
3574 elif test -z "$found_gcc" -a -n "$found_clang"
3575 then
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3577$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3578 CC="$found_clang"
3579 CXX="$found_clang++"
3580
3581 elif test -z "$found_gcc" -a -z "$found_clang"
3582 then
3583 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3584 if test -n "${found_clang}"
3585 then
3586 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3587$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3588 CC="${found_clang}"
3589 CXX="`/usr/bin/xcrun -find clang++`"
3590
3591 # else: use default behaviour
3592 fi
3593 fi
3594 fi
3595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003596ac_ext=c
3597ac_cpp='$CPP $CPPFLAGS'
3598ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3599ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3600ac_compiler_gnu=$ac_cv_c_compiler_gnu
3601if test -n "$ac_tool_prefix"; then
3602 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3603set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003606if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003608else
3609 if test -n "$CC"; then
3610 ac_cv_prog_CC="$CC" # Let the user override the test.
3611else
Martin v. Löwis11437992002-04-12 09:54:03 +00003612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613for as_dir in $PATH
3614do
3615 IFS=$as_save_IFS
3616 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003618 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $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 +00003621 break 2
3622 fi
3623done
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003626
Jack Jansendd19cf82001-12-06 22:36:17 +00003627fi
3628fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003629CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003630if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3632$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003633else
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003636fi
3637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638
Martin v. Löwis11437992002-04-12 09:54:03 +00003639fi
3640if test -z "$ac_cv_prog_CC"; then
3641 ac_ct_CC=$CC
3642 # Extract the first word of "gcc", so it can be a program name with args.
3643set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3645$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003646if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003648else
3649 if test -n "$ac_ct_CC"; then
3650 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3651else
3652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3653for as_dir in $PATH
3654do
3655 IFS=$as_save_IFS
3656 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 $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 +00003661 break 2
3662 fi
3663done
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003666
3667fi
3668fi
3669ac_ct_CC=$ac_cv_prog_ac_ct_CC
3670if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3672$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3675$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003676fi
3677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678 if test "x$ac_ct_CC" = x; then
3679 CC=""
3680 else
3681 case $cross_compiling:$ac_tool_warned in
3682yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685ac_tool_warned=yes ;;
3686esac
3687 CC=$ac_ct_CC
3688 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003689else
3690 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003691fi
3692
Jack Jansendd19cf82001-12-06 22:36:17 +00003693if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694 if test -n "$ac_tool_prefix"; then
3695 # 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 +00003696set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003699if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003701else
3702 if test -n "$CC"; then
3703 ac_cv_prog_CC="$CC" # Let the user override the test.
3704else
Martin v. Löwis11437992002-04-12 09:54:03 +00003705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3706for as_dir in $PATH
3707do
3708 IFS=$as_save_IFS
3709 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003712 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 $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 +00003714 break 2
3715 fi
3716done
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003719
3720fi
3721fi
3722CC=$ac_cv_prog_CC
3723if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3725$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003726else
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3728$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003729fi
3730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003733fi
3734if test -z "$CC"; then
3735 # Extract the first word of "cc", so it can be a program name with args.
3736set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3738$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003739if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003741else
3742 if test -n "$CC"; then
3743 ac_cv_prog_CC="$CC" # Let the user override the test.
3744else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3754 ac_prog_rejected=yes
3755 continue
3756 fi
3757 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 $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 +00003759 break 2
3760 fi
3761done
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003764
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003765if test $ac_prog_rejected = yes; then
3766 # We found a bogon in the path, so make sure we never use it.
3767 set dummy $ac_cv_prog_CC
3768 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770 # We chose a different compiler from the bogus one.
3771 # However, it has the same basename, so the bogon will be chosen
3772 # first if we set CC to just the basename; use the full file name.
3773 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003774 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003775 fi
3776fi
3777fi
3778fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003779CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3782$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783else
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003786fi
3787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
3790if test -z "$CC"; then
3791 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 do
3794 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003798if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003800else
3801 if test -n "$CC"; then
3802 ac_cv_prog_CC="$CC" # Let the user override the test.
3803else
Martin v. Löwis11437992002-04-12 09:54:03 +00003804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3805for as_dir in $PATH
3806do
3807 IFS=$as_save_IFS
3808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003811 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 $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 +00003813 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003814 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815done
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
3819fi
3820fi
3821CC=$ac_cv_prog_CC
3822if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3824$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003825else
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3827$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003828fi
3829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 test -n "$CC" && break
3832 done
3833fi
3834if test -z "$CC"; then
3835 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003837do
3838 # Extract the first word of "$ac_prog", so it can be a program name with args.
3839set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3841$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003842if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003844else
3845 if test -n "$ac_ct_CC"; then
3846 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3847else
3848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3849for as_dir in $PATH
3850do
3851 IFS=$as_save_IFS
3852 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 $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 +00003857 break 2
3858 fi
3859done
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863fi
3864fi
3865ac_ct_CC=$ac_cv_prog_ac_ct_CC
3866if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3868$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003869else
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3871$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003872fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 test -n "$ac_ct_CC" && break
3876done
Michael W. Hudson54241132001-12-07 15:38:26 +00003877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 if test "x$ac_ct_CC" = x; then
3879 CC=""
3880 else
3881 case $cross_compiling:$ac_tool_warned in
3882yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885ac_tool_warned=yes ;;
3886esac
3887 CC=$ac_ct_CC
3888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003889fi
3890
3891fi
3892
3893
Matthias Kloseb9621712010-04-24 17:59:49 +00003894test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003896as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003897See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003898
3899# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003900$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3901set X $ac_compile
3902ac_compiler=$2
3903for ac_option in --version -v -V -qversion; do
3904 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905case "(($ac_try" in
3906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3907 *) ac_try_echo=$ac_try;;
3908esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003909eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3910$as_echo "$ac_try_echo"; } >&5
3911 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003912 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003913 if test -s conftest.err; then
3914 sed '10a\
3915... rest of stderr output deleted ...
3916 10q' conftest.err >conftest.er1
3917 cat conftest.er1 >&5
3918 fi
3919 rm -f conftest.er1 conftest.err
3920 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3921 test $ac_status = 0; }
3922done
Martin v. Löwis11437992002-04-12 09:54:03 +00003923
Matthias Kloseb9621712010-04-24 17:59:49 +00003924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003925/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003926
Martin v. Löwis11437992002-04-12 09:54:03 +00003927int
3928main ()
3929{
3930
3931 ;
3932 return 0;
3933}
3934_ACEOF
3935ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003936ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003937# Try to create an executable without -o first, disregard a.out.
3938# It will help us diagnose broken compilers, and finding out an intuition
3939# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3941$as_echo_n "checking whether the C compiler works... " >&6; }
3942ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3943
3944# The possible output files:
3945ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947ac_rmfiles=
3948for ac_file in $ac_files
3949do
3950 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3953 esac
3954done
3955rm -f $ac_rmfiles
3956
Matthias Kloseb9621712010-04-24 17:59:49 +00003957if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958case "(($ac_try" in
3959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3960 *) ac_try_echo=$ac_try;;
3961esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3963$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003965 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3967 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3969# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3970# in a Makefile. We should not override ac_cv_exeext if it was cached,
3971# so that the user can short-circuit this test for compilers unknown to
3972# Autoconf.
3973for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003974do
3975 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003976 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003978 ;;
3979 [ab].out )
3980 # We found the default executable, but exeext='' is most
3981 # certainly right.
3982 break;;
3983 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 then :; else
3986 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3987 fi
3988 # We set ac_cv_exeext here because the later test for it is not
3989 # safe: cross compilers may not add the suffix if given an `-o'
3990 # argument, so we may need to know it at that point already.
3991 # Even if this section looks crufty: it has the advantage of
3992 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993 break;;
3994 * )
3995 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003996 esac
3997done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998test "$ac_cv_exeext" = no && ac_cv_exeext=
3999
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004000else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001 ac_file=''
4002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004003if test -z "$ac_file"; then :
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4005$as_echo "no" >&6; }
4006$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004007sed 's/^/| /' conftest.$ac_ext >&5
4008
Matthias Kloseb9621712010-04-24 17:59:49 +00004009{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004011as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004012See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004013else
4014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4015$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4018$as_echo_n "checking for C compiler default output file name... " >&6; }
4019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4020$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004022
Matthias Kloseb9621712010-04-24 17:59:49 +00004023rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004024ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4026$as_echo_n "checking for suffix of executables... " >&6; }
4027if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028case "(($ac_try" in
4029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4030 *) ac_try_echo=$ac_try;;
4031esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4033$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004034 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004035 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4037 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4039# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4040# work properly (i.e., refer to `conftest.exe'), while it won't with
4041# `rm'.
4042for ac_file in conftest.exe conftest conftest.*; do
4043 test -f "$ac_file" || continue
4044 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004045 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4047 break;;
4048 * ) break;;
4049 esac
4050done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004051else
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004054as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004055See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004057rm -f conftest conftest$ac_cv_exeext
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4059$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004060
4061rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004062EXEEXT=$ac_cv_exeext
4063ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4065/* end confdefs.h. */
4066#include <stdio.h>
4067int
4068main ()
4069{
4070FILE *f = fopen ("conftest.out", "w");
4071 return ferror (f) || fclose (f) != 0;
4072
4073 ;
4074 return 0;
4075}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004077ac_clean_files="$ac_clean_files conftest.out"
4078# Check that the compiler produces executables we can run. If not, either
4079# the compiler is broken, or we cross compile.
4080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4081$as_echo_n "checking whether we are cross compiling... " >&6; }
4082if test "$cross_compiling" != yes; then
4083 { { ac_try="$ac_link"
4084case "(($ac_try" in
4085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4086 *) ac_try_echo=$ac_try;;
4087esac
4088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4089$as_echo "$ac_try_echo"; } >&5
4090 (eval "$ac_link") 2>&5
4091 ac_status=$?
4092 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4093 test $ac_status = 0; }
4094 if { ac_try='./conftest$ac_cv_exeext'
4095 { { case "(($ac_try" in
4096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4097 *) ac_try_echo=$ac_try;;
4098esac
4099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4100$as_echo "$ac_try_echo"; } >&5
4101 (eval "$ac_try") 2>&5
4102 ac_status=$?
4103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4104 test $ac_status = 0; }; }; then
4105 cross_compiling=no
4106 else
4107 if test "$cross_compiling" = maybe; then
4108 cross_compiling=yes
4109 else
4110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004112as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004113If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004114See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 fi
4116 fi
4117fi
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4119$as_echo "$cross_compiling" >&6; }
4120
4121rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4122ac_clean_files=$ac_clean_files_save
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4124$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004125if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 $as_echo_n "(cached) " >&6
4127else
4128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004129/* end confdefs.h. */
4130
4131int
4132main ()
4133{
4134
4135 ;
4136 return 0;
4137}
4138_ACEOF
4139rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004140if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141case "(($ac_try" in
4142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143 *) ac_try_echo=$ac_try;;
4144esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151 for ac_file in conftest.o conftest.obj conftest.*; do
4152 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004153 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4156 break;;
4157 esac
4158done
4159else
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004161sed 's/^/| /' conftest.$ac_ext >&5
4162
Matthias Kloseb9621712010-04-24 17:59:49 +00004163{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004165as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004166See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004167fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004168rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4171$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004172OBJEXT=$ac_cv_objext
4173ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4175$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004176if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004178else
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004181
Martin v. Löwis11437992002-04-12 09:54:03 +00004182int
4183main ()
4184{
4185#ifndef __GNUC__
4186 choke me
4187#endif
4188
4189 ;
4190 return 0;
4191}
4192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004193if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004194 ac_compiler_gnu=yes
4195else
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004199ac_cv_c_compiler_gnu=$ac_compiler_gnu
4200
4201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4203$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4204if test $ac_compiler_gnu = yes; then
4205 GCC=yes
4206else
4207 GCC=
4208fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004209ac_test_CFLAGS=${CFLAGS+set}
4210ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4212$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004213if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004215else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216 ac_save_c_werror_flag=$ac_c_werror_flag
4217 ac_c_werror_flag=yes
4218 ac_cv_prog_cc_g=no
4219 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004222
Martin v. Löwis11437992002-04-12 09:54:03 +00004223int
4224main ()
4225{
4226
4227 ;
4228 return 0;
4229}
4230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004231if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004232 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233else
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 CFLAGS=""
4235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236/* end confdefs.h. */
4237
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247
Matthias Kloseb9621712010-04-24 17:59:49 +00004248else
4249 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252/* end confdefs.h. */
4253
4254int
4255main ()
4256{
4257
4258 ;
4259 return 0;
4260}
4261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004262if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4270 ac_c_werror_flag=$ac_save_c_werror_flag
4271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4273$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004274if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004276elif test $ac_cv_prog_cc_g = yes; then
4277 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004278 CFLAGS="-g -O2"
4279 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281 fi
4282else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283 if test "$GCC" = yes; then
4284 CFLAGS="-O2"
4285 else
4286 CFLAGS=
4287 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4290$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004291if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004293else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004295ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004297/* end confdefs.h. */
4298#include <stdarg.h>
4299#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004300struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004301/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4302struct buf { int x; };
4303FILE * (*rcsopen) (struct buf *, struct stat *, int);
4304static char *e (p, i)
4305 char **p;
4306 int i;
4307{
4308 return p[i];
4309}
4310static char *f (char * (*g) (char **, int), char **p, ...)
4311{
4312 char *s;
4313 va_list v;
4314 va_start (v,p);
4315 s = g (p, va_arg (v,int));
4316 va_end (v);
4317 return s;
4318}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004319
4320/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4321 function prototypes and stuff, but not '\xHH' hex character constants.
4322 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004324 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4325 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004327int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4330 inside strings and character constants. */
4331#define FOO(x) 'x'
4332int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4333
Skip Montanaro6dead952003-09-25 14:50:04 +00004334int test (int i, double x);
4335struct s1 {int (*f) (int a);};
4336struct s2 {int (*f) (double a);};
4337int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4338int argc;
4339char **argv;
4340int
4341main ()
4342{
4343return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4344 ;
4345 return 0;
4346}
4347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4349 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004350do
4351 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355rm -f core conftest.err conftest.$ac_objext
4356 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004357done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004359CC=$ac_save_CC
4360
4361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362# AC_CACHE_VAL
4363case "x$ac_cv_prog_cc_c89" in
4364 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4366$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4369$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004370 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4373$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004374esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004375if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004376
Matthias Kloseb9621712010-04-24 17:59:49 +00004377fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004378
Martin v. Löwis11437992002-04-12 09:54:03 +00004379ac_ext=c
4380ac_cpp='$CPP $CPPFLAGS'
4381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4383ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004385ac_ext=c
4386ac_cpp='$CPP $CPPFLAGS'
4387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4389ac_compiler_gnu=$ac_cv_c_compiler_gnu
4390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4391$as_echo_n "checking how to run the C preprocessor... " >&6; }
4392# On Suns, sometimes $CPP names a directory.
4393if test -n "$CPP" && test -d "$CPP"; then
4394 CPP=
4395fi
4396if test -z "$CPP"; then
4397 if ${ac_cv_prog_CPP+:} false; then :
4398 $as_echo_n "(cached) " >&6
4399else
4400 # Double quotes because CPP needs to be expanded
4401 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4402 do
4403 ac_preproc_ok=false
4404for ac_c_preproc_warn_flag in '' yes
4405do
4406 # Use a header file that comes with gcc, so configuring glibc
4407 # with a fresh cross-compiler works.
4408 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4409 # <limits.h> exists even on freestanding compilers.
4410 # On the NeXT, cc -E runs the code through the compiler's parser,
4411 # not just through cpp. "Syntax error" is here to catch this case.
4412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4413/* end confdefs.h. */
4414#ifdef __STDC__
4415# include <limits.h>
4416#else
4417# include <assert.h>
4418#endif
4419 Syntax error
4420_ACEOF
4421if ac_fn_c_try_cpp "$LINENO"; then :
4422
4423else
4424 # Broken: fails on valid input.
4425continue
4426fi
4427rm -f conftest.err conftest.i conftest.$ac_ext
4428
4429 # OK, works on sane cases. Now check whether nonexistent headers
4430 # can be detected and how.
4431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4432/* end confdefs.h. */
4433#include <ac_nonexistent.h>
4434_ACEOF
4435if ac_fn_c_try_cpp "$LINENO"; then :
4436 # Broken: success on invalid input.
4437continue
4438else
4439 # Passes both tests.
4440ac_preproc_ok=:
4441break
4442fi
4443rm -f conftest.err conftest.i conftest.$ac_ext
4444
4445done
4446# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4447rm -f conftest.i conftest.err conftest.$ac_ext
4448if $ac_preproc_ok; then :
4449 break
4450fi
4451
4452 done
4453 ac_cv_prog_CPP=$CPP
4454
4455fi
4456 CPP=$ac_cv_prog_CPP
4457else
4458 ac_cv_prog_CPP=$CPP
4459fi
4460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4461$as_echo "$CPP" >&6; }
4462ac_preproc_ok=false
4463for ac_c_preproc_warn_flag in '' yes
4464do
4465 # Use a header file that comes with gcc, so configuring glibc
4466 # with a fresh cross-compiler works.
4467 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4468 # <limits.h> exists even on freestanding compilers.
4469 # On the NeXT, cc -E runs the code through the compiler's parser,
4470 # not just through cpp. "Syntax error" is here to catch this case.
4471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4472/* end confdefs.h. */
4473#ifdef __STDC__
4474# include <limits.h>
4475#else
4476# include <assert.h>
4477#endif
4478 Syntax error
4479_ACEOF
4480if ac_fn_c_try_cpp "$LINENO"; then :
4481
4482else
4483 # Broken: fails on valid input.
4484continue
4485fi
4486rm -f conftest.err conftest.i conftest.$ac_ext
4487
4488 # OK, works on sane cases. Now check whether nonexistent headers
4489 # can be detected and how.
4490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491/* end confdefs.h. */
4492#include <ac_nonexistent.h>
4493_ACEOF
4494if ac_fn_c_try_cpp "$LINENO"; then :
4495 # Broken: success on invalid input.
4496continue
4497else
4498 # Passes both tests.
4499ac_preproc_ok=:
4500break
4501fi
4502rm -f conftest.err conftest.i conftest.$ac_ext
4503
4504done
4505# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4506rm -f conftest.i conftest.err conftest.$ac_ext
4507if $ac_preproc_ok; then :
4508
4509else
4510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4512as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4513See \`config.log' for more details" "$LINENO" 5; }
4514fi
4515
4516ac_ext=c
4517ac_cpp='$CPP $CPPFLAGS'
4518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4520ac_compiler_gnu=$ac_cv_c_compiler_gnu
4521
4522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4523$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4524if ${ac_cv_path_GREP+:} false; then :
4525 $as_echo_n "(cached) " >&6
4526else
4527 if test -z "$GREP"; then
4528 ac_path_GREP_found=false
4529 # Loop through the user's path and test for each of PROGNAME-LIST
4530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4531for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4532do
4533 IFS=$as_save_IFS
4534 test -z "$as_dir" && as_dir=.
4535 for ac_prog in grep ggrep; do
4536 for ac_exec_ext in '' $ac_executable_extensions; do
4537 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4538 as_fn_executable_p "$ac_path_GREP" || continue
4539# Check for GNU ac_path_GREP and select it if it is found.
4540 # Check for GNU $ac_path_GREP
4541case `"$ac_path_GREP" --version 2>&1` in
4542*GNU*)
4543 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4544*)
4545 ac_count=0
4546 $as_echo_n 0123456789 >"conftest.in"
4547 while :
4548 do
4549 cat "conftest.in" "conftest.in" >"conftest.tmp"
4550 mv "conftest.tmp" "conftest.in"
4551 cp "conftest.in" "conftest.nl"
4552 $as_echo 'GREP' >> "conftest.nl"
4553 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4554 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4555 as_fn_arith $ac_count + 1 && ac_count=$as_val
4556 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4557 # Best one so far, save it but keep looking for a better one
4558 ac_cv_path_GREP="$ac_path_GREP"
4559 ac_path_GREP_max=$ac_count
4560 fi
4561 # 10*(2^10) chars as input seems more than enough
4562 test $ac_count -gt 10 && break
4563 done
4564 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4565esac
4566
4567 $ac_path_GREP_found && break 3
4568 done
4569 done
4570 done
4571IFS=$as_save_IFS
4572 if test -z "$ac_cv_path_GREP"; then
4573 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4574 fi
4575else
4576 ac_cv_path_GREP=$GREP
4577fi
4578
4579fi
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4581$as_echo "$ac_cv_path_GREP" >&6; }
4582 GREP="$ac_cv_path_GREP"
4583
4584
Łukasz Langaa785c872016-09-09 17:37:37 -07004585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4586$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4587if ${ac_cv_path_SED+:} false; then :
4588 $as_echo_n "(cached) " >&6
4589else
4590 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4591 for ac_i in 1 2 3 4 5 6 7; do
4592 ac_script="$ac_script$as_nl$ac_script"
4593 done
4594 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4595 { ac_script=; unset ac_script;}
4596 if test -z "$SED"; then
4597 ac_path_SED_found=false
4598 # Loop through the user's path and test for each of PROGNAME-LIST
4599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600for as_dir in $PATH
4601do
4602 IFS=$as_save_IFS
4603 test -z "$as_dir" && as_dir=.
4604 for ac_prog in sed gsed; do
4605 for ac_exec_ext in '' $ac_executable_extensions; do
4606 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4607 as_fn_executable_p "$ac_path_SED" || continue
4608# Check for GNU ac_path_SED and select it if it is found.
4609 # Check for GNU $ac_path_SED
4610case `"$ac_path_SED" --version 2>&1` in
4611*GNU*)
4612 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4613*)
4614 ac_count=0
4615 $as_echo_n 0123456789 >"conftest.in"
4616 while :
4617 do
4618 cat "conftest.in" "conftest.in" >"conftest.tmp"
4619 mv "conftest.tmp" "conftest.in"
4620 cp "conftest.in" "conftest.nl"
4621 $as_echo '' >> "conftest.nl"
4622 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4623 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4624 as_fn_arith $ac_count + 1 && ac_count=$as_val
4625 if test $ac_count -gt ${ac_path_SED_max-0}; then
4626 # Best one so far, save it but keep looking for a better one
4627 ac_cv_path_SED="$ac_path_SED"
4628 ac_path_SED_max=$ac_count
4629 fi
4630 # 10*(2^10) chars as input seems more than enough
4631 test $ac_count -gt 10 && break
4632 done
4633 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4634esac
4635
4636 $ac_path_SED_found && break 3
4637 done
4638 done
4639 done
4640IFS=$as_save_IFS
4641 if test -z "$ac_cv_path_SED"; then
4642 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4643 fi
4644else
4645 ac_cv_path_SED=$SED
4646fi
4647
4648fi
4649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4650$as_echo "$ac_cv_path_SED" >&6; }
4651 SED="$ac_cv_path_SED"
4652 rm -f conftest.sed
4653
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004654
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004655
4656
Matthias Kloseb9621712010-04-24 17:59:49 +00004657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4658$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004660# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004661if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004662 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
4664 case $withval in
4665 no) with_cxx_main=no
4666 MAINCC='$(CC)';;
4667 yes) with_cxx_main=yes
4668 MAINCC='$(CXX)';;
4669 *) with_cxx_main=yes
4670 MAINCC=$withval
4671 if test -z "$CXX"
4672 then
4673 CXX=$withval
4674 fi;;
4675 esac
4676else
4677
4678 with_cxx_main=no
4679 MAINCC='$(CC)'
4680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004681fi
4682
Matthias Kloseb9621712010-04-24 17:59:49 +00004683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4684$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004685
4686preset_cxx="$CXX"
4687if test -z "$CXX"
4688then
4689 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004690 gcc) if test -n "$ac_tool_prefix"; then
4691 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4692set dummy ${ac_tool_prefix}g++; ac_word=$2
4693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4694$as_echo_n "checking for $ac_word... " >&6; }
4695if ${ac_cv_path_CXX+:} false; then :
4696 $as_echo_n "(cached) " >&6
4697else
4698 case $CXX in
4699 [\\/]* | ?:[\\/]*)
4700 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4701 ;;
4702 *)
4703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4704for as_dir in notfound
4705do
4706 IFS=$as_save_IFS
4707 test -z "$as_dir" && as_dir=.
4708 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004710 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4712 break 2
4713 fi
4714done
4715 done
4716IFS=$as_save_IFS
4717
4718 ;;
4719esac
4720fi
4721CXX=$ac_cv_path_CXX
4722if test -n "$CXX"; then
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4724$as_echo "$CXX" >&6; }
4725else
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4727$as_echo "no" >&6; }
4728fi
4729
4730
4731fi
4732if test -z "$ac_cv_path_CXX"; then
4733 ac_pt_CXX=$CXX
4734 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004735set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4737$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004738if ${ac_cv_path_ac_pt_CXX+:} false; then :
4739 $as_echo_n "(cached) " >&6
4740else
4741 case $ac_pt_CXX in
4742 [\\/]* | ?:[\\/]*)
4743 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4744 ;;
4745 *)
4746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in notfound
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
4757done
4758 done
4759IFS=$as_save_IFS
4760
4761 ;;
4762esac
4763fi
4764ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4765if test -n "$ac_pt_CXX"; then
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4767$as_echo "$ac_pt_CXX" >&6; }
4768else
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770$as_echo "no" >&6; }
4771fi
4772
4773 if test "x$ac_pt_CXX" = x; then
4774 CXX="g++"
4775 else
4776 case $cross_compiling:$ac_tool_warned in
4777yes:)
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4779$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4780ac_tool_warned=yes ;;
4781esac
4782 CXX=$ac_pt_CXX
4783 fi
4784else
4785 CXX="$ac_cv_path_CXX"
4786fi
4787 ;;
4788 cc) if test -n "$ac_tool_prefix"; then
4789 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4790set dummy ${ac_tool_prefix}c++; ac_word=$2
4791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4792$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004793if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795else
4796 case $CXX in
4797 [\\/]* | ?:[\\/]*)
4798 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4799 ;;
4800 *)
4801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in notfound
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 break 2
4811 fi
4812done
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004814IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816 ;;
4817esac
4818fi
4819CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4822$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004823else
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4825$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004827
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828
4829fi
4830if test -z "$ac_cv_path_CXX"; then
4831 ac_pt_CXX=$CXX
4832 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004841 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 +00004842 ;;
4843 *)
4844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845for as_dir in notfound
4846do
4847 IFS=$as_save_IFS
4848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004853 break 2
4854 fi
4855done
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004857IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004858
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004859 ;;
4860esac
4861fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004862ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4863if test -n "$ac_pt_CXX"; then
4864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4865$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004866else
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004870
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004871 if test "x$ac_pt_CXX" = x; then
4872 CXX="c++"
4873 else
4874 case $cross_compiling:$ac_tool_warned in
4875yes:)
4876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4878ac_tool_warned=yes ;;
4879esac
4880 CXX=$ac_pt_CXX
4881 fi
4882else
4883 CXX="$ac_cv_path_CXX"
4884fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004885 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004886 clang|*/clang) if test -n "$ac_tool_prefix"; then
4887 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4888set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890$as_echo_n "checking for $ac_word... " >&6; }
4891if ${ac_cv_path_CXX+:} false; then :
4892 $as_echo_n "(cached) " >&6
4893else
4894 case $CXX in
4895 [\\/]* | ?:[\\/]*)
4896 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4897 ;;
4898 *)
4899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900for as_dir in notfound
4901do
4902 IFS=$as_save_IFS
4903 test -z "$as_dir" && as_dir=.
4904 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004906 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908 break 2
4909 fi
4910done
4911 done
4912IFS=$as_save_IFS
4913
Ned Deilycbfb9a52012-06-23 16:02:19 -07004914 ;;
4915esac
4916fi
4917CXX=$ac_cv_path_CXX
4918if test -n "$CXX"; then
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4920$as_echo "$CXX" >&6; }
4921else
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923$as_echo "no" >&6; }
4924fi
4925
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004926
4927fi
4928if test -z "$ac_cv_path_CXX"; then
4929 ac_pt_CXX=$CXX
4930 # Extract the first word of "clang++", so it can be a program name with args.
4931set dummy clang++; ac_word=$2
4932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4933$as_echo_n "checking for $ac_word... " >&6; }
4934if ${ac_cv_path_ac_pt_CXX+:} false; then :
4935 $as_echo_n "(cached) " >&6
4936else
4937 case $ac_pt_CXX in
4938 [\\/]* | ?:[\\/]*)
4939 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4940 ;;
4941 *)
4942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4943for as_dir in notfound
4944do
4945 IFS=$as_save_IFS
4946 test -z "$as_dir" && as_dir=.
4947 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004949 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4951 break 2
4952 fi
4953done
4954 done
4955IFS=$as_save_IFS
4956
4957 ;;
4958esac
4959fi
4960ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4961if test -n "$ac_pt_CXX"; then
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4963$as_echo "$ac_pt_CXX" >&6; }
4964else
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4966$as_echo "no" >&6; }
4967fi
4968
4969 if test "x$ac_pt_CXX" = x; then
4970 CXX="clang++"
4971 else
4972 case $cross_compiling:$ac_tool_warned in
4973yes:)
4974{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4975$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4976ac_tool_warned=yes ;;
4977esac
4978 CXX=$ac_pt_CXX
4979 fi
4980else
4981 CXX="$ac_cv_path_CXX"
4982fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004983 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004984 icc|*/icc) if test -n "$ac_tool_prefix"; then
4985 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4986set dummy ${ac_tool_prefix}icpc; ac_word=$2
4987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4988$as_echo_n "checking for $ac_word... " >&6; }
4989if ${ac_cv_path_CXX+:} false; then :
4990 $as_echo_n "(cached) " >&6
4991else
4992 case $CXX in
4993 [\\/]* | ?:[\\/]*)
4994 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4995 ;;
4996 *)
4997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in notfound
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
5002 for ac_exec_ext in '' $ac_executable_extensions; do
5003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5004 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5006 break 2
5007 fi
5008done
5009 done
5010IFS=$as_save_IFS
5011
5012 ;;
5013esac
5014fi
5015CXX=$ac_cv_path_CXX
5016if test -n "$CXX"; then
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5018$as_echo "$CXX" >&6; }
5019else
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
5022fi
5023
5024
5025fi
5026if test -z "$ac_cv_path_CXX"; then
5027 ac_pt_CXX=$CXX
5028 # Extract the first word of "icpc", so it can be a program name with args.
5029set dummy icpc; ac_word=$2
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031$as_echo_n "checking for $ac_word... " >&6; }
5032if ${ac_cv_path_ac_pt_CXX+:} false; then :
5033 $as_echo_n "(cached) " >&6
5034else
5035 case $ac_pt_CXX in
5036 [\\/]* | ?:[\\/]*)
5037 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5038 ;;
5039 *)
5040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in notfound
5042do
5043 IFS=$as_save_IFS
5044 test -z "$as_dir" && as_dir=.
5045 for ac_exec_ext in '' $ac_executable_extensions; do
5046 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5047 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5049 break 2
5050 fi
5051done
5052 done
5053IFS=$as_save_IFS
5054
5055 ;;
5056esac
5057fi
5058ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5059if test -n "$ac_pt_CXX"; then
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5061$as_echo "$ac_pt_CXX" >&6; }
5062else
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064$as_echo "no" >&6; }
5065fi
5066
5067 if test "x$ac_pt_CXX" = x; then
5068 CXX="icpc"
5069 else
5070 case $cross_compiling:$ac_tool_warned in
5071yes:)
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5073$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5074ac_tool_warned=yes ;;
5075esac
5076 CXX=$ac_pt_CXX
5077 fi
5078else
5079 CXX="$ac_cv_path_CXX"
5080fi
5081 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005082 esac
5083 if test "$CXX" = "notfound"
5084 then
5085 CXX=""
5086 fi
5087fi
5088if test -z "$CXX"
5089then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005090 if test -n "$ac_tool_prefix"; then
5091 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5092 do
5093 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005097if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099else
5100 if test -n "$CXX"; then
5101 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5102else
5103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005110 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005112 break 2
5113 fi
5114done
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005116IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117
5118fi
5119fi
5120CXX=$ac_cv_prog_CXX
5121if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5123$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124else
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5126$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005127fi
5128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005129
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005130 test -n "$CXX" && break
5131 done
5132fi
5133if test -z "$CXX"; then
5134 ac_ct_CXX=$CXX
5135 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5136do
5137 # Extract the first word of "$ac_prog", so it can be a program name with args.
5138set dummy $ac_prog; ac_word=$2
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140$as_echo_n "checking for $ac_word... " >&6; }
5141if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5142 $as_echo_n "(cached) " >&6
5143else
5144 if test -n "$ac_ct_CXX"; then
5145 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5146else
5147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5148for as_dir in $PATH
5149do
5150 IFS=$as_save_IFS
5151 test -z "$as_dir" && as_dir=.
5152 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005154 ac_cv_prog_ac_ct_CXX="$ac_prog"
5155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5156 break 2
5157 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005158done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005159 done
5160IFS=$as_save_IFS
5161
5162fi
5163fi
5164ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5165if test -n "$ac_ct_CXX"; then
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5167$as_echo "$ac_ct_CXX" >&6; }
5168else
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170$as_echo "no" >&6; }
5171fi
5172
5173
5174 test -n "$ac_ct_CXX" && break
5175done
5176
5177 if test "x$ac_ct_CXX" = x; then
5178 CXX="notfound"
5179 else
5180 case $cross_compiling:$ac_tool_warned in
5181yes:)
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5184ac_tool_warned=yes ;;
5185esac
5186 CXX=$ac_ct_CXX
5187 fi
5188fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005189
5190 if test "$CXX" = "notfound"
5191 then
5192 CXX=""
5193 fi
5194fi
5195if test "$preset_cxx" != "$CXX"
5196then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005197 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005198
5199 By default, distutils will build C++ extension modules with \"$CXX\".
5200 If this is not intended, then set CXX on the configure command line.
5201 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005202$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203
5204 By default, distutils will build C++ extension modules with \"$CXX\".
5205 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005206 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005207fi
5208
5209
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005210MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5211
5212
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5214$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5215cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef bfin
5217#undef cris
5218#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005219#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005220#undef hppa
5221#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005222#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005223#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005224#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005225#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005227#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005228 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005229#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230# if defined(__x86_64__) && defined(__LP64__)
5231 x86_64-linux-gnu
5232# elif defined(__x86_64__) && defined(__ILP32__)
5233 x86_64-linux-gnux32
5234# elif defined(__i386__)
5235 i386-linux-gnu
5236# elif defined(__aarch64__) && defined(__AARCH64EL__)
5237# if defined(__ILP32__)
5238 aarch64_ilp32-linux-gnu
5239# else
5240 aarch64-linux-gnu
5241# endif
5242# elif defined(__aarch64__) && defined(__AARCH64EB__)
5243# if defined(__ILP32__)
5244 aarch64_be_ilp32-linux-gnu
5245# else
5246 aarch64_be-linux-gnu
5247# endif
5248# elif defined(__alpha__)
5249 alpha-linux-gnu
5250# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5251# if defined(__ARMEL__)
5252 arm-linux-gnueabihf
5253# else
5254 armeb-linux-gnueabihf
5255# endif
5256# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5257# if defined(__ARMEL__)
5258 arm-linux-gnueabi
5259# else
5260 armeb-linux-gnueabi
5261# endif
5262# elif defined(__hppa__)
5263 hppa-linux-gnu
5264# elif defined(__ia64__)
5265 ia64-linux-gnu
5266# elif defined(__m68k__) && !defined(__mcoldfire__)
5267 m68k-linux-gnu
5268# elif defined(__mips_hard_float) && defined(_MIPSEL)
5269# if _MIPS_SIM == _ABIO32
5270 mipsel-linux-gnu
5271# elif _MIPS_SIM == _ABIN32
5272 mips64el-linux-gnuabin32
5273# elif _MIPS_SIM == _ABI64
5274 mips64el-linux-gnuabi64
5275# else
5276# error unknown platform triplet
5277# endif
5278# elif defined(__mips_hard_float)
5279# if _MIPS_SIM == _ABIO32
5280 mips-linux-gnu
5281# elif _MIPS_SIM == _ABIN32
5282 mips64-linux-gnuabin32
5283# elif _MIPS_SIM == _ABI64
5284 mips64-linux-gnuabi64
5285# else
5286# error unknown platform triplet
5287# endif
5288# elif defined(__or1k__)
5289 or1k-linux-gnu
5290# elif defined(__powerpc__) && defined(__SPE__)
5291 powerpc-linux-gnuspe
5292# elif defined(__powerpc64__)
5293# if defined(__LITTLE_ENDIAN__)
5294 powerpc64le-linux-gnu
5295# else
5296 powerpc64-linux-gnu
5297# endif
5298# elif defined(__powerpc__)
5299 powerpc-linux-gnu
5300# elif defined(__s390x__)
5301 s390x-linux-gnu
5302# elif defined(__s390__)
5303 s390-linux-gnu
5304# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5305 sh4-linux-gnu
5306# elif defined(__sparc__) && defined(__arch64__)
5307 sparc64-linux-gnu
5308# elif defined(__sparc__)
5309 sparc-linux-gnu
5310# else
5311# error unknown platform triplet
5312# endif
5313#elif defined(__FreeBSD_kernel__)
5314# if defined(__LP64__)
5315 x86_64-kfreebsd-gnu
5316# elif defined(__i386__)
5317 i386-kfreebsd-gnu
5318# else
5319# error unknown platform triplet
5320# endif
5321#elif defined(__gnu_hurd__)
5322 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005323#elif defined(__APPLE__)
5324 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325#else
5326# error unknown platform triplet
5327#endif
5328
5329EOF
5330
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005331if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5334$as_echo "$PLATFORM_TRIPLET" >&6; }
5335else
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5337$as_echo "none" >&6; }
5338fi
5339rm -f conftest.c conftest.out
5340
5341if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5342 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5343 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5344 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005345elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5346 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005347fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348
doko@ubuntu.com55532312016-06-14 08:55:19 +02005349if test x$MULTIARCH != x; then
5350 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5351fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005352
5353
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5355$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5356save_LDFLAGS="$LDFLAGS"
5357LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005358
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5360/* end confdefs.h. */
5361
5362int
5363main ()
5364{
5365
5366 ;
5367 return 0;
5368}
5369_ACEOF
5370if ac_fn_c_try_link "$LINENO"; then :
5371 NO_AS_NEEDED="-Wl,--no-as-needed"
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5373$as_echo "yes" >&6; }
5374else
5375 NO_AS_NEEDED=""
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5377$as_echo "no" >&6; }
5378fi
5379rm -f core conftest.err conftest.$ac_objext \
5380 conftest$ac_exeext conftest.$ac_ext
5381LDFLAGS="$save_LDFLAGS"
5382
5383
5384
5385# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386
Matthias Kloseb9621712010-04-24 17:59:49 +00005387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5388$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005389if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005390 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391else
5392 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5393 then ac_cv_path_EGREP="$GREP -E"
5394 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 # Loop through the user's path and test for each of PROGNAME-LIST
5398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5400do
5401 IFS=$as_save_IFS
5402 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 for ac_prog in egrep; do
5404 for ac_exec_ext in '' $ac_executable_extensions; do
5405 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005406 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005407# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408 # Check for GNU $ac_path_EGREP
5409case `"$ac_path_EGREP" --version 2>&1` in
5410*GNU*)
5411 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5412*)
5413 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 while :
5416 do
5417 cat "conftest.in" "conftest.in" >"conftest.tmp"
5418 mv "conftest.tmp" "conftest.in"
5419 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5422 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5425 # Best one so far, save it but keep looking for a better one
5426 ac_cv_path_EGREP="$ac_path_EGREP"
5427 ac_path_EGREP_max=$ac_count
5428 fi
5429 # 10*(2^10) chars as input seems more than enough
5430 test $ac_count -gt 10 && break
5431 done
5432 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5433esac
5434
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $ac_path_EGREP_found && break 3
5436 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005441 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 +00005442 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443else
5444 ac_cv_path_EGREP=$EGREP
5445fi
5446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447 fi
5448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5450$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005452
5453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5455$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005456if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 $as_echo_n "(cached) " >&6
5458else
5459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005460/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005461#include <stdlib.h>
5462#include <stdarg.h>
5463#include <string.h>
5464#include <float.h>
5465
5466int
5467main ()
5468{
5469
5470 ;
5471 return 0;
5472}
5473_ACEOF
5474if ac_fn_c_try_compile "$LINENO"; then :
5475 ac_cv_header_stdc=yes
5476else
5477 ac_cv_header_stdc=no
5478fi
5479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5480
5481if test $ac_cv_header_stdc = yes; then
5482 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5484/* end confdefs.h. */
5485#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005486
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005487_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005489 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005490
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005491else
Matthias Kloseb9621712010-04-24 17:59:49 +00005492 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005493fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005494rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495
Matthias Kloseb9621712010-04-24 17:59:49 +00005496fi
5497
5498if test $ac_cv_header_stdc = yes; then
5499 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#include <stdlib.h>
5503
5504_ACEOF
5505if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5506 $EGREP "free" >/dev/null 2>&1; then :
5507
5508else
5509 ac_cv_header_stdc=no
5510fi
5511rm -f conftest*
5512
5513fi
5514
5515if test $ac_cv_header_stdc = yes; then
5516 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5517 if test "$cross_compiling" = yes; then :
5518 :
5519else
5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h. */
5522#include <ctype.h>
5523#include <stdlib.h>
5524#if ((' ' & 0x0FF) == 0x020)
5525# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5526# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5527#else
5528# define ISLOWER(c) \
5529 (('a' <= (c) && (c) <= 'i') \
5530 || ('j' <= (c) && (c) <= 'r') \
5531 || ('s' <= (c) && (c) <= 'z'))
5532# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5533#endif
5534
5535#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5536int
5537main ()
5538{
5539 int i;
5540 for (i = 0; i < 256; i++)
5541 if (XOR (islower (i), ISLOWER (i))
5542 || toupper (i) != TOUPPER (i))
5543 return 2;
5544 return 0;
5545}
5546_ACEOF
5547if ac_fn_c_try_run "$LINENO"; then :
5548
5549else
5550 ac_cv_header_stdc=no
5551fi
5552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5553 conftest.$ac_objext conftest.beam conftest.$ac_ext
5554fi
5555
5556fi
5557fi
5558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5559$as_echo "$ac_cv_header_stdc" >&6; }
5560if test $ac_cv_header_stdc = yes; then
5561
5562$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5563
5564fi
5565
5566# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5567for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5568 inttypes.h stdint.h unistd.h
5569do :
5570 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5571ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5572"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005573if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 cat >>confdefs.h <<_ACEOF
5575#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5576_ACEOF
5577
5578fi
5579
5580done
5581
5582
5583
5584 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 +02005585if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005586 MINIX=yes
5587else
5588 MINIX=
5589fi
5590
5591
5592 if test "$MINIX" = yes; then
5593
5594$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5595
5596
5597$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5598
5599
5600$as_echo "#define _MINIX 1" >>confdefs.h
5601
5602 fi
5603
5604
5605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5606$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005607if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005608 $as_echo_n "(cached) " >&6
5609else
5610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5611/* end confdefs.h. */
5612
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005613# define __EXTENSIONS__ 1
5614 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005615int
5616main ()
5617{
5618
5619 ;
5620 return 0;
5621}
5622_ACEOF
5623if ac_fn_c_try_compile "$LINENO"; then :
5624 ac_cv_safe_to_define___extensions__=yes
5625else
5626 ac_cv_safe_to_define___extensions__=no
5627fi
5628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5629fi
5630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5631$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5632 test $ac_cv_safe_to_define___extensions__ = yes &&
5633 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5634
5635 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5636
5637 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5638
5639 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5640
5641 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5642
5643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
Xavier de Gaye95750b12016-07-09 11:05:42 +02005645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5646$as_echo_n "checking for the Android API level... " >&6; }
5647cat >> conftest.c <<EOF
5648#ifdef __ANDROID__
5649#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005650android_api = __ANDROID_API__
5651arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005652#else
5653#error not Android
5654#endif
5655EOF
5656
5657if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005658 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5659 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5661$as_echo "$ANDROID_API_LEVEL" >&6; }
5662
5663cat >>confdefs.h <<_ACEOF
5664#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5665_ACEOF
5666
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005667
5668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5669$as_echo_n "checking for the Android arm ABI... " >&6; }
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5671$as_echo "$_arm_arch" >&6; }
5672 if test "$_arm_arch" = 7; then
5673 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5674 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5675 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005676else
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5678$as_echo "not Android" >&6; }
5679fi
5680rm -f conftest.c conftest.out
5681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682# Check for unsupported systems
5683case $ac_sys_system/$ac_sys_release in
5684atheos*|Linux*/1*)
5685 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5686 echo See README for details.
5687 exit 1;;
5688esac
5689
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5692$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005695if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 withval=$with_suffix;
5697 case $withval in
5698 no) EXEEXT=;;
5699 yes) EXEEXT=.exe;;
5700 *) EXEEXT=$withval;;
5701 esac
5702fi
5703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5705$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
5707# Test whether we're running on a non-case-sensitive system, in which
5708# case we give a warning if no ext is given
5709
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5711$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712if test ! -d CaseSensitiveTestDir; then
5713mkdir CaseSensitiveTestDir
5714fi
5715
5716if test -d casesensitivetestdir
5717then
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5719$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 BUILDEXEEXT=.exe
5721else
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5723$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 BUILDEXEEXT=$EXEEXT
5725fi
5726rmdir CaseSensitiveTestDir
5727
5728case $MACHDEP in
5729bsdos*)
5730 case $CC in
5731 gcc) CC="$CC -D_HAVE_BSDI";;
5732 esac;;
5733esac
5734
5735case $ac_sys_system in
5736hp*|HP*)
5737 case $CC in
5738 cc|*/cc) CC="$CC -Ae";;
5739 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740esac
5741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
Matthias Kloseb9621712010-04-24 17:59:49 +00005743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5744$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745if test -z "$LIBRARY"
5746then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005747 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5750$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
5752# LDLIBRARY is the name of the library to link against (as opposed to the
5753# name of the library into which to insert object files). BLDLIBRARY is also
5754# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5755# is blank as the main program is not linked directly against LDLIBRARY.
5756# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5757# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5758# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5759# DLLLIBRARY is the shared (i.e., DLL) library.
5760#
5761# RUNSHARED is used to run shared python without installed libraries
5762#
5763# INSTSONAME is the name of the shared library that will be use to install
5764# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005765#
5766# LDVERSION is the shared library version number, normally the Python version
5767# with the ABI build flags appended.
5768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770
5771
5772
5773
5774
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776LDLIBRARY="$LIBRARY"
5777BLDLIBRARY='$(LDLIBRARY)'
5778INSTSONAME='$(LDLIBRARY)'
5779DLLLIBRARY=''
5780LDLIBRARYDIR=''
5781RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005782LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784# LINKCC is the command that links the python executable -- default is $(CC).
5785# If CXX is set, and if it is needed to link a main function that was
5786# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5787# python might then depend on the C++ runtime
5788# This is altered for AIX in order to build the export list before
5789# linking.
5790
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5792$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793if test -z "$LINKCC"
5794then
5795 LINKCC='$(PURIFY) $(MAINCC)'
5796 case $ac_sys_system in
5797 AIX*)
5798 exp_extra="\"\""
5799 if test $ac_sys_release -ge 5 -o \
5800 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5801 exp_extra="."
5802 fi
5803 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 QNX*)
5805 # qcc must be used because the other compilers do not
5806 # support -N.
5807 LINKCC=qcc;;
5808 esac
5809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5811$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812
5813# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5814# make sure we default having it set to "no": this is used by
5815# distutils.unixccompiler to know if it should add --enable-new-dtags
5816# to linker command lines, and failing to detect GNU ld simply results
5817# in the same bahaviour as before.
5818
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5820$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821ac_prog=ld
5822if test "$GCC" = yes; then
5823 ac_prog=`$CC -print-prog-name=ld`
5824fi
5825case `"$ac_prog" -V 2>&1 < /dev/null` in
5826 *GNU*)
5827 GNULD=yes;;
5828 *)
5829 GNULD=no;;
5830esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5832$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5835$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005837if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838 enableval=$enable_shared;
5839fi
5840
5841
5842if test -z "$enable_shared"
5843then
5844 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005845 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 enable_shared="yes";;
5847 *)
5848 enable_shared="no";;
5849 esac
5850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5852$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5855$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005857if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858 enableval=$enable_profiling;
5859fi
5860
5861if test "x$enable_profiling" = xyes; then
5862 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005863 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865/* end confdefs.h. */
5866int main() { return 0; }
5867_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868if ac_fn_c_try_link "$LINENO"; then :
5869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005873rm -f core conftest.err conftest.$ac_objext \
5874 conftest$ac_exeext conftest.$ac_ext
5875 CC="$ac_save_cc"
5876else
5877 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5880$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882if test "x$enable_profiling" = xyes; then
5883 BASECFLAGS="-pg $BASECFLAGS"
5884 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
5886
Matthias Kloseb9621712010-04-24 17:59:49 +00005887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5888$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
5890# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5891# library that we build, but we do not want to link against it (we
5892# will find it with a -framework option). For this reason there is an
5893# extra variable BLDLIBRARY against which Python and the extension
5894# modules are linked, BLDLIBRARY. This is normally the same as
5895# LDLIBRARY, but empty for MacOSX framework builds.
5896if test "$enable_framework"
5897then
5898 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005899 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 BLDLIBRARY=''
5901else
5902 BLDLIBRARY='$(LDLIBRARY)'
5903fi
5904
5905# Other platforms follow
5906if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005907 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
Matthias Kloseb9621712010-04-24 17:59:49 +00005909$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910
5911 case $ac_sys_system in
5912 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).dll.a'
5914 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).so'
5918 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005919 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005921 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005922 then
5923 PY3LIBRARY=libpython3.so
5924 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005926 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).so'
5928 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005929 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005931 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005932 then
5933 PY3LIBRARY=libpython3.so
5934 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 hp*|HP*)
5937 case `uname -m` in
5938 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005946 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).dylib'
5950 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005951 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005953 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005955 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005956 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957
5958 esac
5959else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005960 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 case $ac_sys_system in
5962 CYGWIN*)
5963 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ;;
5966 esac
5967fi
5968
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005969if test "$cross_compiling" = yes; then
5970 RUNSHARED=
5971fi
5972
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5974$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975
5976if test -n "$ac_tool_prefix"; then
5977 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5978set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5980$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005981if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983else
5984 if test -n "$RANLIB"; then
5985 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5986else
5987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5988for as_dir in $PATH
5989do
5990 IFS=$as_save_IFS
5991 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996 break 2
5997 fi
5998done
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000IFS=$as_save_IFS
6001
6002fi
6003fi
6004RANLIB=$ac_cv_prog_RANLIB
6005if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6007$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008else
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011fi
6012
6013
6014fi
6015if test -z "$ac_cv_prog_RANLIB"; then
6016 ac_ct_RANLIB=$RANLIB
6017 # Extract the first word of "ranlib", so it can be a program name with args.
6018set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6020$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006021if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023else
6024 if test -n "$ac_ct_RANLIB"; then
6025 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6026else
6027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH
6029do
6030 IFS=$as_save_IFS
6031 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036 break 2
6037 fi
6038done
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040IFS=$as_save_IFS
6041
6042fi
6043fi
6044ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6045if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6047$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048else
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6050$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051fi
6052
6053 if test "x$ac_ct_RANLIB" = x; then
6054 RANLIB=":"
6055 else
6056 case $cross_compiling:$ac_tool_warned in
6057yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006058{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6059$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060ac_tool_warned=yes ;;
6061esac
6062 RANLIB=$ac_ct_RANLIB
6063 fi
6064else
6065 RANLIB="$ac_cv_prog_RANLIB"
6066fi
6067
6068
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006069if test -n "$ac_tool_prefix"; then
6070 for ac_prog in ar aal
6071 do
6072 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6073set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6075$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006076if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078else
6079 if test -n "$AR"; then
6080 ac_cv_prog_AR="$AR" # Let the user override the test.
6081else
6082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH
6084do
6085 IFS=$as_save_IFS
6086 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006089 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091 break 2
6092 fi
6093done
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095IFS=$as_save_IFS
6096
6097fi
6098fi
6099AR=$ac_cv_prog_AR
6100if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6102$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103else
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6105$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106fi
6107
6108
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006109 test -n "$AR" && break
6110 done
6111fi
6112if test -z "$AR"; then
6113 ac_ct_AR=$AR
6114 for ac_prog in ar aal
6115do
6116 # Extract the first word of "$ac_prog", so it can be a program name with args.
6117set dummy $ac_prog; ac_word=$2
6118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6119$as_echo_n "checking for $ac_word... " >&6; }
6120if ${ac_cv_prog_ac_ct_AR+:} false; then :
6121 $as_echo_n "(cached) " >&6
6122else
6123 if test -n "$ac_ct_AR"; then
6124 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6125else
6126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6127for as_dir in $PATH
6128do
6129 IFS=$as_save_IFS
6130 test -z "$as_dir" && as_dir=.
6131 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006132 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006133 ac_cv_prog_ac_ct_AR="$ac_prog"
6134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6135 break 2
6136 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006138 done
6139IFS=$as_save_IFS
6140
6141fi
6142fi
6143ac_ct_AR=$ac_cv_prog_ac_ct_AR
6144if test -n "$ac_ct_AR"; then
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6146$as_echo "$ac_ct_AR" >&6; }
6147else
6148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6149$as_echo "no" >&6; }
6150fi
6151
6152
6153 test -n "$ac_ct_AR" && break
6154done
6155
6156 if test "x$ac_ct_AR" = x; then
6157 AR="ar"
6158 else
6159 case $cross_compiling:$ac_tool_warned in
6160yes:)
6161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6163ac_tool_warned=yes ;;
6164esac
6165 AR=$ac_ct_AR
6166 fi
6167fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168
6169
6170# tweak ARFLAGS only if the user didn't set it on the command line
6171
6172if test -z "$ARFLAGS"
6173then
6174 ARFLAGS="rc"
6175fi
6176
doko@ubuntu.com58844492012-06-30 18:25:32 +02006177if test -n "$ac_tool_prefix"; then
6178 for ac_prog in readelf
6179 do
6180 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6181set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6183$as_echo_n "checking for $ac_word... " >&6; }
6184if ${ac_cv_prog_READELF+:} false; then :
6185 $as_echo_n "(cached) " >&6
6186else
6187 if test -n "$READELF"; then
6188 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6189else
6190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6191for as_dir in $PATH
6192do
6193 IFS=$as_save_IFS
6194 test -z "$as_dir" && as_dir=.
6195 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006196 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006197 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6199 break 2
6200 fi
6201done
6202 done
6203IFS=$as_save_IFS
6204
6205fi
6206fi
6207READELF=$ac_cv_prog_READELF
6208if test -n "$READELF"; then
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6210$as_echo "$READELF" >&6; }
6211else
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6213$as_echo "no" >&6; }
6214fi
6215
6216
6217 test -n "$READELF" && break
6218 done
6219fi
6220if test -z "$READELF"; then
6221 ac_ct_READELF=$READELF
6222 for ac_prog in readelf
6223do
6224 # Extract the first word of "$ac_prog", so it can be a program name with args.
6225set dummy $ac_prog; ac_word=$2
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6227$as_echo_n "checking for $ac_word... " >&6; }
6228if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6229 $as_echo_n "(cached) " >&6
6230else
6231 if test -n "$ac_ct_READELF"; then
6232 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6233else
6234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235for as_dir in $PATH
6236do
6237 IFS=$as_save_IFS
6238 test -z "$as_dir" && as_dir=.
6239 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006240 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006241 ac_cv_prog_ac_ct_READELF="$ac_prog"
6242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6243 break 2
6244 fi
6245done
6246 done
6247IFS=$as_save_IFS
6248
6249fi
6250fi
6251ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6252if test -n "$ac_ct_READELF"; then
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6254$as_echo "$ac_ct_READELF" >&6; }
6255else
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6257$as_echo "no" >&6; }
6258fi
6259
6260
6261 test -n "$ac_ct_READELF" && break
6262done
6263
6264 if test "x$ac_ct_READELF" = x; then
6265 READELF=":"
6266 else
6267 case $cross_compiling:$ac_tool_warned in
6268yes:)
6269{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6270$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6271ac_tool_warned=yes ;;
6272esac
6273 READELF=$ac_ct_READELF
6274 fi
6275fi
6276
6277if test "$cross_compiling" = yes; then
6278 case "$READELF" in
6279 readelf|:)
6280 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6281 ;;
6282 esac
6283fi
6284
6285
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287case $MACHDEP in
6288bsdos*|hp*|HP*)
6289 # install -d does not work on BSDI or HP-UX
6290 if test -z "$INSTALL"
6291 then
6292 INSTALL="${srcdir}/install-sh -c"
6293 fi
6294esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295# Find a good install program. We prefer a C program (faster),
6296# so one script is as good as another. But avoid the broken or
6297# incompatible versions:
6298# SysV /etc/install, /usr/sbin/install
6299# SunOS /usr/etc/install
6300# IRIX /sbin/install
6301# AIX /bin/install
6302# AmigaOS /C/install, which installs bootblocks on floppy discs
6303# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6304# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6305# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6306# OS/2's system install, which has a completely different semantic
6307# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006308# Reject install programs that cannot install multiple files.
6309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6310$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006312if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314else
6315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH
6317do
6318 IFS=$as_save_IFS
6319 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 # Account for people who put trailing slashes in PATH elements.
6321case $as_dir/ in #((
6322 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006324 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 /usr/ucb/* ) ;;
6326 *)
6327 # OSF1 and SCO ODT 3.0 have their own names for install.
6328 # Don't use installbsd from OSF since it installs stuff as root
6329 # by default.
6330 for ac_prog in ginstall scoinst install; do
6331 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006332 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333 if test $ac_prog = install &&
6334 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6335 # AIX install. It has an incompatible calling convention.
6336 :
6337 elif test $ac_prog = install &&
6338 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6339 # program-specific install script used by HP pwplus--don't use.
6340 :
6341 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 rm -rf conftest.one conftest.two conftest.dir
6343 echo one > conftest.one
6344 echo two > conftest.two
6345 mkdir conftest.dir
6346 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6347 test -s conftest.one && test -s conftest.two &&
6348 test -s conftest.dir/conftest.one &&
6349 test -s conftest.dir/conftest.two
6350 then
6351 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6352 break 3
6353 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006354 fi
6355 fi
6356 done
6357 done
6358 ;;
6359esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006360
6361 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362IFS=$as_save_IFS
6363
Matthias Kloseb9621712010-04-24 17:59:49 +00006364rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365
6366fi
6367 if test "${ac_cv_path_install+set}" = set; then
6368 INSTALL=$ac_cv_path_install
6369 else
6370 # As a last resort, use the slow shell script. Don't cache a
6371 # value for INSTALL within a source directory, because that will
6372 # break other packages using the cache if that directory is
6373 # removed, or if the value is a relative name.
6374 INSTALL=$ac_install_sh
6375 fi
6376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6378$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379
6380# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6381# It thinks the first close brace ends the variable substitution.
6382test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6383
6384test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6385
6386test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6387
Matthias Klose93a0ef12012-03-15 18:08:34 +01006388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6389$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6390if test -z "$MKDIR_P"; then
6391 if ${ac_cv_path_mkdir+:} false; then :
6392 $as_echo_n "(cached) " >&6
6393else
6394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6396do
6397 IFS=$as_save_IFS
6398 test -z "$as_dir" && as_dir=.
6399 for ac_prog in mkdir gmkdir; do
6400 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006401 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006402 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6403 'mkdir (GNU coreutils) '* | \
6404 'mkdir (coreutils) '* | \
6405 'mkdir (fileutils) '4.1*)
6406 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6407 break 3;;
6408 esac
6409 done
6410 done
6411 done
6412IFS=$as_save_IFS
6413
6414fi
6415
6416 test -d ./--version && rmdir ./--version
6417 if test "${ac_cv_path_mkdir+set}" = set; then
6418 MKDIR_P="$ac_cv_path_mkdir -p"
6419 else
6420 # As a last resort, use the slow shell script. Don't cache a
6421 # value for MKDIR_P within a source directory, because that will
6422 # break other packages using the cache if that directory is
6423 # removed, or if the value is a relative name.
6424 MKDIR_P="$ac_install_sh -d"
6425 fi
6426fi
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6428$as_echo "$MKDIR_P" >&6; }
6429
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430
6431# Not every filesystem supports hard links
6432
6433if test -z "$LN" ; then
6434 case $ac_sys_system in
6435 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436 *) LN=ln;;
6437 esac
6438fi
6439
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006440# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006441
6442ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006443
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6446$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447
6448# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006449if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450 withval=$with_pydebug;
6451if test "$withval" != no
6452then
6453
Matthias Kloseb9621712010-04-24 17:59:49 +00006454$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6457$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006459 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006460else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462fi
6463else
Matthias Kloseb9621712010-04-24 17:59:49 +00006464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006466fi
6467
6468
T. Woutersddbfa2c2017-05-23 01:30:49 +02006469# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6470# the ABI. This allows enabling assertions without changing the ABI.
6471assertions='false'
6472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6473$as_echo_n "checking for --with-assertions... " >&6; }
6474
6475# Check whether --with-assertions was given.
6476if test "${with_assertions+set}" = set; then :
6477 withval=$with_assertions;
6478if test "$withval" != no
6479then
6480 assertions='true'
6481fi
6482fi
6483
6484if test "$assertions" = 'true'; then
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6486$as_echo "yes" >&6; }
6487elif test "$Py_DEBUG" = 'true'; then
6488 assertions='true'
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6490$as_echo "implied by --with-pydebug" >&6; }
6491else
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; }
6494fi
6495
Brett Cannon63d98bc2016-09-06 17:12:40 -07006496# Enable optimization flags
6497
6498
6499Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6501$as_echo_n "checking for --enable-optimizations... " >&6; }
6502# Check whether --enable-optimizations was given.
6503if test "${enable_optimizations+set}" = set; then :
6504 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006505if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006506then
6507 Py_OPT='true'
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6509$as_echo "yes" >&6; };
6510else
6511 Py_OPT='false'
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; };
6514fi
6515else
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; }
6518fi
6519
6520if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006521 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6522 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006523 # 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 +00006524 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006525 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006526 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006527 DEF_MAKE_RULE="build_all"
6528else
6529 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006530 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006531 DEF_MAKE_RULE="all"
6532fi
6533
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006534# Enable LTO flags
6535
6536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6537$as_echo_n "checking for --with-lto... " >&6; }
6538
6539# Check whether --with-lto was given.
6540if test "${with_lto+set}" = set; then :
6541 withval=$with_lto;
6542if test "$withval" != no
6543then
6544 Py_LTO='true'
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6546$as_echo "yes" >&6; };
6547else
6548 Py_LTO='false'
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; };
6551fi
6552else
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554$as_echo "no" >&6; }
6555fi
6556
6557if test "$Py_LTO" = 'true' ; then
6558 case $CC in
6559 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006560 case $ac_sys_system in
6561 Darwin*)
6562 # Any changes made here should be reflected in the GCC+Darwin case below
6563 LTOFLAGS="-flto -Wl,-export_dynamic"
6564 ;;
6565 *)
6566 LTOFLAGS="-flto"
6567 ;;
6568 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006569 ;;
6570 *gcc*)
6571 case $ac_sys_system in
6572 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006573 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006574 ;;
6575 *)
6576 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6577 ;;
6578 esac
6579 ;;
6580 esac
6581fi
6582
Brett Cannon7188a3e2015-09-18 15:13:44 -07006583# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006584
6585
6586
6587
6588
Gregory P. Smith799520c2016-09-07 16:10:00 -07006589# Make this work on systems where llvm tools are not installed with their
6590# normal names in the default $PATH (ie: Ubuntu). They exist under the
6591# non-suffixed name in their versioned llvm directory.
6592llvm_bin_dir=''
6593llvm_path="${PATH}"
6594if test "${CC}" = "clang"
6595then
6596 clang_bin=`which clang`
6597 # Some systems install clang elsewhere as a symlink to the real path
6598 # which is where the related llvm tools are located.
6599 if test -L "${clang_bin}"
6600 then
6601 clang_dir=`dirname "${clang_bin}"`
6602 clang_bin=`readlink "${clang_bin}"`
6603 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6604 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6605 fi
6606fi
Zachary Ware5af85642015-12-21 12:09:17 -06006607
Gregory P. Smith799520c2016-09-07 16:10:00 -07006608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6609$as_echo_n "checking target system type... " >&6; }
6610if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006611 $as_echo_n "(cached) " >&6
6612else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006613 if test "x$target_alias" = x; then
6614 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006615else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006616 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6617 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6618fi
6619
6620fi
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6622$as_echo "$ac_cv_target" >&6; }
6623case $ac_cv_target in
6624*-*-*) ;;
6625*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6626esac
6627target=$ac_cv_target
6628ac_save_IFS=$IFS; IFS='-'
6629set x $ac_cv_target
6630shift
6631target_cpu=$1
6632target_vendor=$2
6633shift; shift
6634# Remember, the first character of IFS is used to create $*,
6635# except with old shells:
6636target_os=$*
6637IFS=$ac_save_IFS
6638case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6639
6640
6641# The aliases save the names the user supplied, while $host etc.
6642# will get canonicalized.
6643test -n "$target_alias" &&
6644 test "$program_prefix$program_suffix$program_transform_name" = \
6645 NONENONEs,x,x, &&
6646 program_prefix=${target_alias}-
6647# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6648set dummy $target_alias-llvm-profdata; ac_word=$2
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6650$as_echo_n "checking for $ac_word... " >&6; }
6651if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6652 $as_echo_n "(cached) " >&6
6653else
6654 case $LLVM_PROFDATA in
6655 [\\/]* | ?:[\\/]*)
6656 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6657 ;;
6658 *)
6659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6660for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661do
6662 IFS=$as_save_IFS
6663 test -z "$as_dir" && as_dir=.
6664 for ac_exec_ext in '' $ac_executable_extensions; do
6665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006666 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6668 break 2
6669 fi
6670done
6671 done
6672IFS=$as_save_IFS
6673
Gregory P. Smith799520c2016-09-07 16:10:00 -07006674 ;;
6675esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006676fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006677LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6678if test -n "$LLVM_PROFDATA"; then
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6680$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681else
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6683$as_echo "no" >&6; }
6684fi
6685
6686
Gregory P. Smith799520c2016-09-07 16:10:00 -07006687if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6688 if test "$build" = "$target"; then
6689 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6690 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6691set dummy llvm-profdata; ac_word=$2
6692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6693$as_echo_n "checking for $ac_word... " >&6; }
6694if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6695 $as_echo_n "(cached) " >&6
6696else
6697 case $ac_pt_LLVM_PROFDATA in
6698 [\\/]* | ?:[\\/]*)
6699 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6700 ;;
6701 *)
6702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6703for as_dir in ${llvm_path}
6704do
6705 IFS=$as_save_IFS
6706 test -z "$as_dir" && as_dir=.
6707 for ac_exec_ext in '' $ac_executable_extensions; do
6708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6709 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6711 break 2
6712 fi
6713done
6714 done
6715IFS=$as_save_IFS
6716
6717 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6718 ;;
6719esac
6720fi
6721ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6722if test -n "$ac_pt_LLVM_PROFDATA"; then
6723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6724$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6725else
6726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6727$as_echo "no" >&6; }
6728fi
6729
6730 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6731 else
6732 LLVM_PROFDATA="''"
6733 fi
6734else
6735 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6736fi
6737
6738
6739if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6740then
6741 LLVM_PROF_FOUND="found"
6742else
6743 LLVM_PROF_FOUND="not-found"
6744fi
6745if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6746then
6747 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6748 if test -n "${found_llvm_profdata}"
6749 then
6750 # llvm-profdata isn't directly in $PATH in some cases.
6751 # https://apple.stackexchange.com/questions/197053/
6752 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6753 LLVM_PROF_FOUND=found
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6755$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6756 fi
6757fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006758LLVM_PROF_ERR=no
6759case $CC in
6760 *clang*)
6761 # Any changes made here should be reflected in the GCC+Darwin case below
6762 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6763 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006764 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006765 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6766 if test $LLVM_PROF_FOUND = not-found
6767 then
6768 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006769 if test "${REQUIRE_PGO}" = "yes"
6770 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006771 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 -07006772 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006773 fi
6774 ;;
6775 *gcc*)
6776 case $ac_sys_system in
6777 Darwin*)
6778 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6779 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006780 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006781 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006782 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006783 then
6784 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006785 if test "${REQUIRE_PGO}" = "yes"
6786 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006787 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 -07006788 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006789 fi
6790 ;;
6791 *)
6792 PGO_PROF_GEN_FLAG="-fprofile-generate"
6793 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6794 LLVM_PROF_MERGER="true"
6795 LLVM_PROF_FILE=""
6796 ;;
6797 esac
6798 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006799 *icc*)
6800 PGO_PROF_GEN_FLAG="-prof-gen"
6801 PGO_PROF_USE_FLAG="-prof-use"
6802 LLVM_PROF_MERGER="true"
6803 LLVM_PROF_FILE=""
6804 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006805esac
6806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6808# merged with this chunk of code?
6809
6810# Optimizer/debugger flags
6811# ------------------------
6812# (The following bit of code is complicated enough - please keep things
6813# indented properly. Just pretend you're editing Python code. ;-)
6814
6815# There are two parallel sets of case statements below, one that checks to
6816# see if OPT was set and one that does BASECFLAGS setting based upon
6817# compiler and platform. BASECFLAGS tweaks need to be made even if the
6818# user set OPT.
6819
6820# tweak OPT based on compiler and platform, only if the user didn't set
6821# it on the command line
6822
Victor Stinner9ed34a82017-05-02 22:35:58 +02006823
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006824if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006825then
6826 case $GCC in
6827 yes)
6828 if test "$CC" != 'g++' ; then
6829 STRICT_PROTO="-Wstrict-prototypes"
6830 fi
6831 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6832 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6833 WRAP="-fwrapv"
6834 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006835
Stefan Krahaf04ff22011-12-08 22:20:31 +01006836 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006837 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006838 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006839 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006840 *)
6841 if $CC --version 2>&1 | grep -q clang
6842 then
6843 cc_is_clang=1
6844 else
6845 cc_is_clang=
6846 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006847 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006848
Victor Stinner35f3d242017-04-21 12:35:24 +02006849 if test -n "${cc_is_clang}"
6850 then
6851 # Clang also needs -fwrapv
6852 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006853 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6854 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006855 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006856 fi
6857
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858 case $ac_cv_prog_cc_g in
6859 yes)
6860 if test "$Py_DEBUG" = 'true' ; then
6861 # Optimization messes up debuggers, so turn it off for
6862 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006863 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006864 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006865 else
Victor Stinner28205b22017-04-21 11:24:34 +02006866 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006867 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 else
Victor Stinner28205b22017-04-21 11:24:34 +02006869 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 fi
6871 ;;
6872 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006873 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874 ;;
6875 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006876
Victor Stinner826f83f2017-04-28 15:07:10 +02006877 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 case $ac_sys_system in
6880 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6881 ;;
6882 esac
6883 ;;
6884
6885 *)
6886 OPT="-O"
6887 ;;
6888 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889fi
6890
6891
6892
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894# The -arch flags for universal builds on OSX
6895UNIVERSAL_ARCH_FLAGS=
6896
6897
6898# tweak BASECFLAGS based on compiler and platform
6899case $GCC in
6900yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006901 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006902
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6904$as_echo_n "checking for -Wextra... " >&6; }
6905 ac_save_cc="$CC"
6906 CC="$CC -Wextra -Werror"
6907 if ${ac_cv_extra_warnings+:} false; then :
6908 $as_echo_n "(cached) " >&6
6909else
6910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6911/* end confdefs.h. */
6912
6913
6914int
6915main ()
6916{
6917
6918 ;
6919 return 0;
6920}
6921
6922_ACEOF
6923if ac_fn_c_try_compile "$LINENO"; then :
6924
6925 ac_cv_extra_warnings=yes
6926
6927else
6928
6929 ac_cv_extra_warnings=no
6930
6931fi
6932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6933fi
6934
6935 CC="$ac_save_cc"
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6937$as_echo "$ac_cv_extra_warnings" >&6; }
6938
6939 if test $ac_cv_extra_warnings = yes
6940 then
6941 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6942 fi
6943
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006944 # Python doesn't violate C99 aliasing rules, but older versions of
6945 # GCC produce warnings for legal Python code. Enable
6946 # -fno-strict-aliasing on versions of GCC that support but produce
6947 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6949$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006950 ac_save_cc="$CC"
6951 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006952 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006953 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006954 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006955else
Matthias Kloseb9621712010-04-24 17:59:49 +00006956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006957/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006958
Matthias Kloseb159a552010-04-25 21:00:44 +00006959
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006960int
6961main ()
6962{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006963
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006964 ;
6965 return 0;
6966}
Matthias Kloseb159a552010-04-25 21:00:44 +00006967
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006969if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006970
6971 CC="$ac_save_cc -fstrict-aliasing"
6972 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006974/* end confdefs.h. */
6975
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006976 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006977int
6978main ()
6979{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006980double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981 ;
6982 return 0;
6983}
Matthias Kloseb159a552010-04-25 21:00:44 +00006984
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006986if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006987
6988 ac_cv_no_strict_aliasing=no
6989
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990else
Matthias Kloseb159a552010-04-25 21:00:44 +00006991
6992 ac_cv_no_strict_aliasing=yes
6993
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006994fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006996
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997else
Matthias Kloseb159a552010-04-25 21:00:44 +00006998
6999 ac_cv_no_strict_aliasing=no
7000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007003fi
7004
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007005 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7008$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007009 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010 then
7011 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7012 fi
7013
Zachary Ware5af85642015-12-21 12:09:17 -06007014 # ICC doesn't recognize the option, but only emits a warning
7015 ## XXX does it emit an unused result warning and can it be disabled?
7016 case "$CC" in
7017 *icc*)
7018 ac_cv_disable_unused_result_warning=no
7019 ;;
7020 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7022$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7023 ac_save_cc="$CC"
7024 CC="$CC -Wunused-result -Werror"
7025 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007026 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007027 $as_echo_n "(cached) " >&6
7028else
7029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7030/* end confdefs.h. */
7031
7032
7033int
7034main ()
7035{
7036
7037 ;
7038 return 0;
7039}
7040
7041_ACEOF
7042if ac_fn_c_try_compile "$LINENO"; then :
7043
7044 ac_cv_disable_unused_result_warning=yes
7045
7046else
7047
7048 ac_cv_disable_unused_result_warning=no
7049
7050fi
7051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7052fi
7053
7054 CFLAGS="$save_CFLAGS"
7055 CC="$ac_save_cc"
7056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7057$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007058 ;;
7059 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007060
7061 if test $ac_cv_disable_unused_result_warning = yes
7062 then
7063 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007064 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7065 fi
7066
7067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7068$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7069 ac_save_cc="$CC"
7070 CC="$CC -Wunused-parameter -Werror"
7071 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7072 $as_echo_n "(cached) " >&6
7073else
7074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7075/* end confdefs.h. */
7076
7077
7078int
7079main ()
7080{
7081
7082 ;
7083 return 0;
7084}
7085
7086_ACEOF
7087if ac_fn_c_try_compile "$LINENO"; then :
7088
7089 ac_cv_disable_unused_parameter_warning=yes
7090
7091else
7092
7093 ac_cv_disable_unused_parameter_warning=no
7094
7095fi
7096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7097fi
7098
7099 CC="$ac_save_cc"
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7101$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7102
7103 if test $ac_cv_disable_unused_parameter_warning = yes
7104 then
7105 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7106 fi
7107
7108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7109$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7110 ac_save_cc="$CC"
7111 CC="$CC -Wmissing-field-initializers -Werror"
7112 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7113 $as_echo_n "(cached) " >&6
7114else
7115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7116/* end confdefs.h. */
7117
7118
7119int
7120main ()
7121{
7122
7123 ;
7124 return 0;
7125}
7126
7127_ACEOF
7128if ac_fn_c_try_compile "$LINENO"; then :
7129
7130 ac_cv_disable_missing_field_initializers=yes
7131
7132else
7133
7134 ac_cv_disable_missing_field_initializers=no
7135
7136fi
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138fi
7139
7140 CC="$ac_save_cc"
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7142$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7143
7144 if test $ac_cv_disable_missing_field_initializers = yes
7145 then
7146 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007147 fi
7148
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7150$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7151 ac_save_cc="$CC"
7152 CC="$CC -Wsign-compare"
7153 save_CFLAGS="$CFLAGS"
7154 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7155 $as_echo_n "(cached) " >&6
7156else
7157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7158/* end confdefs.h. */
7159
7160
7161int
7162main ()
7163{
7164
7165 ;
7166 return 0;
7167}
7168
7169_ACEOF
7170if ac_fn_c_try_compile "$LINENO"; then :
7171
7172 ac_cv_enable_sign_compare_warning=yes
7173
7174else
7175
7176 ac_cv_enable_sign_compare_warning=no
7177
7178fi
7179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7180fi
7181
7182 CFLAGS="$save_CFLAGS"
7183 CC="$ac_save_cc"
7184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7185$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7186
7187 if test $ac_cv_enable_sign_compare_warning = yes
7188 then
7189 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7190 fi
7191
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7193$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7194 ac_save_cc="$CC"
7195 CC="$CC -Wunreachable-code"
7196 save_CFLAGS="$CFLAGS"
7197 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7198 $as_echo_n "(cached) " >&6
7199else
7200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7201/* end confdefs.h. */
7202
7203
7204int
7205main ()
7206{
7207
7208 ;
7209 return 0;
7210}
7211
7212_ACEOF
7213if ac_fn_c_try_compile "$LINENO"; then :
7214
7215 ac_cv_enable_unreachable_code_warning=yes
7216
7217else
7218
7219 ac_cv_enable_unreachable_code_warning=no
7220
7221fi
7222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7223fi
7224
7225 CFLAGS="$save_CFLAGS"
7226 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007227
7228 # Don't enable unreachable code warning in debug mode, since it usually
7229 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007230 # Issue #24324: Unfortunately, the unreachable code warning does not work
7231 # correctly on gcc and has been silently removed from the compiler.
7232 # It is supported on clang but on OS X systems gcc may be an alias
7233 # for clang. Try to determine if the compiler is not really gcc and,
7234 # if so, only then enable the warning.
7235 if test $ac_cv_enable_unreachable_code_warning = yes && \
7236 test "$Py_DEBUG" != "true" && \
7237 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007238 then
7239 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007240 else
7241 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007242 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7244$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007245
Victor Stinner193ee0a2017-02-06 14:24:00 +01007246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7247$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7248 ac_save_cc="$CC"
7249 CC="$CC -Werror=implicit-function-declaration"
7250 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7251 $as_echo_n "(cached) " >&6
7252else
7253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7254/* end confdefs.h. */
7255
7256
7257int
7258main ()
7259{
7260
7261 ;
7262 return 0;
7263}
7264
7265_ACEOF
7266if ac_fn_c_try_compile "$LINENO"; then :
7267
7268 ac_cv_enable_implicit_function_declaration_error=yes
7269
7270else
7271
7272 ac_cv_enable_implicit_function_declaration_error=no
7273
7274fi
7275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7276fi
7277
7278 CC="$ac_save_cc"
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7280$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7281
7282 if test $ac_cv_enable_implicit_function_declaration_error = yes
7283 then
7284 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7285 fi
7286
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7288 # support. Without this, treatment of subnormals doesn't follow
7289 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007290 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291 alpha*)
7292 BASECFLAGS="$BASECFLAGS -mieee"
7293 ;;
7294 esac
7295
7296 case $ac_sys_system in
7297 SCO_SV*)
7298 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7299 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007300
7301 # is there any other compiler on Darwin besides gcc?
7302 Darwin*)
7303 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7304 # used to be here, but non-Apple gcc doesn't accept them.
7305 if test "${CC}" = gcc
7306 then
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007308$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007309 case "${UNIVERSALSDK}" in
7310 */MacOSX10.4u.sdk)
7311 # Build using 10.4 SDK, force usage of gcc when the
7312 # compiler is gcc, otherwise the user will get very
7313 # confusing error messages when building on OSX 10.6
7314 CC=gcc-4.0
7315 CPP=cpp-4.0
7316 ;;
7317 esac
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007319$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007320 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007321
Ned Deily87adb6e2013-10-18 21:09:56 -07007322 if test "${enable_universalsdk}"
7323 then
7324 case "$UNIVERSAL_ARCHS" in
7325 32-bit)
7326 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7327 LIPO_32BIT_FLAGS=""
7328 ARCH_RUN_32BIT=""
7329 ;;
7330 64-bit)
7331 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7332 LIPO_32BIT_FLAGS=""
7333 ARCH_RUN_32BIT="true"
7334 ;;
7335 all)
7336 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7337 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7338 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7339 ;;
7340 intel)
7341 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7342 LIPO_32BIT_FLAGS="-extract i386"
7343 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7344 ;;
7345 intel-32)
7346 UNIVERSAL_ARCH_FLAGS="-arch i386"
7347 LIPO_32BIT_FLAGS=""
7348 ARCH_RUN_32BIT=""
7349 ;;
7350 3-way)
7351 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7352 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7353 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7354 ;;
7355 *)
7356 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7357 ;;
7358 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007359
Ned Deily87adb6e2013-10-18 21:09:56 -07007360 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7361 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7362 if test "${UNIVERSALSDK}" != "/"
7363 then
7364 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7365 fi
7366 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367
Ned Deily87adb6e2013-10-18 21:09:56 -07007368 # Calculate an appropriate deployment target for this build:
7369 # The deployment target value is used explicitly to enable certain
7370 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007371 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007372 # component of the string returned by distutils.get_platform().
7373 #
7374 # Use the value from:
7375 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7376 # 2. the operating system version of the build machine if >= 10.6
7377 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7378 # below to pick either 10.3, 10.4, or 10.5 as the target.
7379 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380
Ned Deily87adb6e2013-10-18 21:09:56 -07007381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7382$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007383 cur_target_major=`sw_vers -productVersion | \
7384 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7385 cur_target_minor=`sw_vers -productVersion | \
7386 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7387 cur_target="${cur_target_major}.${cur_target_minor}"
7388 if test ${cur_target_major} -eq 10 && \
7389 test ${cur_target_minor} -ge 3 && \
7390 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007391 then
Ned Deily36820b62014-06-25 13:44:22 -07007392 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007393 cur_target=10.3
7394 if test ${enable_universalsdk}
7395 then
7396 case "$UNIVERSAL_ARCHS" in
7397 all|3-way|intel|64-bit)
7398 # These configurations were first supported in 10.5
7399 cur_target='10.5'
7400 ;;
7401 esac
7402 else
7403 if test `/usr/bin/arch` = "i386"
7404 then
7405 # 10.4 was the first release to support Intel archs
7406 cur_target="10.4"
7407 fi
7408 fi
7409 fi
7410 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007411
Ned Deily87adb6e2013-10-18 21:09:56 -07007412 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7413 # environment with a value that is the same as what we'll use
7414 # in the Makefile to ensure that we'll get the same compiler
7415 # environment during configure and build time.
7416 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7417 export MACOSX_DEPLOYMENT_TARGET
7418 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7420$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007421
Ned Deily87adb6e2013-10-18 21:09:56 -07007422 # end of Darwin* tests
7423 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424 esac
7425 ;;
7426
7427*)
7428 case $ac_sys_system in
7429 OpenUNIX*|UnixWare*)
7430 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7431 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432 SCO_SV*)
7433 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7434 ;;
7435 esac
7436 ;;
7437esac
7438
Zachary Ware5af85642015-12-21 12:09:17 -06007439# ICC needs -fp-model strict or floats behave badly
7440case "$CC" in
7441*icc*)
7442 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7443 ;;
7444esac
7445
T. Woutersddbfa2c2017-05-23 01:30:49 +02007446if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447 :
7448else
7449 OPT="-DNDEBUG $OPT"
7450fi
7451
7452if test "$ac_arch_flags"
7453then
7454 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7455fi
7456
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457# On some compilers, pthreads are available without further options
7458# (e.g. MacOS X). On some of these systems, the compiler will not
7459# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7460# So we have to see first whether pthreads are available without
7461# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7463$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007464if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466else
Matthias Kloseb9621712010-04-24 17:59:49 +00007467 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468 ac_cv_pthread_is_default=no
7469else
Matthias Kloseb9621712010-04-24 17:59:49 +00007470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471/* end confdefs.h. */
7472
Stefan Krah7dba5942012-11-22 22:49:11 +01007473#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474#include <pthread.h>
7475
7476void* routine(void* p){return NULL;}
7477
7478int main(){
7479 pthread_t p;
7480 if(pthread_create(&p,NULL,routine,NULL)!=0)
7481 return 1;
7482 (void)pthread_detach(p);
7483 return 0;
7484}
7485
7486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007487if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488
7489 ac_cv_pthread_is_default=yes
7490 ac_cv_kthread=no
7491 ac_cv_pthread=no
7492
7493else
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7497 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498fi
7499
7500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501fi
7502
Matthias Kloseb9621712010-04-24 17:59:49 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7504$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505
7506
7507if test $ac_cv_pthread_is_default = yes
7508then
7509 ac_cv_kpthread=no
7510else
7511# -Kpthread, if available, provides the right #defines
7512# and linker options to make pthread_create available
7513# Some compilers won't report that they do not support -Kpthread,
7514# so we need to run a program to see whether it really made the
7515# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7517$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007518if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007519 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520else
7521 ac_save_cc="$CC"
7522CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007523if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524 ac_cv_kpthread=no
7525else
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527/* end confdefs.h. */
7528
Stefan Krah7dba5942012-11-22 22:49:11 +01007529#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530#include <pthread.h>
7531
7532void* routine(void* p){return NULL;}
7533
7534int main(){
7535 pthread_t p;
7536 if(pthread_create(&p,NULL,routine,NULL)!=0)
7537 return 1;
7538 (void)pthread_detach(p);
7539 return 0;
7540}
7541
7542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007543if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544 ac_cv_kpthread=yes
7545else
Matthias Kloseb9621712010-04-24 17:59:49 +00007546 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7549 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550fi
7551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552CC="$ac_save_cc"
7553fi
7554
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7556$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557fi
7558
7559if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7560then
7561# -Kthread, if available, provides the right #defines
7562# and linker options to make pthread_create available
7563# Some compilers won't report that they do not support -Kthread,
7564# so we need to run a program to see whether it really made the
7565# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7567$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007568if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007569 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570else
7571 ac_save_cc="$CC"
7572CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007573if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574 ac_cv_kthread=no
7575else
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577/* end confdefs.h. */
7578
Stefan Krah7dba5942012-11-22 22:49:11 +01007579#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580#include <pthread.h>
7581
7582void* routine(void* p){return NULL;}
7583
7584int main(){
7585 pthread_t p;
7586 if(pthread_create(&p,NULL,routine,NULL)!=0)
7587 return 1;
7588 (void)pthread_detach(p);
7589 return 0;
7590}
7591
7592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007593if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594 ac_cv_kthread=yes
7595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600fi
7601
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602CC="$ac_save_cc"
7603fi
7604
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7606$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607fi
7608
7609if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7610then
7611# -pthread, if available, provides the right #defines
7612# and linker options to make pthread_create available
7613# Some compilers won't report that they do not support -pthread,
7614# so we need to run a program to see whether it really made the
7615# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7617$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007618if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620else
7621 ac_save_cc="$CC"
7622CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007623if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624 ac_cv_pthread=no
7625else
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627/* end confdefs.h. */
7628
Stefan Krah7dba5942012-11-22 22:49:11 +01007629#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630#include <pthread.h>
7631
7632void* routine(void* p){return NULL;}
7633
7634int main(){
7635 pthread_t p;
7636 if(pthread_create(&p,NULL,routine,NULL)!=0)
7637 return 1;
7638 (void)pthread_detach(p);
7639 return 0;
7640}
7641
7642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007643if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644 ac_cv_pthread=yes
7645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007650fi
7651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652CC="$ac_save_cc"
7653fi
7654
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7656$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657fi
7658
7659# If we have set a CC compiler flag for thread support then
7660# check if it works for CXX, too.
7661ac_cv_cxx_thread=no
7662if test ! -z "$CXX"
7663then
Matthias Kloseb9621712010-04-24 17:59:49 +00007664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7665$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666ac_save_cxx="$CXX"
7667
7668if test "$ac_cv_kpthread" = "yes"
7669then
7670 CXX="$CXX -Kpthread"
7671 ac_cv_cxx_thread=yes
7672elif test "$ac_cv_kthread" = "yes"
7673then
7674 CXX="$CXX -Kthread"
7675 ac_cv_cxx_thread=yes
7676elif test "$ac_cv_pthread" = "yes"
7677then
7678 CXX="$CXX -pthread"
7679 ac_cv_cxx_thread=yes
7680fi
7681
7682if test $ac_cv_cxx_thread = yes
7683then
7684 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7685 $CXX -c conftest.$ac_ext 2>&5
7686 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7687 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7688 then
7689 ac_cv_cxx_thread=yes
7690 else
7691 ac_cv_cxx_thread=no
7692 fi
7693 rm -fr conftest*
7694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7696$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697fi
7698CXX="$ac_save_cxx"
7699
7700
7701# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7703$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007704if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708/* end confdefs.h. */
7709#include <stdlib.h>
7710#include <stdarg.h>
7711#include <string.h>
7712#include <float.h>
7713
7714int
7715main ()
7716{
7717
7718 ;
7719 return 0;
7720}
7721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007722if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723 ac_cv_header_stdc=yes
7724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7728
7729if test $ac_cv_header_stdc = yes; then
7730 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732/* end confdefs.h. */
7733#include <string.h>
7734
7735_ACEOF
7736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 $EGREP "memchr" >/dev/null 2>&1; then :
7738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739else
7740 ac_cv_header_stdc=no
7741fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007742rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743
7744fi
7745
7746if test $ac_cv_header_stdc = yes; then
7747 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749/* end confdefs.h. */
7750#include <stdlib.h>
7751
7752_ACEOF
7753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 $EGREP "free" >/dev/null 2>&1; then :
7755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756else
7757 ac_cv_header_stdc=no
7758fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007759rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760
7761fi
7762
7763if test $ac_cv_header_stdc = yes; then
7764 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766 :
7767else
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769/* end confdefs.h. */
7770#include <ctype.h>
7771#include <stdlib.h>
7772#if ((' ' & 0x0FF) == 0x020)
7773# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7774# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7775#else
7776# define ISLOWER(c) \
7777 (('a' <= (c) && (c) <= 'i') \
7778 || ('j' <= (c) && (c) <= 'r') \
7779 || ('s' <= (c) && (c) <= 'z'))
7780# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7781#endif
7782
7783#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7784int
7785main ()
7786{
7787 int i;
7788 for (i = 0; i < 256; i++)
7789 if (XOR (islower (i), ISLOWER (i))
7790 || toupper (i) != TOUPPER (i))
7791 return 2;
7792 return 0;
7793}
7794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007795if ac_fn_c_try_run "$LINENO"; then :
7796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007797else
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802fi
7803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007804fi
7805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7807$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808if test $ac_cv_header_stdc = yes; then
7809
Matthias Kloseb9621712010-04-24 17:59:49 +00007810$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811
7812fi
7813
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007814for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007815fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007816ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007817sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007818unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007819poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007820sys/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 +01007821sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007822sys/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 +01007823sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007824sys/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 -07007825libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007826linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007827sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007828do :
7829 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7830ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007831if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007833#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007834_ACEOF
7835
7836fi
7837
Guido van Rossum627b2d71993-12-24 10:39:16 +00007838done
7839
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007840ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007841for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7844$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007845if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007847else
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007849/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007850#include <sys/types.h>
7851#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007852
Martin v. Löwis11437992002-04-12 09:54:03 +00007853int
7854main ()
7855{
7856if ((DIR *) 0)
7857return 0;
7858 ;
7859 return 0;
7860}
7861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007862if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007864else
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869eval ac_res=\$$as_ac_Header
7870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7871$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007872if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007874#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007875_ACEOF
7876
7877ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007879
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007880done
7881# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7882if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7884$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007885if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007887else
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892/* Override any GCC internal prototype to avoid an error.
7893 Use char because int might match the return type of a GCC
7894 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007895#ifdef __cplusplus
7896extern "C"
7897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007898char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007899int
7900main ()
7901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 ;
7904 return 0;
7905}
7906_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907for ac_lib in '' dir; do
7908 if test -z "$ac_lib"; then
7909 ac_res="none required"
7910 else
7911 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007912 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007917rm -f core conftest.err conftest.$ac_objext \
7918 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007919 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922done
Victor Stinnere0be4232011-10-25 13:06:09 +02007923if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007925else
7926 ac_cv_search_opendir=no
7927fi
7928rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007929LIBS=$ac_func_search_save_LIBS
7930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7932$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007934if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007936
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007937fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
Michael W. Hudson54241132001-12-07 15:38:26 +00007939else
Matthias Kloseb9621712010-04-24 17:59:49 +00007940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7941$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007942if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007944else
7945 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949/* Override any GCC internal prototype to avoid an error.
7950 Use char because int might match the return type of a GCC
7951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007952#ifdef __cplusplus
7953extern "C"
7954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007955char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007956int
7957main ()
7958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ;
7961 return 0;
7962}
7963_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964for ac_lib in '' x; do
7965 if test -z "$ac_lib"; then
7966 ac_res="none required"
7967 else
7968 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007969 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007974rm -f core conftest.err conftest.$ac_objext \
7975 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007976 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979done
Victor Stinnere0be4232011-10-25 13:06:09 +02007980if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982else
7983 ac_cv_search_opendir=no
7984fi
7985rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986LIBS=$ac_func_search_save_LIBS
7987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7989$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007991if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007993
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007994fi
7995
7996fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007997
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7999$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008000if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008002else
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008004/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008005#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008006int
8007main ()
8008{
8009return makedev(0, 0);
8010 ;
8011 return 0;
8012}
8013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008015 ac_cv_header_sys_types_h_makedev=yes
8016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019rm -f core conftest.err conftest.$ac_objext \
8020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008021
8022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8024$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008025
8026if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008027ac_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 +02008028if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008029
Matthias Kloseb9621712010-04-24 17:59:49 +00008030$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008031
8032fi
8033
8034
8035
8036 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 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 +02008038if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008039
Matthias Kloseb9621712010-04-24 17:59:49 +00008040$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008041
8042fi
8043
8044
8045 fi
8046fi
8047
Michael W. Hudson54241132001-12-07 15:38:26 +00008048
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008049# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8050# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8051SAVE_CFLAGS=$CFLAGS
8052CFLAGS="-std=c99 $CFLAGS"
8053for ac_header in bluetooth/bluetooth.h
8054do :
8055 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8056if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8057 cat >>confdefs.h <<_ACEOF
8058#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8059_ACEOF
8060
8061fi
8062
8063done
8064
8065CFLAGS=$SAVE_CFLAGS
8066
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008067# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8068for ac_header in net/if.h
8069do :
8070 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8071#ifdef STDC_HEADERS
8072# include <stdlib.h>
8073# include <stddef.h>
8074#else
8075# ifdef HAVE_STDLIB_H
8076# include <stdlib.h>
8077# endif
8078#endif
8079#ifdef HAVE_SYS_SOCKET_H
8080# include <sys/socket.h>
8081#endif
8082
8083"
Victor Stinnere0be4232011-10-25 13:06:09 +02008084if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008085 cat >>confdefs.h <<_ACEOF
8086#define HAVE_NET_IF_H 1
8087_ACEOF
8088
8089fi
8090
8091done
8092
8093
Martin v. Löwis11017b12006-01-14 18:12:57 +00008094# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008095for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008096do :
8097 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 +00008098#ifdef HAVE_ASM_TYPES_H
8099#include <asm/types.h>
8100#endif
8101#ifdef HAVE_SYS_SOCKET_H
8102#include <sys/socket.h>
8103#endif
8104
Matthias Kloseb9621712010-04-24 17:59:49 +00008105"
Victor Stinnere0be4232011-10-25 13:06:09 +02008106if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008107 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008108#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008109_ACEOF
8110
8111fi
8112
8113done
8114
8115
Charles-François Natali47413c12011-10-06 19:47:44 +02008116# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008117for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008118do :
8119 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8120ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8121#ifdef HAVE_SYS_SOCKET_H
8122#include <sys/socket.h>
8123#endif
8124
8125"
8126if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8127 cat >>confdefs.h <<_ACEOF
8128#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8129_ACEOF
8130
8131fi
8132
8133done
8134
8135
Guido van Rossum627b2d71993-12-24 10:39:16 +00008136# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008137was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8139$as_echo_n "checking for clock_t in time.h... " >&6; }
8140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008141/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008142#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008143
8144_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008147 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008148else
Martin v. Löwis11437992002-04-12 09:54:03 +00008149
8150
Matthias Kloseb9621712010-04-24 17:59:49 +00008151$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008152
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008153
Guido van Rossum627b2d71993-12-24 10:39:16 +00008154fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008155rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8158$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8161$as_echo_n "checking for makedev... " >&6; }
8162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008163/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008164
Jesus Cea740f53a2010-04-28 11:35:30 +00008165#if defined(MAJOR_IN_MKDEV)
8166#include <sys/mkdev.h>
8167#elif defined(MAJOR_IN_SYSMACROS)
8168#include <sys/sysmacros.h>
8169#else
8170#include <sys/types.h>
8171#endif
8172
Neal Norwitz11690112002-07-30 01:08:28 +00008173int
8174main ()
8175{
Jesus Cea740f53a2010-04-28 11:35:30 +00008176
8177 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008178 ;
8179 return 0;
8180}
Matthias Kloseb159a552010-04-25 21:00:44 +00008181
Neal Norwitz11690112002-07-30 01:08:28 +00008182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008183if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008184 ac_cv_has_makedev=yes
8185else
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008188rm -f core conftest.err conftest.$ac_objext \
8189 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8191$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008192if test "$ac_cv_has_makedev" = "yes"; then
8193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008195
8196fi
8197
Christian Heimes985ecdc2013-11-20 11:46:18 +01008198# byte swapping
8199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8200$as_echo_n "checking for le64toh... " >&6; }
8201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8202/* end confdefs.h. */
8203
8204#ifdef HAVE_ENDIAN_H
8205#include <endian.h>
8206#elif defined(HAVE_SYS_ENDIAN_H)
8207#include <sys/endian.h>
8208#endif
8209
8210int
8211main ()
8212{
8213
8214 le64toh(1)
8215 ;
8216 return 0;
8217}
8218
8219_ACEOF
8220if ac_fn_c_try_link "$LINENO"; then :
8221 ac_cv_has_le64toh=yes
8222else
8223 ac_cv_has_le64toh=no
8224fi
8225rm -f core conftest.err conftest.$ac_objext \
8226 conftest$ac_exeext conftest.$ac_ext
8227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8228$as_echo "$ac_cv_has_le64toh" >&6; }
8229if test "$ac_cv_has_le64toh" = "yes"; then
8230
8231$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8232
8233fi
8234
Martin v. Löwis399a6892002-10-04 10:22:02 +00008235# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8236# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8237# defined, but the compiler does not support pragma redefine_extname,
8238# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8239# structures (such as rlimit64) without declaring them. As a
8240# work-around, disable LFS on such configurations
8241
8242use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8244$as_echo_n "checking Solaris LFS bug... " >&6; }
8245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008246/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008247
8248#define _LARGEFILE_SOURCE 1
8249#define _FILE_OFFSET_BITS 64
8250#include <sys/resource.h>
8251
Martin v. Löwis399a6892002-10-04 10:22:02 +00008252int
8253main ()
8254{
8255struct rlimit foo;
8256 ;
8257 return 0;
8258}
8259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008261 sol_lfs_bug=no
8262else
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8267$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008268if test "$sol_lfs_bug" = "yes"; then
8269 use_lfs=no
8270fi
8271
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008272# Don't use largefile support for GNU/Hurd
8273case $ac_sys_system in GNU*)
8274 use_lfs=no
8275esac
8276
Martin v. Löwis399a6892002-10-04 10:22:02 +00008277if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008278# Two defines needed to enable largefile support on various platforms
8279# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008280case $ac_sys_system/$ac_sys_release in
8281AIX*)
8282
8283$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8284
8285 ;;
8286esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008287
Matthias Kloseb9621712010-04-24 17:59:49 +00008288$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008289
8290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008292
Martin v. Löwis399a6892002-10-04 10:22:02 +00008293fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008294
Guido van Rossum84e7b241996-08-19 21:59:00 +00008295# Add some code to confdefs.h so that the test for off_t works on SCO
8296cat >> confdefs.h <<\EOF
8297#if defined(SCO_DS)
8298#undef _OFF_T
8299#endif
8300EOF
8301
Guido van Rossumef2255b2000-03-10 22:30:29 +00008302# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008303ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008304if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008306else
Martin v. Löwis11437992002-04-12 09:54:03 +00008307
8308cat >>confdefs.h <<_ACEOF
8309#define mode_t int
8310_ACEOF
8311
8312fi
8313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008316
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008317else
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008321_ACEOF
8322
8323fi
8324
Matthias Kloseb9621712010-04-24 17:59:49 +00008325ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008326if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008328else
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
8330cat >>confdefs.h <<_ACEOF
8331#define pid_t int
8332_ACEOF
8333
8334fi
8335
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008336
Martin v. Löwis11437992002-04-12 09:54:03 +00008337cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008338#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008339_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008340
Matthias Kloseb9621712010-04-24 17:59:49 +00008341ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008343
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008344else
Martin v. Löwis11437992002-04-12 09:54:03 +00008345
8346cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008348_ACEOF
8349
8350fi
8351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8353$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008354if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008356else
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008358/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008359#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
8361_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008364 ac_cv_type_uid_t=yes
8365else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008366 ac_cv_type_uid_t=no
8367fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008368rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8372$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008373if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008376
8377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008379
8380fi
8381
Mark Dickinson983bc162012-12-02 12:11:38 +00008382
Matthias Kloseb9621712010-04-24 17:59:49 +00008383ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008384if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008387
8388fi
8389
Stefan Krah1919b7e2012-03-21 18:25:23 +01008390ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8391if test "x$ac_cv_type___uint128_t" = xyes; then :
8392
8393$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8394
8395fi
8396
Jack Jansendd19cf82001-12-06 22:36:17 +00008397
Michael W. Hudson54241132001-12-07 15:38:26 +00008398# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008399# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400# The cast to long int works around a bug in the HP C Compiler
8401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8403# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8405$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008406if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008408else
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 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 +00008410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411else
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 if test "$ac_cv_type_int" = yes; then
8413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008415as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008416See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 else
8418 ac_cv_sizeof_int=0
8419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8424$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425
8426
8427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008429#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008430_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008431
8432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433# The cast to long int works around a bug in the HP C Compiler
8434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8436# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8438$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008439if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008441else
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 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 +00008443
Martin v. Löwis11437992002-04-12 09:54:03 +00008444else
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 if test "$ac_cv_type_long" = yes; then
8446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008448as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008449See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450 else
8451 ac_cv_sizeof_long=0
8452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008454
Martin v. Löwis11437992002-04-12 09:54:03 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8457$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458
8459
8460
Martin v. Löwis11437992002-04-12 09:54:03 +00008461cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008462#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008463_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008464
8465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466# The cast to long int works around a bug in the HP C Compiler
8467# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8468# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8469# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8471$as_echo_n "checking size of long long... " >&6; }
8472if ${ac_cv_sizeof_long_long+:} false; then :
8473 $as_echo_n "(cached) " >&6
8474else
8475 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8476
8477else
8478 if test "$ac_cv_type_long_long" = yes; then
8479 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8481as_fn_error 77 "cannot compute sizeof (long long)
8482See \`config.log' for more details" "$LINENO" 5; }
8483 else
8484 ac_cv_sizeof_long_long=0
8485 fi
8486fi
8487
8488fi
8489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8490$as_echo "$ac_cv_sizeof_long_long" >&6; }
8491
8492
8493
8494cat >>confdefs.h <<_ACEOF
8495#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8496_ACEOF
8497
8498
8499# The cast to long int works around a bug in the HP C Compiler
8500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8502# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8504$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008505if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008507else
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 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 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 if test "$ac_cv_type_void_p" = yes; then
8512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008514as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008515See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516 else
8517 ac_cv_sizeof_void_p=0
8518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8523$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524
8525
8526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008528#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008529_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008530
8531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532# The cast to long int works around a bug in the HP C Compiler
8533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8535# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8537$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008538if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008540else
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 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 +00008542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543else
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 if test "$ac_cv_type_short" = yes; then
8545 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008547as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008548See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549 else
8550 ac_cv_sizeof_short=0
8551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8556$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557
8558
8559
Martin v. Löwis11437992002-04-12 09:54:03 +00008560cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008561#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008562_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008563
8564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565# The cast to long int works around a bug in the HP C Compiler
8566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8568# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8570$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008571if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008573else
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 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 +00008575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576else
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 if test "$ac_cv_type_float" = yes; then
8578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008580as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008581See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582 else
8583 ac_cv_sizeof_float=0
8584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8589$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008590
8591
8592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008594#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008595_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008596
8597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598# The cast to long int works around a bug in the HP C Compiler
8599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8603$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008604if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008606else
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 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 +00008608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609else
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 if test "$ac_cv_type_double" = yes; then
8611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008613as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008614See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 else
8616 ac_cv_sizeof_double=0
8617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8622$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623
8624
8625
Martin v. Löwis11437992002-04-12 09:54:03 +00008626cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008627#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008628_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008629
8630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631# The cast to long int works around a bug in the HP C Compiler
8632# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8633# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8634# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8636$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008637if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008639else
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 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 +00008641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642else
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 if test "$ac_cv_type_fpos_t" = yes; then
8644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008646as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008647See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648 else
8649 ac_cv_sizeof_fpos_t=0
8650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008652
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8655$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656
8657
8658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008660#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008661_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008662
Michael W. Hudson54241132001-12-07 15:38:26 +00008663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664# The cast to long int works around a bug in the HP C Compiler
8665# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8666# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8667# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8669$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008670if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008672else
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 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 +00008674
Martin v. Löwis18e16552006-02-15 17:27:45 +00008675else
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 if test "$ac_cv_type_size_t" = yes; then
8677 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008679as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008680See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008681 else
8682 ac_cv_sizeof_size_t=0
8683 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685
Martin v. Löwis18e16552006-02-15 17:27:45 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8688$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689
8690
8691
Martin v. Löwis18e16552006-02-15 17:27:45 +00008692cat >>confdefs.h <<_ACEOF
8693#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8694_ACEOF
8695
8696
Christian Heimes400adb02008-02-01 08:12:03 +00008697# The cast to long int works around a bug in the HP C Compiler
8698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8700# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8702$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008703if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008705else
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 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 +00008707
Christian Heimes400adb02008-02-01 08:12:03 +00008708else
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 if test "$ac_cv_type_pid_t" = yes; then
8710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008712as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008713See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008714 else
8715 ac_cv_sizeof_pid_t=0
8716 fi
8717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718
Christian Heimes400adb02008-02-01 08:12:03 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8721$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008722
8723
8724
8725cat >>confdefs.h <<_ACEOF
8726#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8727_ACEOF
8728
8729
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008730# The cast to long int works around a bug in the HP C Compiler
8731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8733# This bug is HP SR number 8606223364.
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8735$as_echo_n "checking size of uintptr_t... " >&6; }
8736if ${ac_cv_sizeof_uintptr_t+:} false; then :
8737 $as_echo_n "(cached) " >&6
8738else
8739 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8740
8741else
8742 if test "$ac_cv_type_uintptr_t" = yes; then
8743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8745as_fn_error 77 "cannot compute sizeof (uintptr_t)
8746See \`config.log' for more details" "$LINENO" 5; }
8747 else
8748 ac_cv_sizeof_uintptr_t=0
8749 fi
8750fi
8751
8752fi
8753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8754$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8755
8756
8757
8758cat >>confdefs.h <<_ACEOF
8759#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8760_ACEOF
8761
8762
Michael W. Hudson54241132001-12-07 15:38:26 +00008763
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8765$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008766have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768/* end confdefs.h. */
8769
8770int
8771main ()
8772{
8773long double x; x = (long double)0;
8774 ;
8775 return 0;
8776}
8777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008778if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008779
8780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008782
8783 have_long_double=yes
8784
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008785fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8788$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008789if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008790# The cast to long int works around a bug in the HP C Compiler
8791# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8792# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8793# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8795$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008796if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008798else
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 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 +00008800
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008801else
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 if test "$ac_cv_type_long_double" = yes; then
8803 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008805as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008806See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008807 else
8808 ac_cv_sizeof_long_double=0
8809 fi
8810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008811
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8814$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008815
8816
8817
8818cat >>confdefs.h <<_ACEOF
8819#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8820_ACEOF
8821
8822
8823fi
8824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825# The cast to long int works around a bug in the HP C Compiler
8826# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8827# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8828# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8830$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008831if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008833else
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 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 +00008835
Thomas Woutersb2137042007-02-01 18:02:27 +00008836else
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 if test "$ac_cv_type__Bool" = yes; then
8838 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008840as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008841See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842 else
8843 ac_cv_sizeof__Bool=0
8844 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008846
Thomas Woutersb2137042007-02-01 18:02:27 +00008847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8849$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008850
8851
8852
Thomas Woutersb2137042007-02-01 18:02:27 +00008853cat >>confdefs.h <<_ACEOF
8854#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8855_ACEOF
8856
8857
Thomas Woutersb2137042007-02-01 18:02:27 +00008858
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859# The cast to long int works around a bug in the HP C Compiler
8860# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8861# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8862# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8864$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008865if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008867else
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008869#ifdef HAVE_SYS_TYPES_H
8870#include <sys/types.h>
8871#endif
8872
Matthias Kloseb9621712010-04-24 17:59:49 +00008873"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008874
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008875else
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 if test "$ac_cv_type_off_t" = yes; then
8877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008879as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008880See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008881 else
8882 ac_cv_sizeof_off_t=0
8883 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008885
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8888$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008889
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890
8891
Martin v. Löwis11437992002-04-12 09:54:03 +00008892cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008893#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008894_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008895
Michael W. Hudson54241132001-12-07 15:38:26 +00008896
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8899$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008900if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008901 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008902
Matthias Kloseb9621712010-04-24 17:59:49 +00008903$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008904
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8906$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008907else
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8909$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008910fi
8911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008912# The cast to long int works around a bug in the HP C Compiler
8913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8915# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8917$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008918if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008920else
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008922#ifdef HAVE_SYS_TYPES_H
8923#include <sys/types.h>
8924#endif
8925#ifdef HAVE_TIME_H
8926#include <time.h>
8927#endif
8928
Matthias Kloseb9621712010-04-24 17:59:49 +00008929"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008930
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931else
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 if test "$ac_cv_type_time_t" = yes; then
8933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008935as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008936See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008937 else
8938 ac_cv_sizeof_time_t=0
8939 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8944$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946
8947
Martin v. Löwis11437992002-04-12 09:54:03 +00008948cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008949#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008950_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008951
Michael W. Hudson54241132001-12-07 15:38:26 +00008952
8953
Trent Mick635f6fb2000-08-23 21:33:05 +00008954# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008955ac_save_cc="$CC"
8956if test "$ac_cv_kpthread" = "yes"
8957then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008958elif test "$ac_cv_kthread" = "yes"
8959then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008960elif test "$ac_cv_pthread" = "yes"
8961then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008962fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008963
Matthias Kloseb9621712010-04-24 17:59:49 +00008964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8965$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008966have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008968/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008969
8970 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008971int
8972main ()
8973{
Guido van Rossum12580492000-09-24 16:47:19 +00008974pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 ;
8976 return 0;
8977}
Matthias Kloseb159a552010-04-25 21:00:44 +00008978
Martin v. Löwis11437992002-04-12 09:54:03 +00008979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008980if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008981 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8985$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008986if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008988# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8989# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8990# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8992$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008993if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008995else
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008997#ifdef HAVE_PTHREAD_H
8998#include <pthread.h>
8999#endif
9000
Matthias Kloseb9621712010-04-24 17:59:49 +00009001"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003else
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 if test "$ac_cv_type_pthread_t" = yes; then
9005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009007as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009008See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009009 else
9010 ac_cv_sizeof_pthread_t=0
9011 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009013
Trent Mick635f6fb2000-08-23 21:33:05 +00009014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9016$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009017
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009018
9019
Martin v. Löwis11437992002-04-12 09:54:03 +00009020cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009021#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009022_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009023
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009024
Trent Mick635f6fb2000-08-23 21:33:05 +00009025fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009026CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009027
Michael W. Hudson54241132001-12-07 15:38:26 +00009028
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009029case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009030 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009031 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9032 ;;
9033 Darwin/*)
9034 OTHER_LIBTOOL_OPT=""
9035 ;;
9036esac
9037
9038
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009039
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009040case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009041 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009042 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9043 if test "${enable_universalsdk}"; then
9044 :
9045 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009046 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009047 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009048 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009049 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009050 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009051 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009052 if test ${gcc_version} '<' 4.0
9053 then
9054 LIBTOOL_CRUFT="-lcc_dynamic"
9055 else
9056 LIBTOOL_CRUFT=""
9057 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009059 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009060else
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009062/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009063
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009064 #include <unistd.h>
9065 int main(int argc, char*argv[])
9066 {
9067 if (sizeof(long) == 4) {
9068 return 0;
9069 } else {
9070 return 1;
9071 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009072 }
9073
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009075if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009076 ac_osx_32bit=yes
9077else
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009082fi
9083
9084
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009085 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009086 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009087 i386)
9088 MACOSX_DEFAULT_ARCH="i386"
9089 ;;
9090 ppc)
9091 MACOSX_DEFAULT_ARCH="ppc"
9092 ;;
9093 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009094 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009095 ;;
9096 esac
9097 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009098 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009099 i386)
9100 MACOSX_DEFAULT_ARCH="x86_64"
9101 ;;
9102 ppc)
9103 MACOSX_DEFAULT_ARCH="ppc64"
9104 ;;
9105 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009106 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009107 ;;
9108 esac
9109
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009110 fi
9111
9112 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009113 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009114 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009115esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9117$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009118if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009119then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009120 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009122 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009123
Matthias Kloseb9621712010-04-24 17:59:49 +00009124$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009125
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9127$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009128 if test $enable_shared = "yes"
9129 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009130 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 +00009131 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009132else
Matthias Kloseb9621712010-04-24 17:59:49 +00009133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009135fi
9136
Matthias Kloseb9621712010-04-24 17:59:49 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9138$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009139case $ac_sys_system/$ac_sys_release in
9140 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009141
Matthias Kloseb9621712010-04-24 17:59:49 +00009142$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009143
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9145$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009146 ;;
9147 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009150 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009151esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009152
Guido van Rossum0a516c91994-09-12 10:58:40 +00009153# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009154
Michael W. Hudson54241132001-12-07 15:38:26 +00009155
9156
9157
9158
Benjamin Peterson99f03762010-04-11 22:15:28 +00009159
Thomas Wouters477c8d52006-05-27 19:21:47 +00009160
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009161# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9162# -- usually .so, .sl on HP-UX, .dll on Cygwin
9163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9164$as_echo_n "checking the extension of shared libraries... " >&6; }
9165if test -z "$SHLIB_SUFFIX"; then
9166 case $ac_sys_system in
9167 hp*|HP*)
9168 case `uname -m` in
9169 ia64) SHLIB_SUFFIX=.so;;
9170 *) SHLIB_SUFFIX=.sl;;
9171 esac
9172 ;;
9173 CYGWIN*) SHLIB_SUFFIX=.dll;;
9174 *) SHLIB_SUFFIX=.so;;
9175 esac
9176fi
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9178$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009179
Guido van Rossum0a516c91994-09-12 10:58:40 +00009180# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009181# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009182# (Shared libraries in this instance are shared modules to be loaded into
9183# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9185$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009186if test -z "$LDSHARED"
9187then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009188 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009189 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009190 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009191 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009192 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009193 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009194 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009196 if test "$GCC" = "yes" ; then
9197 LDSHARED='$(CC) -shared'
9198 LDCXXSHARED='$(CXX) -shared'
9199 else
9200 LDSHARED='$(CC) -G'
9201 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009202 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009203 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009204 if test "$GCC" = "yes" ; then
9205 LDSHARED='$(CC) -shared'
9206 LDCXXSHARED='$(CXX) -shared'
9207 else
9208 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009209 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009210 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009211 LDSHARED='$(CC) -bundle'
9212 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009213 if test "$enable_framework" ; then
9214 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009215 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9216 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009217 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009218 else
9219 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009220 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009221 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009222 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009223 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009224 LDSHARED='$(CC) -bundle'
9225 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009226 if test "$enable_framework" ; then
9227 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009228 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9229 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009230 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009231 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009232 # No framework, use the Python app as bundle-loader
9233 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009234 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009235 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009236 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009237 Darwin/*)
9238 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9239 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009240
Ned Deily36820b62014-06-25 13:44:22 -07009241 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9242 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9243 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9244 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9245 if test ${dep_target_major} -eq 10 && \
9246 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009247 then
Ned Deily36820b62014-06-25 13:44:22 -07009248 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009249 LDSHARED='$(CC) -bundle'
9250 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009251 if test "$enable_framework" ; then
9252 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009253 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9254 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009255 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009256 else
9257 # No framework, use the Python app as bundle-loader
9258 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9259 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009260 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009261 fi
Ned Deily36820b62014-06-25 13:44:22 -07009262 else
9263 # building for OS X 10.3 and later
9264 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9265 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9266 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009267 fi
9268 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009269 Linux*|GNU*|QNX*)
9270 LDSHARED='$(CC) -shared'
9271 LDCXXSHARED='$(CXX) -shared';;
9272 BSD/OS*/4*)
9273 LDSHARED="gcc -shared"
9274 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009275 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009276 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009277 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009278 LDSHARED='$(CC) -shared'
9279 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009280 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009281 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009282 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009283 OpenBSD*)
9284 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9285 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009286 LDSHARED='$(CC) -shared $(CCSHARED)'
9287 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009288 else
9289 case `uname -r` in
9290 [01].* | 2.[0-7] | 2.[0-7].*)
9291 LDSHARED="ld -Bshareable ${LDFLAGS}"
9292 ;;
9293 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009294 LDSHARED='$(CC) -shared $(CCSHARED)'
9295 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009296 ;;
9297 esac
9298 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009299 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009300 LDSHARED='$(CC) -shared'
9301 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009302 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009303 if test "$GCC" = "yes" ; then
9304 LDSHARED='$(CC) -shared'
9305 LDCXXSHARED='$(CXX) -shared'
9306 else
9307 LDSHARED='$(CC) -G'
9308 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009309 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009310 SCO_SV*)
9311 LDSHARED='$(CC) -Wl,-G,-Bexport'
9312 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9313 CYGWIN*)
9314 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9315 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316 *) LDSHARED="ld";;
9317 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9320$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009321LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009322BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009323# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009324# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9326$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327if test -z "$CCSHARED"
9328then
Guido van Rossum07397971997-04-29 21:49:50 +00009329 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009330 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009331 then CCSHARED="-fPIC";
9332 elif test `uname -p` = sparc;
9333 then CCSHARED="-xcode=pic32";
9334 else CCSHARED="-Kpic";
9335 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009336 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009337 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009338 else CCSHARED="+z";
9339 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009340 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009341 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009342 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009343 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009344 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009345 if test "$GCC" = "yes"
9346 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009347 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009348 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009349 SCO_SV*)
9350 if test "$GCC" = "yes"
9351 then CCSHARED="-fPIC"
9352 else CCSHARED="-Kpic -belf"
9353 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009354 IRIX*/6*) case $CC in
9355 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009356 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009357 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009358 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9361$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009362# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009363# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9365$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009366if test -z "$LINKFORSHARED"
9367then
Guido van Rossum07397971997-04-29 21:49:50 +00009368 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009369 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009370 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009371 LINKFORSHARED="-Wl,-E -Wl,+s";;
9372# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009373 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009374 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009375 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009376 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009378 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009379
9380 # Issue #18075: the default maximum stack size (8MBytes) is too
9381 # small for the default recursion limit. Increase the stack size
9382 # to ensure that tests don't crash
9383 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9384
Jack Jansene578a632001-08-15 01:27:14 +00009385 if test "$enable_framework"
9386 then
Jack Jansenda49e192005-01-07 13:08:22 +00009387 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009388 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009389 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009390 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009391 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009392 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009393 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009394 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9395 then
9396 LINKFORSHARED="-Wl,--export-dynamic"
9397 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009398 SunOS/5*) case $CC in
9399 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009400 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009401 then
9402 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009403 fi;;
9404 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009405 CYGWIN*)
9406 if test $enable_shared = "no"
9407 then
9408 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9409 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009410 QNX*)
9411 # -Wl,-E causes the symbols to be added to the dynamic
9412 # symbol table so that they can be found when a module
9413 # is loaded. -N 2048K causes the stack size to be set
9414 # to 2048 kilobytes so that the stack doesn't overflow
9415 # when running test_compile.py.
9416 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009417 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9420$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009421
Michael W. Hudson54241132001-12-07 15:38:26 +00009422
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009423
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9425$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009426if test ! "$LIBRARY" = "$LDLIBRARY"
9427then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009428 case $ac_sys_system in
9429 CYGWIN*)
9430 # Cygwin needs CCSHARED when building extension DLLs
9431 # but not when building the interpreter DLL.
9432 CFLAGSFORSHARED='';;
9433 *)
9434 CFLAGSFORSHARED='$(CCSHARED)'
9435 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9438$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009439
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009440# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9441# library (with --enable-shared).
9442# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009443# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9444# if it is not required, since it creates a dependency of the shared library
9445# to LIBS. This, in turn, means that applications linking the shared libpython
9446# don't need to link LIBS explicitly. The default should be only changed
9447# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9450$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009451case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009452 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009453 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009454esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9456$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009457
9458
Guido van Rossum627b2d71993-12-24 10:39:16 +00009459# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9461$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009462if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009463 $as_echo_n "(cached) " >&6
9464else
9465 ac_check_lib_save_LIBS=$LIBS
9466LIBS="-lsendfile $LIBS"
9467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9468/* end confdefs.h. */
9469
9470/* Override any GCC internal prototype to avoid an error.
9471 Use char because int might match the return type of a GCC
9472 builtin and then its argument prototype would still apply. */
9473#ifdef __cplusplus
9474extern "C"
9475#endif
9476char sendfile ();
9477int
9478main ()
9479{
9480return sendfile ();
9481 ;
9482 return 0;
9483}
9484_ACEOF
9485if ac_fn_c_try_link "$LINENO"; then :
9486 ac_cv_lib_sendfile_sendfile=yes
9487else
9488 ac_cv_lib_sendfile_sendfile=no
9489fi
9490rm -f core conftest.err conftest.$ac_objext \
9491 conftest$ac_exeext conftest.$ac_ext
9492LIBS=$ac_check_lib_save_LIBS
9493fi
9494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9495$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009496if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009497 cat >>confdefs.h <<_ACEOF
9498#define HAVE_LIBSENDFILE 1
9499_ACEOF
9500
9501 LIBS="-lsendfile $LIBS"
9502
9503fi
9504
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9506$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009507if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009508 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009509else
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009511LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515/* Override any GCC internal prototype to avoid an error.
9516 Use char because int might match the return type of a GCC
9517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009518#ifdef __cplusplus
9519extern "C"
9520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009521char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009522int
9523main ()
9524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ;
9527 return 0;
9528}
9529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009532else
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535rm -f core conftest.err conftest.$ac_objext \
9536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009537LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9540$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009541if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 cat >>confdefs.h <<_ACEOF
9543#define HAVE_LIBDL 1
9544_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009545
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009546 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009548fi
9549 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9551$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009554else
Martin v. Löwis11437992002-04-12 09:54:03 +00009555 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009556LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560/* Override any GCC internal prototype to avoid an error.
9561 Use char because int might match the return type of a GCC
9562 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009563#ifdef __cplusplus
9564extern "C"
9565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009566char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009567int
9568main ()
9569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 ;
9572 return 0;
9573}
9574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009577else
Matthias Kloseb9621712010-04-24 17:59:49 +00009578 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580rm -f core conftest.err conftest.$ac_objext \
9581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009582LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9585$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009586if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 cat >>confdefs.h <<_ACEOF
9588#define HAVE_LIBDLD 1
9589_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009590
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009591 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009592
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009593fi
9594 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009595
Georg Brandlb1441c72009-01-03 22:33:39 +00009596# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009597if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9599$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009602else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009603 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607/* Override any GCC internal prototype to avoid an error.
9608 Use char because int might match the return type of a GCC
9609 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009610#ifdef __cplusplus
9611extern "C"
9612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009613char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009614int
9615main ()
9616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 ;
9619 return 0;
9620}
9621_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622for ac_lib in '' pthread rt posix4; do
9623 if test -z "$ac_lib"; then
9624 ac_res="none required"
9625 else
9626 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009627 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632rm -f core conftest.err conftest.$ac_objext \
9633 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009634 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637done
Victor Stinnere0be4232011-10-25 13:06:09 +02009638if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009640else
9641 ac_cv_search_sem_init=no
9642fi
9643rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009644LIBS=$ac_func_search_save_LIBS
9645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9647$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009649if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009651
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009652fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009653 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009654 # posix4 on Solaris 2.6
9655 # pthread (first!) on Linux
9656fi
9657
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9660$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009661if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009663else
9664 ac_check_lib_save_LIBS=$LIBS
9665LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009667/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669/* Override any GCC internal prototype to avoid an error.
9670 Use char because int might match the return type of a GCC
9671 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672#ifdef __cplusplus
9673extern "C"
9674#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009675char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009676int
9677main ()
9678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009679return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009680 ;
9681 return 0;
9682}
9683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009685 ac_cv_lib_intl_textdomain=yes
9686else
Matthias Kloseb9621712010-04-24 17:59:49 +00009687 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689rm -f core conftest.err conftest.$ac_objext \
9690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009691LIBS=$ac_check_lib_save_LIBS
9692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9694$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009695if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009696
Matthias Kloseb9621712010-04-24 17:59:49 +00009697$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009698
Brett Cannonc6d936e2009-06-07 20:09:53 +00009699 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009700fi
9701
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009702
9703# checks for system dependent C++ extensions support
9704case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9706$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009708/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009709
Georg Brandl59e87bd2011-02-15 19:48:59 +00009710 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009714loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ;
9716 return 0;
9717}
Matthias Kloseb159a552010-04-25 21:00:44 +00009718
Martin v. Löwis11437992002-04-12 09:54:03 +00009719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009720if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009721
Matthias Kloseb159a552010-04-25 21:00:44 +00009722
Matthias Kloseb9621712010-04-24 17:59:49 +00009723$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009724
Matthias Kloseb159a552010-04-25 21:00:44 +00009725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009726$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009727
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009728else
Matthias Kloseb159a552010-04-25 21:00:44 +00009729
9730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009731$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009732
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009734rm -f core conftest.err conftest.$ac_objext \
9735 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009736 *) ;;
9737esac
9738
Christian Heimes985ecdc2013-11-20 11:46:18 +01009739# check for systems that require aligned memory access
9740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9741$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009742if ${ac_cv_aligned_required+:} false; then :
9743 $as_echo_n "(cached) " >&6
9744else
9745 if test "$cross_compiling" = yes; then :
9746 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009747else
9748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9749/* end confdefs.h. */
9750
9751int main()
9752{
9753 char s[16];
9754 int i, *p1, *p2;
9755 for (i=0; i < 16; i++)
9756 s[i] = i;
9757 p1 = (int*)(s+1);
9758 p2 = (int*)(s+2);
9759 if (*p1 == *p2)
9760 return 1;
9761 return 0;
9762}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009763_ACEOF
9764if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009765 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009766else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009767 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009768fi
9769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9770 conftest.$ac_objext conftest.beam conftest.$ac_ext
9771fi
9772
9773
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009774fi
9775
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9777$as_echo "$ac_cv_aligned_required" >&6; }
9778if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009779
9780$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9781
9782fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009783
9784# str, bytes and memoryview hash algorithm
9785
9786
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9788$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9789
9790# Check whether --with-hash_algorithm was given.
9791if test "${with_hash_algorithm+set}" = set; then :
9792 withval=$with_hash_algorithm;
9793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9794$as_echo "$withval" >&6; }
9795case "$withval" in
9796 siphash24)
9797 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9798
9799 ;;
9800 fnv)
9801 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9802
9803 ;;
9804 *)
9805 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9806 ;;
9807esac
9808
9809else
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9811$as_echo "default" >&6; }
9812fi
9813
9814
Charles-François Natalid30b0222014-05-08 23:08:51 +01009815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9816$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9817
9818# Check whether --with-address_sanitizer was given.
9819if test "${with_address_sanitizer+set}" = set; then :
9820 withval=$with_address_sanitizer;
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9822$as_echo "$withval" >&6; }
9823BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9824LDFLAGS="-fsanitize=address $LDFLAGS"
9825
9826else
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828$as_echo "no" >&6; }
9829fi
9830
9831
Guido van Rossum70c7f481998-03-26 18:44:10 +00009832# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9834$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009835if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +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="-lnsl $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 t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009850int
9851main ()
9852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853return t_open ();
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_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009860else
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +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 Rossum79dddcb1995-01-12 12:25:42 +00009866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9868$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009870 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009871fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009872 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9874$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009875if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009877else
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009879LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883/* Override any GCC internal prototype to avoid an error.
9884 Use char because int might match the return type of a GCC
9885 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009886#ifdef __cplusplus
9887extern "C"
9888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009889char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890int
9891main ()
9892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ;
9895 return 0;
9896}
9897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009900else
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903rm -f core conftest.err conftest.$ac_objext \
9904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009905LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9908$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009909if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009910 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009911fi
9912 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009913
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9915$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009918if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9921$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009922LIBS="$withval $LIBS"
9923
9924else
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927fi
9928
Guido van Rossum7f43da71994-08-01 12:15:30 +00009929
Victor Stinner8291b5e2015-03-20 16:03:14 +01009930
9931
9932
9933
9934
9935
9936
9937if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9938 if test -n "$ac_tool_prefix"; then
9939 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9940set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9942$as_echo_n "checking for $ac_word... " >&6; }
9943if ${ac_cv_path_PKG_CONFIG+:} false; then :
9944 $as_echo_n "(cached) " >&6
9945else
9946 case $PKG_CONFIG in
9947 [\\/]* | ?:[\\/]*)
9948 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9949 ;;
9950 *)
9951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9952for as_dir in $PATH
9953do
9954 IFS=$as_save_IFS
9955 test -z "$as_dir" && as_dir=.
9956 for ac_exec_ext in '' $ac_executable_extensions; do
9957 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9958 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9960 break 2
9961 fi
9962done
9963 done
9964IFS=$as_save_IFS
9965
9966 ;;
9967esac
9968fi
9969PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9970if test -n "$PKG_CONFIG"; then
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9972$as_echo "$PKG_CONFIG" >&6; }
9973else
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9975$as_echo "no" >&6; }
9976fi
9977
9978
9979fi
9980if test -z "$ac_cv_path_PKG_CONFIG"; then
9981 ac_pt_PKG_CONFIG=$PKG_CONFIG
9982 # Extract the first word of "pkg-config", so it can be a program name with args.
9983set dummy pkg-config; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9987 $as_echo_n "(cached) " >&6
9988else
9989 case $ac_pt_PKG_CONFIG in
9990 [\\/]* | ?:[\\/]*)
9991 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9992 ;;
9993 *)
9994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997 IFS=$as_save_IFS
9998 test -z "$as_dir" && as_dir=.
9999 for ac_exec_ext in '' $ac_executable_extensions; do
10000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10001 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003 break 2
10004 fi
10005done
10006 done
10007IFS=$as_save_IFS
10008
10009 ;;
10010esac
10011fi
10012ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10013if test -n "$ac_pt_PKG_CONFIG"; then
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10015$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10016else
10017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021 if test "x$ac_pt_PKG_CONFIG" = x; then
10022 PKG_CONFIG=""
10023 else
10024 case $cross_compiling:$ac_tool_warned in
10025yes:)
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10027$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10028ac_tool_warned=yes ;;
10029esac
10030 PKG_CONFIG=$ac_pt_PKG_CONFIG
10031 fi
10032else
10033 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10034fi
10035
10036fi
10037if test -n "$PKG_CONFIG"; then
10038 _pkg_min_version=0.9.0
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10040$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10041 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10043$as_echo "yes" >&6; }
10044 else
10045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10046$as_echo "no" >&6; }
10047 PKG_CONFIG=""
10048 fi
10049fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010050
10051# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10053$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010054
10055# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010056if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010057 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010058else
10059 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010060fi
10061
10062
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10064$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010065
10066# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10068$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010069
10070# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010071if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010072 withval=$with_system_ffi;
10073fi
10074
10075
Zachary Waref40d4dd2016-09-17 01:25:24 -050010076if test "$ac_sys_system" = "Darwin"
10077then
10078 case "$with_system_ffi" in
10079 "")
10080 with_system_ffi="no"
10081 ;;
10082 yes|no)
10083 ;;
10084 *)
10085 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10086 ;;
10087 esac
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10089$as_echo "$with_system_ffi" >&6; }
10090else
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10092$as_echo "yes" >&6; }
10093 if test "$with_system_ffi" != ""
10094 then
10095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10096$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10097 fi
10098 with_system_ffi="yes"
10099fi
Zachary Ware935043d2016-09-09 17:01:21 -070010100
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010101if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010102 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10103else
10104 LIBFFI_INCLUDEDIR=""
10105fi
10106
10107
Stefan Krah60187b52012-03-23 19:06:27 +010010108# Check for use of the system libmpdec library
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10110$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10111
10112# Check whether --with-system_libmpdec was given.
10113if test "${with_system_libmpdec+set}" = set; then :
10114 withval=$with_system_libmpdec;
10115else
10116 with_system_libmpdec="no"
10117fi
10118
10119
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10121$as_echo "$with_system_libmpdec" >&6; }
10122
Benjamin Peterson076ed002010-10-31 17:11:02 +000010123# Check for support for loadable sqlite extensions
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10125$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10126# Check whether --enable-loadable-sqlite-extensions was given.
10127if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10128 enableval=$enable_loadable_sqlite_extensions;
10129else
10130 enable_loadable_sqlite_extensions="no"
10131fi
10132
10133
10134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10135$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10136
Ned Deilyd819b932013-09-06 01:07:05 -070010137# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10138
10139
10140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10141$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10142
10143# Check whether --with-tcltk-includes was given.
10144if test "${with_tcltk_includes+set}" = set; then :
10145 withval=$with_tcltk_includes;
10146else
10147 with_tcltk_includes="default"
10148fi
10149
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10151$as_echo "$with_tcltk_includes" >&6; }
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10153$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10154
10155# Check whether --with-tcltk-libs was given.
10156if test "${with_tcltk_libs+set}" = set; then :
10157 withval=$with_tcltk_libs;
10158else
10159 with_tcltk_libs="default"
10160fi
10161
10162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10163$as_echo "$with_tcltk_libs" >&6; }
10164if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10165then
10166 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10167 then
10168 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10169 fi
10170 TCLTK_INCLUDES=""
10171 TCLTK_LIBS=""
10172else
10173 TCLTK_INCLUDES="$with_tcltk_includes"
10174 TCLTK_LIBS="$with_tcltk_libs"
10175fi
10176
Matthias Klose55708cc2009-04-30 08:06:49 +000010177# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10179$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010180
10181# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010182if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010183 withval=$with_dbmliborder;
10184if test x$with_dbmliborder = xyes
10185then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010186as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010187else
10188 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10189 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10190 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010191 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010192 fi
10193 done
10194fi
10195fi
10196
Matthias Kloseb9621712010-04-24 17:59:49 +000010197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10198$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010199
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010200# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010201
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010202USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204
Martin v. Löwis11437992002-04-12 09:54:03 +000010205
10206# Templates for things AC_DEFINEd more than once.
10207# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010208
10209
Martin v. Löwis11437992002-04-12 09:54:03 +000010210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10212$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010215if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216 withval=$with_threads;
10217fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010218
10219
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010220# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010223if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224 withval=$with_thread; with_threads=$with_thread
10225fi
10226
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010227
10228if test -z "$with_threads"
10229then with_threads="yes"
10230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10232$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010233
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010234
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010235if test "$with_threads" = "no"
10236then
10237 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010238elif test "$ac_cv_pthread_is_default" = yes
10239then
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010241
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010242 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010244
10245 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010247elif test "$ac_cv_kpthread" = "yes"
10248then
10249 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010250 if test "$ac_cv_cxx_thread" = "yes"; then
10251 CXX="$CXX -Kpthread"
10252 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010254
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010255 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010256 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010257elif test "$ac_cv_kthread" = "yes"
10258then
10259 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010260 if test "$ac_cv_cxx_thread" = "yes"; then
10261 CXX="$CXX -Kthread"
10262 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010264
10265 posix_threads=yes
10266 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010267elif test "$ac_cv_pthread" = "yes"
10268then
10269 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010270 if test "$ac_cv_cxx_thread" = "yes"; then
10271 CXX="$CXX -pthread"
10272 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010274
10275 posix_threads=yes
10276 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010277else
10278 if test ! -z "$with_threads" -a -d "$with_threads"
10279 then LDFLAGS="$LDFLAGS -L$with_threads"
10280 fi
10281 if test ! -z "$withval" -a -d "$withval"
10282 then LDFLAGS="$LDFLAGS -L$withval"
10283 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284
10285 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010286 # define _POSIX_THREADS in unistd.h. Some apparently don't
10287 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10289$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010292
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010293#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010294#ifdef _POSIX_THREADS
10295yes
10296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010297
10298_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010301 unistd_defines_pthreads=yes
10302else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010303 unistd_defines_pthreads=no
10304fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010305rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010306
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10308$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010309
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010311
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010312 # Just looking for pthread_create in libpthread is not enough:
10313 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10314 # So we really have to include pthread.h, and then link.
10315 _libs=$LIBS
10316 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10318$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010321
10322#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010323#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010324
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010325void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010326int
10327main ()
10328{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010329
10330pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ;
10332 return 0;
10333}
10334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010335if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010336
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10338$as_echo "yes" >&6; }
10339 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010340
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010341 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010342 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010343else
Martin v. Löwis11437992002-04-12 09:54:03 +000010344
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010345 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010347if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010349
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010350 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010351 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010352else
Guido van Rossumad678af1998-10-02 14:42:15 +000010353
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10355$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010356if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010357 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010358else
Martin v. Löwis11437992002-04-12 09:54:03 +000010359 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010360LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364/* Override any GCC internal prototype to avoid an error.
10365 Use char because int might match the return type of a GCC
10366 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010367#ifdef __cplusplus
10368extern "C"
10369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010370char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010371int
10372main ()
10373{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ;
10376 return 0;
10377}
10378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010379if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010381else
Matthias Kloseb9621712010-04-24 17:59:49 +000010382 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010384rm -f core conftest.err conftest.$ac_objext \
10385 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010386LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10389$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010390if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010393 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010394 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010395 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010396else
Greg Steinadf63d62000-07-05 10:38:09 +000010397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10399$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010400if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010402else
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010404LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408/* Override any GCC internal prototype to avoid an error.
10409 Use char because int might match the return type of a GCC
10410 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010411#ifdef __cplusplus
10412extern "C"
10413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010414char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010415int
10416main ()
10417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428rm -f core conftest.err conftest.$ac_objext \
10429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010430LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10433$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010434if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010437 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010438 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010439 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010440else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10443$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010444if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010446else
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010448LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452/* Override any GCC internal prototype to avoid an error.
10453 Use char because int might match the return type of a GCC
10454 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010455#ifdef __cplusplus
10456extern "C"
10457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010458char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010459int
10460main ()
10461{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 ;
10464 return 0;
10465}
10466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010467if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010468 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010469else
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472rm -f core conftest.err conftest.$ac_objext \
10473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010474LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10477$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010478if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010480
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010481 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010482 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010483 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010484else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10487$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010488if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010490else
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010492LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496/* Override any GCC internal prototype to avoid an error.
10497 Use char because int might match the return type of a GCC
10498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010499#ifdef __cplusplus
10500extern "C"
10501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010502char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010503int
10504main ()
10505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ;
10508 return 0;
10509}
10510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010511if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010513else
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516rm -f core conftest.err conftest.$ac_objext \
10517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010518LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10521$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010522if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010524
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010525 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010526 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010527 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010528else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010529
Martin v. Löwis130fb172001-07-19 11:00:41 +000010530 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010531fi
10532
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010534fi
10535
Guido van Rossum0be3e491997-05-22 20:33:33 +000010536fi
10537
Guido van Rossum49545951997-12-02 19:28:29 +000010538fi
10539
Guido van Rossumb93a8621998-05-07 13:27:32 +000010540fi
10541
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010543rm -f core conftest.err conftest.$ac_objext \
10544 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010545
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10547$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010548if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010549 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010550else
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010552LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010556/* Override any GCC internal prototype to avoid an error.
10557 Use char because int might match the return type of a GCC
10558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010559#ifdef __cplusplus
10560extern "C"
10561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010562char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010563int
10564main ()
10565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010566return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 ;
10568 return 0;
10569}
10570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010572 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576rm -f core conftest.err conftest.$ac_objext \
10577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010578LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10581$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010582if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584
Martin v. Löwis130fb172001-07-19 11:00:41 +000010585 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010586 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010587 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010588fi
10589
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010590
Neal Norwitza978ab02002-11-02 16:58:05 +000010591 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10593$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010594if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010596else
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010598LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602/* Override any GCC internal prototype to avoid an error.
10603 Use char because int might match the return type of a GCC
10604 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010605#ifdef __cplusplus
10606extern "C"
10607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010608char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010609int
10610main ()
10611{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010613 ;
10614 return 0;
10615}
10616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010617if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010619else
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622rm -f core conftest.err conftest.$ac_objext \
10623 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010624LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10627$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010628if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010631 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010632 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010633 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010634fi
10635
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010636 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010637fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010638
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639if test "$posix_threads" = "yes"; then
10640 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010641
Matthias Kloseb9621712010-04-24 17:59:49 +000010642$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010643
10644 fi
10645
10646 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10647 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010648 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010650
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651 ;;
10652 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010653$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010654
10655 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010656 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010657$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010658
10659 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010660 esac
10661
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10663$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010664 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666else
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668 ac_cv_pthread_system_supported=no
10669else
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010672
10673 #include <stdio.h>
10674 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675 void *foo(void *parm) {
10676 return NULL;
10677 }
10678 main() {
10679 pthread_attr_t attr;
10680 pthread_t id;
10681 if (pthread_attr_init(&attr)) exit(-1);
10682 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10683 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10684 exit(0);
10685 }
10686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010688 ac_cv_pthread_system_supported=yes
10689else
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010694fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696
Guido van Rossum627b2d71993-12-24 10:39:16 +000010697fi
10698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10700$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010701 if test "$ac_cv_pthread_system_supported" = "yes"; then
10702
Matthias Kloseb9621712010-04-24 17:59:49 +000010703$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010704
10705 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 for ac_func in pthread_sigmask
10707do :
10708 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010709if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010710 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010711#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010712_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010713 case $ac_sys_system in
10714 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010717
10718 ;;
10719 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010720fi
10721done
10722
Christian Heimesf77b4b22013-08-21 13:26:05 +020010723 for ac_func in pthread_atfork
10724do :
10725 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10726if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10727 cat >>confdefs.h <<_ACEOF
10728#define HAVE_PTHREAD_ATFORK 1
10729_ACEOF
10730
10731fi
10732done
10733
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010734fi
10735
10736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10740$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010741# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010742if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10746$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747 ipv6=no
10748 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10750$as_echo "yes" >&6; }
10751 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752
10753 ipv6=yes
10754 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756else
Martin v. Löwis11437992002-04-12 09:54:03 +000010757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010759/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760 /* AF_INET6 available check */
10761#include <sys/types.h>
10762#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010763int
10764main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010766int domain = AF_INET6;
10767 ;
10768 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769}
Martin v. Löwis11437992002-04-12 09:54:03 +000010770_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010771if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10774$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777else
Matthias Kloseb159a552010-04-25 21:00:44 +000010778
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10780$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010782
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010786if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10788$as_echo_n "checking if RFC2553 API is available... " >&6; }
10789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010790/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010791
10792 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010793#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010794int
10795main ()
10796{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010797struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010798 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 ;
10800 return 0;
10801}
Matthias Kloseb159a552010-04-25 21:00:44 +000010802
Martin v. Löwis11437992002-04-12 09:54:03 +000010803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010804if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010805
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010808 ipv6=yes
10809
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010810else
Matthias Kloseb159a552010-04-25 21:00:44 +000010811
10812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010813$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010814 ipv6=no
10815
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010818fi
10819
10820if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010822
10823fi
10824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825fi
10826
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827
10828ipv6type=unknown
10829ipv6lib=none
10830ipv6trylibc=no
10831
10832if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10834$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010835 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10836 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837 case $i in
10838 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010840/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842#include <netinet/in.h>
10843#ifdef IPV6_INRIA_VERSION
10844yes
10845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010846_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010849 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010851rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852
10853 ;;
10854 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010856/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010857
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858#include <netinet/in.h>
10859#ifdef __KAME__
10860yes
10861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010862_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865 ipv6type=$i;
10866 ipv6lib=inet6
10867 ipv6libdir=/usr/local/v6/lib
10868 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010870rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871
10872 ;;
10873 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010876
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877#include <features.h>
10878#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10879yes
10880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010881_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884 ipv6type=$i;
10885 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010887rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888
10889 ;;
10890 linux-inet6)
10891 if test -d /usr/inet6; then
10892 ipv6type=$i
10893 ipv6lib=inet6
10894 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010895 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896 fi
10897 ;;
10898 solaris)
10899 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010900 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901 ipv6type=$i
10902 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903 fi
10904 fi
10905 ;;
10906 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010908/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910#include <sys/param.h>
10911#ifdef _TOSHIBA_INET6
10912yes
10913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010914_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917 ipv6type=$i;
10918 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010919 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010921rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922
10923 ;;
10924 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010926/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928#include </usr/local/v6/include/sys/v6config.h>
10929#ifdef __V6D__
10930yes
10931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935 ipv6type=$i;
10936 ipv6lib=v6;
10937 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010938 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010940rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941
10942 ;;
10943 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010945/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010947#include <sys/param.h>
10948#ifdef _ZETA_MINAMI_INET6
10949yes
10950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010951_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010954 ipv6type=$i;
10955 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010956 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010958rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959
10960 ;;
10961 esac
10962 if test "$ipv6type" != "unknown"; then
10963 break
10964 fi
10965 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10967$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968fi
10969
10970if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10971 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10972 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10973 echo "using lib$ipv6lib"
10974 else
10975 if test $ipv6trylibc = "yes"; then
10976 echo "using libc"
10977 else
10978 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10979 echo "You need to fetch lib$ipv6lib.a from appropriate"
10980 echo 'ipv6 kit and compile beforehand.'
10981 exit 1
10982 fi
10983 fi
10984fi
10985
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10987$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10989/* end confdefs.h. */
10990 /* CAN_RAW_FD_FRAMES available check */
10991#include <linux/can/raw.h>
10992int
10993main ()
10994{
10995int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10996 ;
10997 return 0;
10998}
10999_ACEOF
11000if ac_fn_c_try_compile "$LINENO"; then :
11001
11002
11003$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11004
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11006$as_echo "yes" >&6; }
11007
11008else
11009
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11011$as_echo "no" >&6; }
11012
11013fi
11014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11015
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011016# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11018$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011020# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011021if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022 withval=$with_doc_strings;
11023fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011024
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011025
11026if test -z "$with_doc_strings"
11027then with_doc_strings="yes"
11028fi
11029if test "$with_doc_strings" != "no"
11030then
11031
Matthias Kloseb9621712010-04-24 17:59:49 +000011032$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011033
11034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11036$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011037
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011038# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11040$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011043if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044 withval=$with_pymalloc;
11045fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011046
Neil Schemenauera35c6882001-02-27 04:45:05 +000011047
Neil Schemenauer16c22972002-03-22 15:34:49 +000011048if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011049then
11050 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011051fi
11052if test "$with_pymalloc" != "no"
11053then
Martin v. Löwis11437992002-04-12 09:54:03 +000011054
Matthias Kloseb9621712010-04-24 17:59:49 +000011055$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011056
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011057 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11060$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011061
Benjamin Peterson05159c42009-12-03 03:01:27 +000011062# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11064$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011065
11066# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011067if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011068 withval=$with_valgrind;
11069else
11070 with_valgrind=no
11071fi
11072
Matthias Kloseb9621712010-04-24 17:59:49 +000011073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11074$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011075if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 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 +020011077if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011078
Matthias Kloseb9621712010-04-24 17:59:49 +000011079$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011080
11081else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011082 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011083
11084fi
11085
11086
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011087 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011088fi
11089
Łukasz Langaa785c872016-09-09 17:37:37 -070011090# Check for DTrace support
11091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11092$as_echo_n "checking for --with-dtrace... " >&6; }
11093
11094# Check whether --with-dtrace was given.
11095if test "${with_dtrace+set}" = set; then :
11096 withval=$with_dtrace;
11097else
11098 with_dtrace=no
11099fi
11100
11101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11102$as_echo "$with_dtrace" >&6; }
11103
11104
11105
11106
11107
11108DTRACE=
11109DFLAGS=
11110DTRACE_HEADERS=
11111DTRACE_OBJS=
11112
11113if test "$with_dtrace" = "yes"
11114then
11115 # Extract the first word of "dtrace", so it can be a program name with args.
11116set dummy dtrace; ac_word=$2
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11118$as_echo_n "checking for $ac_word... " >&6; }
11119if ${ac_cv_path_DTRACE+:} false; then :
11120 $as_echo_n "(cached) " >&6
11121else
11122 case $DTRACE in
11123 [\\/]* | ?:[\\/]*)
11124 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11125 ;;
11126 *)
11127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11128for as_dir in $PATH
11129do
11130 IFS=$as_save_IFS
11131 test -z "$as_dir" && as_dir=.
11132 for ac_exec_ext in '' $ac_executable_extensions; do
11133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11134 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11136 break 2
11137 fi
11138done
11139 done
11140IFS=$as_save_IFS
11141
11142 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11143 ;;
11144esac
11145fi
11146DTRACE=$ac_cv_path_DTRACE
11147if test -n "$DTRACE"; then
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11149$as_echo "$DTRACE" >&6; }
11150else
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11152$as_echo "no" >&6; }
11153fi
11154
11155
11156 if test "$DTRACE" = "not found"; then
11157 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11158 fi
11159
11160$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11161
11162 DTRACE_HEADERS="Include/pydtrace_probes.h"
11163
11164 # On OS X, DTrace providers do not need to be explicitly compiled and
11165 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11166 # generation flag '-G'. We check for presence of this flag, rather than
11167 # hardcoding support by OS, in the interest of robustness.
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11169$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11170if ${ac_cv_dtrace_link+:} false; then :
11171 $as_echo_n "(cached) " >&6
11172else
11173 ac_cv_dtrace_link=no
11174 echo 'BEGIN' > conftest.d
11175 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11176 ac_cv_dtrace_link=yes
11177
11178fi
11179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11180$as_echo "$ac_cv_dtrace_link" >&6; }
11181 if test "$ac_cv_dtrace_link" = "yes"; then
11182 DTRACE_OBJS="Python/pydtrace.o"
11183 fi
11184fi
11185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011186# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011187
Guido van Rossum98935bf2001-09-05 19:13:16 +000011188DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011189
Guido van Rossume97ee181999-12-20 21:27:22 +000011190# the dlopen() function means we might want to use dynload_shlib.o. some
11191# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011192for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011193do :
11194 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011195if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011196 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011197#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011198_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011199
Guido van Rossume97ee181999-12-20 21:27:22 +000011200fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011201done
Guido van Rossume97ee181999-12-20 21:27:22 +000011202
Michael W. Hudson54241132001-12-07 15:38:26 +000011203
Guido van Rossume97ee181999-12-20 21:27:22 +000011204# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11205# loading of modules.
11206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11208$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011209if test -z "$DYNLOADFILE"
11210then
11211 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011212 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11213 if test "$ac_cv_func_dlopen" = yes
11214 then DYNLOADFILE="dynload_shlib.o"
11215 else DYNLOADFILE="dynload_aix.o"
11216 fi
11217 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011218 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011219 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11220 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011221 *)
11222 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11223 # out any dynamic loading
11224 if test "$ac_cv_func_dlopen" = yes
11225 then DYNLOADFILE="dynload_shlib.o"
11226 else DYNLOADFILE="dynload_stub.o"
11227 fi
11228 ;;
11229 esac
11230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11232$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011233if test "$DYNLOADFILE" != "dynload_stub.o"
11234then
Martin v. Löwis11437992002-04-12 09:54:03 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011237
11238fi
11239
Neil Schemenauer4e425612001-06-19 15:44:15 +000011240# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11241
Michael W. Hudson54241132001-12-07 15:38:26 +000011242
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11244$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011245if test -z "$MACHDEP_OBJS"
11246then
Jack Jansene578a632001-08-15 01:27:14 +000011247 MACHDEP_OBJS=$extra_machdep_objs
11248else
11249 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011250fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011251if test -z "$MACHDEP_OBJS"; then
11252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11253$as_echo "none" >&6; }
11254else
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11256$as_echo "$MACHDEP_OBJS" >&6; }
11257fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011258
Guido van Rossum627b2d71993-12-24 10:39:16 +000011259# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011260for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011261 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011262 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011263 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011264 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011265 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011266 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011267 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011268 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011269 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011270 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011271 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011272 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011273 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011274 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11275 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011276 sigaction sigaltstack siginterrupt sigpending sigrelse \
11277 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011278 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011279 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011280 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011281do :
11282 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11283ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011284if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011286#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011287_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011288
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011289fi
11290done
11291
Michael W. Hudson54241132001-12-07 15:38:26 +000011292
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011293ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11294 #include <dirent.h>
11295"
11296if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11297
11298$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11299
11300fi
11301
11302
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011303# For some functions, having a definition is not sufficient, since
11304# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11306$as_echo_n "checking for chroot... " >&6; }
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310int
11311main ()
11312{
11313void *x=chroot
11314 ;
11315 return 0;
11316}
11317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011321
Matthias Kloseb159a552010-04-25 21:00:44 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011324else
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011327
11328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11331$as_echo_n "checking for link... " >&6; }
11332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011333/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011335int
11336main ()
11337{
11338void *x=link
11339 ;
11340 return 0;
11341}
11342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346
Matthias Kloseb159a552010-04-25 21:00:44 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011349else
Matthias Kloseb9621712010-04-24 17:59:49 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352
11353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11356$as_echo_n "checking for symlink... " >&6; }
11357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011359#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011360int
11361main ()
11362{
11363void *x=symlink
11364 ;
11365 return 0;
11366}
11367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011369
Matthias Kloseb9621712010-04-24 17:59:49 +000011370$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011371
Matthias Kloseb159a552010-04-25 21:00:44 +000011372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011373$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011374else
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011377
11378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11381$as_echo_n "checking for fchdir... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384#include <unistd.h>
11385int
11386main ()
11387{
11388void *x=fchdir
11389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011396
Matthias Kloseb159a552010-04-25 21:00:44 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011399else
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11401$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011402
11403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11406$as_echo_n "checking for fsync... " >&6; }
11407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011409#include <unistd.h>
11410int
11411main ()
11412{
11413void *x=fsync
11414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011421
Matthias Kloseb159a552010-04-25 21:00:44 +000011422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011424else
Matthias Kloseb9621712010-04-24 17:59:49 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11426$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427
11428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11431$as_echo_n "checking for fdatasync... " >&6; }
11432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011434#include <unistd.h>
11435int
11436main ()
11437{
11438void *x=fdatasync
11439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011446
Matthias Kloseb159a552010-04-25 21:00:44 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011449else
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011452
11453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11456$as_echo_n "checking for epoll... " >&6; }
11457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011458/* end confdefs.h. */
11459#include <sys/epoll.h>
11460int
11461main ()
11462{
11463void *x=epoll_create
11464 ;
11465 return 0;
11466}
11467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011471
Matthias Kloseb159a552010-04-25 21:00:44 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011473$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011474else
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011477
11478fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11481$as_echo_n "checking for epoll_create1... " >&6; }
11482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11483/* end confdefs.h. */
11484#include <sys/epoll.h>
11485int
11486main ()
11487{
11488void *x=epoll_create1
11489 ;
11490 return 0;
11491}
11492_ACEOF
11493if ac_fn_c_try_compile "$LINENO"; then :
11494
11495$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11496
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11498$as_echo "yes" >&6; }
11499else
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
11502
11503fi
11504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11506$as_echo_n "checking for kqueue... " >&6; }
11507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011508/* end confdefs.h. */
11509
11510#include <sys/types.h>
11511#include <sys/event.h>
11512
11513int
11514main ()
11515{
11516int x=kqueue()
11517 ;
11518 return 0;
11519}
11520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011524
Matthias Kloseb159a552010-04-25 21:00:44 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011530
11531fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11534$as_echo_n "checking for prlimit... " >&6; }
11535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11536/* end confdefs.h. */
11537
11538#include <sys/time.h>
11539#include <sys/resource.h>
11540
11541int
11542main ()
11543{
11544void *x=prlimit
11545 ;
11546 return 0;
11547}
11548_ACEOF
11549if ac_fn_c_try_compile "$LINENO"; then :
11550
11551$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11552
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11554$as_echo "yes" >&6; }
11555else
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11557$as_echo "no" >&6; }
11558
11559fi
11560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11561
Martin v. Löwisd5843682002-11-21 20:41:28 +000011562# On some systems (eg. FreeBSD 5), we would find a definition of the
11563# functions ctermid_r, setgroups in the library, but no prototype
11564# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11565# address to avoid compiler warnings and potential miscompilations
11566# because of the missing prototypes.
11567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11569$as_echo_n "checking for ctermid_r... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011572
Martin v. Löwisd5843682002-11-21 20:41:28 +000011573#include <stdio.h>
11574
Martin v. Löwisd5843682002-11-21 20:41:28 +000011575int
11576main ()
11577{
11578void* p = ctermid_r
11579 ;
11580 return 0;
11581}
11582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011583if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011584
Matthias Kloseb9621712010-04-24 17:59:49 +000011585$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011586
Matthias Kloseb159a552010-04-25 21:00:44 +000011587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011588$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011589else
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11591$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011592
11593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11595
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11597$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011598if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011599 $as_echo_n "(cached) " >&6
11600else
11601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011602/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011603#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011604int
11605main ()
11606{
11607void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011608
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011609 ;
11610 return 0;
11611}
11612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011614 ac_cv_flock_decl=yes
11615else
11616 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011617
11618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011620
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011621fi
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11623$as_echo "$ac_cv_flock_decl" >&6; }
11624if test "x${ac_cv_flock_decl}" = xyes; then
11625 for ac_func in flock
11626do :
11627 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011628if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011629 cat >>confdefs.h <<_ACEOF
11630#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011631_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011632
Antoine Pitroua3000072010-09-07 14:52:42 +000011633else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011635$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011636if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011637 $as_echo_n "(cached) " >&6
11638else
11639 ac_check_lib_save_LIBS=$LIBS
11640LIBS="-lbsd $LIBS"
11641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11642/* end confdefs.h. */
11643
11644/* Override any GCC internal prototype to avoid an error.
11645 Use char because int might match the return type of a GCC
11646 builtin and then its argument prototype would still apply. */
11647#ifdef __cplusplus
11648extern "C"
11649#endif
11650char flock ();
11651int
11652main ()
11653{
11654return flock ();
11655 ;
11656 return 0;
11657}
11658_ACEOF
11659if ac_fn_c_try_link "$LINENO"; then :
11660 ac_cv_lib_bsd_flock=yes
11661else
11662 ac_cv_lib_bsd_flock=no
11663fi
11664rm -f core conftest.err conftest.$ac_objext \
11665 conftest$ac_exeext conftest.$ac_ext
11666LIBS=$ac_check_lib_save_LIBS
11667fi
11668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11669$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011670if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011671 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011672
11673
11674$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11675
11676
11677fi
11678
11679
11680fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011681done
11682
Antoine Pitroua3000072010-09-07 14:52:42 +000011683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11686$as_echo_n "checking for getpagesize... " >&6; }
11687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011688/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011689
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011690#include <unistd.h>
11691
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011692int
11693main ()
11694{
11695void* p = getpagesize
11696 ;
11697 return 0;
11698}
11699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011703
Matthias Kloseb159a552010-04-25 21:00:44 +000011704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011705$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011706else
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11708$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011709
11710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011712
Victor Stinner984890f2011-11-24 13:53:38 +010011713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11714$as_echo_n "checking for broken unsetenv... " >&6; }
11715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716/* end confdefs.h. */
11717
11718#include <stdlib.h>
11719
11720int
11721main ()
11722{
11723int res = unsetenv("DUMMY")
11724 ;
11725 return 0;
11726}
11727_ACEOF
11728if ac_fn_c_try_compile "$LINENO"; then :
11729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730$as_echo "no" >&6; }
11731else
11732
11733$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11734
11735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11736$as_echo "yes" >&6; }
11737
11738fi
11739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11740
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011741for ac_prog in true
11742do
11743 # Extract the first word of "$ac_prog", so it can be a program name with args.
11744set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011747if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011749else
11750 if test -n "$TRUE"; then
11751 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11752else
11753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11754for as_dir in $PATH
11755do
11756 IFS=$as_save_IFS
11757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011760 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 $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 +000011762 break 2
11763 fi
11764done
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011766IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011767
11768fi
11769fi
11770TRUE=$ac_cv_prog_TRUE
11771if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11773$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011774else
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11776$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011777fi
11778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011780 test -n "$TRUE" && break
11781done
11782test -n "$TRUE" || TRUE="/bin/true"
11783
11784
Matthias Kloseb9621712010-04-24 17:59:49 +000011785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11786$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011787if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789else
11790 ac_check_lib_save_LIBS=$LIBS
11791LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011793/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011795/* Override any GCC internal prototype to avoid an error.
11796 Use char because int might match the return type of a GCC
11797 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798#ifdef __cplusplus
11799extern "C"
11800#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802int
11803main ()
11804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011805return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011806 ;
11807 return 0;
11808}
11809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811 ac_cv_lib_c_inet_aton=yes
11812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011815rm -f core conftest.err conftest.$ac_objext \
11816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011817LIBS=$ac_check_lib_save_LIBS
11818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11820$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011821if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011822 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11825$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011826if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828else
11829 ac_check_lib_save_LIBS=$LIBS
11830LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011832/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011834/* Override any GCC internal prototype to avoid an error.
11835 Use char because int might match the return type of a GCC
11836 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011837#ifdef __cplusplus
11838extern "C"
11839#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011841int
11842main ()
11843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011850 ac_cv_lib_resolv_inet_aton=yes
11851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011854rm -f core conftest.err conftest.$ac_objext \
11855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011856LIBS=$ac_check_lib_save_LIBS
11857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11859$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011860if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011861 cat >>confdefs.h <<_ACEOF
11862#define HAVE_LIBRESOLV 1
11863_ACEOF
11864
11865 LIBS="-lresolv $LIBS"
11866
11867fi
11868
11869
11870fi
11871
11872
Christian Heimesd0764e22007-12-04 15:00:33 +000011873# On Tru64, chflags seems to be present, but calling it will
11874# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11876$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011877if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011881 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011884/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011885
Christian Heimesd0764e22007-12-04 15:00:33 +000011886#include <sys/stat.h>
11887#include <unistd.h>
11888int main(int argc, char*argv[])
11889{
11890 if(chflags(argv[0], 0) != 0)
11891 return 1;
11892 return 0;
11893}
Ned Deily3eb67d52011-06-28 00:00:28 -070011894
Christian Heimesd0764e22007-12-04 15:00:33 +000011895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011897 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011903fi
11904
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011905
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11908$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011909if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011911if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011912 ac_cv_have_chflags="yes"
11913else
11914 ac_cv_have_chflags="no"
11915fi
11916
11917fi
11918if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011921
11922fi
11923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11925$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011926if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011930 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011931else
Matthias Kloseb9621712010-04-24 17:59:49 +000011932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011933/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011934
Christian Heimesd0764e22007-12-04 15:00:33 +000011935#include <sys/stat.h>
11936#include <unistd.h>
11937int main(int argc, char*argv[])
11938{
11939 if(lchflags(argv[0], 0) != 0)
11940 return 1;
11941 return 0;
11942}
Ned Deily3eb67d52011-06-28 00:00:28 -070011943
Christian Heimesd0764e22007-12-04 15:00:33 +000011944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011945if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011946 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011952fi
11953
11954
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11957$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011958if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011960if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011961 ac_cv_have_lchflags="yes"
11962else
11963 ac_cv_have_lchflags="no"
11964fi
11965
11966fi
11967if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011970
11971fi
11972
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011973case $ac_sys_system/$ac_sys_release in
11974Darwin/*)
11975 _CUR_CFLAGS="${CFLAGS}"
11976 _CUR_LDFLAGS="${LDFLAGS}"
11977 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11978 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11979 ;;
11980esac
11981
Matthias Kloseb9621712010-04-24 17:59:49 +000011982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11983$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011984if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011986else
11987 ac_check_lib_save_LIBS=$LIBS
11988LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011990/* end confdefs.h. */
11991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011992/* Override any GCC internal prototype to avoid an error.
11993 Use char because int might match the return type of a GCC
11994 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011995#ifdef __cplusplus
11996extern "C"
11997#endif
11998char inflateCopy ();
11999int
12000main ()
12001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012002return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012003 ;
12004 return 0;
12005}
12006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012007if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012008 ac_cv_lib_z_inflateCopy=yes
12009else
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012012rm -f core conftest.err conftest.$ac_objext \
12013 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012014LIBS=$ac_check_lib_save_LIBS
12015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12017$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012018if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012021
12022fi
12023
12024
12025case $ac_sys_system/$ac_sys_release in
12026Darwin/*)
12027 CFLAGS="${_CUR_CFLAGS}"
12028 LDFLAGS="${_CUR_LDFLAGS}"
12029 ;;
12030esac
12031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12033$as_echo_n "checking for hstrerror... " >&6; }
12034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012035/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012036
Martin v. Löwise9416172003-05-03 10:12:45 +000012037#include <netdb.h>
12038
Martin v. Löwise9416172003-05-03 10:12:45 +000012039int
12040main ()
12041{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012042void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012043 ;
12044 return 0;
12045}
12046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012050
Matthias Kloseb159a552010-04-25 21:00:44 +000012051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012052$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012053else
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12055$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012056
12057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058rm -f core conftest.err conftest.$ac_objext \
12059 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060
Matthias Kloseb9621712010-04-24 17:59:49 +000012061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12062$as_echo_n "checking for inet_aton... " >&6; }
12063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012064/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012065
Martin v. Löwis86d66262006-02-17 08:40:11 +000012066#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012067#include <sys/socket.h>
12068#include <netinet/in.h>
12069#include <arpa/inet.h>
12070
Martin v. Löwise9416172003-05-03 10:12:45 +000012071int
12072main ()
12073{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012074void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012075 ;
12076 return 0;
12077}
12078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012080
Matthias Kloseb9621712010-04-24 17:59:49 +000012081$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012082
Matthias Kloseb159a552010-04-25 21:00:44 +000012083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012084$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012085else
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12087$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012088
12089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012090rm -f core conftest.err conftest.$ac_objext \
12091 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12094$as_echo_n "checking for inet_pton... " >&6; }
12095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012097
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012098#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012099#include <sys/socket.h>
12100#include <netinet/in.h>
12101#include <arpa/inet.h>
12102
Martin v. Löwise9416172003-05-03 10:12:45 +000012103int
12104main ()
12105{
12106void* p = inet_pton
12107 ;
12108 return 0;
12109}
12110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012112
Matthias Kloseb9621712010-04-24 17:59:49 +000012113$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012114
Matthias Kloseb159a552010-04-25 21:00:44 +000012115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012116$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12119$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012120
12121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012123
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012124# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12126$as_echo_n "checking for setgroups... " >&6; }
12127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012128/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012129
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012130#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012131#ifdef HAVE_GRP_H
12132#include <grp.h>
12133#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012134
Martin v. Löwisd5843682002-11-21 20:41:28 +000012135int
12136main ()
12137{
12138void* p = setgroups
12139 ;
12140 return 0;
12141}
12142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012144
Matthias Kloseb9621712010-04-24 17:59:49 +000012145$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146
Matthias Kloseb159a552010-04-25 21:00:44 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012148$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012152
12153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012155
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012156# check for openpty and forkpty
12157
12158for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012159do :
12160 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012161if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012164_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012165
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12168$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012169if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171else
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012173LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012176
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öwis11437992002-04-12 09:54:03 +000012180#ifdef __cplusplus
12181extern "C"
12182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012183char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012184int
12185main ()
12186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000012193 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 ac_cv_lib_util_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öwis11437992002-04-12 09:54:03 +000012199LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12202$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206else
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12208$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211else
12212 ac_check_lib_save_LIBS=$LIBS
12213LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215/* end confdefs.h. */
12216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217/* Override any GCC internal prototype to avoid an error.
12218 Use char because int might match the return type of a GCC
12219 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220#ifdef __cplusplus
12221extern "C"
12222#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012223char openpty ();
12224int
12225main ()
12226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012228 ;
12229 return 0;
12230}
12231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012233 ac_cv_lib_bsd_openpty=yes
12234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012237rm -f core conftest.err conftest.$ac_objext \
12238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012239LIBS=$ac_check_lib_save_LIBS
12240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12242$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012245 LIBS="$LIBS -lbsd"
12246fi
12247
12248
12249fi
12250
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251
12252fi
12253done
12254
12255for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012256do :
12257 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012258if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012260#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012261_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262
Fred Drake8cef4cf2000-06-28 16:40:38 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12265$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012266if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268else
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012273
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öwis11437992002-04-12 09:54:03 +000012277#ifdef __cplusplus
12278extern "C"
12279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012280char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012281int
12282main ()
12283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000012290 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012291else
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 ac_cv_lib_util_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öwis11437992002-04-12 09:54:03 +000012296LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12299$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012302 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12305$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012306if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012308else
12309 ac_check_lib_save_LIBS=$LIBS
12310LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012312/* end confdefs.h. */
12313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314/* Override any GCC internal prototype to avoid an error.
12315 Use char because int might match the return type of a GCC
12316 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012317#ifdef __cplusplus
12318extern "C"
12319#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012320char forkpty ();
12321int
12322main ()
12323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012330 ac_cv_lib_bsd_forkpty=yes
12331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012334rm -f core conftest.err conftest.$ac_objext \
12335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012336LIBS=$ac_check_lib_save_LIBS
12337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12339$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012340if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012342 LIBS="$LIBS -lbsd"
12343fi
12344
12345
12346fi
12347
Fred Drake8cef4cf2000-06-28 16:40:38 +000012348
12349fi
12350done
12351
Jack Jansendd19cf82001-12-06 22:36:17 +000012352
Christian Heimesb186d002008-03-18 15:15:01 +000012353# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012354for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012355do :
12356 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012357if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012358 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012360_ACEOF
12361
12362fi
12363done
12364
12365
Michael W. Hudson54241132001-12-07 15:38:26 +000012366# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012367for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012368do :
12369 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12370ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012371if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012373#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012374_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012376fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012377done
12378
Michael W. Hudson54241132001-12-07 15:38:26 +000012379
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012380ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012381if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012382 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012383
Martin v. Löwis1142de32002-03-29 16:28:31 +000012384else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012386 *" dup2.$ac_objext "* ) ;;
12387 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012389esac
12390
Martin v. Löwis1142de32002-03-29 16:28:31 +000012391fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012392
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012393ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012394if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012395 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12396
12397else
12398 case " $LIBOBJS " in
12399 *" strdup.$ac_objext "* ) ;;
12400 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12401 ;;
12402esac
12403
12404fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012405
12406
12407for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012408do :
12409 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012410if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012412#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012415/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012417int
12418main ()
12419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012428
Guido van Rossum627b2d71993-12-24 10:39:16 +000012429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012431
Guido van Rossum627b2d71993-12-24 10:39:16 +000012432fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012433done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012434
Jack Jansen150753c2003-03-29 22:07:47 +000012435for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012436do :
12437 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012438if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012439 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012443/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012444#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012445int
12446main ()
12447{
12448setpgrp(0,0);
12449 ;
12450 return 0;
12451}
12452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012456
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012459
12460fi
12461done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012462
Thomas Wouters3a584202000-08-05 23:28:51 +000012463for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012464do :
12465 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012466if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012467 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012468#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012472#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012473int
12474main ()
12475{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_compile "$LINENO"; then :
12482
Guido van Rossum627b2d71993-12-24 10:39:16 +000012483else
Skip Montanaro6dead952003-09-25 14:50:04 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012486
Martin v. Löwis11437992002-04-12 09:54:03 +000012487
Guido van Rossum627b2d71993-12-24 10:39:16 +000012488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012490
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012491fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012492done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012493
Michael W. Hudson54241132001-12-07 15:38:26 +000012494
Victor Stinnere0be4232011-10-25 13:06:09 +020012495for ac_func in clock_gettime
12496do :
12497 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12498if test "x$ac_cv_func_clock_gettime" = xyes; then :
12499 cat >>confdefs.h <<_ACEOF
12500#define HAVE_CLOCK_GETTIME 1
12501_ACEOF
12502
12503else
12504
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12506$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12507if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12508 $as_echo_n "(cached) " >&6
12509else
12510 ac_check_lib_save_LIBS=$LIBS
12511LIBS="-lrt $LIBS"
12512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12513/* end confdefs.h. */
12514
12515/* Override any GCC internal prototype to avoid an error.
12516 Use char because int might match the return type of a GCC
12517 builtin and then its argument prototype would still apply. */
12518#ifdef __cplusplus
12519extern "C"
12520#endif
12521char clock_gettime ();
12522int
12523main ()
12524{
12525return clock_gettime ();
12526 ;
12527 return 0;
12528}
12529_ACEOF
12530if ac_fn_c_try_link "$LINENO"; then :
12531 ac_cv_lib_rt_clock_gettime=yes
12532else
12533 ac_cv_lib_rt_clock_gettime=no
12534fi
12535rm -f core conftest.err conftest.$ac_objext \
12536 conftest$ac_exeext conftest.$ac_ext
12537LIBS=$ac_check_lib_save_LIBS
12538fi
12539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12540$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12541if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12542
Victor Stinner7efb8332014-08-29 15:41:08 +020012543 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012544 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12545
12546
12547$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12548
12549
12550fi
12551
12552
12553fi
12554done
12555
12556
12557for ac_func in clock_getres
12558do :
12559 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12560if test "x$ac_cv_func_clock_getres" = xyes; then :
12561 cat >>confdefs.h <<_ACEOF
12562#define HAVE_CLOCK_GETRES 1
12563_ACEOF
12564
12565else
12566
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12568$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12569if ${ac_cv_lib_rt_clock_getres+:} false; then :
12570 $as_echo_n "(cached) " >&6
12571else
12572 ac_check_lib_save_LIBS=$LIBS
12573LIBS="-lrt $LIBS"
12574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12575/* end confdefs.h. */
12576
12577/* Override any GCC internal prototype to avoid an error.
12578 Use char because int might match the return type of a GCC
12579 builtin and then its argument prototype would still apply. */
12580#ifdef __cplusplus
12581extern "C"
12582#endif
12583char clock_getres ();
12584int
12585main ()
12586{
12587return clock_getres ();
12588 ;
12589 return 0;
12590}
12591_ACEOF
12592if ac_fn_c_try_link "$LINENO"; then :
12593 ac_cv_lib_rt_clock_getres=yes
12594else
12595 ac_cv_lib_rt_clock_getres=no
12596fi
12597rm -f core conftest.err conftest.$ac_objext \
12598 conftest$ac_exeext conftest.$ac_ext
12599LIBS=$ac_check_lib_save_LIBS
12600fi
12601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12602$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12603if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12604
12605 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12606
12607
12608fi
12609
12610
12611fi
12612done
12613
12614
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012615for ac_func in clock_settime
12616do :
12617 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12618if test "x$ac_cv_func_clock_settime" = xyes; then :
12619 cat >>confdefs.h <<_ACEOF
12620#define HAVE_CLOCK_SETTIME 1
12621_ACEOF
12622
12623else
12624
12625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12626$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12627if ${ac_cv_lib_rt_clock_settime+:} false; then :
12628 $as_echo_n "(cached) " >&6
12629else
12630 ac_check_lib_save_LIBS=$LIBS
12631LIBS="-lrt $LIBS"
12632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12633/* end confdefs.h. */
12634
12635/* Override any GCC internal prototype to avoid an error.
12636 Use char because int might match the return type of a GCC
12637 builtin and then its argument prototype would still apply. */
12638#ifdef __cplusplus
12639extern "C"
12640#endif
12641char clock_settime ();
12642int
12643main ()
12644{
12645return clock_settime ();
12646 ;
12647 return 0;
12648}
12649_ACEOF
12650if ac_fn_c_try_link "$LINENO"; then :
12651 ac_cv_lib_rt_clock_settime=yes
12652else
12653 ac_cv_lib_rt_clock_settime=no
12654fi
12655rm -f core conftest.err conftest.$ac_objext \
12656 conftest$ac_exeext conftest.$ac_ext
12657LIBS=$ac_check_lib_save_LIBS
12658fi
12659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12660$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12661if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12662
12663 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12664
12665
12666fi
12667
12668
12669fi
12670done
12671
12672
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12674$as_echo_n "checking for major... " >&6; }
12675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012677
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012678#if defined(MAJOR_IN_MKDEV)
12679#include <sys/mkdev.h>
12680#elif defined(MAJOR_IN_SYSMACROS)
12681#include <sys/sysmacros.h>
12682#else
12683#include <sys/types.h>
12684#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012685
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012686int
12687main ()
12688{
12689
12690 makedev(major(0),minor(0));
12691
12692 ;
12693 return 0;
12694}
12695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012697
12698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012700
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12702$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012703
12704else
Skip Montanaro6dead952003-09-25 14:50:04 +000012705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12707$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012708
12709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012710rm -f core conftest.err conftest.$ac_objext \
12711 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012712
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012713# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12714# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12716$as_echo_n "checking for if_nameindex... " >&6; }
12717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12718/* end confdefs.h. */
12719
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012720#include <stdio.h>
12721#ifdef STDC_HEADERS
12722# include <stdlib.h>
12723# include <stddef.h>
12724#else
12725# ifdef HAVE_STDLIB_H
12726# include <stdlib.h>
12727# endif
12728#endif
12729#ifdef HAVE_SYS_SOCKET_H
12730# include <sys/socket.h>
12731#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012732#ifdef HAVE_NET_IF_H
12733# include <net/if.h>
12734#endif
12735
12736int
12737main ()
12738{
12739struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12740 ;
12741 return 0;
12742}
12743_ACEOF
12744if ac_fn_c_try_link "$LINENO"; then :
12745
12746$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12747
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12749$as_echo "yes" >&6; }
12750else
12751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12752$as_echo "no" >&6; }
12753
12754fi
12755rm -f core conftest.err conftest.$ac_objext \
12756 conftest$ac_exeext conftest.$ac_ext
12757
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012758# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12759# macro is not defined in android-ndk-r13.
12760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12761$as_echo_n "checking for lockf... " >&6; }
12762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12763/* end confdefs.h. */
12764#include <unistd.h>
12765int
12766main ()
12767{
12768lockf(0, F_LOCK, 0);
12769 ;
12770 return 0;
12771}
12772_ACEOF
12773if ac_fn_c_try_link "$LINENO"; then :
12774
12775$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12776
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12778$as_echo "yes" >&6; }
12779else
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12781$as_echo "no" >&6; }
12782
12783fi
12784rm -f core conftest.err conftest.$ac_objext \
12785 conftest$ac_exeext conftest.$ac_ext
12786
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012787# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012788# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12790$as_echo_n "checking for getaddrinfo... " >&6; }
12791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012792/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012793
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012794#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012795#include <sys/socket.h>
12796#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012797#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012798
Martin v. Löwis11437992002-04-12 09:54:03 +000012799int
12800main ()
12801{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012802getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 ;
12804 return 0;
12805}
12806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012807if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012808 have_getaddrinfo=yes
12809else
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012812rm -f core conftest.err conftest.$ac_objext \
12813 conftest$ac_exeext conftest.$ac_ext
12814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12815$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012816if test $have_getaddrinfo = yes
12817then
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12819$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012820 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012822else
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012824
12825if test "${enable_ipv6+set}" = set; then
12826 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12827else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012828 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012829fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012830else
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012832/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012833
Stefan Krah19c21392012-11-22 23:47:32 +010012834#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012835#include <sys/types.h>
12836#include <netdb.h>
12837#include <string.h>
12838#include <sys/socket.h>
12839#include <netinet/in.h>
12840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012841int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012842{
12843 int passive, gaierr, inet4 = 0, inet6 = 0;
12844 struct addrinfo hints, *ai, *aitop;
12845 char straddr[INET6_ADDRSTRLEN], strport[16];
12846
12847 for (passive = 0; passive <= 1; passive++) {
12848 memset(&hints, 0, sizeof(hints));
12849 hints.ai_family = AF_UNSPEC;
12850 hints.ai_flags = passive ? AI_PASSIVE : 0;
12851 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012852 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12854 (void)gai_strerror(gaierr);
12855 goto bad;
12856 }
12857 for (ai = aitop; ai; ai = ai->ai_next) {
12858 if (ai->ai_addr == NULL ||
12859 ai->ai_addrlen == 0 ||
12860 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12861 straddr, sizeof(straddr), strport, sizeof(strport),
12862 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12863 goto bad;
12864 }
12865 switch (ai->ai_family) {
12866 case AF_INET:
12867 if (strcmp(strport, "54321") != 0) {
12868 goto bad;
12869 }
12870 if (passive) {
12871 if (strcmp(straddr, "0.0.0.0") != 0) {
12872 goto bad;
12873 }
12874 } else {
12875 if (strcmp(straddr, "127.0.0.1") != 0) {
12876 goto bad;
12877 }
12878 }
12879 inet4++;
12880 break;
12881 case AF_INET6:
12882 if (strcmp(strport, "54321") != 0) {
12883 goto bad;
12884 }
12885 if (passive) {
12886 if (strcmp(straddr, "::") != 0) {
12887 goto bad;
12888 }
12889 } else {
12890 if (strcmp(straddr, "::1") != 0) {
12891 goto bad;
12892 }
12893 }
12894 inet6++;
12895 break;
12896 case AF_UNSPEC:
12897 goto bad;
12898 break;
12899 default:
12900 /* another family support? */
12901 break;
12902 }
12903 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012904 freeaddrinfo(aitop);
12905 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012906 }
12907
12908 if (!(inet4 == 0 || inet4 == 2))
12909 goto bad;
12910 if (!(inet6 == 0 || inet6 == 2))
12911 goto bad;
12912
12913 if (aitop)
12914 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012915 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012916
12917 bad:
12918 if (aitop)
12919 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012920 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012921}
12922
Martin v. Löwis11437992002-04-12 09:54:03 +000012923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012924if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012925 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012926else
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12930 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012933fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012934
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12938$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12939
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012940if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012941then
12942 if test $ipv6 = yes
12943 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012944 echo 'Fatal: You must get working getaddrinfo() function.'
12945 echo ' or you can specify "--disable-ipv6"'.
12946 exit 1
12947 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012948else
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012951
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012952fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012953
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012954for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012955do :
12956 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012957if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012959#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012960_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012961
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012962fi
12963done
12964
Michael W. Hudson54241132001-12-07 15:38:26 +000012965
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12968$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012969if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012971else
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012973/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012974#include <sys/types.h>
12975#include <sys/time.h>
12976#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
Martin v. Löwis11437992002-04-12 09:54:03 +000012978int
12979main ()
12980{
12981if ((struct tm *) 0)
12982return 0;
12983 ;
12984 return 0;
12985}
12986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012987if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012988 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012989else
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12995$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012996if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012999
13000fi
13001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13003$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013004if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013008/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013009#include <sys/types.h>
13010#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013011
Martin v. Löwis11437992002-04-12 09:54:03 +000013012int
13013main ()
13014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015struct tm tm;
13016 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 ;
13019 return 0;
13020}
13021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013022if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013023 ac_cv_struct_tm=time.h
13024else
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13030$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013031if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013034
13035fi
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037ac_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 +000013038#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040"
Victor Stinnere0be4232011-10-25 13:06:09 +020013041if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013042
13043cat >>confdefs.h <<_ACEOF
13044#define HAVE_STRUCT_TM_TM_ZONE 1
13045_ACEOF
13046
13047
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013049
Martin v. Löwis11437992002-04-12 09:54:03 +000013050if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013053
13054else
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13056"
Victor Stinnere0be4232011-10-25 13:06:09 +020013057if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061fi
13062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013064#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065_ACEOF
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13068$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013069if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013073/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013074#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075#if !HAVE_DECL_TZNAME
13076extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013078
Martin v. Löwis11437992002-04-12 09:54:03 +000013079int
13080main ()
13081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013082return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013083 ;
13084 return 0;
13085}
13086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013087if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013088 ac_cv_var_tzname=yes
13089else
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013092rm -f core conftest.err conftest.$ac_objext \
13093 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13096$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013097 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013100
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013101 fi
13102fi
13103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104ac_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 +020013105if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013106
13107cat >>confdefs.h <<_ACEOF
13108#define HAVE_STRUCT_STAT_ST_RDEV 1
13109_ACEOF
13110
13111
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013112fi
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114ac_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 +020013115if test "x$ac_cv_member_struct_stat_st_blksize" = 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_BLKSIZE 1
13119_ACEOF
13120
13121
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013122fi
13123
Matthias Kloseb9621712010-04-24 17:59:49 +000013124ac_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 +020013125if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013126
13127cat >>confdefs.h <<_ACEOF
13128#define HAVE_STRUCT_STAT_ST_FLAGS 1
13129_ACEOF
13130
13131
13132fi
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134ac_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 +020013135if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013136
13137cat >>confdefs.h <<_ACEOF
13138#define HAVE_STRUCT_STAT_ST_GEN 1
13139_ACEOF
13140
13141
13142fi
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144ac_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 +020013145if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013146
13147cat >>confdefs.h <<_ACEOF
13148#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13149_ACEOF
13150
13151
13152fi
13153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154ac_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 +020013155if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157cat >>confdefs.h <<_ACEOF
13158#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13159_ACEOF
13160
13161
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013162fi
13163
Stefan Krah267b6392016-04-26 01:09:18 +020013164ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13165 #include <sys/types.h>
13166 #include <pwd.h>
13167
13168"
13169if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13170
13171cat >>confdefs.h <<_ACEOF
13172#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13173_ACEOF
13174
13175
13176fi
13177ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13178 #include <sys/types.h>
13179 #include <pwd.h>
13180
13181"
13182if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13183
13184cat >>confdefs.h <<_ACEOF
13185#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13186_ACEOF
13187
13188
13189fi
13190
Zachary Ware6a6967e2016-10-01 00:47:27 -050013191# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13192ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13193"
13194if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13195
13196cat >>confdefs.h <<_ACEOF
13197#define HAVE_SIGINFO_T_SI_BAND 1
13198_ACEOF
13199
13200
13201fi
13202
Michael W. Hudson54241132001-12-07 15:38:26 +000013203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13205$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013206if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013208else
Matthias Kloseb159a552010-04-25 21:00:44 +000013209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013211/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013212#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013213int
13214main ()
13215{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013216return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 ;
13218 return 0;
13219}
13220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013221if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013222 ac_cv_header_time_altzone=yes
13223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228fi
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13231$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013232if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013235
13236fi
13237
Guido van Rossumda88dad1995-01-26 00:46:29 +000013238was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13240$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013242/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013243
13244#include <sys/types.h>
13245#include <sys/select.h>
13246#include <sys/time.h>
13247
Martin v. Löwis11437992002-04-12 09:54:03 +000013248int
13249main ()
13250{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013251;
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ;
13253 return 0;
13254}
13255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013260
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013261 was_it_defined=yes
13262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13266$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267
Matthias Kloseb9621712010-04-24 17:59:49 +000013268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13269$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013270if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272else
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013274/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013275#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013276int
13277main ()
13278{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013279struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285 ac_cv_struct_addrinfo=yes
13286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13290fi
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13293$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013294if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013297
13298fi
13299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13301$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013302if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013306/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013307
13308# include <sys/types.h>
13309# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013310int
13311main ()
13312{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013313struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 ;
13315 return 0;
13316}
13317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319 ac_cv_struct_sockaddr_storage=yes
13320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13324fi
13325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13327$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013328if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013331
13332fi
13333
Christian Heimesdffa3942016-09-05 23:54:41 +020013334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13335$as_echo_n "checking for sockaddr_alg... " >&6; }
13336if ${ac_cv_struct_sockaddr_alg+:} false; then :
13337 $as_echo_n "(cached) " >&6
13338else
13339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13340/* end confdefs.h. */
13341
13342# include <sys/types.h>
13343# include <sys/socket.h>
13344# include <linux/if_alg.h>
13345int
13346main ()
13347{
13348struct sockaddr_alg s
13349 ;
13350 return 0;
13351}
13352_ACEOF
13353if ac_fn_c_try_compile "$LINENO"; then :
13354 ac_cv_struct_sockaddr_alg=yes
13355else
13356 ac_cv_struct_sockaddr_alg=no
13357fi
13358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13359fi
13360
13361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13362$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13363if test $ac_cv_struct_sockaddr_alg = yes; then
13364
13365$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13366
13367fi
13368
Guido van Rossum627b2d71993-12-24 10:39:16 +000013369# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13372$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013373if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013378$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013379int
13380main ()
13381{
13382static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013383test_array [0] = 0;
13384return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
13386 ;
13387 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013388}
Martin v. Löwis11437992002-04-12 09:54:03 +000013389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013390if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013391 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013392else
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13398$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013401
13402fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13405$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013406if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013408else
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013410/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412int
13413main ()
13414{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013417 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013419 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421 char const *const *pcpcc;
13422 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 /* NEC SVR4.0.2 mips cc rejects this. */
13424 struct point {int x, y;};
13425 static struct point const zero = {0,0};
13426 /* AIX XL C 1.02.0.0 rejects this.
13427 It does not let you subtract one const X* pointer from another in
13428 an arm of an if-expression whose if-part is not a constant
13429 expression */
13430 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013433 ++pcpcc;
13434 ppc = (char**) pcpcc;
13435 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013436 { /* SCO 3.2v4 cc rejects this sort of thing. */
13437 char tx;
13438 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 }
13444 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13445 int x[] = {25, 17};
13446 const int *foo = &x[0];
13447 ++foo;
13448 }
13449 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13450 typedef const int *iptr;
13451 iptr p = 0;
13452 ++p;
13453 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013454 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013456 struct s { int j; const int *ap[3]; } bx;
13457 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013458 }
13459 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13460 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013461 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013464#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013465
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ;
13467 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013468}
Martin v. Löwis11437992002-04-12 09:54:03 +000013469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471 ac_cv_c_const=yes
13472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13478$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482
13483fi
13484
Michael W. Hudson54241132001-12-07 15:38:26 +000013485
Guido van Rossumda88dad1995-01-26 00:46:29 +000013486works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13488$as_echo_n "checking for working volatile... " >&6; }
13489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013490/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013491
Martin v. Löwis11437992002-04-12 09:54:03 +000013492int
13493main ()
13494{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013495volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 ;
13497 return 0;
13498}
13499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013500if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013501 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013502else
Skip Montanaro6dead952003-09-25 14:50:04 +000013503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013505
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013506
Guido van Rossum627b2d71993-12-24 10:39:16 +000013507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13510$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013511
Guido van Rossumda88dad1995-01-26 00:46:29 +000013512works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13514$as_echo_n "checking for working signed char... " >&6; }
13515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013516/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013517
Martin v. Löwis11437992002-04-12 09:54:03 +000013518int
13519main ()
13520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ;
13523 return 0;
13524}
13525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013526if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013527 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013528else
Skip Montanaro6dead952003-09-25 14:50:04 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013531
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013532
Guido van Rossum7f43da71994-08-01 12:15:30 +000013533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13536$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013537
Guido van Rossumda88dad1995-01-26 00:46:29 +000013538have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13540$as_echo_n "checking for prototypes... " >&6; }
13541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013542/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013543int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013544int
13545main ()
13546{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 ;
13549 return 0;
13550}
13551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Kloseb159a552010-04-25 21:00:44 +000013556 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13560$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013561
Guido van Rossumda88dad1995-01-26 00:46:29 +000013562works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13564$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013566/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013567
13568#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013569int foo(int x, ...) {
13570 va_list va;
13571 va_start(va, x);
13572 va_arg(va, int);
13573 va_arg(va, char *);
13574 va_arg(va, double);
13575 return 0;
13576}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013577
Martin v. Löwis11437992002-04-12 09:54:03 +000013578int
13579main ()
13580{
Guido van Rossum90eea071996-08-30 20:58:57 +000013581return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
13584}
13585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
13588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013591 works=yes
13592
Guido van Rossum627b2d71993-12-24 10:39:16 +000013593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13596$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597
Martin v. Löwisd6320502004-08-12 13:45:08 +000013598# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13600$as_echo_n "checking for socketpair... " >&6; }
13601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013602/* end confdefs.h. */
13603
13604#include <sys/types.h>
13605#include <sys/socket.h>
13606
13607int
13608main ()
13609{
13610void *x=socketpair
13611 ;
13612 return 0;
13613}
13614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013618
Matthias Kloseb159a552010-04-25 21:00:44 +000013619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013621else
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13623$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013624
13625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013627
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13630$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013633#include <sys/types.h>
13634#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013635int
13636main ()
13637{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013638struct sockaddr x;
13639x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013640 ;
13641 return 0;
13642}
13643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013644if ac_fn_c_try_compile "$LINENO"; then :
13645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13646$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013649
13650else
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13652$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013653
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013656
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013657# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013658
13659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013661if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13666$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013667 OLD_CFLAGS=$CFLAGS
13668 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013670/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013671
13672# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674int
13675main ()
13676{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013677
13678 char *name;
13679 struct hostent *he, *res;
13680 char buffer[2048];
13681 int buflen = 2048;
13682 int h_errnop;
13683
13684 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013685
13686 ;
13687 return 0;
13688}
13689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694
Matthias Kloseb9621712010-04-24 17:59:49 +000013695$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13698$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013700else
Skip Montanaro6dead952003-09-25 14:50:04 +000013701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13703$as_echo "no" >&6; }
13704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13705$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013707/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013708
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013709# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
Martin v. Löwis11437992002-04-12 09:54:03 +000013711int
13712main ()
13713{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013714
13715 char *name;
13716 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013717 char buffer[2048];
13718 int buflen = 2048;
13719 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013720
Matthias Kloseb159a552010-04-25 21:00:44 +000013721 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
13723 ;
13724 return 0;
13725}
13726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013727if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013730
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
Matthias Kloseb159a552010-04-25 21:00:44 +000013732$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13735$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013737else
Skip Montanaro6dead952003-09-25 14:50:04 +000013738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13740$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13742$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13744/* end confdefs.h. */
13745
13746# include <netdb.h>
13747
13748int
13749main ()
13750{
13751
13752 char *name;
13753 struct hostent *he;
13754 struct hostent_data data;
13755
13756 (void) gethostbyname_r(name, he, &data);
13757
13758 ;
13759 return 0;
13760}
13761_ACEOF
13762if ac_fn_c_try_compile "$LINENO"; then :
13763
13764 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13765
13766
13767$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13768
13769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13770$as_echo "yes" >&6; }
13771
13772else
13773
13774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13775$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013776
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013782
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013785 CFLAGS=$OLD_CFLAGS
13786
13787else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 for ac_func in gethostbyname
13790do :
13791 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013792if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013794#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013795_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013796
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013797fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013798done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013799
Michael W. Hudson54241132001-12-07 15:38:26 +000013800
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013801fi
13802
Michael W. Hudson54241132001-12-07 15:38:26 +000013803
13804
13805
13806
13807
13808
Guido van Rossum627b2d71993-12-24 10:39:16 +000013809# checks for system services
13810# (none yet)
13811
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013813ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013814if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013815
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013816else
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13818$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013819if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013821else
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013823LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827/* Override any GCC internal prototype to avoid an error.
13828 Use char because int might match the return type of a GCC
13829 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013830#ifdef __cplusplus
13831extern "C"
13832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013833char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013834int
13835main ()
13836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ;
13839 return 0;
13840}
13841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013842if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013844else
Matthias Kloseb9621712010-04-24 17:59:49 +000013845 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013847rm -f core conftest.err conftest.$ac_objext \
13848 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013849LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13852$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013853if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 cat >>confdefs.h <<_ACEOF
13855#define HAVE_LIBIEEE 1
13856_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013858 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859
Guido van Rossum627b2d71993-12-24 10:39:16 +000013860fi
13861
Michael W. Hudson54241132001-12-07 15:38:26 +000013862
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013863fi
13864
Michael W. Hudson54241132001-12-07 15:38:26 +000013865
Guido van Rossum7f253911997-05-09 02:42:48 +000013866# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13868$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013872 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013873if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013874then
13875
Matthias Kloseb9621712010-04-24 17:59:49 +000013876$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13879$as_echo "yes" >&6; }
13880else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13881$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013882fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013883else
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13885$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886fi
13887
Guido van Rossum7f253911997-05-09 02:42:48 +000013888
Guido van Rossum7f43da71994-08-01 12:15:30 +000013889# check for --with-libm=...
13890
Guido van Rossum563e7081996-09-10 18:20:48 +000013891case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013892Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013893*) LIBM=-lm
13894esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13896$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013899if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013901if test "$withval" = no
13902then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13904$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013905elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013906then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13908$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013909else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013910fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013911else
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13913$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914fi
13915
Guido van Rossum7f43da71994-08-01 12:15:30 +000013916
13917# check for --with-libc=...
13918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13920$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013923if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013925if test "$withval" = no
13926then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13928$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013929elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013930then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13932$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013933else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013934fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013935else
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13937$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938fi
13939
Guido van Rossum7f43da71994-08-01 12:15:30 +000013940
Stefan Krah1919b7e2012-03-21 18:25:23 +010013941# **************************************
13942# * Check for gcc x64 inline assembler *
13943# **************************************
13944
13945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13946$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13948/* end confdefs.h. */
13949
13950int
13951main ()
13952{
13953
13954 __asm__ __volatile__ ("movq %rcx, %rax");
13955
13956 ;
13957 return 0;
13958}
13959_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013960if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013961 have_gcc_asm_for_x64=yes
13962else
13963 have_gcc_asm_for_x64=no
13964fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013965rm -f core conftest.err conftest.$ac_objext \
13966 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13968$as_echo "$have_gcc_asm_for_x64" >&6; }
13969if test "$have_gcc_asm_for_x64" = yes
13970then
13971
13972$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13973
13974fi
13975
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976# **************************************************
13977# * Check for various properties of floating point *
13978# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13981$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013982if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984else
13985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987 ac_cv_little_endian_double=no
13988else
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990/* end confdefs.h. */
13991
13992#include <string.h>
13993int main() {
13994 double x = 9006104071832581.0;
13995 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13996 return 0;
13997 else
13998 return 1;
13999}
14000
14001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014002if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014003 ac_cv_little_endian_double=yes
14004else
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14008 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014009fi
14010
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011fi
14012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14014$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014015if test "$ac_cv_little_endian_double" = yes
14016then
14017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014019
14020fi
14021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14023$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014024if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026else
14027
Matthias Kloseb9621712010-04-24 17:59:49 +000014028if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014029 ac_cv_big_endian_double=no
14030else
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014032/* end confdefs.h. */
14033
14034#include <string.h>
14035int main() {
14036 double x = 9006104071832581.0;
14037 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14038 return 0;
14039 else
14040 return 1;
14041}
14042
14043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014044if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014045 ac_cv_big_endian_double=yes
14046else
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014051fi
14052
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014053fi
14054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14056$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014057if test "$ac_cv_big_endian_double" = yes
14058then
14059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014061
14062fi
14063
14064# Some ARM platforms use a mixed-endian representation for doubles.
14065# While Python doesn't currently have full support for these platforms
14066# (see e.g., issue 1762561), we can at least make sure that float <-> string
14067# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14069$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014070if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014072else
14073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014075 ac_cv_mixed_endian_double=no
14076else
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014078/* end confdefs.h. */
14079
14080#include <string.h>
14081int main() {
14082 double x = 9006104071832581.0;
14083 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14084 return 0;
14085 else
14086 return 1;
14087}
14088
14089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014090if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014091 ac_cv_mixed_endian_double=yes
14092else
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14096 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014097fi
14098
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014099fi
14100
Matthias Kloseb9621712010-04-24 17:59:49 +000014101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14102$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014103if test "$ac_cv_mixed_endian_double" = yes
14104then
14105
Matthias Kloseb9621712010-04-24 17:59:49 +000014106$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014107
14108fi
14109
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014110# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014111# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014112# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014113# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014114# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014115# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014116
14117# This inline assembler syntax may also work for suncc and icc,
14118# so we try it on all platforms.
14119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14121$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014123/* end confdefs.h. */
14124
14125int
14126main ()
14127{
14128
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014129 unsigned short cw;
14130 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14131 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014132
14133 ;
14134 return 0;
14135}
14136_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014137if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014138 have_gcc_asm_for_x87=yes
14139else
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014141fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014142rm -f core conftest.err conftest.$ac_objext \
14143 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14145$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014146if test "$have_gcc_asm_for_x87" = yes
14147then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014150
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014152
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14154$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14156/* end confdefs.h. */
14157
14158int
14159main ()
14160{
14161
14162 unsigned int fpcr;
14163 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14164 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14165
14166 ;
14167 return 0;
14168}
14169_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014170if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014171 have_gcc_asm_for_mc68881=yes
14172else
14173 have_gcc_asm_for_mc68881=no
14174fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014175rm -f core conftest.err conftest.$ac_objext \
14176 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14178$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14179if test "$have_gcc_asm_for_mc68881" = yes
14180then
14181
14182$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14183
14184fi
14185
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014186# Detect whether system arithmetic is subject to x87-style double
14187# rounding issues. The result of this test has little meaning on non
14188# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14189# mode is round-to-nearest and double rounding issues are present, and
14190# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14192$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014193# $BASECFLAGS may affect the result
14194ac_save_cc="$CC"
14195CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014196if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014197 ac_cv_x87_double_rounding=no
14198else
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014200/* end confdefs.h. */
14201
14202#include <stdlib.h>
14203#include <math.h>
14204int main() {
14205 volatile double x, y, z;
14206 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14207 x = 0.99999999999999989; /* 1-2**-53 */
14208 y = 1./x;
14209 if (y != 1.)
14210 exit(0);
14211 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14212 x = 1e16;
14213 y = 2.99999;
14214 z = x + y;
14215 if (z != 1e16+4.)
14216 exit(0);
14217 /* both tests show evidence of double rounding */
14218 exit(1);
14219}
14220
14221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014222if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014223 ac_cv_x87_double_rounding=no
14224else
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014229fi
14230
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014231CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14233$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014234if test "$ac_cv_x87_double_rounding" = yes
14235then
14236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014238
14239fi
14240
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014241# ************************************
14242# * Check for mathematical functions *
14243# ************************************
14244
14245LIBS_SAVE=$LIBS
14246LIBS="$LIBS $LIBM"
14247
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014248for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14249do :
14250 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14251ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014252if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014253 cat >>confdefs.h <<_ACEOF
14254#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14255_ACEOF
14256
14257fi
14258done
14259
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014260for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014261do :
14262 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14263ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014264if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014265 cat >>confdefs.h <<_ACEOF
14266#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14267_ACEOF
14268
14269fi
14270done
14271
14272ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14273"
Victor Stinnere0be4232011-10-25 13:06:09 +020014274if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014275 ac_have_decl=1
14276else
14277 ac_have_decl=0
14278fi
14279
14280cat >>confdefs.h <<_ACEOF
14281#define HAVE_DECL_ISINF $ac_have_decl
14282_ACEOF
14283ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14284"
Victor Stinnere0be4232011-10-25 13:06:09 +020014285if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014286 ac_have_decl=1
14287else
14288 ac_have_decl=0
14289fi
14290
14291cat >>confdefs.h <<_ACEOF
14292#define HAVE_DECL_ISNAN $ac_have_decl
14293_ACEOF
14294ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14295"
Victor Stinnere0be4232011-10-25 13:06:09 +020014296if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014297 ac_have_decl=1
14298else
14299 ac_have_decl=0
14300fi
14301
14302cat >>confdefs.h <<_ACEOF
14303#define HAVE_DECL_ISFINITE $ac_have_decl
14304_ACEOF
14305
14306
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014307# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14308# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14310$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014311if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014313else
14314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014316 ac_cv_tanh_preserves_zero_sign=no
14317else
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014319/* end confdefs.h. */
14320
14321#include <math.h>
14322#include <stdlib.h>
14323int main() {
14324 /* return 0 if either negative zeros don't exist
14325 on this platform or if negative zeros exist
14326 and tanh(-0.) == -0. */
14327 if (atan2(0., -1.) == atan2(-0., -1.) ||
14328 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14329 else exit(1);
14330}
14331
14332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014333if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014334 ac_cv_tanh_preserves_zero_sign=yes
14335else
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014340fi
14341
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014342fi
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14345$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014346if test "$ac_cv_tanh_preserves_zero_sign" = yes
14347then
14348
Matthias Kloseb9621712010-04-24 17:59:49 +000014349$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014350
14351fi
14352
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014353if test "$ac_cv_func_log1p" = yes
14354then
14355 # On some versions of AIX, log1p(-0.) returns 0. instead of
14356 # -0. See issue #9920.
14357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14358$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014359 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014360 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014361else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014362
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014363 if test "$cross_compiling" = yes; then :
14364 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014365else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14367/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014368
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014369 #include <math.h>
14370 #include <stdlib.h>
14371 int main() {
14372 /* Fail if the signs of log1p(-0.) and -0. can be
14373 distinguished. */
14374 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14375 return 0;
14376 else
14377 return 1;
14378 }
14379
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014380_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014381if ac_fn_c_try_run "$LINENO"; then :
14382 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014383else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014384 ac_cv_log1p_drops_zero_sign=yes
14385fi
14386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14387 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014388fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014389
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014390fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014391
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14393$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14394fi
14395if test "$ac_cv_log1p_drops_zero_sign" = yes
14396then
14397
14398$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14399
14400fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014401
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014402LIBS=$LIBS_SAVE
14403
Mark Dickinsona614f042009-11-28 12:48:43 +000014404# For multiprocessing module, check that sem_open
14405# actually works. For FreeBSD versions <= 7.2,
14406# the kernel module that provides POSIX semaphores
14407# isn't loaded by default, so an attempt to call
14408# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14410$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014411if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014413else
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014415 ac_cv_posix_semaphores_enabled=yes
14416else
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014418/* end confdefs.h. */
14419
14420#include <unistd.h>
14421#include <fcntl.h>
14422#include <stdio.h>
14423#include <semaphore.h>
14424#include <sys/stat.h>
14425
14426int main(void) {
14427 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14428 if (a == SEM_FAILED) {
14429 perror("sem_open");
14430 return 1;
14431 }
14432 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014433 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014434 return 0;
14435}
14436
14437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014438if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014439 ac_cv_posix_semaphores_enabled=yes
14440else
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14444 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014445fi
14446
14447
Mark Dickinsona614f042009-11-28 12:48:43 +000014448fi
14449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14451$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014452if test $ac_cv_posix_semaphores_enabled = no
14453then
14454
Matthias Kloseb9621712010-04-24 17:59:49 +000014455$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014456
14457fi
14458
Mark Dickinson10683072009-04-18 21:18:19 +000014459# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14461$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014462if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014464else
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014466 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014467else
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014469/* end confdefs.h. */
14470
14471#include <unistd.h>
14472#include <fcntl.h>
14473#include <stdio.h>
14474#include <semaphore.h>
14475#include <sys/stat.h>
14476
14477int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014478 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014479 int count;
14480 int res;
14481 if(a==SEM_FAILED){
14482 perror("sem_open");
14483 return 1;
14484
14485 }
14486 res = sem_getvalue(a, &count);
14487 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014488 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014489 return res==-1 ? 1 : 0;
14490}
14491
Mark Dickinson10683072009-04-18 21:18:19 +000014492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014493if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014494 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014495else
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014500fi
14501
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014503fi
14504
Matthias Kloseb9621712010-04-24 17:59:49 +000014505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14506$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014507if test $ac_cv_broken_sem_getvalue = yes
14508then
14509
Matthias Kloseb9621712010-04-24 17:59:49 +000014510$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014511
14512fi
14513
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014514ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14515"
14516if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14517 ac_have_decl=1
14518else
14519 ac_have_decl=0
14520fi
14521
14522cat >>confdefs.h <<_ACEOF
14523#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14524_ACEOF
14525ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14526"
14527if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14528 ac_have_decl=1
14529else
14530 ac_have_decl=0
14531fi
14532
14533cat >>confdefs.h <<_ACEOF
14534#define HAVE_DECL_RTLD_NOW $ac_have_decl
14535_ACEOF
14536ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14537"
14538if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14539 ac_have_decl=1
14540else
14541 ac_have_decl=0
14542fi
14543
14544cat >>confdefs.h <<_ACEOF
14545#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14546_ACEOF
14547ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14548"
14549if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14550 ac_have_decl=1
14551else
14552 ac_have_decl=0
14553fi
14554
14555cat >>confdefs.h <<_ACEOF
14556#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14557_ACEOF
14558ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14559"
14560if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14561 ac_have_decl=1
14562else
14563 ac_have_decl=0
14564fi
14565
14566cat >>confdefs.h <<_ACEOF
14567#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14568_ACEOF
14569ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14570"
14571if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14572 ac_have_decl=1
14573else
14574 ac_have_decl=0
14575fi
14576
14577cat >>confdefs.h <<_ACEOF
14578#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14579_ACEOF
14580ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14581"
14582if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14583 ac_have_decl=1
14584else
14585 ac_have_decl=0
14586fi
14587
14588cat >>confdefs.h <<_ACEOF
14589#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14590_ACEOF
14591
14592
Mark Dickinsonbd792642009-03-18 20:06:12 +000014593# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14595$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014596# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014598 enableval=$enable_big_digits; case $enable_big_digits in
14599yes)
14600 enable_big_digits=30 ;;
14601no)
14602 enable_big_digits=15 ;;
1460315|30)
14604 ;;
14605*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014606 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 +000014607esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14609$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014610
14611cat >>confdefs.h <<_ACEOF
14612#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14613_ACEOF
14614
14615
14616else
Matthias Kloseb9621712010-04-24 17:59:49 +000014617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14618$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014619fi
14620
14621
Guido van Rossumef2255b2000-03-10 22:30:29 +000014622# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014623ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014624if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
14626
Matthias Kloseb9621712010-04-24 17:59:49 +000014627$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014628
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014629 wchar_h="yes"
14630
Guido van Rossumef2255b2000-03-10 22:30:29 +000014631else
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014633
14634fi
14635
Michael W. Hudson54241132001-12-07 15:38:26 +000014636
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014638# determine wchar_t size
14639if test "$wchar_h" = yes
14640then
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14644# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14646$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014647if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014648 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014649else
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14651"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653else
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 if test "$ac_cv_type_wchar_t" = yes; then
14655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014657as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014658See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659 else
14660 ac_cv_sizeof_wchar_t=0
14661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014663
Martin v. Löwis11437992002-04-12 09:54:03 +000014664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14666$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667
14668
14669
Martin v. Löwis11437992002-04-12 09:54:03 +000014670cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014671#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014672_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014673
Michael W. Hudson54241132001-12-07 15:38:26 +000014674
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014675fi
14676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14678$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014679have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014681/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014682
14683#include <tcl.h>
14684#if TCL_UTF_MAX != 6
14685# error "NOT UCS4_TCL"
14686#endif
14687int
14688main ()
14689{
14690
14691 ;
14692 return 0;
14693}
14694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014696
14697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014699
14700 have_ucs4_tcl=yes
14701
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14705$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014706
Skip Montanaro6dead952003-09-25 14:50:04 +000014707# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014708if test "$wchar_h" = yes
14709then
14710 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14712$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014713 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014715else
14716
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014718 ac_cv_wchar_t_signed=yes
14719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014721/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014722
14723 #include <wchar.h>
14724 int main()
14725 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014726 /* Success: exit code 0 */
14727 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014728 }
14729
14730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014731if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014732 ac_cv_wchar_t_signed=yes
14733else
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014738fi
14739
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014740fi
14741
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14743$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014744fi
14745
Georg Brandl52d168a2008-01-07 18:10:24 +000014746# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014747if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014748 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014749then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014750 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014751
Matthias Kloseb9621712010-04-24 17:59:49 +000014752$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014753
Georg Brandl52d168a2008-01-07 18:10:24 +000014754else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014755 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014756fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14758$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014759
14760# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14762$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014763if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014765else
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 ac_cv_c_bigendian=unknown
14767 # See if we're dealing with a universal compiler.
14768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14769/* end confdefs.h. */
14770#ifndef __APPLE_CC__
14771 not a universal capable compiler
14772 #endif
14773 typedef int dummy;
14774
Skip Montanaro6dead952003-09-25 14:50:04 +000014775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014776if ac_fn_c_try_compile "$LINENO"; then :
14777
14778 # Check for potential -arch flags. It is not universal unless
14779 # there are at least two -arch flags with different values.
14780 ac_arch=
14781 ac_prev=
14782 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14783 if test -n "$ac_prev"; then
14784 case $ac_word in
14785 i?86 | x86_64 | ppc | ppc64)
14786 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14787 ac_arch=$ac_word
14788 else
14789 ac_cv_c_bigendian=universal
14790 break
14791 fi
14792 ;;
14793 esac
14794 ac_prev=
14795 elif test "x$ac_word" = "x-arch"; then
14796 ac_prev=arch
14797 fi
14798 done
14799fi
14800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14801 if test $ac_cv_c_bigendian = unknown; then
14802 # See if sys/param.h defines the BYTE_ORDER macro.
14803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014804/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014805#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014807
Martin v. Löwis11437992002-04-12 09:54:03 +000014808int
14809main ()
14810{
Matthias Kloseb9621712010-04-24 17:59:49 +000014811#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14812 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14813 && LITTLE_ENDIAN)
14814 bogus endian macros
14815 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014816
14817 ;
14818 return 0;
14819}
14820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014821if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014822 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014824/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014825#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014827
Martin v. Löwis11437992002-04-12 09:54:03 +000014828int
14829main ()
14830{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014831#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 not big endian
14833 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014834
14835 ;
14836 return 0;
14837}
14838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014840 ac_cv_c_bigendian=yes
14841else
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014845fi
14846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14847 fi
14848 if test $ac_cv_c_bigendian = unknown; then
14849 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014851/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014852#include <limits.h>
14853
Martin v. Löwis11437992002-04-12 09:54:03 +000014854int
14855main ()
14856{
Matthias Kloseb9621712010-04-24 17:59:49 +000014857#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14858 bogus endian macros
14859 #endif
14860
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 ;
14862 return 0;
14863}
14864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014865if ac_fn_c_try_compile "$LINENO"; then :
14866 # It does; now see whether it defined to _BIG_ENDIAN or not.
14867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14868/* end confdefs.h. */
14869#include <limits.h>
14870
14871int
14872main ()
14873{
14874#ifndef _BIG_ENDIAN
14875 not big endian
14876 #endif
14877
14878 ;
14879 return 0;
14880}
14881_ACEOF
14882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014884else
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14888fi
14889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14890 fi
14891 if test $ac_cv_c_bigendian = unknown; then
14892 # Compile a test program.
14893 if test "$cross_compiling" = yes; then :
14894 # Try to guess by grepping values from an object file.
14895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14896/* end confdefs.h. */
14897short int ascii_mm[] =
14898 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14899 short int ascii_ii[] =
14900 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14901 int use_ascii (int i) {
14902 return ascii_mm[i] + ascii_ii[i];
14903 }
14904 short int ebcdic_ii[] =
14905 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14906 short int ebcdic_mm[] =
14907 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14908 int use_ebcdic (int i) {
14909 return ebcdic_mm[i] + ebcdic_ii[i];
14910 }
14911 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912
Matthias Kloseb9621712010-04-24 17:59:49 +000014913int
14914main ()
14915{
14916return use_ascii (foo) == use_ebcdic (foo);
14917 ;
14918 return 0;
14919}
14920_ACEOF
14921if ac_fn_c_try_compile "$LINENO"; then :
14922 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14923 ac_cv_c_bigendian=yes
14924 fi
14925 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14926 if test "$ac_cv_c_bigendian" = unknown; then
14927 ac_cv_c_bigendian=no
14928 else
14929 # finding both strings is unlikely to happen, but who knows?
14930 ac_cv_c_bigendian=unknown
14931 fi
14932 fi
14933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014935else
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014937/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014939int
14940main ()
14941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 /* Are we little or big endian? From Harbison&Steele. */
14944 union
14945 {
14946 long int l;
14947 char c[sizeof (long int)];
14948 } u;
14949 u.l = 1;
14950 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014951
14952 ;
14953 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014954}
Martin v. Löwis11437992002-04-12 09:54:03 +000014955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014956if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014957 ac_cv_c_bigendian=no
14958else
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14968$as_echo "$ac_cv_c_bigendian" >&6; }
14969 case $ac_cv_c_bigendian in #(
14970 yes)
14971 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14972;; #(
14973 no)
14974 ;; #(
14975 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014978
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 ;; #(
14980 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014981 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014982 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014984
Michael W. Hudson54241132001-12-07 15:38:26 +000014985
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014986# ABI version string for Python extension modules. This appears between the
14987# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14988# from the following attributes which affect the ABI of this Python build (in
14989# this order):
14990#
14991# * The Python implementation (always 'cpython-' for us)
14992# * The major and minor version numbers
14993# * --with-pydebug (adds a 'd')
14994# * --with-pymalloc (adds a 'm')
14995# * --with-wide-unicode (adds a 'u')
14996#
14997# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014998# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14999# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015000
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15002$as_echo_n "checking ABIFLAGS... " >&6; }
15003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15004$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15006$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015007SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15009$as_echo "$SOABI" >&6; }
15010
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015011
15012case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015013 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015014 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15015 *)
15016 EXT_SUFFIX=${SHLIB_SUFFIX};;
15017esac
15018
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15020$as_echo_n "checking LDVERSION... " >&6; }
15021LDVERSION='$(VERSION)$(ABIFLAGS)'
15022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15023$as_echo "$LDVERSION" >&6; }
15024
doko@python.org87421192013-01-26 11:39:31 +010015025
doko@ubuntu.com55532312016-06-14 08:55:19 +020015026if test x$PLATFORM_TRIPLET = x; then
15027 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15028else
15029 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15030fi
doko@python.org87421192013-01-26 11:39:31 +010015031
15032
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015033# Check whether right shifting a negative integer extends the sign bit
15034# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15036$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015037if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015039else
Martin v. Löwis11437992002-04-12 09:54:03 +000015040
Matthias Kloseb9621712010-04-24 17:59:49 +000015041if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015042 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015043else
Matthias Kloseb9621712010-04-24 17:59:49 +000015044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015045/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015046
15047int main()
15048{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015049 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015050}
15051
Martin v. Löwis11437992002-04-12 09:54:03 +000015052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015053if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015054 ac_cv_rshift_extends_sign=yes
15055else
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15059 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015060fi
15061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062fi
15063
Matthias Kloseb9621712010-04-24 17:59:49 +000015064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15065$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015066if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015067then
Martin v. Löwis11437992002-04-12 09:54:03 +000015068
Matthias Kloseb9621712010-04-24 17:59:49 +000015069$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015070
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015071fi
15072
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015073# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15075$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015076if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015078else
Martin v. Löwis11437992002-04-12 09:54:03 +000015079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015081/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015082#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015083int
15084main ()
15085{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015086
15087 FILE *f = fopen("/dev/null", "r");
15088 flockfile(f);
15089 getc_unlocked(f);
15090 funlockfile(f);
15091
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 ;
15093 return 0;
15094}
15095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015096if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015097 ac_cv_have_getc_unlocked=yes
15098else
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 ac_cv_have_getc_unlocked=no
15100fi
15101rm -f core conftest.err conftest.$ac_objext \
15102 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104
Matthias Kloseb9621712010-04-24 17:59:49 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15106$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015107if test "$ac_cv_have_getc_unlocked" = yes
15108then
Martin v. Löwis11437992002-04-12 09:54:03 +000015109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015111
15112fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015113
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015114# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015115# save the value of LIBS so we don't actually link Python with readline
15116LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015117
Gregory P. Smith18820942008-09-07 06:24:49 +000015118# On some systems we need to link readline to a termcap compatible
15119# library. NOTE: Keep the precedence of listed libraries synchronised
15120# with setup.py.
15121py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15123$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015124for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015125 if test -z "$py_libtermcap"; then
15126 READLINE_LIBS="-lreadline"
15127 else
15128 READLINE_LIBS="-lreadline -l$py_libtermcap"
15129 fi
15130 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015132/* end confdefs.h. */
15133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134/* Override any GCC internal prototype to avoid an error.
15135 Use char because int might match the return type of a GCC
15136 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015137#ifdef __cplusplus
15138extern "C"
15139#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015140char readline ();
15141int
15142main ()
15143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015145 ;
15146 return 0;
15147}
15148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015149if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015150 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015152rm -f core conftest.err conftest.$ac_objext \
15153 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015154 if test $py_cv_lib_readline = yes; then
15155 break
15156 fi
15157done
15158# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15159#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015160if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15162$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015163else
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15165$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015166
Matthias Kloseb9621712010-04-24 17:59:49 +000015167$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015168
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015169fi
15170
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15173$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015174if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015176else
15177 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015178LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015180/* end confdefs.h. */
15181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182/* Override any GCC internal prototype to avoid an error.
15183 Use char because int might match the return type of a GCC
15184 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015185#ifdef __cplusplus
15186extern "C"
15187#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015188char rl_callback_handler_install ();
15189int
15190main ()
15191{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015193 ;
15194 return 0;
15195}
15196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015197if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015198 ac_cv_lib_readline_rl_callback_handler_install=yes
15199else
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015202rm -f core conftest.err conftest.$ac_objext \
15203 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015204LIBS=$ac_check_lib_save_LIBS
15205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15207$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015208if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209
Matthias Kloseb9621712010-04-24 17:59:49 +000015210$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015211
15212fi
15213
15214
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015215# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015217/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015218#include <readline/readline.h>
15219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015220if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015221 have_readline=yes
15222else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015223 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015224
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015225fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015226rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015227if test $have_readline = yes
15228then
Matthias Kloseb9621712010-04-24 17:59:49 +000015229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015230/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015231#include <readline/readline.h>
15232
15233_ACEOF
15234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015238
15239fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015240rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015241
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015243/* end confdefs.h. */
15244#include <readline/readline.h>
15245
15246_ACEOF
15247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015249
Matthias Kloseb9621712010-04-24 17:59:49 +000015250$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015251
15252fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015253rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015254
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015255fi
15256
Martin v. Löwis0daad592001-09-30 21:09:59 +000015257# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15259$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015260if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015262else
Martin v. Löwis11437992002-04-12 09:54:03 +000015263 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015264LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268/* Override any GCC internal prototype to avoid an error.
15269 Use char because int might match the return type of a GCC
15270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015271#ifdef __cplusplus
15272extern "C"
15273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015274char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015275int
15276main ()
15277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 ;
15280 return 0;
15281}
15282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015285else
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015288rm -f core conftest.err conftest.$ac_objext \
15289 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015290LIBS=$ac_check_lib_save_LIBS
15291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15293$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015294if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015297
Martin v. Löwis0daad592001-09-30 21:09:59 +000015298fi
15299
Michael W. Hudson54241132001-12-07 15:38:26 +000015300
Thomas Wouters89d996e2007-09-08 17:39:28 +000015301# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15303$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015304if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015306else
15307 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015308LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015310/* end confdefs.h. */
15311
15312/* Override any GCC internal prototype to avoid an error.
15313 Use char because int might match the return type of a GCC
15314 builtin and then its argument prototype would still apply. */
15315#ifdef __cplusplus
15316extern "C"
15317#endif
15318char rl_completion_display_matches_hook ();
15319int
15320main ()
15321{
15322return rl_completion_display_matches_hook ();
15323 ;
15324 return 0;
15325}
15326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015327if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015328 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15329else
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015332rm -f core conftest.err conftest.$ac_objext \
15333 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015334LIBS=$ac_check_lib_save_LIBS
15335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15337$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015338if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015341
15342fi
15343
15344
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015345# also in 4.0, but not in editline
15346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15347$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15348if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15349 $as_echo_n "(cached) " >&6
15350else
15351 ac_check_lib_save_LIBS=$LIBS
15352LIBS="-lreadline $READLINE_LIBS $LIBS"
15353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15354/* end confdefs.h. */
15355
15356/* Override any GCC internal prototype to avoid an error.
15357 Use char because int might match the return type of a GCC
15358 builtin and then its argument prototype would still apply. */
15359#ifdef __cplusplus
15360extern "C"
15361#endif
15362char rl_resize_terminal ();
15363int
15364main ()
15365{
15366return rl_resize_terminal ();
15367 ;
15368 return 0;
15369}
15370_ACEOF
15371if ac_fn_c_try_link "$LINENO"; then :
15372 ac_cv_lib_readline_rl_resize_terminal=yes
15373else
15374 ac_cv_lib_readline_rl_resize_terminal=no
15375fi
15376rm -f core conftest.err conftest.$ac_objext \
15377 conftest$ac_exeext conftest.$ac_ext
15378LIBS=$ac_check_lib_save_LIBS
15379fi
15380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15381$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15382if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15383
15384$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15385
15386fi
15387
15388
Martin v. Löwis0daad592001-09-30 21:09:59 +000015389# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15391$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015392if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015394else
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015396LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400/* Override any GCC internal prototype to avoid an error.
15401 Use char because int might match the return type of a GCC
15402 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015403#ifdef __cplusplus
15404extern "C"
15405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015406char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015407int
15408main ()
15409{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015410return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 ;
15412 return 0;
15413}
15414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015415if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015417else
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015420rm -f core conftest.err conftest.$ac_objext \
15421 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015422LIBS=$ac_check_lib_save_LIBS
15423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15425$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015426if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015427
Matthias Kloseb9621712010-04-24 17:59:49 +000015428$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015429
Guido van Rossum353ae582001-07-10 16:45:32 +000015430fi
15431
Jack Jansendd19cf82001-12-06 22:36:17 +000015432
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015433# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015435/* end confdefs.h. */
15436#include <readline/readline.h>
15437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015438if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015439 have_readline=yes
15440else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015441 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015442
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015443fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015444rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015445if test $have_readline = yes
15446then
Matthias Kloseb9621712010-04-24 17:59:49 +000015447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015448/* end confdefs.h. */
15449#include <readline/readline.h>
15450
15451_ACEOF
15452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015454
Matthias Kloseb9621712010-04-24 17:59:49 +000015455$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015456
15457fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015458rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015459
15460fi
15461
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15463$as_echo_n "checking for append_history in -lreadline... " >&6; }
15464if ${ac_cv_lib_readline_append_history+:} false; then :
15465 $as_echo_n "(cached) " >&6
15466else
15467 ac_check_lib_save_LIBS=$LIBS
15468LIBS="-lreadline $READLINE_LIBS $LIBS"
15469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15470/* end confdefs.h. */
15471
15472/* Override any GCC internal prototype to avoid an error.
15473 Use char because int might match the return type of a GCC
15474 builtin and then its argument prototype would still apply. */
15475#ifdef __cplusplus
15476extern "C"
15477#endif
15478char append_history ();
15479int
15480main ()
15481{
15482return append_history ();
15483 ;
15484 return 0;
15485}
15486_ACEOF
15487if ac_fn_c_try_link "$LINENO"; then :
15488 ac_cv_lib_readline_append_history=yes
15489else
15490 ac_cv_lib_readline_append_history=no
15491fi
15492rm -f core conftest.err conftest.$ac_objext \
15493 conftest$ac_exeext conftest.$ac_ext
15494LIBS=$ac_check_lib_save_LIBS
15495fi
15496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15497$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15498if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15499
15500$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15501
15502fi
15503
15504
Martin v. Löwis82bca632006-02-10 20:49:30 +000015505# End of readline checks: restore LIBS
15506LIBS=$LIBS_no_readline
15507
Matthias Kloseb9621712010-04-24 17:59:49 +000015508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15509$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015510if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015511 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015512else
Martin v. Löwis11437992002-04-12 09:54:03 +000015513
Matthias Kloseb9621712010-04-24 17:59:49 +000015514if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015515 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015518/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015519
15520int main()
15521{
15522 int val1 = nice(1);
15523 if (val1 != -1 && val1 == nice(2))
15524 exit(0);
15525 exit(1);
15526}
15527
Martin v. Löwis11437992002-04-12 09:54:03 +000015528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015529if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015530 ac_cv_broken_nice=yes
15531else
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015536fi
15537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538fi
15539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15541$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015542if test "$ac_cv_broken_nice" = yes
15543then
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
Matthias Kloseb9621712010-04-24 17:59:49 +000015545$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015546
15547fi
15548
Matthias Kloseb9621712010-04-24 17:59:49 +000015549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15550$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015551if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015553else
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015555 ac_cv_broken_poll=no
15556else
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015558/* end confdefs.h. */
15559
15560#include <poll.h>
15561
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015562int main()
15563{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015564 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015565 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015566
15567 close (42);
15568
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015569 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015570 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015571 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015572 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015573 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015574 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015575 return 1;
15576}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015577
15578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015579if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015580 ac_cv_broken_poll=yes
15581else
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015587
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015588fi
15589
Matthias Kloseb9621712010-04-24 17:59:49 +000015590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15591$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015592if test "$ac_cv_broken_poll" = yes
15593then
15594
Matthias Kloseb9621712010-04-24 17:59:49 +000015595$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015596
15597fi
15598
Brett Cannon43802422005-02-10 20:48:03 +000015599# 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 +000015600# (which is not required by ISO C or UNIX spec) and/or if we support
15601# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015602ac_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 +000015603#include <$ac_cv_struct_tm>
15604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605"
Victor Stinnere0be4232011-10-25 13:06:09 +020015606if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015607
15608cat >>confdefs.h <<_ACEOF
15609#define HAVE_STRUCT_TM_TM_ZONE 1
15610_ACEOF
15611
15612
15613fi
15614
15615if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15616
Matthias Kloseb9621712010-04-24 17:59:49 +000015617$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015618
15619else
Matthias Kloseb9621712010-04-24 17:59:49 +000015620 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15621"
Victor Stinnere0be4232011-10-25 13:06:09 +020015622if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624else
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626fi
15627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015628cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015629#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630_ACEOF
15631
Matthias Kloseb9621712010-04-24 17:59:49 +000015632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15633$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015634if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636else
Matthias Kloseb9621712010-04-24 17:59:49 +000015637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015638/* end confdefs.h. */
15639#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015640#if !HAVE_DECL_TZNAME
15641extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015642#endif
15643
15644int
15645main ()
15646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015648 ;
15649 return 0;
15650}
15651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015652if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015653 ac_cv_var_tzname=yes
15654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015657rm -f core conftest.err conftest.$ac_objext \
15658 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15661$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015662 if test $ac_cv_var_tzname = yes; then
15663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015665
15666 fi
15667fi
15668
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015669
Martin v. Löwis1d459062005-03-14 21:23:33 +000015670# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15672$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015673if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015675else
15676
Matthias Kloseb9621712010-04-24 17:59:49 +000015677if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015678 ac_cv_working_tzset=no
15679else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015681/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015682
15683#include <stdlib.h>
15684#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015685#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015686
15687#if HAVE_TZNAME
15688extern char *tzname[];
15689#endif
15690
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015691int main()
15692{
Brett Cannon18367812003-09-19 00:59:16 +000015693 /* Note that we need to ensure that not only does tzset(3)
15694 do 'something' with localtime, but it works as documented
15695 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015696 This includes making sure that tzname is set properly if
15697 tm->tm_zone does not exist since it is the alternative way
15698 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015699
15700 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015701 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015702 */
15703
Martin v. Löwis1d459062005-03-14 21:23:33 +000015704 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015705 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15706
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015707 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015708 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015709 if (localtime(&groundhogday)->tm_hour != 0)
15710 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015711#if HAVE_TZNAME
15712 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15713 if (strcmp(tzname[0], "UTC") ||
15714 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15715 exit(1);
15716#endif
Brett Cannon18367812003-09-19 00:59:16 +000015717
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015718 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015720 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015721 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015722#if HAVE_TZNAME
15723 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15724 exit(1);
15725#endif
Brett Cannon18367812003-09-19 00:59:16 +000015726
15727 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15728 tzset();
15729 if (localtime(&groundhogday)->tm_hour != 11)
15730 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015731#if HAVE_TZNAME
15732 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15733 exit(1);
15734#endif
15735
15736#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015737 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15738 exit(1);
15739 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15740 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015741#endif
Brett Cannon18367812003-09-19 00:59:16 +000015742
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015743 exit(0);
15744}
15745
15746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015748 ac_cv_working_tzset=yes
15749else
Matthias Kloseb9621712010-04-24 17:59:49 +000015750 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015754fi
15755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756fi
15757
Matthias Kloseb9621712010-04-24 17:59:49 +000015758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15759$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015760if test "$ac_cv_working_tzset" = yes
15761then
15762
Matthias Kloseb9621712010-04-24 17:59:49 +000015763$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015764
15765fi
15766
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015767# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15769$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015770if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015772else
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015774/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015775#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015776int
15777main ()
15778{
15779
15780struct stat st;
15781st.st_mtim.tv_nsec = 1;
15782
15783 ;
15784 return 0;
15785}
15786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015788 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015789else
Matthias Kloseb9621712010-04-24 17:59:49 +000015790 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15793fi
15794
Matthias Kloseb9621712010-04-24 17:59:49 +000015795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15796$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015797if test "$ac_cv_stat_tv_nsec" = yes
15798then
15799
Matthias Kloseb9621712010-04-24 17:59:49 +000015800$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015801
15802fi
15803
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015804# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15806$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015807if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015809else
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015811/* end confdefs.h. */
15812#include <sys/stat.h>
15813int
15814main ()
15815{
15816
15817struct stat st;
15818st.st_mtimespec.tv_nsec = 1;
15819
15820 ;
15821 return 0;
15822}
15823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015824if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015825 ac_cv_stat_tv_nsec2=yes
15826else
Matthias Kloseb9621712010-04-24 17:59:49 +000015827 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15830fi
15831
Matthias Kloseb9621712010-04-24 17:59:49 +000015832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15833$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015834if test "$ac_cv_stat_tv_nsec2" = yes
15835then
15836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015838
15839fi
15840
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015841# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015842ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015843if test "$cross_compiling" = no; then
15844 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15845fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015846
15847for ac_header in curses.h ncurses.h
15848do :
15849 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15850ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15851if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15852 cat >>confdefs.h <<_ACEOF
15853#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15854_ACEOF
15855
15856fi
15857
15858done
15859
15860
15861# On Solaris, term.h requires curses.h
15862for ac_header in term.h
15863do :
15864 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15865#ifdef HAVE_CURSES_H
15866#include <curses.h>
15867#endif
15868
15869"
15870if test "x$ac_cv_header_term_h" = xyes; then :
15871 cat >>confdefs.h <<_ACEOF
15872#define HAVE_TERM_H 1
15873_ACEOF
15874
15875fi
15876
15877done
15878
15879
Jack Jansen666b1e72001-10-31 12:11:48 +000015880# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15882$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015883if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015884 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015885else
Matthias Kloseb9621712010-04-24 17:59:49 +000015886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015887/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015888#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015889int
15890main ()
15891{
Jack Jansen666b1e72001-10-31 12:11:48 +000015892
15893 int rtn;
15894 rtn = mvwdelch(0,0,0);
15895
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 ;
15897 return 0;
15898}
15899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015900if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015901 ac_cv_mvwdelch_is_expression=yes
15902else
Matthias Kloseb9621712010-04-24 17:59:49 +000015903 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15906fi
15907
Matthias Kloseb9621712010-04-24 17:59:49 +000015908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15909$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015910
15911if test "$ac_cv_mvwdelch_is_expression" = yes
15912then
Martin v. Löwis11437992002-04-12 09:54:03 +000015913
Matthias Kloseb9621712010-04-24 17:59:49 +000015914$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015915
15916fi
15917
Matthias Kloseb9621712010-04-24 17:59:49 +000015918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15919$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015920if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015922else
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015924/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015925#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015926int
15927main ()
15928{
Jack Jansen666b1e72001-10-31 12:11:48 +000015929
15930 WINDOW *w;
15931 w->_flags = 0;
15932
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 ;
15934 return 0;
15935}
15936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015937if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015938 ac_cv_window_has_flags=yes
15939else
Matthias Kloseb9621712010-04-24 17:59:49 +000015940 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15943fi
15944
Matthias Kloseb9621712010-04-24 17:59:49 +000015945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15946$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015947
Jack Jansen666b1e72001-10-31 12:11:48 +000015948
15949if test "$ac_cv_window_has_flags" = yes
15950then
Martin v. Löwis11437992002-04-12 09:54:03 +000015951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015953
15954fi
15955
Matthias Kloseb9621712010-04-24 17:59:49 +000015956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15957$as_echo_n "checking for is_term_resized... " >&6; }
15958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015959/* end confdefs.h. */
15960#include <curses.h>
15961int
15962main ()
15963{
15964void *x=is_term_resized
15965 ;
15966 return 0;
15967}
15968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015969if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015970
Matthias Kloseb9621712010-04-24 17:59:49 +000015971$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015972
Matthias Kloseb159a552010-04-25 21:00:44 +000015973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015974$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015975else
Matthias Kloseb9621712010-04-24 17:59:49 +000015976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15977$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015978
15979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15983$as_echo_n "checking for resize_term... " >&6; }
15984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015985/* end confdefs.h. */
15986#include <curses.h>
15987int
15988main ()
15989{
15990void *x=resize_term
15991 ;
15992 return 0;
15993}
15994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015995if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015996
Matthias Kloseb9621712010-04-24 17:59:49 +000015997$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015998
Matthias Kloseb159a552010-04-25 21:00:44 +000015999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016000$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016001else
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16003$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016004
16005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16007
Matthias Kloseb9621712010-04-24 17:59:49 +000016008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16009$as_echo_n "checking for resizeterm... " >&6; }
16010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016011/* end confdefs.h. */
16012#include <curses.h>
16013int
16014main ()
16015{
16016void *x=resizeterm
16017 ;
16018 return 0;
16019}
16020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016021if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016022
Matthias Kloseb9621712010-04-24 17:59:49 +000016023$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016024
Matthias Kloseb159a552010-04-25 21:00:44 +000016025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016026$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016027else
Matthias Kloseb9621712010-04-24 17:59:49 +000016028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16029$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016030
16031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016033# last curses configure check
16034CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016035
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16037$as_echo "$as_me: checking for device files" >&6;}
16038
16039if test "x$cross_compiling" = xyes; then
16040 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16042$as_echo_n "checking for /dev/ptmx... " >&6; }
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16044$as_echo "not set" >&6; }
16045 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16046 fi
16047 if test "${ac_cv_file__dev_ptc+set}" != set; then
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16049$as_echo_n "checking for /dev/ptc... " >&6; }
16050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16051$as_echo "not set" >&6; }
16052 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16053 fi
16054fi
16055
Matthias Kloseb9621712010-04-24 17:59:49 +000016056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16057$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016058if ${ac_cv_file__dev_ptmx+:} false; then :
16059 $as_echo_n "(cached) " >&6
16060else
16061 test "$cross_compiling" = yes &&
16062 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16063if test -r "/dev/ptmx"; then
16064 ac_cv_file__dev_ptmx=yes
16065else
16066 ac_cv_file__dev_ptmx=no
16067fi
16068fi
16069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16070$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16071if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016072
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016073fi
16074
16075if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016076
Matthias Kloseb9621712010-04-24 17:59:49 +000016077$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016078
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16081$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016082if ${ac_cv_file__dev_ptc+:} false; then :
16083 $as_echo_n "(cached) " >&6
16084else
16085 test "$cross_compiling" = yes &&
16086 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16087if test -r "/dev/ptc"; then
16088 ac_cv_file__dev_ptc=yes
16089else
16090 ac_cv_file__dev_ptc=no
16091fi
16092fi
16093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16094$as_echo "$ac_cv_file__dev_ptc" >&6; }
16095if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016096
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016097fi
16098
16099if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016100
Matthias Kloseb9621712010-04-24 17:59:49 +000016101$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016102
Neal Norwitz865400f2003-03-21 01:42:58 +000016103fi
16104
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016105if test $ac_sys_system = Darwin
16106then
16107 LIBS="$LIBS -framework CoreFoundation"
16108fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016109
Matthias Kloseb9621712010-04-24 17:59:49 +000016110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16111$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016112if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016113 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016114else
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016116 ac_cv_have_size_t_format="cross -- assuming yes"
16117
Thomas Wouters477c8d52006-05-27 19:21:47 +000016118else
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016120/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016121
Thomas Wouters477c8d52006-05-27 19:21:47 +000016122#include <stdio.h>
16123#include <stddef.h>
16124#include <string.h>
16125
Christian Heimes2c181612007-12-17 20:04:13 +000016126#ifdef HAVE_SYS_TYPES_H
16127#include <sys/types.h>
16128#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016129
16130#ifdef HAVE_SSIZE_T
16131typedef ssize_t Py_ssize_t;
16132#elif SIZEOF_VOID_P == SIZEOF_LONG
16133typedef long Py_ssize_t;
16134#else
16135typedef int Py_ssize_t;
16136#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016137
Christian Heimes2c181612007-12-17 20:04:13 +000016138int main()
16139{
16140 char buffer[256];
16141
Thomas Wouters477c8d52006-05-27 19:21:47 +000016142 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16143 return 1;
16144
Thomas Wouters89f507f2006-12-13 04:49:30 +000016145 if (strcmp(buffer, "123"))
16146 return 1;
16147
16148 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16149 return 1;
16150
16151 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016152 return 1;
16153
16154 return 0;
16155}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016156
Thomas Wouters477c8d52006-05-27 19:21:47 +000016157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016158if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016159 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016160else
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16164 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016165fi
16166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16169$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016170if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016173
16174fi
16175
Matthias Kloseb9621712010-04-24 17:59:49 +000016176ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016177#ifdef HAVE_SYS_TYPES_H
16178#include <sys/types.h>
16179#endif
16180#ifdef HAVE_SYS_SOCKET_H
16181#include <sys/socket.h>
16182#endif
16183
Matthias Kloseb9621712010-04-24 17:59:49 +000016184"
Victor Stinnere0be4232011-10-25 13:06:09 +020016185if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016186
Martin v. Löwis11437992002-04-12 09:54:03 +000016187else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016188
Matthias Kloseb9621712010-04-24 17:59:49 +000016189$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016190
16191fi
16192
Michael W. Hudson54241132001-12-07 15:38:26 +000016193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16195$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016196if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016197 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016198else
Matthias Kloseb9621712010-04-24 17:59:49 +000016199 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016200 ac_cv_broken_mbstowcs=no
16201else
Matthias Kloseb9621712010-04-24 17:59:49 +000016202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016203/* end confdefs.h. */
16204
Stefan Krah19c21392012-11-22 23:47:32 +010016205#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016206#include<stdlib.h>
16207int main() {
16208 size_t len = -1;
16209 const char *str = "text";
16210 len = mbstowcs(NULL, str, 0);
16211 return (len != 4);
16212}
16213
16214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016215if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016216 ac_cv_broken_mbstowcs=no
16217else
Matthias Kloseb9621712010-04-24 17:59:49 +000016218 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16221 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016222fi
16223
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016224fi
16225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16227$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016228if test "$ac_cv_broken_mbstowcs" = yes
16229then
16230
Matthias Kloseb9621712010-04-24 17:59:49 +000016231$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016232
16233fi
16234
Antoine Pitroub52ec782009-01-25 16:34:23 +000016235# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16237$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238
16239# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016240if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016241 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016242if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016243then
16244
Matthias Kloseb9621712010-04-24 17:59:49 +000016245$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016246
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16248$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016249fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016250if test "$withval" = no
16251then
16252
16253$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16254
Matthias Kloseb9621712010-04-24 17:59:49 +000016255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16256$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016257fi
16258
Antoine Pitrou042b1282010-08-13 21:15:58 +000016259else
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16261$as_echo "no value specified" >&6; }
16262fi
16263
Antoine Pitroub52ec782009-01-25 16:34:23 +000016264
Matthias Kloseb17289e2012-03-15 19:51:34 +010016265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16266$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16267if ${ac_cv_computed_gotos+:} false; then :
16268 $as_echo_n "(cached) " >&6
16269else
16270 if test "$cross_compiling" = yes; then :
16271 if test "${with_computed_gotos+set}" = set; then
16272 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16273 else
16274 ac_cv_computed_gotos=no
16275 fi
16276else
16277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278/* end confdefs.h. */
16279
16280int main(int argc, char **argv)
16281{
16282 static void *targets[1] = { &&LABEL1 };
16283 goto LABEL2;
16284LABEL1:
16285 return 0;
16286LABEL2:
16287 goto *targets[0];
16288 return 1;
16289}
16290
16291_ACEOF
16292if ac_fn_c_try_run "$LINENO"; then :
16293 ac_cv_computed_gotos=yes
16294else
16295 ac_cv_computed_gotos=no
16296fi
16297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16298 conftest.$ac_objext conftest.beam conftest.$ac_ext
16299fi
16300
16301fi
16302
16303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16304$as_echo "$ac_cv_computed_gotos" >&6; }
16305case "$ac_cv_computed_gotos" in yes*)
16306
16307$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16308
16309esac
16310
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016311case $ac_sys_system in
16312AIX*)
16313
16314$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16315 ;;
16316esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016317
Michael W. Hudson54241132001-12-07 15:38:26 +000016318
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016319
16320
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016321for h in `(cd $srcdir;echo Python/thread_*.h)`
16322do
16323 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16324done
16325
Michael W. Hudson54241132001-12-07 15:38:26 +000016326
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016327SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16329$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016330for dir in $SRCDIRS; do
16331 if test ! -d $dir; then
16332 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016333 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016334done
Matthias Kloseb9621712010-04-24 17:59:49 +000016335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16336$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016337
Stefan Krah1919b7e2012-03-21 18:25:23 +010016338# Availability of -O2:
16339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16340$as_echo_n "checking for -O2... " >&6; }
16341saved_cflags="$CFLAGS"
16342CFLAGS="-O2"
16343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16344/* end confdefs.h. */
16345
16346int
16347main ()
16348{
16349
16350
16351 ;
16352 return 0;
16353}
16354_ACEOF
16355if ac_fn_c_try_compile "$LINENO"; then :
16356 have_O2=yes
16357else
16358 have_O2=no
16359fi
16360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16362$as_echo "$have_O2" >&6; }
16363CFLAGS="$saved_cflags"
16364
16365# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16366# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16368$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16369saved_cflags="$CFLAGS"
16370CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16371if test "$have_O2" = no; then
16372 CFLAGS=""
16373fi
16374if test "$cross_compiling" = yes; then :
16375 have_glibc_memmove_bug=undefined
16376else
16377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16378/* end confdefs.h. */
16379
16380#include <stdio.h>
16381#include <stdlib.h>
16382#include <string.h>
16383void foo(void *p, void *q) { memmove(p, q, 19); }
16384int main() {
16385 char a[32] = "123456789000000000";
16386 foo(&a[9], a);
16387 if (strcmp(a, "123456789123456789000000000") != 0)
16388 return 1;
16389 foo(a, &a[9]);
16390 if (strcmp(a, "123456789000000000") != 0)
16391 return 1;
16392 return 0;
16393}
16394
16395_ACEOF
16396if ac_fn_c_try_run "$LINENO"; then :
16397 have_glibc_memmove_bug=no
16398else
16399 have_glibc_memmove_bug=yes
16400fi
16401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16402 conftest.$ac_objext conftest.beam conftest.$ac_ext
16403fi
16404
16405CFLAGS="$saved_cflags"
16406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16407$as_echo "$have_glibc_memmove_bug" >&6; }
16408if test "$have_glibc_memmove_bug" = yes; then
16409
16410$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16411
16412fi
16413
16414if test "$have_gcc_asm_for_x87" = yes; then
16415 # Some versions of gcc miscompile inline asm:
16416 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16417 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16418 case $CC in
16419 *gcc*)
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16421$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16422 saved_cflags="$CFLAGS"
16423 CFLAGS="-O2"
16424 if test "$cross_compiling" = yes; then :
16425 have_ipa_pure_const_bug=undefined
16426else
16427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16428/* end confdefs.h. */
16429
16430 __attribute__((noinline)) int
16431 foo(int *p) {
16432 int r;
16433 asm ( "movl \$6, (%1)\n\t"
16434 "xorl %0, %0\n\t"
16435 : "=r" (r) : "r" (p) : "memory"
16436 );
16437 return r;
16438 }
16439 int main() {
16440 int p = 8;
16441 if ((foo(&p) ? : p) != 6)
16442 return 1;
16443 return 0;
16444 }
16445
16446_ACEOF
16447if ac_fn_c_try_run "$LINENO"; then :
16448 have_ipa_pure_const_bug=no
16449else
16450 have_ipa_pure_const_bug=yes
16451fi
16452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16453 conftest.$ac_objext conftest.beam conftest.$ac_ext
16454fi
16455
16456 CFLAGS="$saved_cflags"
16457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16458$as_echo "$have_ipa_pure_const_bug" >&6; }
16459 if test "$have_ipa_pure_const_bug" = yes; then
16460
16461$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16462
16463 fi
16464 ;;
16465 esac
16466fi
16467
Victor Stinner4f5366e2015-01-09 02:13:19 +010016468# Check for stdatomic.h
16469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16470$as_echo_n "checking for stdatomic.h... " >&6; }
16471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16472/* end confdefs.h. */
16473
16474
16475 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016476 atomic_int value = ATOMIC_VAR_INIT(1);
16477 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016478 int main() {
16479 int loaded_value = atomic_load(&value);
16480 return 0;
16481 }
16482
16483
16484_ACEOF
16485if ac_fn_c_try_link "$LINENO"; then :
16486 have_stdatomic_h=yes
16487else
16488 have_stdatomic_h=no
16489fi
16490rm -f core conftest.err conftest.$ac_objext \
16491 conftest$ac_exeext conftest.$ac_ext
16492
16493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16494$as_echo "$have_stdatomic_h" >&6; }
16495
16496if test "$have_stdatomic_h" = yes; then
16497
16498$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16499
16500fi
16501
16502# Check for GCC >= 4.7 __atomic builtins
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16504$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16506/* end confdefs.h. */
16507
16508
16509 volatile int val = 1;
16510 int main() {
16511 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16512 return 0;
16513 }
16514
16515
16516_ACEOF
16517if ac_fn_c_try_link "$LINENO"; then :
16518 have_builtin_atomic=yes
16519else
16520 have_builtin_atomic=no
16521fi
16522rm -f core conftest.err conftest.$ac_objext \
16523 conftest$ac_exeext conftest.$ac_ext
16524
16525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16526$as_echo "$have_builtin_atomic" >&6; }
16527
16528if test "$have_builtin_atomic" = yes; then
16529
16530$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16531
16532fi
16533
Ned Deily322f5ba2013-11-21 23:01:59 -080016534# ensurepip option
16535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16536$as_echo_n "checking for ensurepip... " >&6; }
16537
16538# Check whether --with-ensurepip was given.
16539if test "${with_ensurepip+set}" = set; then :
16540 withval=$with_ensurepip;
16541else
16542 with_ensurepip=upgrade
16543fi
16544
16545case $with_ensurepip in #(
16546 yes|upgrade) :
16547 ENSUREPIP=upgrade ;; #(
16548 install) :
16549 ENSUREPIP=install ;; #(
16550 no) :
16551 ENSUREPIP=no ;; #(
16552 *) :
16553 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16554esac
16555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16556$as_echo "$ENSUREPIP" >&6; }
16557
16558
Victor Stinner35a97c02015-03-08 02:59:09 +010016559# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16561$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16563/* end confdefs.h. */
16564
16565
16566 #include <dirent.h>
16567
16568 int main() {
16569 struct dirent entry;
16570 return entry.d_type == DT_UNKNOWN;
16571 }
16572
16573
16574_ACEOF
16575if ac_fn_c_try_link "$LINENO"; then :
16576 have_dirent_d_type=yes
16577else
16578 have_dirent_d_type=no
16579fi
16580rm -f core conftest.err conftest.$ac_objext \
16581 conftest$ac_exeext conftest.$ac_ext
16582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16583$as_echo "$have_dirent_d_type" >&6; }
16584
16585if test "$have_dirent_d_type" = yes; then
16586
16587$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16588
16589fi
16590
Victor Stinner9eb57c52015-03-19 22:21:49 +010016591# check if the Linux getrandom() syscall is available
16592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16593$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16595/* end confdefs.h. */
16596
16597
Victor Stinner1b80b242016-04-12 22:34:58 +020016598 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016599 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016600 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016601
16602 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016603 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016604 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016605 const int flags = GRND_NONBLOCK;
16606 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016607 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016608 return 0;
16609 }
16610
16611
16612_ACEOF
16613if ac_fn_c_try_link "$LINENO"; then :
16614 have_getrandom_syscall=yes
16615else
16616 have_getrandom_syscall=no
16617fi
16618rm -f core conftest.err conftest.$ac_objext \
16619 conftest$ac_exeext conftest.$ac_ext
16620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16621$as_echo "$have_getrandom_syscall" >&6; }
16622
16623if test "$have_getrandom_syscall" = yes; then
16624
16625$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16626
16627fi
16628
Victor Stinner3abf44e2015-09-18 15:38:37 +020016629# check if the getrandom() function is available
16630# the test was written for the Solaris function of <sys/random.h>
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16632$as_echo_n "checking for the getrandom() function... " >&6; }
16633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16634/* end confdefs.h. */
16635
16636
16637 #include <sys/random.h>
16638
16639 int main() {
16640 char buffer[1];
16641 const size_t buflen = sizeof(buffer);
16642 const int flags = 0;
16643 /* ignore the result, Python checks for ENOSYS at runtime */
16644 (void)getrandom(buffer, buflen, flags);
16645 return 0;
16646 }
16647
16648
16649_ACEOF
16650if ac_fn_c_try_link "$LINENO"; then :
16651 have_getrandom=yes
16652else
16653 have_getrandom=no
16654fi
16655rm -f core conftest.err conftest.$ac_objext \
16656 conftest$ac_exeext conftest.$ac_ext
16657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16658$as_echo "$have_getrandom" >&6; }
16659
16660if test "$have_getrandom" = yes; then
16661
16662$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16663
16664fi
16665
Guido van Rossum627b2d71993-12-24 10:39:16 +000016666# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016667ac_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 +000016668
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016669ac_config_files="$ac_config_files Modules/ld_so_aix"
16670
Martin v. Löwis11437992002-04-12 09:54:03 +000016671cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016672# This file is a shell script that caches the results of configure
16673# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016674# scripts and configure runs, see configure's option --config-cache.
16675# It is not useful on other systems. If it contains results you don't
16676# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016677#
Martin v. Löwis11437992002-04-12 09:54:03 +000016678# config.status only pays attention to the cache file if you give it
16679# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016680#
Skip Montanaro6dead952003-09-25 14:50:04 +000016681# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016682# loading this file, other *unset* `ac_cv_foo' will be assigned the
16683# following values.
16684
16685_ACEOF
16686
Guido van Rossumf78abae1997-01-21 22:02:36 +000016687# The following way of writing the cache mishandles newlines in values,
16688# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016690# Ultrix sh set writes to stderr and can't be redirected directly,
16691# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692(
16693 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16694 eval ac_val=\$$ac_var
16695 case $ac_val in #(
16696 *${as_nl}*)
16697 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016698 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16699$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700 esac
16701 case $ac_var in #(
16702 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016703 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16704 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705 esac ;;
16706 esac
16707 done
16708
Martin v. Löwis11437992002-04-12 09:54:03 +000016709 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16711 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016712 # `set' does not quote correctly, so add quotes: double-quote
16713 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016714 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016715 "s/'/'\\\\''/g;
16716 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016718 *)
16719 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722 esac |
16723 sort
16724) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016725 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016729 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16730 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16732 :end' >>confcache
16733if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16734 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016735 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016736 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16737$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016738 if test ! -f "$cache_file" || test -h "$cache_file"; then
16739 cat confcache >"$cache_file"
16740 else
16741 case $cache_file in #(
16742 */* | ?:*)
16743 mv -f confcache "$cache_file"$$ &&
16744 mv -f "$cache_file"$$ "$cache_file" ;; #(
16745 *)
16746 mv -f confcache "$cache_file" ;;
16747 esac
16748 fi
16749 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016750 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016751 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16752$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016753 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016754fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016755rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016756
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016757test "x$prefix" = xNONE && prefix=$ac_default_prefix
16758# Let make expand exec_prefix.
16759test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016761DEFS=-DHAVE_CONFIG_H
16762
Skip Montanaro6dead952003-09-25 14:50:04 +000016763ac_libobjs=
16764ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016765U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016766for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16767 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016769 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16771 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016772 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16773 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016774done
16775LIBOBJS=$ac_libobjs
16776
16777LTLIBOBJS=$ac_ltlibobjs
16778
16779
Martin v. Löwis11437992002-04-12 09:54:03 +000016780
Matthias Kloseb9621712010-04-24 17:59:49 +000016781
Victor Stinnere0be4232011-10-25 13:06:09 +020016782: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016783ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016784ac_clean_files_save=$ac_clean_files
16785ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016786{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16787$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16788as_write_fail=0
16789cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016790#! $SHELL
16791# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016792# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016793# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016794# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016795
Martin v. Löwis11437992002-04-12 09:54:03 +000016796debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016797ac_cs_recheck=false
16798ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016799
Matthias Kloseb9621712010-04-24 17:59:49 +000016800SHELL=\${CONFIG_SHELL-$SHELL}
16801export SHELL
16802_ASEOF
16803cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16804## -------------------- ##
16805## M4sh Initialization. ##
16806## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808# Be more Bourne compatible
16809DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016810if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016811 emulate sh
16812 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016813 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016814 # is contrary to our usage. Disable this feature.
16815 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016817else
Matthias Kloseb9621712010-04-24 17:59:49 +000016818 case `(set -o) 2>/dev/null` in #(
16819 *posix*) :
16820 set -o posix ;; #(
16821 *) :
16822 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016824fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016825
16826
Matthias Kloseb9621712010-04-24 17:59:49 +000016827as_nl='
16828'
16829export as_nl
16830# Printing a long string crashes Solaris 7 /usr/bin/printf.
16831as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16832as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16833as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16834# Prefer a ksh shell builtin over an external printf program on Solaris,
16835# but without wasting forks for bash or zsh.
16836if test -z "$BASH_VERSION$ZSH_VERSION" \
16837 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16838 as_echo='print -r --'
16839 as_echo_n='print -rn --'
16840elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16841 as_echo='printf %s\n'
16842 as_echo_n='printf %s'
16843else
16844 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16845 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16846 as_echo_n='/usr/ucb/echo -n'
16847 else
16848 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16849 as_echo_n_body='eval
16850 arg=$1;
16851 case $arg in #(
16852 *"$as_nl"*)
16853 expr "X$arg" : "X\\(.*\\)$as_nl";
16854 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16855 esac;
16856 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16857 '
16858 export as_echo_n_body
16859 as_echo_n='sh -c $as_echo_n_body as_echo'
16860 fi
16861 export as_echo_body
16862 as_echo='sh -c $as_echo_body as_echo'
16863fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016864
16865# The user is always right.
16866if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016867 PATH_SEPARATOR=:
16868 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16869 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16870 PATH_SEPARATOR=';'
16871 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874
16875# IFS
16876# We need space, tab and new line, in precisely that order. Quoting is
16877# there to prevent editors from complaining about space-tab.
16878# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16879# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880IFS=" "" $as_nl"
16881
16882# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016883as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016884case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885 *[\\/]* ) as_myself=$0 ;;
16886 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016887for as_dir in $PATH
16888do
16889 IFS=$as_save_IFS
16890 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016891 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16892 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895 ;;
16896esac
16897# We did not find ourselves, most probably we were run as `sh COMMAND'
16898# in which case we are not to be found in the path.
16899if test "x$as_myself" = x; then
16900 as_myself=$0
16901fi
16902if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016903 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16904 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905fi
16906
Matthias Kloseb9621712010-04-24 17:59:49 +000016907# Unset variables that we do not need and which cause bugs (e.g. in
16908# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16909# suppresses any "Segmentation fault" message there. '((' could
16910# trigger a bug in pdksh 5.2.14.
16911for as_var in BASH_ENV ENV MAIL MAILPATH
16912do eval test x\${$as_var+set} = xset \
16913 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914done
16915PS1='$ '
16916PS2='> '
16917PS4='+ '
16918
16919# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016920LC_ALL=C
16921export LC_ALL
16922LANGUAGE=C
16923export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016924
Matthias Kloseb9621712010-04-24 17:59:49 +000016925# CDPATH.
16926(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16927
16928
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016929# as_fn_error STATUS ERROR [LINENO LOG_FD]
16930# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016931# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16932# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016933# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016934as_fn_error ()
16935{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016936 as_status=$1; test $as_status -eq 0 && as_status=1
16937 if test "$4"; then
16938 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16939 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016940 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016941 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016942 as_fn_exit $as_status
16943} # as_fn_error
16944
16945
16946# as_fn_set_status STATUS
16947# -----------------------
16948# Set $? to STATUS, without forking.
16949as_fn_set_status ()
16950{
16951 return $1
16952} # as_fn_set_status
16953
16954# as_fn_exit STATUS
16955# -----------------
16956# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16957as_fn_exit ()
16958{
16959 set +e
16960 as_fn_set_status $1
16961 exit $1
16962} # as_fn_exit
16963
16964# as_fn_unset VAR
16965# ---------------
16966# Portably unset VAR.
16967as_fn_unset ()
16968{
16969 { eval $1=; unset $1;}
16970}
16971as_unset=as_fn_unset
16972# as_fn_append VAR VALUE
16973# ----------------------
16974# Append the text in VALUE to the end of the definition contained in VAR. Take
16975# advantage of any shell optimizations that allow amortized linear growth over
16976# repeated appends, instead of the typical quadratic growth present in naive
16977# implementations.
16978if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16979 eval 'as_fn_append ()
16980 {
16981 eval $1+=\$2
16982 }'
16983else
16984 as_fn_append ()
16985 {
16986 eval $1=\$$1\$2
16987 }
16988fi # as_fn_append
16989
16990# as_fn_arith ARG...
16991# ------------------
16992# Perform arithmetic evaluation on the ARGs, and store the result in the
16993# global $as_val. Take advantage of shells that can avoid forks. The arguments
16994# must be portable across $(()) and expr.
16995if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16996 eval 'as_fn_arith ()
16997 {
16998 as_val=$(( $* ))
16999 }'
17000else
17001 as_fn_arith ()
17002 {
17003 as_val=`expr "$@" || test $? -eq 1`
17004 }
17005fi # as_fn_arith
17006
17007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008if expr a : '\(a\)' >/dev/null 2>&1 &&
17009 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17010 as_expr=expr
17011else
17012 as_expr=false
17013fi
17014
17015if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17016 as_basename=basename
17017else
17018 as_basename=false
17019fi
17020
Matthias Kloseb9621712010-04-24 17:59:49 +000017021if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17022 as_dirname=dirname
17023else
17024 as_dirname=false
17025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027as_me=`$as_basename -- "$0" ||
17028$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17029 X"$0" : 'X\(//\)$' \| \
17030 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017031$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017032 sed '/^.*\/\([^/][^/]*\)\/*$/{
17033 s//\1/
17034 q
17035 }
17036 /^X\/\(\/\/\)$/{
17037 s//\1/
17038 q
17039 }
17040 /^X\/\(\/\).*/{
17041 s//\1/
17042 q
17043 }
17044 s/.*/./; q'`
17045
Matthias Kloseb9621712010-04-24 17:59:49 +000017046# Avoid depending upon Character Ranges.
17047as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17048as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17049as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17050as_cr_digits='0123456789'
17051as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052
17053ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017054case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017058 xy) ECHO_C='\c';;
17059 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17060 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017061 esac;;
17062*)
17063 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017064esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017065
Martin v. Löwis11437992002-04-12 09:54:03 +000017066rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067if test -d conf$$.dir; then
17068 rm -f conf$$.dir/conf$$.file
17069else
17070 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017071 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017073if (echo >conf$$.file) 2>/dev/null; then
17074 if ln -s conf$$.file conf$$ 2>/dev/null; then
17075 as_ln_s='ln -s'
17076 # ... but there are two gotchas:
17077 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17078 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017079 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017081 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 elif ln conf$$.file conf$$ 2>/dev/null; then
17083 as_ln_s=ln
17084 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017085 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017086 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017087else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017088 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17091rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017092
Matthias Kloseb9621712010-04-24 17:59:49 +000017093
17094# as_fn_mkdir_p
17095# -------------
17096# Create "$as_dir" as a directory, including parents if necessary.
17097as_fn_mkdir_p ()
17098{
17099
17100 case $as_dir in #(
17101 -*) as_dir=./$as_dir;;
17102 esac
17103 test -d "$as_dir" || eval $as_mkdir_p || {
17104 as_dirs=
17105 while :; do
17106 case $as_dir in #(
17107 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17108 *) as_qdir=$as_dir;;
17109 esac
17110 as_dirs="'$as_qdir' $as_dirs"
17111 as_dir=`$as_dirname -- "$as_dir" ||
17112$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17113 X"$as_dir" : 'X\(//\)[^/]' \| \
17114 X"$as_dir" : 'X\(//\)$' \| \
17115 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17116$as_echo X"$as_dir" |
17117 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17118 s//\1/
17119 q
17120 }
17121 /^X\(\/\/\)[^/].*/{
17122 s//\1/
17123 q
17124 }
17125 /^X\(\/\/\)$/{
17126 s//\1/
17127 q
17128 }
17129 /^X\(\/\).*/{
17130 s//\1/
17131 q
17132 }
17133 s/.*/./; q'`
17134 test -d "$as_dir" && break
17135 done
17136 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017137 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017138
17139
17140} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017141if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017142 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017143else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017144 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017145 as_mkdir_p=false
17146fi
17147
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017148
17149# as_fn_executable_p FILE
17150# -----------------------
17151# Test if FILE is an executable regular file.
17152as_fn_executable_p ()
17153{
17154 test -f "$1" && test -x "$1"
17155} # as_fn_executable_p
17156as_test_x='test -x'
17157as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017158
17159# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017160as_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 +000017161
17162# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017163as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017164
17165
Martin v. Löwis11437992002-04-12 09:54:03 +000017166exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017167## ----------------------------------- ##
17168## Main body of $CONFIG_STATUS script. ##
17169## ----------------------------------- ##
17170_ASEOF
17171test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017172
Matthias Kloseb9621712010-04-24 17:59:49 +000017173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17174# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017175# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176# values after options handling.
17177ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017178This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017179generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017180
17181 CONFIG_FILES = $CONFIG_FILES
17182 CONFIG_HEADERS = $CONFIG_HEADERS
17183 CONFIG_LINKS = $CONFIG_LINKS
17184 CONFIG_COMMANDS = $CONFIG_COMMANDS
17185 $ $0 $@
17186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187on `(hostname || uname -n) 2>/dev/null | sed 1q`
17188"
17189
Martin v. Löwis11437992002-04-12 09:54:03 +000017190_ACEOF
17191
Matthias Kloseb9621712010-04-24 17:59:49 +000017192case $ac_config_files in *"
17193"*) set x $ac_config_files; shift; ac_config_files=$*;;
17194esac
17195
17196case $ac_config_headers in *"
17197"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17198esac
17199
17200
17201cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017202# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017203config_files="$ac_config_files"
17204config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017207
Matthias Kloseb9621712010-04-24 17:59:49 +000017208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017209ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017210\`$as_me' instantiates files and other configuration actions
17211from templates according to the current configuration. Unless the files
17212and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017213
Matthias Kloseb9621712010-04-24 17:59:49 +000017214Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017215
17216 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017218 --config print configuration, then exit
17219 -q, --quiet, --silent
17220 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 -d, --debug don't remove temporary files
17222 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017223 --file=FILE[:TEMPLATE]
17224 instantiate the configuration file FILE
17225 --header=FILE[:TEMPLATE]
17226 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017227
17228Configuration files:
17229$config_files
17230
17231Configuration headers:
17232$config_headers
17233
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017234Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17238ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017239ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017240python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017241configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017242 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017243
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017244Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017245This config.status script is free software; the Free Software Foundation
17246gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247
17248ac_pwd='$ac_pwd'
17249srcdir='$srcdir'
17250INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017251MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017252test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017253_ACEOF
17254
Matthias Kloseb9621712010-04-24 17:59:49 +000017255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17256# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017257ac_need_defaults=:
17258while test $# != 0
17259do
17260 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017261 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17263 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017264 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017266 --*=)
17267 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17268 ac_optarg=
17269 ac_shift=:
17270 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017272 ac_option=$1
17273 ac_optarg=$2
17274 ac_shift=shift
17275 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017276 esac
17277
Skip Montanaro6dead952003-09-25 14:50:04 +000017278 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017280 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17281 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017283 $as_echo "$ac_cs_version"; exit ;;
17284 --config | --confi | --conf | --con | --co | --c )
17285 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 debug=: ;;
17288 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017289 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017290 case $ac_optarg in
17291 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017292 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017293 esac
17294 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 ac_need_defaults=false;;
17296 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017297 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017298 case $ac_optarg in
17299 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17300 esac
17301 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017302 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 --he | --h)
17304 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017305 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017306Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017308 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017309 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17310 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17311 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017312
17313 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017314 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017315Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017316
Matthias Kloseb9621712010-04-24 17:59:49 +000017317 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017319
17320 esac
17321 shift
17322done
17323
Skip Montanaro6dead952003-09-25 14:50:04 +000017324ac_configure_extra_args=
17325
17326if $ac_cs_silent; then
17327 exec 6>/dev/null
17328 ac_configure_extra_args="$ac_configure_extra_args --silent"
17329fi
17330
17331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017333if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017334 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017335 shift
17336 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17337 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017339 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017340fi
17341
Martin v. Löwis11437992002-04-12 09:54:03 +000017342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344exec 5>>config.log
17345{
17346 echo
17347 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17348## Running $as_me. ##
17349_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017356
Matthias Kloseb9621712010-04-24 17:59:49 +000017357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017358
17359# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017360for ac_config_target in $ac_config_targets
17361do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362 case $ac_config_target in
17363 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17364 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17365 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017366 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17367 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17369 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017370 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017371 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017372 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373
Victor Stinnere0be4232011-10-25 13:06:09 +020017374 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017375 esac
17376done
17377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378
Martin v. Löwis11437992002-04-12 09:54:03 +000017379# If the user did not use the arguments to specify the items to instantiate,
17380# then the envvar interface is used. Set only those that are not.
17381# We use the long form for the default assignment because of an extremely
17382# bizarre bug on SunOS 4.1.3.
17383if $ac_need_defaults; then
17384 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17385 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17386fi
17387
Skip Montanaro6dead952003-09-25 14:50:04 +000017388# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017390# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391# Hook for its removal unless debugging.
17392# Note that there is a small window in which the directory will not be cleaned:
17393# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017394$debug ||
17395{
Victor Stinnere0be4232011-10-25 13:06:09 +020017396 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017398 : "${ac_tmp:=$tmp}"
17399 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017401 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017402}
Martin v. Löwis11437992002-04-12 09:54:03 +000017403# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017404
Martin v. Löwis11437992002-04-12 09:54:03 +000017405{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017407 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017408} ||
17409{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410 tmp=./conf$$-$RANDOM
17411 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017412} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017413ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017414
Matthias Kloseb9621712010-04-24 17:59:49 +000017415# Set up the scripts for CONFIG_FILES section.
17416# No need to generate them if there are no CONFIG_FILES.
17417# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017419
Matthias Kloseb9621712010-04-24 17:59:49 +000017420
17421ac_cr=`echo X | tr X '\015'`
17422# On cygwin, bash can eat \r inside `` if the user requested igncr.
17423# But we know of no other shell where ac_cr would be empty at this
17424# point, so we can use a bashism as a fallback.
17425if test "x$ac_cr" = x; then
17426 eval ac_cr=\$\'\\r\'
17427fi
17428ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17429if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017430 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017431else
17432 ac_cs_awk_cr=$ac_cr
17433fi
17434
Victor Stinnere0be4232011-10-25 13:06:09 +020017435echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017436_ACEOF
17437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438
Matthias Kloseb9621712010-04-24 17:59:49 +000017439{
17440 echo "cat >conf$$subs.awk <<_ACEOF" &&
17441 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17442 echo "_ACEOF"
17443} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017444 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17445ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446ac_delim='%!_!# '
17447for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017448 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017449 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017450
Matthias Kloseb9621712010-04-24 17:59:49 +000017451 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17452 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017453 break
17454 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017455 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017456 else
17457 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017458 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459done
Matthias Kloseb9621712010-04-24 17:59:49 +000017460rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461
Matthias Kloseb9621712010-04-24 17:59:49 +000017462cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017463cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017465sed -n '
17466h
17467s/^/S["/; s/!.*/"]=/
17468p
17469g
17470s/^[^!]*!//
17471:repl
17472t repl
17473s/'"$ac_delim"'$//
17474t delim
17475:nl
17476h
17477s/\(.\{148\}\)..*/\1/
17478t more1
17479s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17480p
17481n
17482b repl
17483:more1
17484s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17485p
17486g
17487s/.\{148\}//
17488t nl
17489:delim
17490h
17491s/\(.\{148\}\)..*/\1/
17492t more2
17493s/["\\]/\\&/g; s/^/"/; s/$/"/
17494p
17495b
17496:more2
17497s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17498p
17499g
17500s/.\{148\}//
17501t delim
17502' <conf$$subs.awk | sed '
17503/^[^""]/{
17504 N
17505 s/\n//
17506}
17507' >>$CONFIG_STATUS || ac_write_fail=1
17508rm -f conf$$subs.awk
17509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17510_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017511cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017512 for (key in S) S_is_set[key] = 1
17513 FS = ""
17514
17515}
17516{
17517 line = $ 0
17518 nfields = split(line, field, "@")
17519 substed = 0
17520 len = length(field[1])
17521 for (i = 2; i < nfields; i++) {
17522 key = field[i]
17523 keylen = length(key)
17524 if (S_is_set[key]) {
17525 value = S[key]
17526 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17527 len += length(value) + length(field[++i])
17528 substed = 1
17529 } else
17530 len += 1 + keylen
17531 }
17532
17533 print line
17534}
17535
17536_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017538cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17539if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17540 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17541else
17542 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017543fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017544 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017545_ACEOF
17546
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017547# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17548# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549# trailing colons and then remove the whole line if VPATH becomes empty
17550# (actually we leave an empty line to preserve line numbers).
17551if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017552 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17553h
17554s///
17555s/^/:/
17556s/[ ]*$/:/
17557s/:\$(srcdir):/:/g
17558s/:\${srcdir}:/:/g
17559s/:@srcdir@:/:/g
17560s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017562x
17563s/\(=[ ]*\).*/\1/
17564G
17565s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566s/^[^=]*=[ ]*$//
17567}'
17568fi
17569
Matthias Kloseb9621712010-04-24 17:59:49 +000017570cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017571fi # test -n "$CONFIG_FILES"
17572
Matthias Kloseb9621712010-04-24 17:59:49 +000017573# Set up the scripts for CONFIG_HEADERS section.
17574# No need to generate them if there are no CONFIG_HEADERS.
17575# This happens for instance with `./config.status Makefile'.
17576if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017577cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017578BEGIN {
17579_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580
Matthias Kloseb9621712010-04-24 17:59:49 +000017581# Transform confdefs.h into an awk script `defines.awk', embedded as
17582# here-document in config.status, that substitutes the proper values into
17583# config.h.in to produce config.h.
17584
17585# Create a delimiter string that does not exist in confdefs.h, to ease
17586# handling of long lines.
17587ac_delim='%!_!# '
17588for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017589 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17590 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017591 break
17592 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017593 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017594 else
17595 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17596 fi
17597done
17598
17599# For the awk script, D is an array of macro values keyed by name,
17600# likewise P contains macro parameters if any. Preserve backslash
17601# newline sequences.
17602
17603ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17604sed -n '
17605s/.\{148\}/&'"$ac_delim"'/g
17606t rset
17607:rset
17608s/^[ ]*#[ ]*define[ ][ ]*/ /
17609t def
17610d
17611:def
17612s/\\$//
17613t bsnl
17614s/["\\]/\\&/g
17615s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17616D["\1"]=" \3"/p
17617s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17618d
17619:bsnl
17620s/["\\]/\\&/g
17621s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17622D["\1"]=" \3\\\\\\n"\\/p
17623t cont
17624s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17625t cont
17626d
17627:cont
17628n
17629s/.\{148\}/&'"$ac_delim"'/g
17630t clear
17631:clear
17632s/\\$//
17633t bsnlc
17634s/["\\]/\\&/g; s/^/"/; s/$/"/p
17635d
17636:bsnlc
17637s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17638b cont
17639' <confdefs.h | sed '
17640s/'"$ac_delim"'/"\\\
17641"/g' >>$CONFIG_STATUS || ac_write_fail=1
17642
17643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17644 for (key in D) D_is_set[key] = 1
17645 FS = ""
17646}
17647/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17648 line = \$ 0
17649 split(line, arg, " ")
17650 if (arg[1] == "#") {
17651 defundef = arg[2]
17652 mac1 = arg[3]
17653 } else {
17654 defundef = substr(arg[1], 2)
17655 mac1 = arg[2]
17656 }
17657 split(mac1, mac2, "(") #)
17658 macro = mac2[1]
17659 prefix = substr(line, 1, index(line, defundef) - 1)
17660 if (D_is_set[macro]) {
17661 # Preserve the white space surrounding the "#".
17662 print prefix "define", macro P[macro] D[macro]
17663 next
17664 } else {
17665 # Replace #undef with comments. This is necessary, for example,
17666 # in the case of _POSIX_SOURCE, which is predefined and required
17667 # on some systems where configure will not decide to define it.
17668 if (defundef == "undef") {
17669 print "/*", prefix defundef, macro, "*/"
17670 next
17671 }
17672 }
17673}
17674{ print }
17675_ACAWK
17676_ACEOF
17677cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017678 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017679fi # test -n "$CONFIG_HEADERS"
17680
17681
17682eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17683shift
17684for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685do
17686 case $ac_tag in
17687 :[FHLC]) ac_mode=$ac_tag; continue;;
17688 esac
17689 case $ac_mode$ac_tag in
17690 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017691 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692 :[FH]-) ac_tag=-:-;;
17693 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17694 esac
17695 ac_save_IFS=$IFS
17696 IFS=:
17697 set x $ac_tag
17698 IFS=$ac_save_IFS
17699 shift
17700 ac_file=$1
17701 shift
17702
17703 case $ac_mode in
17704 :L) ac_source=$1;;
17705 :[FH])
17706 ac_file_inputs=
17707 for ac_f
17708 do
17709 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017710 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711 *) # Look for the file first in the build tree, then in the source tree
17712 # (if the path is not absolute). The absolute path cannot be DOS-style,
17713 # because $ac_f cannot contain `:'.
17714 test -f "$ac_f" ||
17715 case $ac_f in
17716 [\\/$]*) false;;
17717 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17718 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017719 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017721 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17722 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723 done
17724
17725 # Let's still pretend it is `configure' which instantiates (i.e., don't
17726 # use $as_me), people would be surprised to read:
17727 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017728 configure_input='Generated from '`
17729 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17730 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731 if test x"$ac_file" != x-; then
17732 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017733 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17734$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017736 # Neutralize special characters interpreted by sed in replacement strings.
17737 case $configure_input in #(
17738 *\&* | *\|* | *\\* )
17739 ac_sed_conf_input=`$as_echo "$configure_input" |
17740 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17741 *) ac_sed_conf_input=$configure_input;;
17742 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743
17744 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017745 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17746 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 esac
17748 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017749 esac
17750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017752$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017753 X"$ac_file" : 'X\(//\)[^/]' \| \
17754 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017756$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17758 s//\1/
17759 q
17760 }
17761 /^X\(\/\/\)[^/].*/{
17762 s//\1/
17763 q
17764 }
17765 /^X\(\/\/\)$/{
17766 s//\1/
17767 q
17768 }
17769 /^X\(\/\).*/{
17770 s//\1/
17771 q
17772 }
17773 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017774 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017775 ac_builddir=.
17776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777case "$ac_dir" in
17778.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17779*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017780 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017782 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783 case $ac_top_builddir_sub in
17784 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17785 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17786 esac ;;
17787esac
17788ac_abs_top_builddir=$ac_pwd
17789ac_abs_builddir=$ac_pwd$ac_dir_suffix
17790# for backward compatibility:
17791ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017792
17793case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796 ac_top_srcdir=$ac_top_builddir_sub
17797 ac_abs_top_srcdir=$ac_pwd ;;
17798 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017799 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800 ac_top_srcdir=$srcdir
17801 ac_abs_top_srcdir=$srcdir ;;
17802 *) # Relative name.
17803 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17804 ac_top_srcdir=$ac_top_build_prefix$srcdir
17805 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017806esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017808
Martin v. Löwis11437992002-04-12 09:54:03 +000017809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810 case $ac_mode in
17811 :F)
17812 #
17813 # CONFIG_FILE
17814 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017815
17816 case $INSTALL in
17817 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017819 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017820 ac_MKDIR_P=$MKDIR_P
17821 case $MKDIR_P in
17822 [\\/$]* | ?:[\\/]* ) ;;
17823 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17824 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017825_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826
Matthias Kloseb9621712010-04-24 17:59:49 +000017827cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828# If the template does not know about datarootdir, expand it.
17829# FIXME: This hack should be removed a few years after 2.60.
17830ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017831ac_sed_dataroot='
17832/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017833 p
17834 q
17835}
17836/@datadir@/p
17837/@docdir@/p
17838/@infodir@/p
17839/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017840/@mandir@/p'
17841case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842*datarootdir*) ac_datarootdir_seen=yes;;
17843*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17845$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017847cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848 ac_datarootdir_hack='
17849 s&@datadir@&$datadir&g
17850 s&@docdir@&$docdir&g
17851 s&@infodir@&$infodir&g
17852 s&@localedir@&$localedir&g
17853 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017854 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855esac
17856_ACEOF
17857
17858# Neutralize VPATH when `$srcdir' = `.'.
17859# Shell code in configure.ac might set extrasub.
17860# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017861cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17862ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017863$extrasub
17864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017866:t
17867/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017868s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017870s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871s&@srcdir@&$ac_srcdir&;t t
17872s&@abs_srcdir@&$ac_abs_srcdir&;t t
17873s&@top_srcdir@&$ac_top_srcdir&;t t
17874s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17875s&@builddir@&$ac_builddir&;t t
17876s&@abs_builddir@&$ac_abs_builddir&;t t
17877s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17878s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017879s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017881"
Victor Stinnere0be4232011-10-25 13:06:09 +020017882eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17883 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017886 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17887 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17888 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017890which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017891$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017892which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017893
Victor Stinnere0be4232011-10-25 13:06:09 +020017894 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017895 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017896 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17897 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017898 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017899 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900 ;;
17901 :H)
17902 #
17903 # CONFIG_HEADER
17904 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017906 {
17907 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017908 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17909 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017910 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017911 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017912 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17913$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017915 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017916 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017917 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017918 fi
17919 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017920 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017921 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017922 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017923 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926
17927 esac
17928
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017929
17930 case $ac_file$ac_mode in
17931 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17932
17933 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934done # for ac_tag
17935
Guido van Rossum627b2d71993-12-24 10:39:16 +000017936
Matthias Kloseb9621712010-04-24 17:59:49 +000017937as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017938_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017939ac_clean_files=$ac_clean_files_save
17940
Matthias Kloseb9621712010-04-24 17:59:49 +000017941test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017942 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017943
Martin v. Löwis11437992002-04-12 09:54:03 +000017944
17945# configure is writing to config.log, and then calls config.status.
17946# config.status does its own redirection, appending to config.log.
17947# Unfortunately, on DOS this fails, as config.log is still kept open
17948# by configure, so config.status won't be able to write to it; its
17949# output is simply discarded. So we exec the FD to /dev/null,
17950# effectively closing config.log, so it can be properly (re)opened and
17951# appended to by config.status. When coming back to configure, we
17952# need to make the FD available again.
17953if test "$no_create" != yes; then
17954 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017955 ac_config_status_args=
17956 test "$silent" = yes &&
17957 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017958 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017959 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 exec 5>>config.log
17961 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17962 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017963 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017964fi
17965if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17967$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017968fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017969
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017970
Christian Heimes75ed8902013-11-20 01:11:18 +010017971echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017972if test ! -f Modules/Setup
17973then
17974 cp $srcdir/Modules/Setup.dist Modules/Setup
17975fi
17976
Christian Heimes75ed8902013-11-20 01:11:18 +010017977echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017978if test ! -f Modules/Setup.local
17979then
17980 echo "# Edit this file for local setup changes" >Modules/Setup.local
17981fi
17982
Christian Heimes75ed8902013-11-20 01:11:18 +010017983echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017984$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17985 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017986 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017987mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017988
17989if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17990 echo "" >&6
17991 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017992 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 +000017993 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017994 echo "" >&6
17995 echo "" >&6
17996fi
17997