blob: 1126372b0b751486501cf3004448a16d28e0caad [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000698USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
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
Martin Panter43a94a72016-07-29 05:52:32 +0000752GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200754PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500763HAS_HG
764HGBRANCH
765HGTAG
766HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_fpectl
840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150 ac_prev=sbindir ;;
1151 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
1155 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157 | --sharedst | --shareds | --shared | --share | --shar \
1158 | --sha | --sh)
1159 ac_prev=sharedstatedir ;;
1160 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 -site | --site | --sit)
1167 ac_prev=site ;;
1168 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172 ac_prev=srcdir ;;
1173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177 | --syscon | --sysco | --sysc | --sys | --sy)
1178 ac_prev=sysconfdir ;;
1179 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189 verbose=yes ;;
1190
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 -version | --version | --versio | --versi | --vers | -V)
1192 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001198 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 --x)
1227 # Obsolete; use --with-x.
1228 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231 | --x-incl | --x-inc | --x-in | --x-i)
1232 ac_prev=x_includes ;;
1233 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239 ac_prev=x_libraries ;;
1240 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 *=*)
1249 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 case $ac_envvar in #(
1252 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 export $ac_envvar ;;
1257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001263 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ;;
1265
1266 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267done
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273
Matthias Kloseb9621712010-04-24 17:59:49 +00001274if test -n "$ac_unrecognized_opts"; then
1275 case $enable_option_checking in
1276 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279 esac
1280fi
1281
1282# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284 datadir sysconfdir sharedstatedir localstatedir includedir \
1285 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Ned Deily8bb38a72016-12-06 17:31:32 -05001286 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 # Remove trailing slashes.
1290 case $ac_val in
1291 */ )
1292 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293 eval $ac_var=\$ac_val;;
1294 esac
1295 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 [\\/$]* | ?:[\\/]* ) continue;;
1298 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001301done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# There might be people who depend on the old broken behavior: `$host'
1304# used to hold the argument of --host etc.
1305# FIXME: To remove some day.
1306build=$build_alias
1307host=$host_alias
1308target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# FIXME: To remove some day.
1311if test "x$host_alias" != x; then
1312 if test "x$build_alias" = x; then
1313 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 elif test "x$build_alias" != "x$host_alias"; then
1315 cross_compiling=yes
1316 fi
1317fi
1318
1319ac_tool_prefix=
1320test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322test "$silent" = yes && exec 6>/dev/null
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326ac_ls_di=`ls -di .` &&
1327ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333# Find the source files, if location was not specified.
1334if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 ac_confdir=`$as_dirname -- "$as_myself" ||
1338$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339 X"$as_myself" : 'X\(//\)[^/]' \| \
1340 X"$as_myself" : 'X\(//\)$' \| \
1341 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)[^/].*/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\).*/{
1356 s//\1/
1357 q
1358 }
1359 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362 srcdir=..
1363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367if test ! -r "$srcdir/$ac_unique_file"; then
1368 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 pwd)`
1375# When building in place, set srcdir=.
1376if test "$ac_abs_confdir" = "$ac_pwd"; then
1377 srcdir=.
1378fi
1379# Remove unnecessary trailing slashes from srcdir.
1380# Double slashes in file names in object file debugging info
1381# mess up M-x gdb in Emacs.
1382case $srcdir in
1383*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384esac
1385for ac_var in $ac_precious_vars; do
1386 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_env_${ac_var}_value=\$${ac_var}
1388 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392#
1393# Report the --help message.
1394#
1395if test "$ac_init_help" = "long"; then
1396 # Omit some internal or obsolete options to make the list less imposing.
1397 # This message is too long to be a string in the A/UX 3.1 sh.
1398 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001399\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404VAR=VALUE. See below for descriptions of some of the useful variables.
1405
1406Defaults for the options are specified in brackets.
1407
1408Configuration:
1409 -h, --help display this help and exit
1410 --help=short display options specific to this package
1411 --help=recursive display the short help of all the included packages
1412 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001413 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --cache-file=FILE cache test results in FILE [disabled]
1415 -C, --config-cache alias for \`--cache-file=config.cache'
1416 -n, --no-create do not create output files
1417 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1418
Martin v. Löwis11437992002-04-12 09:54:03 +00001419Installation directories:
1420 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425By default, \`make install' will install all the files in
1426\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1427an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428for instance \`--prefix=\$HOME'.
1429
1430For better control, use the options below.
1431
1432Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --bindir=DIR user executables [EPREFIX/bin]
1434 --sbindir=DIR system admin executables [EPREFIX/sbin]
1435 --libexecdir=DIR program executables [EPREFIX/libexec]
1436 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1437 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1438 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001465 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001479 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1480 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with(out)-threads[=DIRECTORY]
1525 disable/enable thread support
1526 --with(out)-thread[=DIRECTORY]
1527 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-doc-strings disable/enable documentation strings
1529 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001530 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001531 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with-fpectl enable SIGFPE catching
1533 --with-libm=STRING math library
1534 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001535 --with(out)-computed-gotos
1536 Use computed gotos in evaluation loop (enabled by
1537 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001538 --with(out)-ensurepip=[=upgrade]
1539 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001542 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 CC C compiler command
1544 CFLAGS C compiler flags
1545 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1546 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001548 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001551 PKG_CONFIG path to pkg-config utility
1552 PKG_CONFIG_PATH
1553 directories to add to pkg-config's search path
1554 PKG_CONFIG_LIBDIR
1555 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
1557Use these variables to override the choices made by `configure' or to help
1558it to find libraries and programs with nonstandard names/locations.
1559
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001560Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001563fi
1564
1565if test "$ac_init_help" = "recursive"; then
1566 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 test -d "$ac_dir" ||
1569 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1570 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_builddir=.
1572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573case "$ac_dir" in
1574.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 case $ac_top_builddir_sub in
1580 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1582 esac ;;
1583esac
1584ac_abs_top_builddir=$ac_pwd
1585ac_abs_builddir=$ac_pwd$ac_dir_suffix
1586# for backward compatibility:
1587ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
1589case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 ac_top_srcdir=$ac_top_builddir_sub
1593 ac_abs_top_srcdir=$ac_pwd ;;
1594 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 ac_top_srcdir=$srcdir
1597 ac_abs_top_srcdir=$srcdir ;;
1598 *) # Relative name.
1599 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1600 ac_top_srcdir=$ac_top_build_prefix$srcdir
1601 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001602esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 cd "$ac_dir" || { ac_status=$?; continue; }
1606 # Check for guested configure.
1607 if test -f "$ac_srcdir/configure.gnu"; then
1608 echo &&
1609 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1610 elif test -f "$ac_srcdir/configure"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001614 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 fi || ac_status=$?
1616 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 done
1618fi
1619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001621if $ac_init_version; then
1622 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001623python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001624generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001625
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001626Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001627This configure script is free software; the Free Software Foundation
1628gives unlimited permission to copy, distribute and modify it.
1629_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001632
1633## ------------------------ ##
1634## Autoconf initialization. ##
1635## ------------------------ ##
1636
1637# ac_fn_c_try_compile LINENO
1638# --------------------------
1639# Try to compile conftest.$ac_ext, and return whether this succeeded.
1640ac_fn_c_try_compile ()
1641{
1642 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1643 rm -f conftest.$ac_objext
1644 if { { ac_try="$ac_compile"
1645case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648esac
1649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650$as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_compile") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1659 test $ac_status = 0; } && {
1660 test -z "$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 } && test -s conftest.$ac_objext; then :
1663 ac_retval=0
1664else
1665 $as_echo "$as_me: failed program was:" >&5
1666sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 as_fn_set_status $ac_retval
1672
1673} # ac_fn_c_try_compile
1674
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001675# ac_fn_c_try_cpp LINENO
1676# ----------------------
1677# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1678ac_fn_c_try_cpp ()
1679{
1680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681 if { { ac_try="$ac_cpp conftest.$ac_ext"
1682case "(($ac_try" in
1683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1684 *) ac_try_echo=$ac_try;;
1685esac
1686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1687$as_echo "$ac_try_echo"; } >&5
1688 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1689 ac_status=$?
1690 if test -s conftest.err; then
1691 grep -v '^ *+' conftest.err >conftest.er1
1692 cat conftest.er1 >&5
1693 mv -f conftest.er1 conftest.err
1694 fi
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } > conftest.i && {
1697 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1698 test ! -s conftest.err
1699 }; then :
1700 ac_retval=0
1701else
1702 $as_echo "$as_me: failed program was:" >&5
1703sed 's/^/| /' conftest.$ac_ext >&5
1704
1705 ac_retval=1
1706fi
1707 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1708 as_fn_set_status $ac_retval
1709
1710} # ac_fn_c_try_cpp
1711
Matthias Kloseb9621712010-04-24 17:59:49 +00001712# ac_fn_c_try_link LINENO
1713# -----------------------
1714# Try to link conftest.$ac_ext, and return whether this succeeded.
1715ac_fn_c_try_link ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 rm -f conftest.$ac_objext conftest$ac_exeext
1719 if { { ac_try="$ac_link"
1720case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_link") 2>conftest.err
1727 ac_status=$?
1728 if test -s conftest.err; then
1729 grep -v '^ *+' conftest.err >conftest.er1
1730 cat conftest.er1 >&5
1731 mv -f conftest.er1 conftest.err
1732 fi
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; } && {
1735 test -z "$ac_c_werror_flag" ||
1736 test ! -s conftest.err
1737 } && test -s conftest$ac_exeext && {
1738 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001739 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 }; then :
1741 ac_retval=0
1742else
1743 $as_echo "$as_me: failed program was:" >&5
1744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746 ac_retval=1
1747fi
1748 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1749 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1750 # interfere with the next link command; also delete a directory that is
1751 # left behind by Apple's compiler. We do this before executing the actions.
1752 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_link
1757
Matthias Kloseb9621712010-04-24 17:59:49 +00001758# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1759# -------------------------------------------------------
1760# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1761# the include files in INCLUDES and setting the cache variable VAR
1762# accordingly.
1763ac_fn_c_check_header_mongrel ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1768$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001769if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 $as_echo_n "(cached) " >&6
1771fi
1772eval ac_res=\$$3
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775else
1776 # Is the header compilable?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1778$as_echo_n "checking $2 usability... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h. */
1781$4
1782#include <$2>
1783_ACEOF
1784if ac_fn_c_try_compile "$LINENO"; then :
1785 ac_header_compiler=yes
1786else
1787 ac_header_compiler=no
1788fi
1789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1791$as_echo "$ac_header_compiler" >&6; }
1792
1793# Is the header present?
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1795$as_echo_n "checking $2 presence... " >&6; }
1796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_cpp "$LINENO"; then :
1801 ac_header_preproc=yes
1802else
1803 ac_header_preproc=no
1804fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1807$as_echo "$ac_header_preproc" >&6; }
1808
1809# So? What about this header?
1810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1811 yes:no: )
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1813$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1815$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1816 ;;
1817 no:yes:* )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1819$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1821$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1823$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1825$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001828( $as_echo "## --------------------------------------- ##
1829## Report this to https://bugs.python.org/ ##
1830## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 ) | sed "s/^/$as_me: WARNING: /" >&2
1832 ;;
1833esac
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001836if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 $as_echo_n "(cached) " >&6
1838else
1839 eval "$3=\$ac_header_compiler"
1840fi
1841eval ac_res=\$$3
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1843$as_echo "$ac_res" >&6; }
1844fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001846
1847} # ac_fn_c_check_header_mongrel
1848
1849# ac_fn_c_try_run LINENO
1850# ----------------------
1851# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1852# that executables *can* be run.
1853ac_fn_c_try_run ()
1854{
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_link"
1857case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_link") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1867 { { case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_try") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; }; }; then :
1877 ac_retval=0
1878else
1879 $as_echo "$as_me: program exited with status $ac_status" >&5
1880 $as_echo "$as_me: failed program was:" >&5
1881sed 's/^/| /' conftest.$ac_ext >&5
1882
1883 ac_retval=$ac_status
1884fi
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_run
1890
1891# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1892# -------------------------------------------------------
1893# Tests whether HEADER exists and can be compiled using the include files in
1894# INCLUDES, setting the cache variable VAR accordingly.
1895ac_fn_c_check_header_compile ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$4
1906#include <$2>
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1914fi
1915eval ac_res=\$$3
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1917$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920} # ac_fn_c_check_header_compile
1921
Matthias Kloseb9621712010-04-24 17:59:49 +00001922# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1923# -------------------------------------------
1924# Tests whether TYPE exists after having included INCLUDES, setting cache
1925# variable VAR accordingly.
1926ac_fn_c_check_type ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001931if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001932 $as_echo_n "(cached) " >&6
1933else
1934 eval "$3=no"
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$4
1938int
1939main ()
1940{
1941if (sizeof ($2))
1942 return 0;
1943 ;
1944 return 0;
1945}
1946_ACEOF
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954if (sizeof (($2)))
1955 return 0;
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 eval "$3=yes"
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968fi
1969eval ac_res=\$$3
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974} # ac_fn_c_check_type
1975
Matthias Kloseb9621712010-04-24 17:59:49 +00001976# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1977# --------------------------------------------
1978# Tries to find the compile-time value of EXPR in a program that includes
1979# INCLUDES, setting VAR accordingly. Returns whether the value could be
1980# computed
1981ac_fn_c_compute_int ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 if test "$cross_compiling" = yes; then
1985 # Depending upon the size, compute the lo and hi bounds.
1986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$4
1989int
1990main ()
1991{
1992static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 ac_lo=0 ac_mid=0
2002 while :; do
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_hi=$ac_mid; break
2019else
2020 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2021 if test $ac_lo -le $ac_mid; then
2022 ac_lo= ac_hi=
2023 break
2024 fi
2025 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028 done
2029else
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_hi=-1 ac_mid=-1
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_lo=$ac_mid; break
2063else
2064 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2065 if test $ac_mid -le $ac_hi; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 ac_lo= ac_hi=
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079# Binary search between lo and hi bounds.
2080while test "x$ac_lo" != "x$ac_hi"; do
2081 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002089test_array [0] = 0;
2090return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=$ac_mid
2098else
2099 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102done
2103case $ac_lo in #((
2104?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2105'') ac_retval=1 ;;
2106esac
2107 else
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111static long int longval () { return $2; }
2112static unsigned long int ulongval () { return $2; }
2113#include <stdio.h>
2114#include <stdlib.h>
2115int
2116main ()
2117{
2118
2119 FILE *f = fopen ("conftest.val", "w");
2120 if (! f)
2121 return 1;
2122 if (($2) < 0)
2123 {
2124 long int i = longval ();
2125 if (i != ($2))
2126 return 1;
2127 fprintf (f, "%ld", i);
2128 }
2129 else
2130 {
2131 unsigned long int i = ulongval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%lu", i);
2135 }
2136 /* Do not output a trailing newline, as this causes \r\n confusion
2137 on some platforms. */
2138 return ferror (f) || fclose (f) != 0;
2139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_run "$LINENO"; then :
2145 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2146else
2147 ac_retval=1
2148fi
2149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2150 conftest.$ac_objext conftest.beam conftest.$ac_ext
2151rm -f conftest.val
2152
2153 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002154 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002155 as_fn_set_status $ac_retval
2156
2157} # ac_fn_c_compute_int
2158
2159# ac_fn_c_check_func LINENO FUNC VAR
2160# ----------------------------------
2161# Tests whether FUNC exists, setting the cache variable VAR accordingly
2162ac_fn_c_check_func ()
2163{
2164 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2166$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002167if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 $as_echo_n "(cached) " >&6
2169else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2174#define $2 innocuous_$2
2175
2176/* System header to define __stub macros and hopefully few prototypes,
2177 which can conflict with char $2 (); below.
2178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2179 <limits.h> exists even on freestanding compilers. */
2180
2181#ifdef __STDC__
2182# include <limits.h>
2183#else
2184# include <assert.h>
2185#endif
2186
2187#undef $2
2188
2189/* Override any GCC internal prototype to avoid an error.
2190 Use char because int might match the return type of a GCC
2191 builtin and then its argument prototype would still apply. */
2192#ifdef __cplusplus
2193extern "C"
2194#endif
2195char $2 ();
2196/* The GNU C library defines this for functions which it implements
2197 to always fail with ENOSYS. Some functions are actually named
2198 something starting with __ and the normal name is an alias. */
2199#if defined __stub_$2 || defined __stub___$2
2200choke me
2201#endif
2202
2203int
2204main ()
2205{
2206return $2 ();
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_link "$LINENO"; then :
2212 eval "$3=yes"
2213else
2214 eval "$3=no"
2215fi
2216rm -f core conftest.err conftest.$ac_objext \
2217 conftest$ac_exeext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223
2224} # ac_fn_c_check_func
2225
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002226# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2227# ---------------------------------------------
2228# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2229# accordingly.
2230ac_fn_c_check_decl ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 as_decl_name=`echo $2|sed 's/ *(.*//'`
2234 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2236$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2237if eval \${$3+:} false; then :
2238 $as_echo_n "(cached) " >&6
2239else
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$4
2243int
2244main ()
2245{
2246#ifndef $as_decl_name
2247#ifdef __cplusplus
2248 (void) $as_decl_use;
2249#else
2250 (void) $as_decl_name;
2251#endif
2252#endif
2253
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$3=yes"
2260else
2261 eval "$3=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265eval ac_res=\$$3
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2267$as_echo "$ac_res" >&6; }
2268 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2269
2270} # ac_fn_c_check_decl
2271
Matthias Kloseb9621712010-04-24 17:59:49 +00002272# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2273# ----------------------------------------------------
2274# Tries to find if the field MEMBER exists in type AGGR, after including
2275# INCLUDES, setting cache variable VAR accordingly.
2276ac_fn_c_check_member ()
2277{
2278 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2280$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002281if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002282 $as_echo_n "(cached) " >&6
2283else
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h. */
2286$5
2287int
2288main ()
2289{
2290static $2 ac_aggr;
2291if (ac_aggr.$3)
2292return 0;
2293 ;
2294 return 0;
2295}
2296_ACEOF
2297if ac_fn_c_try_compile "$LINENO"; then :
2298 eval "$4=yes"
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$5
2303int
2304main ()
2305{
2306static $2 ac_aggr;
2307if (sizeof ac_aggr.$3)
2308return 0;
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$4=yes"
2315else
2316 eval "$4=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$4
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002325 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002326
2327} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Ned Deily4829bc62016-09-12 17:29:04 -04002332It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002333generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002443 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002444## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002445## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 echo
2447 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448(
2449 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2450 eval ac_val=\$$ac_var
2451 case $ac_val in #(
2452 *${as_nl}*)
2453 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2455$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac
2457 case $ac_var in #(
2458 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2460 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 esac ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2466 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 "s/'\''/'\''\\\\'\'''\''/g;
2469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2470 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac |
2475 sort
2476)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002478
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002479 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002480## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002481## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 echo
2483 for ac_var in $ac_subst_vars
2484 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 eval ac_val=\$$ac_var
2486 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 done | sort
2491 echo
2492
2493 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002496## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 echo
2498 for ac_var in $ac_subst_files
2499 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 eval ac_val=\$$ac_var
2501 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 done | sort
2506 echo
2507 fi
2508
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002511## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo
2516 fi
2517 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 $as_echo "$as_me: caught signal $ac_signal"
2519 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 rm -f core *.core core.conftest.* &&
2522 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002525for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002527done
2528ac_signal=0
2529
2530# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002532
Matthias Kloseb9621712010-04-24 17:59:49 +00002533$as_echo "/* confdefs.h */" > confdefs.h
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535# Predefined preprocessor variables.
2536
2537cat >>confdefs.h <<_ACEOF
2538#define PACKAGE_NAME "$PACKAGE_NAME"
2539_ACEOF
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2543_ACEOF
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_VERSION "$PACKAGE_VERSION"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_STRING "$PACKAGE_STRING"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2555_ACEOF
2556
Matthias Kloseb9621712010-04-24 17:59:49 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_URL "$PACKAGE_URL"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561
2562# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002563# Prefer an explicitly selected file to automatically selected ones.
2564ac_site_file1=NONE
2565ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567 # We do not want a PATH search for config.site.
2568 case $CONFIG_SITE in #((
2569 -*) ac_site_file1=./$CONFIG_SITE;;
2570 */*) ac_site_file1=$CONFIG_SITE;;
2571 *) ac_site_file1=./$CONFIG_SITE;;
2572 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$prefix/share/config.site
2575 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576else
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$ac_default_prefix/share/config.site
2578 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002580for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581do
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 test "x$ac_site_file" = xNONE && continue
2583 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2585$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 . "$ac_site_file" \
2588 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2590as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002591See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592 fi
2593done
2594
2595if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 # Some versions of bash will fail to source /dev/null (special files
2597 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2598 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2600$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2603 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 esac
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606else
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2608$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 >$cache_file
2610fi
2611
2612# Check that the precious variables saved in the cache have kept the same
2613# value.
2614ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2617 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2619 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $ac_old_set,$ac_new_set in
2621 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2623$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 ac_cache_corrupted=: ;;
2625 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2627$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 ac_cache_corrupted=: ;;
2629 ,);;
2630 *)
2631 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 # differences in whitespace do not lead to failure.
2633 ac_old_val_w=`echo x $ac_old_val`
2634 ac_new_val_w=`echo x $ac_new_val`
2635 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2637$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2638 ac_cache_corrupted=:
2639 else
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2641$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2642 eval $ac_var=\$ac_old_val
2643 fi
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2645$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2647$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 fi;;
2649 esac
2650 # Pass precious variables to config.status.
2651 if test "$ac_new_set" = set; then
2652 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 *) ac_arg=$ac_var=$ac_new_val ;;
2655 esac
2656 case " $ac_configure_args " in
2657 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 esac
2660 fi
2661done
2662if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2666$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002667 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002669## -------------------- ##
2670## Main body of script. ##
2671## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672
Guido van Rossum7f43da71994-08-01 12:15:30 +00002673ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2677ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678
Guido van Rossum627b2d71993-12-24 10:39:16 +00002679
Michael W. Hudson54241132001-12-07 15:38:26 +00002680
Trent Nelson4d4ec652012-10-16 08:51:24 -04002681
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002682if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002683 # If we're building out-of-tree, we need to make sure the following
2684 # resources get picked up before their $srcdir counterparts.
2685 # Objects/ -> typeslots.inc
2686 # Include/ -> Python-ast.h, graminit.h
2687 # Python/ -> importlib.h
2688 # (A side effect of this is that these resources will automatically be
2689 # regenerated when building out-of-tree, regardless of whether or not
2690 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2691 # off.)
2692 BASECPPFLAGS="-IObjects -IInclude -IPython"
2693else
2694 BASECPPFLAGS=""
2695fi
2696
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002697
2698
2699
2700
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002701if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702then
2703# Extract the first word of "hg", so it can be a program name with args.
2704set dummy hg; ac_word=$2
2705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002707if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708 $as_echo_n "(cached) " >&6
2709else
2710 if test -n "$HAS_HG"; then
2711 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2712else
2713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2714for as_dir in $PATH
2715do
2716 IFS=$as_save_IFS
2717 test -z "$as_dir" && as_dir=.
2718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 ac_cv_prog_HAS_HG="found"
2721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2722 break 2
2723 fi
2724done
2725 done
2726IFS=$as_save_IFS
2727
2728 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2729fi
2730fi
2731HAS_HG=$ac_cv_prog_HAS_HG
2732if test -n "$HAS_HG"; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2734$as_echo "$HAS_HG" >&6; }
2735else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2737$as_echo "no" >&6; }
2738fi
2739
2740
2741else
2742HAS_HG=no-repository
2743fi
2744if test $HAS_HG = found
2745then
2746 HGVERSION="hg id -i \$(srcdir)"
2747 HGTAG="hg id -t \$(srcdir)"
2748 HGBRANCH="hg id -b \$(srcdir)"
2749else
2750 HGVERSION=""
2751 HGTAG=""
2752 HGBRANCH=""
2753fi
2754
2755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
2758
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002759ac_aux_dir=
2760for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2761 if test -f "$ac_dir/install-sh"; then
2762 ac_aux_dir=$ac_dir
2763 ac_install_sh="$ac_aux_dir/install-sh -c"
2764 break
2765 elif test -f "$ac_dir/install.sh"; then
2766 ac_aux_dir=$ac_dir
2767 ac_install_sh="$ac_aux_dir/install.sh -c"
2768 break
2769 elif test -f "$ac_dir/shtool"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/shtool install -c"
2772 break
2773 fi
2774done
2775if test -z "$ac_aux_dir"; then
2776 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2777fi
2778
2779# These three variables are undocumented and unsupported,
2780# and are intended to be withdrawn in a future Autoconf release.
2781# They can cause serious problems if a builder's source tree is in a directory
2782# whose full name contains unusual characters.
2783ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2784ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2785ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2786
2787
2788# Make sure we can run config.sub.
2789$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2790 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2791
2792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2793$as_echo_n "checking build system type... " >&6; }
2794if ${ac_cv_build+:} false; then :
2795 $as_echo_n "(cached) " >&6
2796else
2797 ac_build_alias=$build_alias
2798test "x$ac_build_alias" = x &&
2799 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2800test "x$ac_build_alias" = x &&
2801 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2802ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2803 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2804
2805fi
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2807$as_echo "$ac_cv_build" >&6; }
2808case $ac_cv_build in
2809*-*-*) ;;
2810*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2811esac
2812build=$ac_cv_build
2813ac_save_IFS=$IFS; IFS='-'
2814set x $ac_cv_build
2815shift
2816build_cpu=$1
2817build_vendor=$2
2818shift; shift
2819# Remember, the first character of IFS is used to create $*,
2820# except with old shells:
2821build_os=$*
2822IFS=$ac_save_IFS
2823case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2824
2825
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2827$as_echo_n "checking host system type... " >&6; }
2828if ${ac_cv_host+:} false; then :
2829 $as_echo_n "(cached) " >&6
2830else
2831 if test "x$host_alias" = x; then
2832 ac_cv_host=$ac_cv_build
2833else
2834 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2835 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2836fi
2837
2838fi
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2840$as_echo "$ac_cv_host" >&6; }
2841case $ac_cv_host in
2842*-*-*) ;;
2843*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2844esac
2845host=$ac_cv_host
2846ac_save_IFS=$IFS; IFS='-'
2847set x $ac_cv_host
2848shift
2849host_cpu=$1
2850host_vendor=$2
2851shift; shift
2852# Remember, the first character of IFS is used to create $*,
2853# except with old shells:
2854host_os=$*
2855IFS=$ac_save_IFS
2856case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2857
2858
2859
doko@python.orga10e4a92013-01-25 18:45:12 +01002860
2861
Ned Deilyfcbc2462014-08-22 13:32:49 -07002862# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2863rm -f pybuilddir.txt
2864
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002865for ac_prog in python$PACKAGE_VERSION python3 python
2866do
2867 # Extract the first word of "$ac_prog", so it can be a program name with args.
2868set dummy $ac_prog; ac_word=$2
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2870$as_echo_n "checking for $ac_word... " >&6; }
2871if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2872 $as_echo_n "(cached) " >&6
2873else
2874 if test -n "$PYTHON_FOR_GEN"; then
2875 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2876else
2877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2878for as_dir in $PATH
2879do
2880 IFS=$as_save_IFS
2881 test -z "$as_dir" && as_dir=.
2882 for ac_exec_ext in '' $ac_executable_extensions; do
2883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2884 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2886 break 2
2887 fi
2888done
2889 done
2890IFS=$as_save_IFS
2891
2892fi
2893fi
2894PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2895if test -n "$PYTHON_FOR_GEN"; then
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2897$as_echo "$PYTHON_FOR_GEN" >&6; }
2898else
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2900$as_echo "no" >&6; }
2901fi
2902
2903
2904 test -n "$PYTHON_FOR_GEN" && break
2905done
2906test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2907
2908if test "$PYTHON_FOR_GEN" = not-found; then
2909 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2910 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2911 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2912fi
2913
2914
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002915if test "$cross_compiling" = yes; then
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2917$as_echo_n "checking for python interpreter for cross build... " >&6; }
2918 if test -z "$PYTHON_FOR_BUILD"; then
2919 for interp in python$PACKAGE_VERSION python3 python; do
2920 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002921 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 +02002922 break
2923 fi
2924 interp=
2925 done
2926 if test x$interp = x; then
2927 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2928 fi
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2930$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002931 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 +02002932 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002933 # Used to comment out stuff for rebuilding generated files
2934 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002935elif test "$cross_compiling" = maybe; then
2936 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002937else
2938 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002939 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Martin Pantereac67be2016-07-28 01:28:27 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Ned Deily4829bc62016-09-12 17:29:04 -04002959VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989
2990
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2993# them.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002996
2997
2998
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002999define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003000
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003001# Arguments passed to configure.
3002
3003CONFIG_ARGS="$ac_configure_args"
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3006$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003008if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010 case $enableval in
3011 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 # Locate the best usable SDK, see Mac/README.txt for more
3013 # information
3014 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003015 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003017 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3018 if test ! -d "${enableval}"
3019 then
3020 enableval=/
3021 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023 ;;
3024 esac
3025 case $enableval in
3026 no)
3027 UNIVERSALSDK=
3028 enable_universalsdk=
3029 ;;
3030 *)
3031 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 if test ! -d "${UNIVERSALSDK}"
3033 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003034 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036 ;;
3037 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003038
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040else
3041
3042 UNIVERSALSDK=
3043 enable_universalsdk=
3044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047if test -n "${UNIVERSALSDK}"
3048then
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3050$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051else
Matthias Kloseb9621712010-04-24 17:59:49 +00003052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deily87adb6e2013-10-18 21:09:56 -07003058ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060# For backward compatibility reasons we prefer to select '32-bit' if available,
3061# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003062UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063if test "`uname -s`" = "Darwin"
3064then
3065 if test -n "${UNIVERSALSDK}"
3066 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003067 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 then
3069 UNIVERSAL_ARCHS="intel"
3070 fi
3071 fi
3072fi
3073
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3076$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077
3078# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003079if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 UNIVERSAL_ARCHS="$withval"
3082
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083fi
3084
Ned Deily87adb6e2013-10-18 21:09:56 -07003085if test -n "${UNIVERSALSDK}"
3086then
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3088$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3089else
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3091$as_echo "no" >&6; }
3092fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094
3095# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003096if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003097 withval=$with_framework_name;
3098 PYTHONFRAMEWORK=${withval}
3099 PYTHONFRAMEWORKDIR=${withval}.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3101
3102else
3103
3104 PYTHONFRAMEWORK=Python
3105 PYTHONFRAMEWORKDIR=Python.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3107
3108fi
3109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003113 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003114 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003115 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 esac
3117 case $enableval in
3118 no)
3119 PYTHONFRAMEWORK=
3120 PYTHONFRAMEWORKDIR=no-framework
3121 PYTHONFRAMEWORKPREFIX=
3122 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123 FRAMEWORKINSTALLFIRST=
3124 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 FRAMEWORKALTINSTALLFIRST=
3126 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003127 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003128 if test "x${prefix}" = "xNONE"; then
3129 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3130 else
3131 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3132 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003134 ;;
3135 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003137 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003139 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003140 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3141 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003142 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003148 else
3149 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3150 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151
3152 case "${enableval}" in
3153 /System*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 if test "${prefix}" = "NONE" ; then
3156 # See below
3157 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3158 fi
3159 ;;
3160
3161 /Library*)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 ;;
3164
3165 */Library/Frameworks)
3166 MDIR="`dirname "${enableval}"`"
3167 MDIR="`dirname "${MDIR}"`"
3168 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3169
3170 if test "${prefix}" = "NONE"; then
3171 # User hasn't specified the
3172 # --prefix option, but wants to install
3173 # the framework in a non-default location,
3174 # ensure that the compatibility links get
3175 # installed relative to that prefix as well
3176 # instead of in /usr/local.
3177 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3178 fi
3179 ;;
3180
3181 *)
3182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3183 ;;
3184 esac
3185
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3195
3196 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3197
Jack Jansene578a632001-08-15 01:27:14 +00003198 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Guido van Rossum563e7081996-09-10 18:20:48 +00003200else
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORKPREFIX=
3205 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206 FRAMEWORKINSTALLFIRST=
3207 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 FRAMEWORKALTINSTALLFIRST=
3209 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003210 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211 if test "x${prefix}" = "xNONE" ; then
3212 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3213 else
3214 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3215 fi
Jack Jansene578a632001-08-15 01:27:14 +00003216 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219fi
3220
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
3222
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
3224
3225
3226
Jack Jansene578a632001-08-15 01:27:14 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228
3229
3230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003232
Ned Deilyb8f944f2013-11-21 22:42:25 -08003233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003250 *-*-linux-android*)
3251 ac_sys_system=Linux-android
3252 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
3259 *)
3260 # for now, limit cross builds to known configurations
3261 MACHDEP="unknown"
3262 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3263 esac
3264 ac_sys_release=
3265 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003267 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003268 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 fi
3274 ac_md_system=`echo $ac_sys_system |
3275 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3276 ac_md_release=`echo $ac_sys_release |
3277 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3278 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003279
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003281 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003282 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003283 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003284 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 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 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On FreeBSD 4, the math functions C89 does not cover are never defined
3366 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3367 FreeBSD/4.*)
3368 define_xopen_source=no;;
3369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Guido van Rossum91922671997-10-09 20:24:13 +00003433#
3434# SGI compilers allow the specification of the both the ABI and the
3435# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003436# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003437#
3438# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3439# thus supply support for various ABI/ISA combinations. The MACHDEP
3440# variable is also adjusted.
3441#
3442
3443if test ! -z "$SGI_ABI"
3444then
3445 CC="cc $SGI_ABI"
3446 LDFLAGS="$SGI_ABI $LDFLAGS"
3447 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3450$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003451
Jack Jansen6b08a402004-06-03 12:41:45 +00003452# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3453# it may influence the way we can build extensions, so distutils
3454# needs to check it
3455
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003458EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003459
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003461
3462# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3463# for debug/optimization stuff. BASECFLAGS is for flags that are required
3464# just to get things to compile and link. Users are free to override OPT
3465# when running configure or make. The build should not break if they do.
3466# BASECFLAGS should generally not be messed with, however.
3467
3468# XXX shouldn't some/most/all of this code be merged with the stuff later
3469# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3471$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003474if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003477 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478 without_gcc=yes;;
3479 yes) CC=gcc
3480 without_gcc=no;;
3481 *) CC=$withval
3482 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003483 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003484else
Martin v. Löwis11437992002-04-12 09:54:03 +00003485
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003486 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003487 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003488 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003489 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003490 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491fi
3492
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3494$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003495
Zachary Ware5af85642015-12-21 12:09:17 -06003496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3497$as_echo_n "checking for --with-icc... " >&6; }
3498
3499# Check whether --with-icc was given.
3500if test "${with_icc+set}" = set; then :
3501 withval=$with_icc;
3502 case $withval in
3503 no) CC=${CC:-cc}
3504 with_icc=no;;
3505 yes) CC=icc
3506 CXX=icpc
3507 with_icc=yes;;
3508 *) CC=$withval
3509 with_icc=$withval;;
3510 esac
3511else
3512
3513 with_icc=no
3514fi
3515
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3517$as_echo "$with_icc" >&6; }
3518
Guido van Rossum8b131c51995-03-09 14:10:13 +00003519# If the user switches compilers, we can't believe the cache
3520if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3521then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003522 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003523(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003524fi
3525
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003526# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3527# when the compiler supports them, but we don't always want -O2, and
3528# we set -g later.
3529if test -z "$CFLAGS"; then
3530 CFLAGS=
3531fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003532
3533if test "$ac_sys_system" = "Darwin"
3534then
3535 # Compiler selection on MacOSX is more complicated than
3536 # AC_PROG_CC can handle, see Mac/README.txt for more
3537 # information
3538 if test -z "${CC}"
3539 then
3540 found_gcc=
3541 found_clang=
3542 as_save_IFS=$IFS; IFS=:
3543 for as_dir in $PATH
3544 do
3545 IFS=$as_save_IFS
3546 if test -x $as_dir/gcc; then
3547 if test -z "${found_gcc}"; then
3548 found_gcc=$as_dir/gcc
3549 fi
3550 fi
3551 if test -x $as_dir/clang; then
3552 if test -z "${found_clang}"; then
3553 found_clang=$as_dir/clang
3554 fi
3555 fi
3556 done
3557 IFS=$as_save_IFS
3558
3559 if test -n "$found_gcc" -a -n "$found_clang"
3560 then
3561 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3564$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3565 CC="$found_clang"
3566 CXX="$found_clang++"
3567 fi
3568
3569
3570 elif test -z "$found_gcc" -a -n "$found_clang"
3571 then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3573$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3574 CC="$found_clang"
3575 CXX="$found_clang++"
3576
3577 elif test -z "$found_gcc" -a -z "$found_clang"
3578 then
3579 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3580 if test -n "${found_clang}"
3581 then
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3583$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3584 CC="${found_clang}"
3585 CXX="`/usr/bin/xcrun -find clang++`"
3586
3587 # else: use default behaviour
3588 fi
3589 fi
3590 fi
3591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003592ac_ext=c
3593ac_cpp='$CPP $CPPFLAGS'
3594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3596ac_compiler_gnu=$ac_cv_c_compiler_gnu
3597if test -n "$ac_tool_prefix"; then
3598 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3599set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3601$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003602if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003604else
3605 if test -n "$CC"; then
3606 ac_cv_prog_CC="$CC" # Let the user override the test.
3607else
Martin v. Löwis11437992002-04-12 09:54:03 +00003608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3609for as_dir in $PATH
3610do
3611 IFS=$as_save_IFS
3612 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $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 +00003617 break 2
3618 fi
3619done
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003622
Jack Jansendd19cf82001-12-06 22:36:17 +00003623fi
3624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003625CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003626if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3628$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003629else
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3631$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003632fi
3633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636if test -z "$ac_cv_prog_CC"; then
3637 ac_ct_CC=$CC
3638 # Extract the first word of "gcc", so it can be a program name with args.
3639set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3641$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003642if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003644else
3645 if test -n "$ac_ct_CC"; then
3646 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3647else
3648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3649for as_dir in $PATH
3650do
3651 IFS=$as_save_IFS
3652 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 $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 +00003657 break 2
3658 fi
3659done
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003662
3663fi
3664fi
3665ac_ct_CC=$ac_cv_prog_ac_ct_CC
3666if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3668$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3671$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672fi
3673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674 if test "x$ac_ct_CC" = x; then
3675 CC=""
3676 else
3677 case $cross_compiling:$ac_tool_warned in
3678yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681ac_tool_warned=yes ;;
3682esac
3683 CC=$ac_ct_CC
3684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003685else
3686 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003687fi
3688
Jack Jansendd19cf82001-12-06 22:36:17 +00003689if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690 if test -n "$ac_tool_prefix"; then
3691 # 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 +00003692set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3694$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003695if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003697else
3698 if test -n "$CC"; then
3699 ac_cv_prog_CC="$CC" # Let the user override the test.
3700else
Martin v. Löwis11437992002-04-12 09:54:03 +00003701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702for as_dir in $PATH
3703do
3704 IFS=$as_save_IFS
3705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 $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 +00003710 break 2
3711 fi
3712done
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003715
3716fi
3717fi
3718CC=$ac_cv_prog_CC
3719if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3721$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003722else
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3724$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003725fi
3726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729fi
3730if test -z "$CC"; then
3731 # Extract the first word of "cc", so it can be a program name with args.
3732set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003735if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003737else
3738 if test -n "$CC"; then
3739 ac_cv_prog_CC="$CC" # Let the user override the test.
3740else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3743for as_dir in $PATH
3744do
3745 IFS=$as_save_IFS
3746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3750 ac_prog_rejected=yes
3751 continue
3752 fi
3753 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $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 +00003755 break 2
3756 fi
3757done
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003760
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761if test $ac_prog_rejected = yes; then
3762 # We found a bogon in the path, so make sure we never use it.
3763 set dummy $ac_cv_prog_CC
3764 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766 # We chose a different compiler from the bogus one.
3767 # However, it has the same basename, so the bogon will be chosen
3768 # first if we set CC to just the basename; use the full file name.
3769 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003770 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771 fi
3772fi
3773fi
3774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3778$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3781$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782fi
3783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784
Martin v. Löwis11437992002-04-12 09:54:03 +00003785fi
3786if test -z "$CC"; then
3787 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 do
3790 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3793$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003794if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003796else
3797 if test -n "$CC"; then
3798 ac_cv_prog_CC="$CC" # Let the user override the test.
3799else
Martin v. Löwis11437992002-04-12 09:54:03 +00003800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3801for as_dir in $PATH
3802do
3803 IFS=$as_save_IFS
3804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $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 +00003809 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003811done
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
3815fi
3816fi
3817CC=$ac_cv_prog_CC
3818if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3820$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821else
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3823$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003824fi
3825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 test -n "$CC" && break
3828 done
3829fi
3830if test -z "$CC"; then
3831 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003833do
3834 # Extract the first word of "$ac_prog", so it can be a program name with args.
3835set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003838if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003840else
3841 if test -n "$ac_ct_CC"; then
3842 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3843else
3844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3845for as_dir in $PATH
3846do
3847 IFS=$as_save_IFS
3848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 $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 +00003853 break 2
3854 fi
3855done
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
3860fi
3861ac_ct_CC=$ac_cv_prog_ac_ct_CC
3862if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3864$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 test -n "$ac_ct_CC" && break
3872done
Michael W. Hudson54241132001-12-07 15:38:26 +00003873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 if test "x$ac_ct_CC" = x; then
3875 CC=""
3876 else
3877 case $cross_compiling:$ac_tool_warned in
3878yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881ac_tool_warned=yes ;;
3882esac
3883 CC=$ac_ct_CC
3884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003885fi
3886
3887fi
3888
3889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003892as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003893See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003894
3895# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003896$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3897set X $ac_compile
3898ac_compiler=$2
3899for ac_option in --version -v -V -qversion; do
3900 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901case "(($ac_try" in
3902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903 *) ac_try_echo=$ac_try;;
3904esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3906$as_echo "$ac_try_echo"; } >&5
3907 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 if test -s conftest.err; then
3910 sed '10a\
3911... rest of stderr output deleted ...
3912 10q' conftest.err >conftest.er1
3913 cat conftest.er1 >&5
3914 fi
3915 rm -f conftest.er1 conftest.err
3916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }
3918done
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
Matthias Kloseb9621712010-04-24 17:59:49 +00003920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003921/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003922
Martin v. Löwis11437992002-04-12 09:54:03 +00003923int
3924main ()
3925{
3926
3927 ;
3928 return 0;
3929}
3930_ACEOF
3931ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003932ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003933# Try to create an executable without -o first, disregard a.out.
3934# It will help us diagnose broken compilers, and finding out an intuition
3935# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3937$as_echo_n "checking whether the C compiler works... " >&6; }
3938ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3939
3940# The possible output files:
3941ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943ac_rmfiles=
3944for ac_file in $ac_files
3945do
3946 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3949 esac
3950done
3951rm -f $ac_rmfiles
3952
Matthias Kloseb9621712010-04-24 17:59:49 +00003953if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3965# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3966# in a Makefile. We should not override ac_cv_exeext if it was cached,
3967# so that the user can short-circuit this test for compilers unknown to
3968# Autoconf.
3969for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003970do
3971 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974 ;;
3975 [ab].out )
3976 # We found the default executable, but exeext='' is most
3977 # certainly right.
3978 break;;
3979 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 then :; else
3982 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3983 fi
3984 # We set ac_cv_exeext here because the later test for it is not
3985 # safe: cross compilers may not add the suffix if given an `-o'
3986 # argument, so we may need to know it at that point already.
3987 # Even if this section looks crufty: it has the advantage of
3988 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 break;;
3990 * )
3991 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003992 esac
3993done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994test "$ac_cv_exeext" = no && ac_cv_exeext=
3995
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003996else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 ac_file=''
3998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003999if test -z "$ac_file"; then :
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4001$as_echo "no" >&6; }
4002$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004003sed 's/^/| /' conftest.$ac_ext >&5
4004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004007as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004008See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004009else
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4011$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4014$as_echo_n "checking for C compiler default output file name... " >&6; }
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4016$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004017ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018
Matthias Kloseb9621712010-04-24 17:59:49 +00004019rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4022$as_echo_n "checking for suffix of executables... " >&6; }
4023if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024case "(($ac_try" in
4025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4026 *) ac_try_echo=$ac_try;;
4027esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4029$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4033 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4035# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4036# work properly (i.e., refer to `conftest.exe'), while it won't with
4037# `rm'.
4038for ac_file in conftest.exe conftest conftest.*; do
4039 test -f "$ac_file" || continue
4040 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4043 break;;
4044 * ) break;;
4045 esac
4046done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047else
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004050as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004051See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004053rm -f conftest conftest$ac_cv_exeext
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4055$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004056
4057rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004058EXEEXT=$ac_cv_exeext
4059ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4061/* end confdefs.h. */
4062#include <stdio.h>
4063int
4064main ()
4065{
4066FILE *f = fopen ("conftest.out", "w");
4067 return ferror (f) || fclose (f) != 0;
4068
4069 ;
4070 return 0;
4071}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004073ac_clean_files="$ac_clean_files conftest.out"
4074# Check that the compiler produces executables we can run. If not, either
4075# the compiler is broken, or we cross compile.
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4077$as_echo_n "checking whether we are cross compiling... " >&6; }
4078if test "$cross_compiling" != yes; then
4079 { { ac_try="$ac_link"
4080case "(($ac_try" in
4081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082 *) ac_try_echo=$ac_try;;
4083esac
4084eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4085$as_echo "$ac_try_echo"; } >&5
4086 (eval "$ac_link") 2>&5
4087 ac_status=$?
4088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4089 test $ac_status = 0; }
4090 if { ac_try='./conftest$ac_cv_exeext'
4091 { { case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_try") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }; }; then
4101 cross_compiling=no
4102 else
4103 if test "$cross_compiling" = maybe; then
4104 cross_compiling=yes
4105 else
4106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004108as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004110See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 fi
4112 fi
4113fi
4114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4115$as_echo "$cross_compiling" >&6; }
4116
4117rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4118ac_clean_files=$ac_clean_files_save
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4120$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004121if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
4123else
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004125/* end confdefs.h. */
4126
4127int
4128main ()
4129{
4130
4131 ;
4132 return 0;
4133}
4134_ACEOF
4135rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004136if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137case "(($ac_try" in
4138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4139 *) ac_try_echo=$ac_try;;
4140esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004141eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4142$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4146 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147 for ac_file in conftest.o conftest.obj conftest.*; do
4148 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4152 break;;
4153 esac
4154done
4155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004157sed 's/^/| /' conftest.$ac_ext >&5
4158
Matthias Kloseb9621712010-04-24 17:59:49 +00004159{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004161as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004162See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004164rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4167$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004168OBJEXT=$ac_cv_objext
4169ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4171$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004172if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004174else
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004177
Martin v. Löwis11437992002-04-12 09:54:03 +00004178int
4179main ()
4180{
4181#ifndef __GNUC__
4182 choke me
4183#endif
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 ac_compiler_gnu=yes
4191else
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004195ac_cv_c_compiler_gnu=$ac_compiler_gnu
4196
4197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4199$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4200if test $ac_compiler_gnu = yes; then
4201 GCC=yes
4202else
4203 GCC=
4204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004205ac_test_CFLAGS=${CFLAGS+set}
4206ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4208$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004209if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004211else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 ac_save_c_werror_flag=$ac_c_werror_flag
4213 ac_c_werror_flag=yes
4214 ac_cv_prog_cc_g=no
4215 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004218
Martin v. Löwis11437992002-04-12 09:54:03 +00004219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229else
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 CFLAGS=""
4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232/* end confdefs.h. */
4233
4234int
4235main ()
4236{
4237
4238 ;
4239 return 0;
4240}
4241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243
Matthias Kloseb9621712010-04-24 17:59:49 +00004244else
4245 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248/* end confdefs.h. */
4249
4250int
4251main ()
4252{
4253
4254 ;
4255 return 0;
4256}
4257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4266 ac_c_werror_flag=$ac_save_c_werror_flag
4267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4269$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004272elif test $ac_cv_prog_cc_g = yes; then
4273 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004274 CFLAGS="-g -O2"
4275 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004276 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277 fi
4278else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279 if test "$GCC" = yes; then
4280 CFLAGS="-O2"
4281 else
4282 CFLAGS=
4283 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4286$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004287if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004289else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004291ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004293/* end confdefs.h. */
4294#include <stdarg.h>
4295#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004296struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004297/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4298struct buf { int x; };
4299FILE * (*rcsopen) (struct buf *, struct stat *, int);
4300static char *e (p, i)
4301 char **p;
4302 int i;
4303{
4304 return p[i];
4305}
4306static char *f (char * (*g) (char **, int), char **p, ...)
4307{
4308 char *s;
4309 va_list v;
4310 va_start (v,p);
4311 s = g (p, va_arg (v,int));
4312 va_end (v);
4313 return s;
4314}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315
4316/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4317 function prototypes and stuff, but not '\xHH' hex character constants.
4318 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004320 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4321 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4326 inside strings and character constants. */
4327#define FOO(x) 'x'
4328int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4329
Skip Montanaro6dead952003-09-25 14:50:04 +00004330int test (int i, double x);
4331struct s1 {int (*f) (int a);};
4332struct s2 {int (*f) (double a);};
4333int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4334int argc;
4335char **argv;
4336int
4337main ()
4338{
4339return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4340 ;
4341 return 0;
4342}
4343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4345 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004346do
4347 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351rm -f core conftest.err conftest.$ac_objext
4352 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004353done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004355CC=$ac_save_CC
4356
4357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358# AC_CACHE_VAL
4359case "x$ac_cv_prog_cc_c89" in
4360 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4362$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4365$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004366 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4369$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004370esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004374
Martin v. Löwis11437992002-04-12 09:54:03 +00004375ac_ext=c
4376ac_cpp='$CPP $CPPFLAGS'
4377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4379ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004381ac_ext=c
4382ac_cpp='$CPP $CPPFLAGS'
4383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4385ac_compiler_gnu=$ac_cv_c_compiler_gnu
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4387$as_echo_n "checking how to run the C preprocessor... " >&6; }
4388# On Suns, sometimes $CPP names a directory.
4389if test -n "$CPP" && test -d "$CPP"; then
4390 CPP=
4391fi
4392if test -z "$CPP"; then
4393 if ${ac_cv_prog_CPP+:} false; then :
4394 $as_echo_n "(cached) " >&6
4395else
4396 # Double quotes because CPP needs to be expanded
4397 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4398 do
4399 ac_preproc_ok=false
4400for ac_c_preproc_warn_flag in '' yes
4401do
4402 # Use a header file that comes with gcc, so configuring glibc
4403 # with a fresh cross-compiler works.
4404 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4405 # <limits.h> exists even on freestanding compilers.
4406 # On the NeXT, cc -E runs the code through the compiler's parser,
4407 # not just through cpp. "Syntax error" is here to catch this case.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#ifdef __STDC__
4411# include <limits.h>
4412#else
4413# include <assert.h>
4414#endif
4415 Syntax error
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418
4419else
4420 # Broken: fails on valid input.
4421continue
4422fi
4423rm -f conftest.err conftest.i conftest.$ac_ext
4424
4425 # OK, works on sane cases. Now check whether nonexistent headers
4426 # can be detected and how.
4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h. */
4429#include <ac_nonexistent.h>
4430_ACEOF
4431if ac_fn_c_try_cpp "$LINENO"; then :
4432 # Broken: success on invalid input.
4433continue
4434else
4435 # Passes both tests.
4436ac_preproc_ok=:
4437break
4438fi
4439rm -f conftest.err conftest.i conftest.$ac_ext
4440
4441done
4442# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4443rm -f conftest.i conftest.err conftest.$ac_ext
4444if $ac_preproc_ok; then :
4445 break
4446fi
4447
4448 done
4449 ac_cv_prog_CPP=$CPP
4450
4451fi
4452 CPP=$ac_cv_prog_CPP
4453else
4454 ac_cv_prog_CPP=$CPP
4455fi
4456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4457$as_echo "$CPP" >&6; }
4458ac_preproc_ok=false
4459for ac_c_preproc_warn_flag in '' yes
4460do
4461 # Use a header file that comes with gcc, so configuring glibc
4462 # with a fresh cross-compiler works.
4463 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4464 # <limits.h> exists even on freestanding compilers.
4465 # On the NeXT, cc -E runs the code through the compiler's parser,
4466 # not just through cpp. "Syntax error" is here to catch this case.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#ifdef __STDC__
4470# include <limits.h>
4471#else
4472# include <assert.h>
4473#endif
4474 Syntax error
4475_ACEOF
4476if ac_fn_c_try_cpp "$LINENO"; then :
4477
4478else
4479 # Broken: fails on valid input.
4480continue
4481fi
4482rm -f conftest.err conftest.i conftest.$ac_ext
4483
4484 # OK, works on sane cases. Now check whether nonexistent headers
4485 # can be detected and how.
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487/* end confdefs.h. */
4488#include <ac_nonexistent.h>
4489_ACEOF
4490if ac_fn_c_try_cpp "$LINENO"; then :
4491 # Broken: success on invalid input.
4492continue
4493else
4494 # Passes both tests.
4495ac_preproc_ok=:
4496break
4497fi
4498rm -f conftest.err conftest.i conftest.$ac_ext
4499
4500done
4501# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4502rm -f conftest.i conftest.err conftest.$ac_ext
4503if $ac_preproc_ok; then :
4504
4505else
4506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4508as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4509See \`config.log' for more details" "$LINENO" 5; }
4510fi
4511
4512ac_ext=c
4513ac_cpp='$CPP $CPPFLAGS'
4514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4516ac_compiler_gnu=$ac_cv_c_compiler_gnu
4517
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4519$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4520if ${ac_cv_path_GREP+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 if test -z "$GREP"; then
4524 ac_path_GREP_found=false
4525 # Loop through the user's path and test for each of PROGNAME-LIST
4526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
4531 for ac_prog in grep ggrep; do
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4534 as_fn_executable_p "$ac_path_GREP" || continue
4535# Check for GNU ac_path_GREP and select it if it is found.
4536 # Check for GNU $ac_path_GREP
4537case `"$ac_path_GREP" --version 2>&1` in
4538*GNU*)
4539 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4540*)
4541 ac_count=0
4542 $as_echo_n 0123456789 >"conftest.in"
4543 while :
4544 do
4545 cat "conftest.in" "conftest.in" >"conftest.tmp"
4546 mv "conftest.tmp" "conftest.in"
4547 cp "conftest.in" "conftest.nl"
4548 $as_echo 'GREP' >> "conftest.nl"
4549 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4550 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4551 as_fn_arith $ac_count + 1 && ac_count=$as_val
4552 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4553 # Best one so far, save it but keep looking for a better one
4554 ac_cv_path_GREP="$ac_path_GREP"
4555 ac_path_GREP_max=$ac_count
4556 fi
4557 # 10*(2^10) chars as input seems more than enough
4558 test $ac_count -gt 10 && break
4559 done
4560 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4561esac
4562
4563 $ac_path_GREP_found && break 3
4564 done
4565 done
4566 done
4567IFS=$as_save_IFS
4568 if test -z "$ac_cv_path_GREP"; then
4569 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4570 fi
4571else
4572 ac_cv_path_GREP=$GREP
4573fi
4574
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4577$as_echo "$ac_cv_path_GREP" >&6; }
4578 GREP="$ac_cv_path_GREP"
4579
4580
Łukasz Langaa785c872016-09-09 17:37:37 -07004581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4582$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4583if ${ac_cv_path_SED+:} false; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4587 for ac_i in 1 2 3 4 5 6 7; do
4588 ac_script="$ac_script$as_nl$ac_script"
4589 done
4590 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4591 { ac_script=; unset ac_script;}
4592 if test -z "$SED"; then
4593 ac_path_SED_found=false
4594 # Loop through the user's path and test for each of PROGNAME-LIST
4595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in $PATH
4597do
4598 IFS=$as_save_IFS
4599 test -z "$as_dir" && as_dir=.
4600 for ac_prog in sed gsed; do
4601 for ac_exec_ext in '' $ac_executable_extensions; do
4602 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4603 as_fn_executable_p "$ac_path_SED" || continue
4604# Check for GNU ac_path_SED and select it if it is found.
4605 # Check for GNU $ac_path_SED
4606case `"$ac_path_SED" --version 2>&1` in
4607*GNU*)
4608 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4609*)
4610 ac_count=0
4611 $as_echo_n 0123456789 >"conftest.in"
4612 while :
4613 do
4614 cat "conftest.in" "conftest.in" >"conftest.tmp"
4615 mv "conftest.tmp" "conftest.in"
4616 cp "conftest.in" "conftest.nl"
4617 $as_echo '' >> "conftest.nl"
4618 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4619 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4620 as_fn_arith $ac_count + 1 && ac_count=$as_val
4621 if test $ac_count -gt ${ac_path_SED_max-0}; then
4622 # Best one so far, save it but keep looking for a better one
4623 ac_cv_path_SED="$ac_path_SED"
4624 ac_path_SED_max=$ac_count
4625 fi
4626 # 10*(2^10) chars as input seems more than enough
4627 test $ac_count -gt 10 && break
4628 done
4629 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4630esac
4631
4632 $ac_path_SED_found && break 3
4633 done
4634 done
4635 done
4636IFS=$as_save_IFS
4637 if test -z "$ac_cv_path_SED"; then
4638 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4639 fi
4640else
4641 ac_cv_path_SED=$SED
4642fi
4643
4644fi
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4646$as_echo "$ac_cv_path_SED" >&6; }
4647 SED="$ac_cv_path_SED"
4648 rm -f conftest.sed
4649
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004650
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651
4652
Matthias Kloseb9621712010-04-24 17:59:49 +00004653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4654$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004657if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004658 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660 case $withval in
4661 no) with_cxx_main=no
4662 MAINCC='$(CC)';;
4663 yes) with_cxx_main=yes
4664 MAINCC='$(CXX)';;
4665 *) with_cxx_main=yes
4666 MAINCC=$withval
4667 if test -z "$CXX"
4668 then
4669 CXX=$withval
4670 fi;;
4671 esac
4672else
4673
4674 with_cxx_main=no
4675 MAINCC='$(CC)'
4676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004677fi
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4680$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681
4682preset_cxx="$CXX"
4683if test -z "$CXX"
4684then
4685 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004686 gcc) if test -n "$ac_tool_prefix"; then
4687 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4688set dummy ${ac_tool_prefix}g++; ac_word=$2
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690$as_echo_n "checking for $ac_word... " >&6; }
4691if ${ac_cv_path_CXX+:} false; then :
4692 $as_echo_n "(cached) " >&6
4693else
4694 case $CXX in
4695 [\\/]* | ?:[\\/]*)
4696 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4697 ;;
4698 *)
4699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4700for as_dir in notfound
4701do
4702 IFS=$as_save_IFS
4703 test -z "$as_dir" && as_dir=.
4704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004706 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4708 break 2
4709 fi
4710done
4711 done
4712IFS=$as_save_IFS
4713
4714 ;;
4715esac
4716fi
4717CXX=$ac_cv_path_CXX
4718if test -n "$CXX"; then
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4720$as_echo "$CXX" >&6; }
4721else
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723$as_echo "no" >&6; }
4724fi
4725
4726
4727fi
4728if test -z "$ac_cv_path_CXX"; then
4729 ac_pt_CXX=$CXX
4730 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004731set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734if ${ac_cv_path_ac_pt_CXX+:} false; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 case $ac_pt_CXX in
4738 [\\/]* | ?:[\\/]*)
4739 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4740 ;;
4741 *)
4742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743for as_dir in notfound
4744do
4745 IFS=$as_save_IFS
4746 test -z "$as_dir" && as_dir=.
4747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004749 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751 break 2
4752 fi
4753done
4754 done
4755IFS=$as_save_IFS
4756
4757 ;;
4758esac
4759fi
4760ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4761if test -n "$ac_pt_CXX"; then
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4763$as_echo "$ac_pt_CXX" >&6; }
4764else
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
4767fi
4768
4769 if test "x$ac_pt_CXX" = x; then
4770 CXX="g++"
4771 else
4772 case $cross_compiling:$ac_tool_warned in
4773yes:)
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4776ac_tool_warned=yes ;;
4777esac
4778 CXX=$ac_pt_CXX
4779 fi
4780else
4781 CXX="$ac_cv_path_CXX"
4782fi
4783 ;;
4784 cc) if test -n "$ac_tool_prefix"; then
4785 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4786set dummy ${ac_tool_prefix}c++; ac_word=$2
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004789if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791else
4792 case $CXX in
4793 [\\/]* | ?:[\\/]*)
4794 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4795 ;;
4796 *)
4797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in notfound
4799do
4800 IFS=$as_save_IFS
4801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 break 2
4807 fi
4808done
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004810IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 ;;
4813esac
4814fi
4815CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4818$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819else
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004823
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824
4825fi
4826if test -z "$ac_cv_path_CXX"; then
4827 ac_pt_CXX=$CXX
4828 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 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 +00004838 ;;
4839 *)
4840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in notfound
4842do
4843 IFS=$as_save_IFS
4844 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004846 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 break 2
4850 fi
4851done
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004853IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004855 ;;
4856esac
4857fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4859if test -n "$ac_pt_CXX"; then
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4861$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004862else
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004866
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867 if test "x$ac_pt_CXX" = x; then
4868 CXX="c++"
4869 else
4870 case $cross_compiling:$ac_tool_warned in
4871yes:)
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4874ac_tool_warned=yes ;;
4875esac
4876 CXX=$ac_pt_CXX
4877 fi
4878else
4879 CXX="$ac_cv_path_CXX"
4880fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004881 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 clang|*/clang) if test -n "$ac_tool_prefix"; then
4883 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4884set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if ${ac_cv_path_CXX+:} false; then :
4888 $as_echo_n "(cached) " >&6
4889else
4890 case $CXX in
4891 [\\/]* | ?:[\\/]*)
4892 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4893 ;;
4894 *)
4895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in notfound
4897do
4898 IFS=$as_save_IFS
4899 test -z "$as_dir" && as_dir=.
4900 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004901 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004902 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904 break 2
4905 fi
4906done
4907 done
4908IFS=$as_save_IFS
4909
Ned Deilycbfb9a52012-06-23 16:02:19 -07004910 ;;
4911esac
4912fi
4913CXX=$ac_cv_path_CXX
4914if test -n "$CXX"; then
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4916$as_echo "$CXX" >&6; }
4917else
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004922
4923fi
4924if test -z "$ac_cv_path_CXX"; then
4925 ac_pt_CXX=$CXX
4926 # Extract the first word of "clang++", so it can be a program name with args.
4927set dummy clang++; ac_word=$2
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
4930if ${ac_cv_path_ac_pt_CXX+:} false; then :
4931 $as_echo_n "(cached) " >&6
4932else
4933 case $ac_pt_CXX in
4934 [\\/]* | ?:[\\/]*)
4935 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4936 ;;
4937 *)
4938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in notfound
4940do
4941 IFS=$as_save_IFS
4942 test -z "$as_dir" && as_dir=.
4943 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004945 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4947 break 2
4948 fi
4949done
4950 done
4951IFS=$as_save_IFS
4952
4953 ;;
4954esac
4955fi
4956ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4957if test -n "$ac_pt_CXX"; then
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4959$as_echo "$ac_pt_CXX" >&6; }
4960else
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4962$as_echo "no" >&6; }
4963fi
4964
4965 if test "x$ac_pt_CXX" = x; then
4966 CXX="clang++"
4967 else
4968 case $cross_compiling:$ac_tool_warned in
4969yes:)
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4972ac_tool_warned=yes ;;
4973esac
4974 CXX=$ac_pt_CXX
4975 fi
4976else
4977 CXX="$ac_cv_path_CXX"
4978fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004979 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004980 icc|*/icc) if test -n "$ac_tool_prefix"; then
4981 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4982set dummy ${ac_tool_prefix}icpc; ac_word=$2
4983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4984$as_echo_n "checking for $ac_word... " >&6; }
4985if ${ac_cv_path_CXX+:} false; then :
4986 $as_echo_n "(cached) " >&6
4987else
4988 case $CXX in
4989 [\\/]* | ?:[\\/]*)
4990 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4991 ;;
4992 *)
4993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in notfound
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
4998 for ac_exec_ext in '' $ac_executable_extensions; do
4999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5000 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5002 break 2
5003 fi
5004done
5005 done
5006IFS=$as_save_IFS
5007
5008 ;;
5009esac
5010fi
5011CXX=$ac_cv_path_CXX
5012if test -n "$CXX"; then
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5014$as_echo "$CXX" >&6; }
5015else
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017$as_echo "no" >&6; }
5018fi
5019
5020
5021fi
5022if test -z "$ac_cv_path_CXX"; then
5023 ac_pt_CXX=$CXX
5024 # Extract the first word of "icpc", so it can be a program name with args.
5025set dummy icpc; ac_word=$2
5026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027$as_echo_n "checking for $ac_word... " >&6; }
5028if ${ac_cv_path_ac_pt_CXX+:} false; then :
5029 $as_echo_n "(cached) " >&6
5030else
5031 case $ac_pt_CXX in
5032 [\\/]* | ?:[\\/]*)
5033 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5034 ;;
5035 *)
5036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in notfound
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
5041 for ac_exec_ext in '' $ac_executable_extensions; do
5042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5043 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5045 break 2
5046 fi
5047done
5048 done
5049IFS=$as_save_IFS
5050
5051 ;;
5052esac
5053fi
5054ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5055if test -n "$ac_pt_CXX"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5057$as_echo "$ac_pt_CXX" >&6; }
5058else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
5062
5063 if test "x$ac_pt_CXX" = x; then
5064 CXX="icpc"
5065 else
5066 case $cross_compiling:$ac_tool_warned in
5067yes:)
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5070ac_tool_warned=yes ;;
5071esac
5072 CXX=$ac_pt_CXX
5073 fi
5074else
5075 CXX="$ac_cv_path_CXX"
5076fi
5077 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005078 esac
5079 if test "$CXX" = "notfound"
5080 then
5081 CXX=""
5082 fi
5083fi
5084if test -z "$CXX"
5085then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005086 if test -n "$ac_tool_prefix"; then
5087 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5088 do
5089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005093if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095else
5096 if test -n "$CXX"; then
5097 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5098else
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005106 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108 break 2
5109 fi
5110done
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113
5114fi
5115fi
5116CXX=$ac_cv_prog_CXX
5117if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5119$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120else
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123fi
5124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005126 test -n "$CXX" && break
5127 done
5128fi
5129if test -z "$CXX"; then
5130 ac_ct_CXX=$CXX
5131 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5132do
5133 # Extract the first word of "$ac_prog", so it can be a program name with args.
5134set dummy $ac_prog; ac_word=$2
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5136$as_echo_n "checking for $ac_word... " >&6; }
5137if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5138 $as_echo_n "(cached) " >&6
5139else
5140 if test -n "$ac_ct_CXX"; then
5141 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5142else
5143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5144for as_dir in $PATH
5145do
5146 IFS=$as_save_IFS
5147 test -z "$as_dir" && as_dir=.
5148 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005150 ac_cv_prog_ac_ct_CXX="$ac_prog"
5151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5152 break 2
5153 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005155 done
5156IFS=$as_save_IFS
5157
5158fi
5159fi
5160ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5161if test -n "$ac_ct_CXX"; then
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5163$as_echo "$ac_ct_CXX" >&6; }
5164else
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
5167fi
5168
5169
5170 test -n "$ac_ct_CXX" && break
5171done
5172
5173 if test "x$ac_ct_CXX" = x; then
5174 CXX="notfound"
5175 else
5176 case $cross_compiling:$ac_tool_warned in
5177yes:)
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5180ac_tool_warned=yes ;;
5181esac
5182 CXX=$ac_ct_CXX
5183 fi
5184fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185
5186 if test "$CXX" = "notfound"
5187 then
5188 CXX=""
5189 fi
5190fi
5191if test "$preset_cxx" != "$CXX"
5192then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005193 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194
5195 By default, distutils will build C++ extension modules with \"$CXX\".
5196 If this is not intended, then set CXX on the configure command line.
5197 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005198$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005199
5200 By default, distutils will build C++ extension modules with \"$CXX\".
5201 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005202 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203fi
5204
5205
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5207
5208
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5210$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5211cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005212#undef bfin
5213#undef cris
5214#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef hppa
5217#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005219#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005220#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005221#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005222#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005223#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005224 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005225#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226# if defined(__x86_64__) && defined(__LP64__)
5227 x86_64-linux-gnu
5228# elif defined(__x86_64__) && defined(__ILP32__)
5229 x86_64-linux-gnux32
5230# elif defined(__i386__)
5231 i386-linux-gnu
5232# elif defined(__aarch64__) && defined(__AARCH64EL__)
5233# if defined(__ILP32__)
5234 aarch64_ilp32-linux-gnu
5235# else
5236 aarch64-linux-gnu
5237# endif
5238# elif defined(__aarch64__) && defined(__AARCH64EB__)
5239# if defined(__ILP32__)
5240 aarch64_be_ilp32-linux-gnu
5241# else
5242 aarch64_be-linux-gnu
5243# endif
5244# elif defined(__alpha__)
5245 alpha-linux-gnu
5246# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5247# if defined(__ARMEL__)
5248 arm-linux-gnueabihf
5249# else
5250 armeb-linux-gnueabihf
5251# endif
5252# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5253# if defined(__ARMEL__)
5254 arm-linux-gnueabi
5255# else
5256 armeb-linux-gnueabi
5257# endif
5258# elif defined(__hppa__)
5259 hppa-linux-gnu
5260# elif defined(__ia64__)
5261 ia64-linux-gnu
5262# elif defined(__m68k__) && !defined(__mcoldfire__)
5263 m68k-linux-gnu
5264# elif defined(__mips_hard_float) && defined(_MIPSEL)
5265# if _MIPS_SIM == _ABIO32
5266 mipsel-linux-gnu
5267# elif _MIPS_SIM == _ABIN32
5268 mips64el-linux-gnuabin32
5269# elif _MIPS_SIM == _ABI64
5270 mips64el-linux-gnuabi64
5271# else
5272# error unknown platform triplet
5273# endif
5274# elif defined(__mips_hard_float)
5275# if _MIPS_SIM == _ABIO32
5276 mips-linux-gnu
5277# elif _MIPS_SIM == _ABIN32
5278 mips64-linux-gnuabin32
5279# elif _MIPS_SIM == _ABI64
5280 mips64-linux-gnuabi64
5281# else
5282# error unknown platform triplet
5283# endif
5284# elif defined(__or1k__)
5285 or1k-linux-gnu
5286# elif defined(__powerpc__) && defined(__SPE__)
5287 powerpc-linux-gnuspe
5288# elif defined(__powerpc64__)
5289# if defined(__LITTLE_ENDIAN__)
5290 powerpc64le-linux-gnu
5291# else
5292 powerpc64-linux-gnu
5293# endif
5294# elif defined(__powerpc__)
5295 powerpc-linux-gnu
5296# elif defined(__s390x__)
5297 s390x-linux-gnu
5298# elif defined(__s390__)
5299 s390-linux-gnu
5300# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5301 sh4-linux-gnu
5302# elif defined(__sparc__) && defined(__arch64__)
5303 sparc64-linux-gnu
5304# elif defined(__sparc__)
5305 sparc-linux-gnu
5306# else
5307# error unknown platform triplet
5308# endif
5309#elif defined(__FreeBSD_kernel__)
5310# if defined(__LP64__)
5311 x86_64-kfreebsd-gnu
5312# elif defined(__i386__)
5313 i386-kfreebsd-gnu
5314# else
5315# error unknown platform triplet
5316# endif
5317#elif defined(__gnu_hurd__)
5318 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005319#elif defined(__APPLE__)
5320 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321#else
5322# error unknown platform triplet
5323#endif
5324
5325EOF
5326
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005327if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5330$as_echo "$PLATFORM_TRIPLET" >&6; }
5331else
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5333$as_echo "none" >&6; }
5334fi
5335rm -f conftest.c conftest.out
5336
5337if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5338 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5339 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5340 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005341elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5342 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005343fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005344
doko@ubuntu.com55532312016-06-14 08:55:19 +02005345if test x$MULTIARCH != x; then
5346 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5347fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348
5349
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5351$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5352save_LDFLAGS="$LDFLAGS"
5353LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005354
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h. */
5357
5358int
5359main ()
5360{
5361
5362 ;
5363 return 0;
5364}
5365_ACEOF
5366if ac_fn_c_try_link "$LINENO"; then :
5367 NO_AS_NEEDED="-Wl,--no-as-needed"
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5369$as_echo "yes" >&6; }
5370else
5371 NO_AS_NEEDED=""
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373$as_echo "no" >&6; }
5374fi
5375rm -f core conftest.err conftest.$ac_objext \
5376 conftest$ac_exeext conftest.$ac_ext
5377LDFLAGS="$save_LDFLAGS"
5378
5379
5380
5381# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5384$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005385if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387else
5388 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5389 then ac_cv_path_EGREP="$GREP -E"
5390 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 # Loop through the user's path and test for each of PROGNAME-LIST
5394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5396do
5397 IFS=$as_save_IFS
5398 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 for ac_prog in egrep; do
5400 for ac_exec_ext in '' $ac_executable_extensions; do
5401 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005402 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005403# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 # Check for GNU $ac_path_EGREP
5405case `"$ac_path_EGREP" --version 2>&1` in
5406*GNU*)
5407 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5408*)
5409 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 while :
5412 do
5413 cat "conftest.in" "conftest.in" >"conftest.tmp"
5414 mv "conftest.tmp" "conftest.in"
5415 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5418 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5421 # Best one so far, save it but keep looking for a better one
5422 ac_cv_path_EGREP="$ac_path_EGREP"
5423 ac_path_EGREP_max=$ac_count
5424 fi
5425 # 10*(2^10) chars as input seems more than enough
5426 test $ac_count -gt 10 && break
5427 done
5428 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5429esac
5430
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 $ac_path_EGREP_found && break 3
5432 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005437 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 +00005438 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439else
5440 ac_cv_path_EGREP=$EGREP
5441fi
5442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443 fi
5444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5446$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005448
5449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5451$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005452if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 $as_echo_n "(cached) " >&6
5454else
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005456/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005457#include <stdlib.h>
5458#include <stdarg.h>
5459#include <string.h>
5460#include <float.h>
5461
5462int
5463main ()
5464{
5465
5466 ;
5467 return 0;
5468}
5469_ACEOF
5470if ac_fn_c_try_compile "$LINENO"; then :
5471 ac_cv_header_stdc=yes
5472else
5473 ac_cv_header_stdc=no
5474fi
5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476
5477if test $ac_cv_header_stdc = yes; then
5478 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5480/* end confdefs.h. */
5481#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005482
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005483_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005487else
Matthias Kloseb9621712010-04-24 17:59:49 +00005488 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005490rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492fi
5493
5494if test $ac_cv_header_stdc = yes; then
5495 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497/* end confdefs.h. */
5498#include <stdlib.h>
5499
5500_ACEOF
5501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5502 $EGREP "free" >/dev/null 2>&1; then :
5503
5504else
5505 ac_cv_header_stdc=no
5506fi
5507rm -f conftest*
5508
5509fi
5510
5511if test $ac_cv_header_stdc = yes; then
5512 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5513 if test "$cross_compiling" = yes; then :
5514 :
5515else
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517/* end confdefs.h. */
5518#include <ctype.h>
5519#include <stdlib.h>
5520#if ((' ' & 0x0FF) == 0x020)
5521# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5522# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5523#else
5524# define ISLOWER(c) \
5525 (('a' <= (c) && (c) <= 'i') \
5526 || ('j' <= (c) && (c) <= 'r') \
5527 || ('s' <= (c) && (c) <= 'z'))
5528# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5529#endif
5530
5531#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5532int
5533main ()
5534{
5535 int i;
5536 for (i = 0; i < 256; i++)
5537 if (XOR (islower (i), ISLOWER (i))
5538 || toupper (i) != TOUPPER (i))
5539 return 2;
5540 return 0;
5541}
5542_ACEOF
5543if ac_fn_c_try_run "$LINENO"; then :
5544
5545else
5546 ac_cv_header_stdc=no
5547fi
5548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5549 conftest.$ac_objext conftest.beam conftest.$ac_ext
5550fi
5551
5552fi
5553fi
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5555$as_echo "$ac_cv_header_stdc" >&6; }
5556if test $ac_cv_header_stdc = yes; then
5557
5558$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5559
5560fi
5561
5562# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5563for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5564 inttypes.h stdint.h unistd.h
5565do :
5566 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5567ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5568"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005569if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 cat >>confdefs.h <<_ACEOF
5571#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5572_ACEOF
5573
5574fi
5575
5576done
5577
5578
5579
5580 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 +02005581if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 MINIX=yes
5583else
5584 MINIX=
5585fi
5586
5587
5588 if test "$MINIX" = yes; then
5589
5590$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5591
5592
5593$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5594
5595
5596$as_echo "#define _MINIX 1" >>confdefs.h
5597
5598 fi
5599
5600
5601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5602$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005603if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 $as_echo_n "(cached) " >&6
5605else
5606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5607/* end confdefs.h. */
5608
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005609# define __EXTENSIONS__ 1
5610 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005611int
5612main ()
5613{
5614
5615 ;
5616 return 0;
5617}
5618_ACEOF
5619if ac_fn_c_try_compile "$LINENO"; then :
5620 ac_cv_safe_to_define___extensions__=yes
5621else
5622 ac_cv_safe_to_define___extensions__=no
5623fi
5624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5625fi
5626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5627$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5628 test $ac_cv_safe_to_define___extensions__ = yes &&
5629 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5630
5631 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5632
5633 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5634
5635 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5636
5637 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5638
5639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
Xavier de Gaye95750b12016-07-09 11:05:42 +02005641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5642$as_echo_n "checking for the Android API level... " >&6; }
5643cat >> conftest.c <<EOF
5644#ifdef __ANDROID__
5645#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005646android_api = __ANDROID_API__
5647arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005648#else
5649#error not Android
5650#endif
5651EOF
5652
5653if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005654 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5655 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5657$as_echo "$ANDROID_API_LEVEL" >&6; }
5658
5659cat >>confdefs.h <<_ACEOF
5660#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5661_ACEOF
5662
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005663
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5665$as_echo_n "checking for the Android arm ABI... " >&6; }
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5667$as_echo "$_arm_arch" >&6; }
5668 if test "$_arm_arch" = 7; then
5669 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5670 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5671 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672else
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5674$as_echo "not Android" >&6; }
5675fi
5676rm -f conftest.c conftest.out
5677
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678# Check for unsupported systems
5679case $ac_sys_system/$ac_sys_release in
5680atheos*|Linux*/1*)
5681 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5682 echo See README for details.
5683 exit 1;;
5684esac
5685
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5688$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005691if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 withval=$with_suffix;
5693 case $withval in
5694 no) EXEEXT=;;
5695 yes) EXEEXT=.exe;;
5696 *) EXEEXT=$withval;;
5697 esac
5698fi
5699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5701$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702
5703# Test whether we're running on a non-case-sensitive system, in which
5704# case we give a warning if no ext is given
5705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5707$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708if test ! -d CaseSensitiveTestDir; then
5709mkdir CaseSensitiveTestDir
5710fi
5711
5712if test -d casesensitivetestdir
5713then
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5715$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 BUILDEXEEXT=.exe
5717else
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 BUILDEXEEXT=$EXEEXT
5721fi
5722rmdir CaseSensitiveTestDir
5723
5724case $MACHDEP in
5725bsdos*)
5726 case $CC in
5727 gcc) CC="$CC -D_HAVE_BSDI";;
5728 esac;;
5729esac
5730
5731case $ac_sys_system in
5732hp*|HP*)
5733 case $CC in
5734 cc|*/cc) CC="$CC -Ae";;
5735 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736esac
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5740$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741if test -z "$LIBRARY"
5742then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005743 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5746$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748# LDLIBRARY is the name of the library to link against (as opposed to the
5749# name of the library into which to insert object files). BLDLIBRARY is also
5750# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5751# is blank as the main program is not linked directly against LDLIBRARY.
5752# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5753# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5754# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5755# DLLLIBRARY is the shared (i.e., DLL) library.
5756#
5757# RUNSHARED is used to run shared python without installed libraries
5758#
5759# INSTSONAME is the name of the shared library that will be use to install
5760# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005761#
5762# LDVERSION is the shared library version number, normally the Python version
5763# with the ABI build flags appended.
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766
5767
5768
5769
5770
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772LDLIBRARY="$LIBRARY"
5773BLDLIBRARY='$(LDLIBRARY)'
5774INSTSONAME='$(LDLIBRARY)'
5775DLLLIBRARY=''
5776LDLIBRARYDIR=''
5777RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005778LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779
5780# LINKCC is the command that links the python executable -- default is $(CC).
5781# If CXX is set, and if it is needed to link a main function that was
5782# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5783# python might then depend on the C++ runtime
5784# This is altered for AIX in order to build the export list before
5785# linking.
5786
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5788$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789if test -z "$LINKCC"
5790then
5791 LINKCC='$(PURIFY) $(MAINCC)'
5792 case $ac_sys_system in
5793 AIX*)
5794 exp_extra="\"\""
5795 if test $ac_sys_release -ge 5 -o \
5796 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5797 exp_extra="."
5798 fi
5799 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 QNX*)
5801 # qcc must be used because the other compilers do not
5802 # support -N.
5803 LINKCC=qcc;;
5804 esac
5805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5807$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808
5809# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5810# make sure we default having it set to "no": this is used by
5811# distutils.unixccompiler to know if it should add --enable-new-dtags
5812# to linker command lines, and failing to detect GNU ld simply results
5813# in the same bahaviour as before.
5814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5816$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817ac_prog=ld
5818if test "$GCC" = yes; then
5819 ac_prog=`$CC -print-prog-name=ld`
5820fi
5821case `"$ac_prog" -V 2>&1 < /dev/null` in
5822 *GNU*)
5823 GNULD=yes;;
5824 *)
5825 GNULD=no;;
5826esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5828$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5831$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005832if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005833 $as_echo_n "(cached) " >&6
5834else
5835 ac_cv_c_inline=no
5836for ac_kw in inline __inline__ __inline; do
5837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5838/* end confdefs.h. */
5839#ifndef __cplusplus
5840typedef int foo_t;
5841static $ac_kw foo_t static_foo () {return 0; }
5842$ac_kw foo_t foo () {return 0; }
5843#endif
5844
5845_ACEOF
5846if ac_fn_c_try_compile "$LINENO"; then :
5847 ac_cv_c_inline=$ac_kw
5848fi
5849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5850 test "$ac_cv_c_inline" != no && break
5851done
5852
5853fi
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5855$as_echo "$ac_cv_c_inline" >&6; }
5856
5857case $ac_cv_c_inline in
5858 inline | yes) ;;
5859 *)
5860 case $ac_cv_c_inline in
5861 no) ac_val=;;
5862 *) ac_val=$ac_cv_c_inline;;
5863 esac
5864 cat >>confdefs.h <<_ACEOF
5865#ifndef __cplusplus
5866#define inline $ac_val
5867#endif
5868_ACEOF
5869 ;;
5870esac
5871
5872if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005873
5874$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005875
5876
5877fi
5878
5879
Matthias Kloseb9621712010-04-24 17:59:49 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5881$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005883if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 enableval=$enable_shared;
5885fi
5886
5887
5888if test -z "$enable_shared"
5889then
5890 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005891 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 enable_shared="yes";;
5893 *)
5894 enable_shared="no";;
5895 esac
5896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5898$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899
Matthias Kloseb9621712010-04-24 17:59:49 +00005900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5901$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005903if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005904 enableval=$enable_profiling;
5905fi
5906
5907if test "x$enable_profiling" = xyes; then
5908 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005909 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911/* end confdefs.h. */
5912int main() { return 0; }
5913_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005914if ac_fn_c_try_link "$LINENO"; then :
5915
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005917 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005919rm -f core conftest.err conftest.$ac_objext \
5920 conftest$ac_exeext conftest.$ac_ext
5921 CC="$ac_save_cc"
5922else
5923 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5926$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
doko@ubuntu.comba015832012-06-30 16:52:05 +02005928if test "x$enable_profiling" = xyes; then
5929 BASECFLAGS="-pg $BASECFLAGS"
5930 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931fi
5932
Matthias Kloseb9621712010-04-24 17:59:49 +00005933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5934$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
5936# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5937# library that we build, but we do not want to link against it (we
5938# will find it with a -framework option). For this reason there is an
5939# extra variable BLDLIBRARY against which Python and the extension
5940# modules are linked, BLDLIBRARY. This is normally the same as
5941# LDLIBRARY, but empty for MacOSX framework builds.
5942if test "$enable_framework"
5943then
5944 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005945 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 BLDLIBRARY=''
5947else
5948 BLDLIBRARY='$(LDLIBRARY)'
5949fi
5950
5951# Other platforms follow
5952if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005953 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
Matthias Kloseb9621712010-04-24 17:59:49 +00005955$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956
5957 case $ac_sys_system in
5958 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).dll.a'
5960 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 ;;
5962 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).so'
5964 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005967 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005968 then
5969 PY3LIBRARY=libpython3.so
5970 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005972 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005973 LDLIBRARY='libpython$(LDVERSION).so'
5974 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005975 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005977 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005978 then
5979 PY3LIBRARY=libpython3.so
5980 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ;;
5982 hp*|HP*)
5983 case `uname -m` in
5984 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005985 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ;;
5987 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005988 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989 ;;
5990 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005991 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005992 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005995 LDLIBRARY='libpython$(LDVERSION).dylib'
5996 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005997 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005999 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006000 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006001 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006002 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003
6004 esac
6005else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006006 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 case $ac_sys_system in
6008 CYGWIN*)
6009 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006010 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011 ;;
6012 esac
6013fi
6014
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006015if test "$cross_compiling" = yes; then
6016 RUNSHARED=
6017fi
6018
Matthias Kloseb9621712010-04-24 17:59:49 +00006019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6020$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021
6022if test -n "$ac_tool_prefix"; then
6023 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6024set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006027if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029else
6030 if test -n "$RANLIB"; then
6031 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6032else
6033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6034for as_dir in $PATH
6035do
6036 IFS=$as_save_IFS
6037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 break 2
6043 fi
6044done
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046IFS=$as_save_IFS
6047
6048fi
6049fi
6050RANLIB=$ac_cv_prog_RANLIB
6051if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6053$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054else
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6056$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057fi
6058
6059
6060fi
6061if test -z "$ac_cv_prog_RANLIB"; then
6062 ac_ct_RANLIB=$RANLIB
6063 # Extract the first word of "ranlib", so it can be a program name with args.
6064set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6066$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006067if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069else
6070 if test -n "$ac_ct_RANLIB"; then
6071 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6072else
6073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6074for as_dir in $PATH
6075do
6076 IFS=$as_save_IFS
6077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082 break 2
6083 fi
6084done
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086IFS=$as_save_IFS
6087
6088fi
6089fi
6090ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6091if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6093$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094else
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6096$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097fi
6098
6099 if test "x$ac_ct_RANLIB" = x; then
6100 RANLIB=":"
6101 else
6102 case $cross_compiling:$ac_tool_warned in
6103yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6105$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106ac_tool_warned=yes ;;
6107esac
6108 RANLIB=$ac_ct_RANLIB
6109 fi
6110else
6111 RANLIB="$ac_cv_prog_RANLIB"
6112fi
6113
6114
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006115if test -n "$ac_tool_prefix"; then
6116 for ac_prog in ar aal
6117 do
6118 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6119set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006122if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124else
6125 if test -n "$AR"; then
6126 ac_cv_prog_AR="$AR" # Let the user override the test.
6127else
6128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129for as_dir in $PATH
6130do
6131 IFS=$as_save_IFS
6132 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006133 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137 break 2
6138 fi
6139done
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141IFS=$as_save_IFS
6142
6143fi
6144fi
6145AR=$ac_cv_prog_AR
6146if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6148$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149else
Matthias Kloseb9621712010-04-24 17:59:49 +00006150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152fi
6153
6154
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006155 test -n "$AR" && break
6156 done
6157fi
6158if test -z "$AR"; then
6159 ac_ct_AR=$AR
6160 for ac_prog in ar aal
6161do
6162 # Extract the first word of "$ac_prog", so it can be a program name with args.
6163set dummy $ac_prog; ac_word=$2
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165$as_echo_n "checking for $ac_word... " >&6; }
6166if ${ac_cv_prog_ac_ct_AR+:} false; then :
6167 $as_echo_n "(cached) " >&6
6168else
6169 if test -n "$ac_ct_AR"; then
6170 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6171else
6172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175 IFS=$as_save_IFS
6176 test -z "$as_dir" && as_dir=.
6177 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006178 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006179 ac_cv_prog_ac_ct_AR="$ac_prog"
6180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181 break 2
6182 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006184 done
6185IFS=$as_save_IFS
6186
6187fi
6188fi
6189ac_ct_AR=$ac_cv_prog_ac_ct_AR
6190if test -n "$ac_ct_AR"; then
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6192$as_echo "$ac_ct_AR" >&6; }
6193else
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6195$as_echo "no" >&6; }
6196fi
6197
6198
6199 test -n "$ac_ct_AR" && break
6200done
6201
6202 if test "x$ac_ct_AR" = x; then
6203 AR="ar"
6204 else
6205 case $cross_compiling:$ac_tool_warned in
6206yes:)
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6208$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6209ac_tool_warned=yes ;;
6210esac
6211 AR=$ac_ct_AR
6212 fi
6213fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214
6215
6216# tweak ARFLAGS only if the user didn't set it on the command line
6217
6218if test -z "$ARFLAGS"
6219then
6220 ARFLAGS="rc"
6221fi
6222
doko@ubuntu.com58844492012-06-30 18:25:32 +02006223if test -n "$ac_tool_prefix"; then
6224 for ac_prog in readelf
6225 do
6226 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6229$as_echo_n "checking for $ac_word... " >&6; }
6230if ${ac_cv_prog_READELF+:} false; then :
6231 $as_echo_n "(cached) " >&6
6232else
6233 if test -n "$READELF"; then
6234 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6235else
6236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239 IFS=$as_save_IFS
6240 test -z "$as_dir" && as_dir=.
6241 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006243 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245 break 2
6246 fi
6247done
6248 done
6249IFS=$as_save_IFS
6250
6251fi
6252fi
6253READELF=$ac_cv_prog_READELF
6254if test -n "$READELF"; then
6255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6256$as_echo "$READELF" >&6; }
6257else
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263 test -n "$READELF" && break
6264 done
6265fi
6266if test -z "$READELF"; then
6267 ac_ct_READELF=$READELF
6268 for ac_prog in readelf
6269do
6270 # Extract the first word of "$ac_prog", so it can be a program name with args.
6271set dummy $ac_prog; ac_word=$2
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6273$as_echo_n "checking for $ac_word... " >&6; }
6274if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6275 $as_echo_n "(cached) " >&6
6276else
6277 if test -n "$ac_ct_READELF"; then
6278 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6279else
6280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283 IFS=$as_save_IFS
6284 test -z "$as_dir" && as_dir=.
6285 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006287 ac_cv_prog_ac_ct_READELF="$ac_prog"
6288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6289 break 2
6290 fi
6291done
6292 done
6293IFS=$as_save_IFS
6294
6295fi
6296fi
6297ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6298if test -n "$ac_ct_READELF"; then
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6300$as_echo "$ac_ct_READELF" >&6; }
6301else
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6303$as_echo "no" >&6; }
6304fi
6305
6306
6307 test -n "$ac_ct_READELF" && break
6308done
6309
6310 if test "x$ac_ct_READELF" = x; then
6311 READELF=":"
6312 else
6313 case $cross_compiling:$ac_tool_warned in
6314yes:)
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6317ac_tool_warned=yes ;;
6318esac
6319 READELF=$ac_ct_READELF
6320 fi
6321fi
6322
6323if test "$cross_compiling" = yes; then
6324 case "$READELF" in
6325 readelf|:)
6326 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6327 ;;
6328 esac
6329fi
6330
6331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333case $MACHDEP in
6334bsdos*|hp*|HP*)
6335 # install -d does not work on BSDI or HP-UX
6336 if test -z "$INSTALL"
6337 then
6338 INSTALL="${srcdir}/install-sh -c"
6339 fi
6340esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341# Find a good install program. We prefer a C program (faster),
6342# so one script is as good as another. But avoid the broken or
6343# incompatible versions:
6344# SysV /etc/install, /usr/sbin/install
6345# SunOS /usr/etc/install
6346# IRIX /sbin/install
6347# AIX /bin/install
6348# AmigaOS /C/install, which installs bootblocks on floppy discs
6349# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6350# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6351# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6352# OS/2's system install, which has a completely different semantic
6353# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006354# Reject install programs that cannot install multiple files.
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6356$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006358if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360else
6361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364 IFS=$as_save_IFS
6365 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 # Account for people who put trailing slashes in PATH elements.
6367case $as_dir/ in #((
6368 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 /usr/ucb/* ) ;;
6372 *)
6373 # OSF1 and SCO ODT 3.0 have their own names for install.
6374 # Don't use installbsd from OSF since it installs stuff as root
6375 # by default.
6376 for ac_prog in ginstall scoinst install; do
6377 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006378 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 if test $ac_prog = install &&
6380 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6381 # AIX install. It has an incompatible calling convention.
6382 :
6383 elif test $ac_prog = install &&
6384 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6385 # program-specific install script used by HP pwplus--don't use.
6386 :
6387 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006388 rm -rf conftest.one conftest.two conftest.dir
6389 echo one > conftest.one
6390 echo two > conftest.two
6391 mkdir conftest.dir
6392 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6393 test -s conftest.one && test -s conftest.two &&
6394 test -s conftest.dir/conftest.one &&
6395 test -s conftest.dir/conftest.two
6396 then
6397 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6398 break 3
6399 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400 fi
6401 fi
6402 done
6403 done
6404 ;;
6405esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006406
6407 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408IFS=$as_save_IFS
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411
6412fi
6413 if test "${ac_cv_path_install+set}" = set; then
6414 INSTALL=$ac_cv_path_install
6415 else
6416 # As a last resort, use the slow shell script. Don't cache a
6417 # value for INSTALL within a source directory, because that will
6418 # break other packages using the cache if that directory is
6419 # removed, or if the value is a relative name.
6420 INSTALL=$ac_install_sh
6421 fi
6422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6424$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425
6426# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6427# It thinks the first close brace ends the variable substitution.
6428test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6429
6430test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6431
6432test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6433
Matthias Klose93a0ef12012-03-15 18:08:34 +01006434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6435$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6436if test -z "$MKDIR_P"; then
6437 if ${ac_cv_path_mkdir+:} false; then :
6438 $as_echo_n "(cached) " >&6
6439else
6440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6442do
6443 IFS=$as_save_IFS
6444 test -z "$as_dir" && as_dir=.
6445 for ac_prog in mkdir gmkdir; do
6446 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006447 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006448 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6449 'mkdir (GNU coreutils) '* | \
6450 'mkdir (coreutils) '* | \
6451 'mkdir (fileutils) '4.1*)
6452 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6453 break 3;;
6454 esac
6455 done
6456 done
6457 done
6458IFS=$as_save_IFS
6459
6460fi
6461
6462 test -d ./--version && rmdir ./--version
6463 if test "${ac_cv_path_mkdir+set}" = set; then
6464 MKDIR_P="$ac_cv_path_mkdir -p"
6465 else
6466 # As a last resort, use the slow shell script. Don't cache a
6467 # value for MKDIR_P within a source directory, because that will
6468 # break other packages using the cache if that directory is
6469 # removed, or if the value is a relative name.
6470 MKDIR_P="$ac_install_sh -d"
6471 fi
6472fi
6473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6474$as_echo "$MKDIR_P" >&6; }
6475
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476
6477# Not every filesystem supports hard links
6478
6479if test -z "$LN" ; then
6480 case $ac_sys_system in
6481 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006482 *) LN=ln;;
6483 esac
6484fi
6485
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006486# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006487
6488ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006489
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006490# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6492$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006493
6494# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006495if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496 withval=$with_pydebug;
6497if test "$withval" != no
6498then
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501
Matthias Kloseb9621712010-04-24 17:59:49 +00006502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6503$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006505 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006506else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508fi
6509else
Matthias Kloseb9621712010-04-24 17:59:49 +00006510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512fi
6513
6514
Brett Cannon63d98bc2016-09-06 17:12:40 -07006515# Enable optimization flags
6516
6517
6518Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6520$as_echo_n "checking for --enable-optimizations... " >&6; }
6521# Check whether --enable-optimizations was given.
6522if test "${enable_optimizations+set}" = set; then :
6523 enableval=$enable_optimizations;
Brett Cannon63d98bc2016-09-06 17:12:40 -07006524if test "$withval" != no
6525then
6526 Py_OPT='true'
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6528$as_echo "yes" >&6; };
6529else
6530 Py_OPT='false'
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532$as_echo "no" >&6; };
6533fi
6534else
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006540 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6541 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006542 # 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 +00006543 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006544 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006545 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006546 DEF_MAKE_RULE="build_all"
6547else
6548 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006549 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006550 DEF_MAKE_RULE="all"
6551fi
6552
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006553# Enable LTO flags
6554
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6556$as_echo_n "checking for --with-lto... " >&6; }
6557
6558# Check whether --with-lto was given.
6559if test "${with_lto+set}" = set; then :
6560 withval=$with_lto;
6561if test "$withval" != no
6562then
6563 Py_LTO='true'
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6565$as_echo "yes" >&6; };
6566else
6567 Py_LTO='false'
6568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; };
6570fi
6571else
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6573$as_echo "no" >&6; }
6574fi
6575
6576if test "$Py_LTO" = 'true' ; then
6577 case $CC in
6578 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006579 case $ac_sys_system in
6580 Darwin*)
6581 # Any changes made here should be reflected in the GCC+Darwin case below
6582 LTOFLAGS="-flto -Wl,-export_dynamic"
6583 ;;
6584 *)
6585 LTOFLAGS="-flto"
6586 ;;
6587 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006588 ;;
6589 *gcc*)
6590 case $ac_sys_system in
6591 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006592 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006593 ;;
6594 *)
6595 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6596 ;;
6597 esac
6598 ;;
6599 esac
6600fi
6601
Brett Cannon7188a3e2015-09-18 15:13:44 -07006602# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006603
6604
6605
6606
6607
Gregory P. Smith799520c2016-09-07 16:10:00 -07006608# Make this work on systems where llvm tools are not installed with their
6609# normal names in the default $PATH (ie: Ubuntu). They exist under the
6610# non-suffixed name in their versioned llvm directory.
6611llvm_bin_dir=''
6612llvm_path="${PATH}"
6613if test "${CC}" = "clang"
6614then
6615 clang_bin=`which clang`
6616 # Some systems install clang elsewhere as a symlink to the real path
6617 # which is where the related llvm tools are located.
6618 if test -L "${clang_bin}"
6619 then
6620 clang_dir=`dirname "${clang_bin}"`
6621 clang_bin=`readlink "${clang_bin}"`
6622 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6623 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6624 fi
6625fi
Zachary Ware5af85642015-12-21 12:09:17 -06006626
Gregory P. Smith799520c2016-09-07 16:10:00 -07006627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6628$as_echo_n "checking target system type... " >&6; }
6629if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006630 $as_echo_n "(cached) " >&6
6631else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006632 if test "x$target_alias" = x; then
6633 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006634else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006635 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6636 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6637fi
6638
6639fi
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6641$as_echo "$ac_cv_target" >&6; }
6642case $ac_cv_target in
6643*-*-*) ;;
6644*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6645esac
6646target=$ac_cv_target
6647ac_save_IFS=$IFS; IFS='-'
6648set x $ac_cv_target
6649shift
6650target_cpu=$1
6651target_vendor=$2
6652shift; shift
6653# Remember, the first character of IFS is used to create $*,
6654# except with old shells:
6655target_os=$*
6656IFS=$ac_save_IFS
6657case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6658
6659
6660# The aliases save the names the user supplied, while $host etc.
6661# will get canonicalized.
6662test -n "$target_alias" &&
6663 test "$program_prefix$program_suffix$program_transform_name" = \
6664 NONENONEs,x,x, &&
6665 program_prefix=${target_alias}-
6666# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6667set dummy $target_alias-llvm-profdata; ac_word=$2
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669$as_echo_n "checking for $ac_word... " >&6; }
6670if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6671 $as_echo_n "(cached) " >&6
6672else
6673 case $LLVM_PROFDATA in
6674 [\\/]* | ?:[\\/]*)
6675 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6676 ;;
6677 *)
6678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006680do
6681 IFS=$as_save_IFS
6682 test -z "$as_dir" && as_dir=.
6683 for ac_exec_ext in '' $ac_executable_extensions; do
6684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006685 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687 break 2
6688 fi
6689done
6690 done
6691IFS=$as_save_IFS
6692
Gregory P. Smith799520c2016-09-07 16:10:00 -07006693 ;;
6694esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006696LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6697if test -n "$LLVM_PROFDATA"; then
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6699$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006700else
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705
Gregory P. Smith799520c2016-09-07 16:10:00 -07006706if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6707 if test "$build" = "$target"; then
6708 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6709 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6710set dummy llvm-profdata; ac_word=$2
6711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6712$as_echo_n "checking for $ac_word... " >&6; }
6713if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6714 $as_echo_n "(cached) " >&6
6715else
6716 case $ac_pt_LLVM_PROFDATA in
6717 [\\/]* | ?:[\\/]*)
6718 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6719 ;;
6720 *)
6721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6722for as_dir in ${llvm_path}
6723do
6724 IFS=$as_save_IFS
6725 test -z "$as_dir" && as_dir=.
6726 for ac_exec_ext in '' $ac_executable_extensions; do
6727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6728 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6730 break 2
6731 fi
6732done
6733 done
6734IFS=$as_save_IFS
6735
6736 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6737 ;;
6738esac
6739fi
6740ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6741if test -n "$ac_pt_LLVM_PROFDATA"; then
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6743$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6744else
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746$as_echo "no" >&6; }
6747fi
6748
6749 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6750 else
6751 LLVM_PROFDATA="''"
6752 fi
6753else
6754 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6755fi
6756
6757
6758if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6759then
6760 LLVM_PROF_FOUND="found"
6761else
6762 LLVM_PROF_FOUND="not-found"
6763fi
6764if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6765then
6766 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6767 if test -n "${found_llvm_profdata}"
6768 then
6769 # llvm-profdata isn't directly in $PATH in some cases.
6770 # https://apple.stackexchange.com/questions/197053/
6771 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6772 LLVM_PROF_FOUND=found
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6774$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6775 fi
6776fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777LLVM_PROF_ERR=no
6778case $CC in
6779 *clang*)
6780 # Any changes made here should be reflected in the GCC+Darwin case below
6781 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6782 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006783 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6785 if test $LLVM_PROF_FOUND = not-found
6786 then
6787 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006788 if test "${REQUIRE_PGO}" = "yes"
6789 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006790 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 -07006791 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006792 fi
6793 ;;
6794 *gcc*)
6795 case $ac_sys_system in
6796 Darwin*)
6797 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6798 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006799 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006800 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006801 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006802 then
6803 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 if test "${REQUIRE_PGO}" = "yes"
6805 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006806 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 -07006807 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006808 fi
6809 ;;
6810 *)
6811 PGO_PROF_GEN_FLAG="-fprofile-generate"
6812 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6813 LLVM_PROF_MERGER="true"
6814 LLVM_PROF_FILE=""
6815 ;;
6816 esac
6817 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006818 *icc*)
6819 PGO_PROF_GEN_FLAG="-prof-gen"
6820 PGO_PROF_USE_FLAG="-prof-use"
6821 LLVM_PROF_MERGER="true"
6822 LLVM_PROF_FILE=""
6823 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006824esac
6825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6827# merged with this chunk of code?
6828
6829# Optimizer/debugger flags
6830# ------------------------
6831# (The following bit of code is complicated enough - please keep things
6832# indented properly. Just pretend you're editing Python code. ;-)
6833
6834# There are two parallel sets of case statements below, one that checks to
6835# see if OPT was set and one that does BASECFLAGS setting based upon
6836# compiler and platform. BASECFLAGS tweaks need to be made even if the
6837# user set OPT.
6838
6839# tweak OPT based on compiler and platform, only if the user didn't set
6840# it on the command line
6841
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006842if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843then
6844 case $GCC in
6845 yes)
6846 if test "$CC" != 'g++' ; then
6847 STRICT_PROTO="-Wstrict-prototypes"
6848 fi
6849 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6850 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6851 WRAP="-fwrapv"
6852 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006853
6854 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006855 case $CC in
6856 *clang*) WRAP="-fwrapv"
6857 ;;
6858 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 case $ac_cv_prog_cc_g in
6861 yes)
6862 if test "$Py_DEBUG" = 'true' ; then
6863 # Optimization messes up debuggers, so turn it off for
6864 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006865 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6866 OPT="-g -Og -Wall $STRICT_PROTO"
6867 else
6868 OPT="-g -O0 -Wall $STRICT_PROTO"
6869 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 else
6871 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6872 fi
6873 ;;
6874 *)
6875 OPT="-O3 -Wall $STRICT_PROTO"
6876 ;;
6877 esac
6878 case $ac_sys_system in
6879 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6880 ;;
6881 esac
6882 ;;
6883
6884 *)
6885 OPT="-O"
6886 ;;
6887 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888fi
6889
6890
6891
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893# The -arch flags for universal builds on OSX
6894UNIVERSAL_ARCH_FLAGS=
6895
6896
6897# tweak BASECFLAGS based on compiler and platform
6898case $GCC in
6899yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006900 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006901
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6903$as_echo_n "checking for -Wextra... " >&6; }
6904 ac_save_cc="$CC"
6905 CC="$CC -Wextra -Werror"
6906 if ${ac_cv_extra_warnings+:} false; then :
6907 $as_echo_n "(cached) " >&6
6908else
6909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6910/* end confdefs.h. */
6911
6912
6913int
6914main ()
6915{
6916
6917 ;
6918 return 0;
6919}
6920
6921_ACEOF
6922if ac_fn_c_try_compile "$LINENO"; then :
6923
6924 ac_cv_extra_warnings=yes
6925
6926else
6927
6928 ac_cv_extra_warnings=no
6929
6930fi
6931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6932fi
6933
6934 CC="$ac_save_cc"
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6936$as_echo "$ac_cv_extra_warnings" >&6; }
6937
6938 if test $ac_cv_extra_warnings = yes
6939 then
6940 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6941 fi
6942
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006943 # Python doesn't violate C99 aliasing rules, but older versions of
6944 # GCC produce warnings for legal Python code. Enable
6945 # -fno-strict-aliasing on versions of GCC that support but produce
6946 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6948$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949 ac_save_cc="$CC"
6950 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006951 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006952 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006953 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006954else
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006957
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006959int
6960main ()
6961{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006962
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006963 ;
6964 return 0;
6965}
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006968if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006969
6970 CC="$ac_save_cc -fstrict-aliasing"
6971 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973/* end confdefs.h. */
6974
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006975 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006976int
6977main ()
6978{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006979double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980 ;
6981 return 0;
6982}
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006985if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 ac_cv_no_strict_aliasing=no
6988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989else
Matthias Kloseb159a552010-04-25 21:00:44 +00006990
6991 ac_cv_no_strict_aliasing=yes
6992
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006995
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006996else
Matthias Kloseb159a552010-04-25 21:00:44 +00006997
6998 ac_cv_no_strict_aliasing=no
6999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007002fi
7003
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007004 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7007$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009 then
7010 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7011 fi
7012
Zachary Ware5af85642015-12-21 12:09:17 -06007013 # ICC doesn't recognize the option, but only emits a warning
7014 ## XXX does it emit an unused result warning and can it be disabled?
7015 case "$CC" in
7016 *icc*)
7017 ac_cv_disable_unused_result_warning=no
7018 ;;
7019 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7021$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7022 ac_save_cc="$CC"
7023 CC="$CC -Wunused-result -Werror"
7024 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007025 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007026 $as_echo_n "(cached) " >&6
7027else
7028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7029/* end confdefs.h. */
7030
7031
7032int
7033main ()
7034{
7035
7036 ;
7037 return 0;
7038}
7039
7040_ACEOF
7041if ac_fn_c_try_compile "$LINENO"; then :
7042
7043 ac_cv_disable_unused_result_warning=yes
7044
7045else
7046
7047 ac_cv_disable_unused_result_warning=no
7048
7049fi
7050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7051fi
7052
7053 CFLAGS="$save_CFLAGS"
7054 CC="$ac_save_cc"
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7056$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007057 ;;
7058 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007059
7060 if test $ac_cv_disable_unused_result_warning = yes
7061 then
7062 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007063 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7064 fi
7065
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7067$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7068 ac_save_cc="$CC"
7069 CC="$CC -Wunused-parameter -Werror"
7070 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7071 $as_echo_n "(cached) " >&6
7072else
7073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h. */
7075
7076
7077int
7078main ()
7079{
7080
7081 ;
7082 return 0;
7083}
7084
7085_ACEOF
7086if ac_fn_c_try_compile "$LINENO"; then :
7087
7088 ac_cv_disable_unused_parameter_warning=yes
7089
7090else
7091
7092 ac_cv_disable_unused_parameter_warning=no
7093
7094fi
7095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096fi
7097
7098 CC="$ac_save_cc"
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7100$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7101
7102 if test $ac_cv_disable_unused_parameter_warning = yes
7103 then
7104 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7105 fi
7106
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7108$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7109 ac_save_cc="$CC"
7110 CC="$CC -Wmissing-field-initializers -Werror"
7111 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7112 $as_echo_n "(cached) " >&6
7113else
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115/* end confdefs.h. */
7116
7117
7118int
7119main ()
7120{
7121
7122 ;
7123 return 0;
7124}
7125
7126_ACEOF
7127if ac_fn_c_try_compile "$LINENO"; then :
7128
7129 ac_cv_disable_missing_field_initializers=yes
7130
7131else
7132
7133 ac_cv_disable_missing_field_initializers=no
7134
7135fi
7136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137fi
7138
7139 CC="$ac_save_cc"
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7141$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7142
7143 if test $ac_cv_disable_missing_field_initializers = yes
7144 then
7145 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007146 fi
7147
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7149$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7150 ac_save_cc="$CC"
7151 CC="$CC -Wsign-compare"
7152 save_CFLAGS="$CFLAGS"
7153 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155else
7156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157/* end confdefs.h. */
7158
7159
7160int
7161main ()
7162{
7163
7164 ;
7165 return 0;
7166}
7167
7168_ACEOF
7169if ac_fn_c_try_compile "$LINENO"; then :
7170
7171 ac_cv_enable_sign_compare_warning=yes
7172
7173else
7174
7175 ac_cv_enable_sign_compare_warning=no
7176
7177fi
7178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179fi
7180
7181 CFLAGS="$save_CFLAGS"
7182 CC="$ac_save_cc"
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7184$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7185
7186 if test $ac_cv_enable_sign_compare_warning = yes
7187 then
7188 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7189 fi
7190
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7192$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7193 ac_save_cc="$CC"
7194 CC="$CC -Wunreachable-code"
7195 save_CFLAGS="$CFLAGS"
7196 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7197 $as_echo_n "(cached) " >&6
7198else
7199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h. */
7201
7202
7203int
7204main ()
7205{
7206
7207 ;
7208 return 0;
7209}
7210
7211_ACEOF
7212if ac_fn_c_try_compile "$LINENO"; then :
7213
7214 ac_cv_enable_unreachable_code_warning=yes
7215
7216else
7217
7218 ac_cv_enable_unreachable_code_warning=no
7219
7220fi
7221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7222fi
7223
7224 CFLAGS="$save_CFLAGS"
7225 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007226
7227 # Don't enable unreachable code warning in debug mode, since it usually
7228 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007229 # Issue #24324: Unfortunately, the unreachable code warning does not work
7230 # correctly on gcc and has been silently removed from the compiler.
7231 # It is supported on clang but on OS X systems gcc may be an alias
7232 # for clang. Try to determine if the compiler is not really gcc and,
7233 # if so, only then enable the warning.
7234 if test $ac_cv_enable_unreachable_code_warning = yes && \
7235 test "$Py_DEBUG" != "true" && \
7236 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007237 then
7238 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007239 else
7240 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007241 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7243$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007244
Victor Stinner193ee0a2017-02-06 14:24:00 +01007245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7246$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7247 ac_save_cc="$CC"
7248 CC="$CC -Werror=implicit-function-declaration"
7249 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7250 $as_echo_n "(cached) " >&6
7251else
7252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7253/* end confdefs.h. */
7254
7255
7256int
7257main ()
7258{
7259
7260 ;
7261 return 0;
7262}
7263
7264_ACEOF
7265if ac_fn_c_try_compile "$LINENO"; then :
7266
7267 ac_cv_enable_implicit_function_declaration_error=yes
7268
7269else
7270
7271 ac_cv_enable_implicit_function_declaration_error=no
7272
7273fi
7274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7275fi
7276
7277 CC="$ac_save_cc"
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7279$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7280
7281 if test $ac_cv_enable_implicit_function_declaration_error = yes
7282 then
7283 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7284 fi
7285
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007286 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7287 # support. Without this, treatment of subnormals doesn't follow
7288 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007289 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290 alpha*)
7291 BASECFLAGS="$BASECFLAGS -mieee"
7292 ;;
7293 esac
7294
7295 case $ac_sys_system in
7296 SCO_SV*)
7297 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7298 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007299
7300 # is there any other compiler on Darwin besides gcc?
7301 Darwin*)
7302 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7303 # used to be here, but non-Apple gcc doesn't accept them.
7304 if test "${CC}" = gcc
7305 then
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007307$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007308 case "${UNIVERSALSDK}" in
7309 */MacOSX10.4u.sdk)
7310 # Build using 10.4 SDK, force usage of gcc when the
7311 # compiler is gcc, otherwise the user will get very
7312 # confusing error messages when building on OSX 10.6
7313 CC=gcc-4.0
7314 CPP=cpp-4.0
7315 ;;
7316 esac
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007318$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007319 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320
Ned Deily87adb6e2013-10-18 21:09:56 -07007321 if test "${enable_universalsdk}"
7322 then
7323 case "$UNIVERSAL_ARCHS" in
7324 32-bit)
7325 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7326 LIPO_32BIT_FLAGS=""
7327 ARCH_RUN_32BIT=""
7328 ;;
7329 64-bit)
7330 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7331 LIPO_32BIT_FLAGS=""
7332 ARCH_RUN_32BIT="true"
7333 ;;
7334 all)
7335 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7336 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7337 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7338 ;;
7339 intel)
7340 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7341 LIPO_32BIT_FLAGS="-extract i386"
7342 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7343 ;;
7344 intel-32)
7345 UNIVERSAL_ARCH_FLAGS="-arch i386"
7346 LIPO_32BIT_FLAGS=""
7347 ARCH_RUN_32BIT=""
7348 ;;
7349 3-way)
7350 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7351 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7352 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7353 ;;
7354 *)
7355 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7356 ;;
7357 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358
Ned Deily87adb6e2013-10-18 21:09:56 -07007359 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7360 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7361 if test "${UNIVERSALSDK}" != "/"
7362 then
7363 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7364 fi
7365 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366
Ned Deily87adb6e2013-10-18 21:09:56 -07007367 # Calculate an appropriate deployment target for this build:
7368 # The deployment target value is used explicitly to enable certain
7369 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007370 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007371 # component of the string returned by distutils.get_platform().
7372 #
7373 # Use the value from:
7374 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7375 # 2. the operating system version of the build machine if >= 10.6
7376 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7377 # below to pick either 10.3, 10.4, or 10.5 as the target.
7378 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007379
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7381$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007382 cur_target_major=`sw_vers -productVersion | \
7383 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7384 cur_target_minor=`sw_vers -productVersion | \
7385 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7386 cur_target="${cur_target_major}.${cur_target_minor}"
7387 if test ${cur_target_major} -eq 10 && \
7388 test ${cur_target_minor} -ge 3 && \
7389 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007390 then
Ned Deily36820b62014-06-25 13:44:22 -07007391 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007392 cur_target=10.3
7393 if test ${enable_universalsdk}
7394 then
7395 case "$UNIVERSAL_ARCHS" in
7396 all|3-way|intel|64-bit)
7397 # These configurations were first supported in 10.5
7398 cur_target='10.5'
7399 ;;
7400 esac
7401 else
7402 if test `/usr/bin/arch` = "i386"
7403 then
7404 # 10.4 was the first release to support Intel archs
7405 cur_target="10.4"
7406 fi
7407 fi
7408 fi
7409 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007410
Ned Deily87adb6e2013-10-18 21:09:56 -07007411 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7412 # environment with a value that is the same as what we'll use
7413 # in the Makefile to ensure that we'll get the same compiler
7414 # environment during configure and build time.
7415 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7416 export MACOSX_DEPLOYMENT_TARGET
7417 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7419$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007420
Ned Deily87adb6e2013-10-18 21:09:56 -07007421 # end of Darwin* tests
7422 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423 esac
7424 ;;
7425
7426*)
7427 case $ac_sys_system in
7428 OpenUNIX*|UnixWare*)
7429 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7430 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431 SCO_SV*)
7432 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7433 ;;
7434 esac
7435 ;;
7436esac
7437
Zachary Ware5af85642015-12-21 12:09:17 -06007438# ICC needs -fp-model strict or floats behave badly
7439case "$CC" in
7440*icc*)
7441 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7442 ;;
7443esac
7444
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445if test "$Py_DEBUG" = 'true'; then
7446 :
7447else
7448 OPT="-DNDEBUG $OPT"
7449fi
7450
7451if test "$ac_arch_flags"
7452then
7453 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7454fi
7455
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456# On some compilers, pthreads are available without further options
7457# (e.g. MacOS X). On some of these systems, the compiler will not
7458# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7459# So we have to see first whether pthreads are available without
7460# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7462$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007463if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467 ac_cv_pthread_is_default=no
7468else
Matthias Kloseb9621712010-04-24 17:59:49 +00007469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470/* end confdefs.h. */
7471
Stefan Krah7dba5942012-11-22 22:49:11 +01007472#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473#include <pthread.h>
7474
7475void* routine(void* p){return NULL;}
7476
7477int main(){
7478 pthread_t p;
7479 if(pthread_create(&p,NULL,routine,NULL)!=0)
7480 return 1;
7481 (void)pthread_detach(p);
7482 return 0;
7483}
7484
7485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007486if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487
7488 ac_cv_pthread_is_default=yes
7489 ac_cv_kthread=no
7490 ac_cv_pthread=no
7491
7492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497fi
7498
7499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500fi
7501
Matthias Kloseb9621712010-04-24 17:59:49 +00007502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7503$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504
7505
7506if test $ac_cv_pthread_is_default = yes
7507then
7508 ac_cv_kpthread=no
7509else
7510# -Kpthread, if available, provides the right #defines
7511# and linker options to make pthread_create available
7512# Some compilers won't report that they do not support -Kpthread,
7513# so we need to run a program to see whether it really made the
7514# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7516$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007517if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007518 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519else
7520 ac_save_cc="$CC"
7521CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007522if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523 ac_cv_kpthread=no
7524else
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526/* end confdefs.h. */
7527
Stefan Krah7dba5942012-11-22 22:49:11 +01007528#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529#include <pthread.h>
7530
7531void* routine(void* p){return NULL;}
7532
7533int main(){
7534 pthread_t p;
7535 if(pthread_create(&p,NULL,routine,NULL)!=0)
7536 return 1;
7537 (void)pthread_detach(p);
7538 return 0;
7539}
7540
7541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007542if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543 ac_cv_kpthread=yes
7544else
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549fi
7550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551CC="$ac_save_cc"
7552fi
7553
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7555$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556fi
7557
7558if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7559then
7560# -Kthread, if available, provides the right #defines
7561# and linker options to make pthread_create available
7562# Some compilers won't report that they do not support -Kthread,
7563# so we need to run a program to see whether it really made the
7564# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7566$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007567if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007568 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569else
7570 ac_save_cc="$CC"
7571CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573 ac_cv_kthread=no
7574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576/* end confdefs.h. */
7577
Stefan Krah7dba5942012-11-22 22:49:11 +01007578#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579#include <pthread.h>
7580
7581void* routine(void* p){return NULL;}
7582
7583int main(){
7584 pthread_t p;
7585 if(pthread_create(&p,NULL,routine,NULL)!=0)
7586 return 1;
7587 (void)pthread_detach(p);
7588 return 0;
7589}
7590
7591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007592if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593 ac_cv_kthread=yes
7594else
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7598 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599fi
7600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601CC="$ac_save_cc"
7602fi
7603
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7605$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606fi
7607
7608if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7609then
7610# -pthread, if available, provides the right #defines
7611# and linker options to make pthread_create available
7612# Some compilers won't report that they do not support -pthread,
7613# so we need to run a program to see whether it really made the
7614# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7616$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007617if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619else
7620 ac_save_cc="$CC"
7621CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007622if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623 ac_cv_pthread=no
7624else
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626/* end confdefs.h. */
7627
Stefan Krah7dba5942012-11-22 22:49:11 +01007628#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629#include <pthread.h>
7630
7631void* routine(void* p){return NULL;}
7632
7633int main(){
7634 pthread_t p;
7635 if(pthread_create(&p,NULL,routine,NULL)!=0)
7636 return 1;
7637 (void)pthread_detach(p);
7638 return 0;
7639}
7640
7641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007642if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643 ac_cv_pthread=yes
7644else
Matthias Kloseb9621712010-04-24 17:59:49 +00007645 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649fi
7650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651CC="$ac_save_cc"
7652fi
7653
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7655$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656fi
7657
7658# If we have set a CC compiler flag for thread support then
7659# check if it works for CXX, too.
7660ac_cv_cxx_thread=no
7661if test ! -z "$CXX"
7662then
Matthias Kloseb9621712010-04-24 17:59:49 +00007663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7664$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665ac_save_cxx="$CXX"
7666
7667if test "$ac_cv_kpthread" = "yes"
7668then
7669 CXX="$CXX -Kpthread"
7670 ac_cv_cxx_thread=yes
7671elif test "$ac_cv_kthread" = "yes"
7672then
7673 CXX="$CXX -Kthread"
7674 ac_cv_cxx_thread=yes
7675elif test "$ac_cv_pthread" = "yes"
7676then
7677 CXX="$CXX -pthread"
7678 ac_cv_cxx_thread=yes
7679fi
7680
7681if test $ac_cv_cxx_thread = yes
7682then
7683 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7684 $CXX -c conftest.$ac_ext 2>&5
7685 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7686 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7687 then
7688 ac_cv_cxx_thread=yes
7689 else
7690 ac_cv_cxx_thread=no
7691 fi
7692 rm -fr conftest*
7693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7695$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696fi
7697CXX="$ac_save_cxx"
7698
7699
7700# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7702$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007703if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707/* end confdefs.h. */
7708#include <stdlib.h>
7709#include <stdarg.h>
7710#include <string.h>
7711#include <float.h>
7712
7713int
7714main ()
7715{
7716
7717 ;
7718 return 0;
7719}
7720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007721if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722 ac_cv_header_stdc=yes
7723else
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7727
7728if test $ac_cv_header_stdc = yes; then
7729 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731/* end confdefs.h. */
7732#include <string.h>
7733
7734_ACEOF
7735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 $EGREP "memchr" >/dev/null 2>&1; then :
7737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738else
7739 ac_cv_header_stdc=no
7740fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007741rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742
7743fi
7744
7745if test $ac_cv_header_stdc = yes; then
7746 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748/* end confdefs.h. */
7749#include <stdlib.h>
7750
7751_ACEOF
7752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 $EGREP "free" >/dev/null 2>&1; then :
7754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755else
7756 ac_cv_header_stdc=no
7757fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007758rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759
7760fi
7761
7762if test $ac_cv_header_stdc = yes; then
7763 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765 :
7766else
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768/* end confdefs.h. */
7769#include <ctype.h>
7770#include <stdlib.h>
7771#if ((' ' & 0x0FF) == 0x020)
7772# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7773# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7774#else
7775# define ISLOWER(c) \
7776 (('a' <= (c) && (c) <= 'i') \
7777 || ('j' <= (c) && (c) <= 'r') \
7778 || ('s' <= (c) && (c) <= 'z'))
7779# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7780#endif
7781
7782#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7783int
7784main ()
7785{
7786 int i;
7787 for (i = 0; i < 256; i++)
7788 if (XOR (islower (i), ISLOWER (i))
7789 || toupper (i) != TOUPPER (i))
7790 return 2;
7791 return 0;
7792}
7793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007794if ac_fn_c_try_run "$LINENO"; then :
7795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801fi
7802
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803fi
7804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7806$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807if test $ac_cv_header_stdc = yes; then
7808
Matthias Kloseb9621712010-04-24 17:59:49 +00007809$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007810
7811fi
7812
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007813for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007814fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007815ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007816sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007817unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007818poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007819sys/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 +01007820sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007821sys/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 +01007822sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007823sys/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 -07007824libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007825linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007826sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007827do :
7828 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7829ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007830if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007832#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007833_ACEOF
7834
7835fi
7836
Guido van Rossum627b2d71993-12-24 10:39:16 +00007837done
7838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007840for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7843$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007844if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007846else
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007848/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007849#include <sys/types.h>
7850#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852int
7853main ()
7854{
7855if ((DIR *) 0)
7856return 0;
7857 ;
7858 return 0;
7859}
7860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007863else
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868eval ac_res=\$$as_ac_Header
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7870$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007871if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007873#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007874_ACEOF
7875
7876ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007879done
7880# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7881if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7883$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007884if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007886else
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891/* Override any GCC internal prototype to avoid an error.
7892 Use char because int might match the return type of a GCC
7893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007894#ifdef __cplusplus
7895extern "C"
7896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007897char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ;
7903 return 0;
7904}
7905_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906for ac_lib in '' dir; do
7907 if test -z "$ac_lib"; then
7908 ac_res="none required"
7909 else
7910 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007911 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007916rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007918 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921done
Victor Stinnere0be4232011-10-25 13:06:09 +02007922if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924else
7925 ac_cv_search_opendir=no
7926fi
7927rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007928LIBS=$ac_func_search_save_LIBS
7929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7931$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007933if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007935
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
Michael W. Hudson54241132001-12-07 15:38:26 +00007938else
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7940$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007941if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007943else
7944 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948/* Override any GCC internal prototype to avoid an error.
7949 Use char because int might match the return type of a GCC
7950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007951#ifdef __cplusplus
7952extern "C"
7953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007954char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007955int
7956main ()
7957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ;
7960 return 0;
7961}
7962_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963for ac_lib in '' x; do
7964 if test -z "$ac_lib"; then
7965 ac_res="none required"
7966 else
7967 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007968 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007973rm -f core conftest.err conftest.$ac_objext \
7974 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007975 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978done
Victor Stinnere0be4232011-10-25 13:06:09 +02007979if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981else
7982 ac_cv_search_opendir=no
7983fi
7984rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007985LIBS=$ac_func_search_save_LIBS
7986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7988$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007990if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007992
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007993fi
7994
7995fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007996
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7998$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007999if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008003/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008004#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008005int
8006main ()
8007{
8008return makedev(0, 0);
8009 ;
8010 return 0;
8011}
8012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008014 ac_cv_header_sys_types_h_makedev=yes
8015else
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008018rm -f core conftest.err conftest.$ac_objext \
8019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008020
8021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8023$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008024
8025if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008026ac_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 +02008027if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008030
8031fi
8032
8033
8034
8035 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 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 +02008037if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008040
8041fi
8042
8043
8044 fi
8045fi
8046
Michael W. Hudson54241132001-12-07 15:38:26 +00008047
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008048# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8049# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8050SAVE_CFLAGS=$CFLAGS
8051CFLAGS="-std=c99 $CFLAGS"
8052for ac_header in bluetooth/bluetooth.h
8053do :
8054 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8055if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8056 cat >>confdefs.h <<_ACEOF
8057#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8058_ACEOF
8059
8060fi
8061
8062done
8063
8064CFLAGS=$SAVE_CFLAGS
8065
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008066# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8067for ac_header in net/if.h
8068do :
8069 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8070#ifdef STDC_HEADERS
8071# include <stdlib.h>
8072# include <stddef.h>
8073#else
8074# ifdef HAVE_STDLIB_H
8075# include <stdlib.h>
8076# endif
8077#endif
8078#ifdef HAVE_SYS_SOCKET_H
8079# include <sys/socket.h>
8080#endif
8081
8082"
Victor Stinnere0be4232011-10-25 13:06:09 +02008083if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008084 cat >>confdefs.h <<_ACEOF
8085#define HAVE_NET_IF_H 1
8086_ACEOF
8087
8088fi
8089
8090done
8091
8092
Martin v. Löwis11017b12006-01-14 18:12:57 +00008093# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008094for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008095do :
8096 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 +00008097#ifdef HAVE_ASM_TYPES_H
8098#include <asm/types.h>
8099#endif
8100#ifdef HAVE_SYS_SOCKET_H
8101#include <sys/socket.h>
8102#endif
8103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104"
Victor Stinnere0be4232011-10-25 13:06:09 +02008105if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008106 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008107#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008108_ACEOF
8109
8110fi
8111
8112done
8113
8114
Charles-François Natali47413c12011-10-06 19:47:44 +02008115# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008116for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008117do :
8118 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8119ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8120#ifdef HAVE_SYS_SOCKET_H
8121#include <sys/socket.h>
8122#endif
8123
8124"
8125if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8126 cat >>confdefs.h <<_ACEOF
8127#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8128_ACEOF
8129
8130fi
8131
8132done
8133
8134
Guido van Rossum627b2d71993-12-24 10:39:16 +00008135# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008136was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8138$as_echo_n "checking for clock_t in time.h... " >&6; }
8139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008140/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008141#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008142
8143_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008146 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008147else
Martin v. Löwis11437992002-04-12 09:54:03 +00008148
8149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008151
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008152
Guido van Rossum627b2d71993-12-24 10:39:16 +00008153fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008154rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008155
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8157$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8160$as_echo_n "checking for makedev... " >&6; }
8161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008162/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008163
Jesus Cea740f53a2010-04-28 11:35:30 +00008164#if defined(MAJOR_IN_MKDEV)
8165#include <sys/mkdev.h>
8166#elif defined(MAJOR_IN_SYSMACROS)
8167#include <sys/sysmacros.h>
8168#else
8169#include <sys/types.h>
8170#endif
8171
Neal Norwitz11690112002-07-30 01:08:28 +00008172int
8173main ()
8174{
Jesus Cea740f53a2010-04-28 11:35:30 +00008175
8176 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008177 ;
8178 return 0;
8179}
Matthias Kloseb159a552010-04-25 21:00:44 +00008180
Neal Norwitz11690112002-07-30 01:08:28 +00008181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008182if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008183 ac_cv_has_makedev=yes
8184else
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008187rm -f core conftest.err conftest.$ac_objext \
8188 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8190$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008191if test "$ac_cv_has_makedev" = "yes"; then
8192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008194
8195fi
8196
Christian Heimes985ecdc2013-11-20 11:46:18 +01008197# byte swapping
8198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8199$as_echo_n "checking for le64toh... " >&6; }
8200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8201/* end confdefs.h. */
8202
8203#ifdef HAVE_ENDIAN_H
8204#include <endian.h>
8205#elif defined(HAVE_SYS_ENDIAN_H)
8206#include <sys/endian.h>
8207#endif
8208
8209int
8210main ()
8211{
8212
8213 le64toh(1)
8214 ;
8215 return 0;
8216}
8217
8218_ACEOF
8219if ac_fn_c_try_link "$LINENO"; then :
8220 ac_cv_has_le64toh=yes
8221else
8222 ac_cv_has_le64toh=no
8223fi
8224rm -f core conftest.err conftest.$ac_objext \
8225 conftest$ac_exeext conftest.$ac_ext
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8227$as_echo "$ac_cv_has_le64toh" >&6; }
8228if test "$ac_cv_has_le64toh" = "yes"; then
8229
8230$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8231
8232fi
8233
Martin v. Löwis399a6892002-10-04 10:22:02 +00008234# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8235# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8236# defined, but the compiler does not support pragma redefine_extname,
8237# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8238# structures (such as rlimit64) without declaring them. As a
8239# work-around, disable LFS on such configurations
8240
8241use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8243$as_echo_n "checking Solaris LFS bug... " >&6; }
8244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008245/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008246
8247#define _LARGEFILE_SOURCE 1
8248#define _FILE_OFFSET_BITS 64
8249#include <sys/resource.h>
8250
Martin v. Löwis399a6892002-10-04 10:22:02 +00008251int
8252main ()
8253{
8254struct rlimit foo;
8255 ;
8256 return 0;
8257}
8258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008259if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008260 sol_lfs_bug=no
8261else
Matthias Kloseb9621712010-04-24 17:59:49 +00008262 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8266$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008267if test "$sol_lfs_bug" = "yes"; then
8268 use_lfs=no
8269fi
8270
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008271# Don't use largefile support for GNU/Hurd
8272case $ac_sys_system in GNU*)
8273 use_lfs=no
8274esac
8275
Martin v. Löwis399a6892002-10-04 10:22:02 +00008276if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008277# Two defines needed to enable largefile support on various platforms
8278# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008279case $ac_sys_system/$ac_sys_release in
8280AIX*)
8281
8282$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8283
8284 ;;
8285esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008286
Matthias Kloseb9621712010-04-24 17:59:49 +00008287$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
8289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008291
Martin v. Löwis399a6892002-10-04 10:22:02 +00008292fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008293
Guido van Rossum84e7b241996-08-19 21:59:00 +00008294# Add some code to confdefs.h so that the test for off_t works on SCO
8295cat >> confdefs.h <<\EOF
8296#if defined(SCO_DS)
8297#undef _OFF_T
8298#endif
8299EOF
8300
Guido van Rossumef2255b2000-03-10 22:30:29 +00008301# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008302ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008303if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008304
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008305else
Martin v. Löwis11437992002-04-12 09:54:03 +00008306
8307cat >>confdefs.h <<_ACEOF
8308#define mode_t int
8309_ACEOF
8310
8311fi
8312
Matthias Kloseb9621712010-04-24 17:59:49 +00008313ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008314if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008315
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008316else
Martin v. Löwis11437992002-04-12 09:54:03 +00008317
8318cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008319#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008320_ACEOF
8321
8322fi
8323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008325if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008327else
Martin v. Löwis11437992002-04-12 09:54:03 +00008328
8329cat >>confdefs.h <<_ACEOF
8330#define pid_t int
8331_ACEOF
8332
8333fi
8334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008335
Martin v. Löwis11437992002-04-12 09:54:03 +00008336cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008337#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008338_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008341if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008342
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008343else
Martin v. Löwis11437992002-04-12 09:54:03 +00008344
8345cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008347_ACEOF
8348
8349fi
8350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8352$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008353if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008355else
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008357/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008358#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
8360_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008363 ac_cv_type_uid_t=yes
8364else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008365 ac_cv_type_uid_t=no
8366fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008367rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008368
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8371$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008372if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008375
8376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008378
8379fi
8380
Mark Dickinson983bc162012-12-02 12:11:38 +00008381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008383if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008386
8387fi
8388
Stefan Krah1919b7e2012-03-21 18:25:23 +01008389ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8390if test "x$ac_cv_type___uint128_t" = xyes; then :
8391
8392$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8393
8394fi
8395
Jack Jansendd19cf82001-12-06 22:36:17 +00008396
Michael W. Hudson54241132001-12-07 15:38:26 +00008397# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008398# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399# The cast to long int works around a bug in the HP C Compiler
8400# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8401# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8402# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8404$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008405if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008407else
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 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 +00008409
Martin v. Löwis11437992002-04-12 09:54:03 +00008410else
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 if test "$ac_cv_type_int" = yes; then
8412 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008414as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008415See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416 else
8417 ac_cv_sizeof_int=0
8418 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8423$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424
8425
8426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008428#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008429_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008430
8431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008432# The cast to long int works around a bug in the HP C Compiler
8433# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8434# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8435# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8437$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008438if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008440else
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 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 +00008442
Martin v. Löwis11437992002-04-12 09:54:03 +00008443else
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 if test "$ac_cv_type_long" = yes; then
8445 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8446$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008447as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008448See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449 else
8450 ac_cv_sizeof_long=0
8451 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008453
Martin v. Löwis11437992002-04-12 09:54:03 +00008454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8456$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457
8458
8459
Martin v. Löwis11437992002-04-12 09:54:03 +00008460cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008461#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008462_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008463
8464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465# The cast to long int works around a bug in the HP C Compiler
8466# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8467# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8468# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8470$as_echo_n "checking size of long long... " >&6; }
8471if ${ac_cv_sizeof_long_long+:} false; then :
8472 $as_echo_n "(cached) " >&6
8473else
8474 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8475
8476else
8477 if test "$ac_cv_type_long_long" = yes; then
8478 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8480as_fn_error 77 "cannot compute sizeof (long long)
8481See \`config.log' for more details" "$LINENO" 5; }
8482 else
8483 ac_cv_sizeof_long_long=0
8484 fi
8485fi
8486
8487fi
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8489$as_echo "$ac_cv_sizeof_long_long" >&6; }
8490
8491
8492
8493cat >>confdefs.h <<_ACEOF
8494#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8495_ACEOF
8496
8497
8498# The cast to long int works around a bug in the HP C Compiler
8499# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8500# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8501# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8503$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008504if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008506else
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 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 +00008508
Martin v. Löwis11437992002-04-12 09:54:03 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 if test "$ac_cv_type_void_p" = yes; then
8511 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8512$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008513as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008514See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515 else
8516 ac_cv_sizeof_void_p=0
8517 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8522$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523
8524
8525
Martin v. Löwis11437992002-04-12 09:54:03 +00008526cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008527#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008528_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008529
8530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531# The cast to long int works around a bug in the HP C Compiler
8532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8534# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8536$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008537if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008539else
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 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 +00008541
Martin v. Löwis11437992002-04-12 09:54:03 +00008542else
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 if test "$ac_cv_type_short" = yes; then
8544 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008546as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008547See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548 else
8549 ac_cv_sizeof_short=0
8550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8555$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556
8557
8558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008560#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008561_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008562
8563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564# The cast to long int works around a bug in the HP C Compiler
8565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8567# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8569$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008570if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008572else
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 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 +00008574
Martin v. Löwis11437992002-04-12 09:54:03 +00008575else
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 if test "$ac_cv_type_float" = yes; then
8577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008579as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008580See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581 else
8582 ac_cv_sizeof_float=0
8583 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008585
Martin v. Löwis11437992002-04-12 09:54:03 +00008586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8588$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589
8590
8591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008593#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008594_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008595
8596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597# The cast to long int works around a bug in the HP C Compiler
8598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8600# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8602$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008603if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008605else
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 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 +00008607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 if test "$ac_cv_type_double" = yes; then
8610 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008612as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008613See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614 else
8615 ac_cv_sizeof_double=0
8616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8621$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622
8623
8624
Martin v. Löwis11437992002-04-12 09:54:03 +00008625cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008626#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008627_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008628
8629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008630# The cast to long int works around a bug in the HP C Compiler
8631# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8632# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8633# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8635$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008636if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008638else
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 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 +00008640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 if test "$ac_cv_type_fpos_t" = yes; then
8643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008645as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008646See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647 else
8648 ac_cv_sizeof_fpos_t=0
8649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8654$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655
8656
8657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008659#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008660_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008661
Michael W. Hudson54241132001-12-07 15:38:26 +00008662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663# The cast to long int works around a bug in the HP C Compiler
8664# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8665# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8666# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8668$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008669if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008671else
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 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 +00008673
Martin v. Löwis18e16552006-02-15 17:27:45 +00008674else
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 if test "$ac_cv_type_size_t" = yes; then
8676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008678as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008679See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680 else
8681 ac_cv_sizeof_size_t=0
8682 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684
Martin v. Löwis18e16552006-02-15 17:27:45 +00008685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8687$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688
8689
8690
Martin v. Löwis18e16552006-02-15 17:27:45 +00008691cat >>confdefs.h <<_ACEOF
8692#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8693_ACEOF
8694
8695
Christian Heimes400adb02008-02-01 08:12:03 +00008696# The cast to long int works around a bug in the HP C Compiler
8697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8699# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8701$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008702if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008704else
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 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 +00008706
Christian Heimes400adb02008-02-01 08:12:03 +00008707else
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 if test "$ac_cv_type_pid_t" = yes; then
8709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008711as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008712See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008713 else
8714 ac_cv_sizeof_pid_t=0
8715 fi
8716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008717
Christian Heimes400adb02008-02-01 08:12:03 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8720$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008721
8722
8723
8724cat >>confdefs.h <<_ACEOF
8725#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8726_ACEOF
8727
8728
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008729# The cast to long int works around a bug in the HP C Compiler
8730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8732# This bug is HP SR number 8606223364.
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8734$as_echo_n "checking size of uintptr_t... " >&6; }
8735if ${ac_cv_sizeof_uintptr_t+:} false; then :
8736 $as_echo_n "(cached) " >&6
8737else
8738 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8739
8740else
8741 if test "$ac_cv_type_uintptr_t" = yes; then
8742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8744as_fn_error 77 "cannot compute sizeof (uintptr_t)
8745See \`config.log' for more details" "$LINENO" 5; }
8746 else
8747 ac_cv_sizeof_uintptr_t=0
8748 fi
8749fi
8750
8751fi
8752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8753$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8754
8755
8756
8757cat >>confdefs.h <<_ACEOF
8758#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8759_ACEOF
8760
8761
Michael W. Hudson54241132001-12-07 15:38:26 +00008762
Matthias Kloseb9621712010-04-24 17:59:49 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8764$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008765have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008767/* end confdefs.h. */
8768
8769int
8770main ()
8771{
8772long double x; x = (long double)0;
8773 ;
8774 return 0;
8775}
8776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008777if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008778
8779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008781
8782 have_long_double=yes
8783
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008784fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8787$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008788if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008789# The cast to long int works around a bug in the HP C Compiler
8790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8792# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8794$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008795if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008797else
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 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 +00008799
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008800else
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 if test "$ac_cv_type_long_double" = yes; then
8802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008804as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008805See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008806 else
8807 ac_cv_sizeof_long_double=0
8808 fi
8809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008810
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8813$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008814
8815
8816
8817cat >>confdefs.h <<_ACEOF
8818#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8819_ACEOF
8820
8821
8822fi
8823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824# The cast to long int works around a bug in the HP C Compiler
8825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8827# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8829$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008830if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008831 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008832else
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 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 +00008834
Thomas Woutersb2137042007-02-01 18:02:27 +00008835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 if test "$ac_cv_type__Bool" = yes; then
8837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008839as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008840See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841 else
8842 ac_cv_sizeof__Bool=0
8843 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845
Thomas Woutersb2137042007-02-01 18:02:27 +00008846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8848$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849
8850
8851
Thomas Woutersb2137042007-02-01 18:02:27 +00008852cat >>confdefs.h <<_ACEOF
8853#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8854_ACEOF
8855
8856
Thomas Woutersb2137042007-02-01 18:02:27 +00008857
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858# The cast to long int works around a bug in the HP C Compiler
8859# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8860# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8861# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8863$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008864if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008866else
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008868#ifdef HAVE_SYS_TYPES_H
8869#include <sys/types.h>
8870#endif
8871
Matthias Kloseb9621712010-04-24 17:59:49 +00008872"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008874else
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 if test "$ac_cv_type_off_t" = yes; then
8876 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008878as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008879See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880 else
8881 ac_cv_sizeof_off_t=0
8882 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008884
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8887$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889
8890
Martin v. Löwis11437992002-04-12 09:54:03 +00008891cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008892#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008893_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008894
Michael W. Hudson54241132001-12-07 15:38:26 +00008895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008896
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8898$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008899if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008900 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008901
Matthias Kloseb9621712010-04-24 17:59:49 +00008902$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8905$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008906else
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8908$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008909fi
8910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911# The cast to long int works around a bug in the HP C Compiler
8912# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8913# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8914# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8916$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008917if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008919else
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008921#ifdef HAVE_SYS_TYPES_H
8922#include <sys/types.h>
8923#endif
8924#ifdef HAVE_TIME_H
8925#include <time.h>
8926#endif
8927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008929
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008930else
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 if test "$ac_cv_type_time_t" = yes; then
8932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008934as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008935See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008936 else
8937 ac_cv_sizeof_time_t=0
8938 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008940
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8943$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008944
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008945
8946
Martin v. Löwis11437992002-04-12 09:54:03 +00008947cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008948#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008950
Michael W. Hudson54241132001-12-07 15:38:26 +00008951
8952
Trent Mick635f6fb2000-08-23 21:33:05 +00008953# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008954ac_save_cc="$CC"
8955if test "$ac_cv_kpthread" = "yes"
8956then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008957elif test "$ac_cv_kthread" = "yes"
8958then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008959elif test "$ac_cv_pthread" = "yes"
8960then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008961fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8964$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008965have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008967/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008968
8969 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008970int
8971main ()
8972{
Guido van Rossum12580492000-09-24 16:47:19 +00008973pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 ;
8975 return 0;
8976}
Matthias Kloseb159a552010-04-25 21:00:44 +00008977
Martin v. Löwis11437992002-04-12 09:54:03 +00008978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008979if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008980 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8984$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008985if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8989# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8991$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008992if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008994else
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008996#ifdef HAVE_PTHREAD_H
8997#include <pthread.h>
8998#endif
8999
Matthias Kloseb9621712010-04-24 17:59:49 +00009000"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002else
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 if test "$ac_cv_type_pthread_t" = yes; then
9004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009006as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009007See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009008 else
9009 ac_cv_sizeof_pthread_t=0
9010 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009012
Trent Mick635f6fb2000-08-23 21:33:05 +00009013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9015$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017
9018
Martin v. Löwis11437992002-04-12 09:54:03 +00009019cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009020#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009022
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023
Trent Mick635f6fb2000-08-23 21:33:05 +00009024fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009025CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009026
Michael W. Hudson54241132001-12-07 15:38:26 +00009027
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009028case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009029 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009030 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9031 ;;
9032 Darwin/*)
9033 OTHER_LIBTOOL_OPT=""
9034 ;;
9035esac
9036
9037
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009039case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009040 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009041 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9042 if test "${enable_universalsdk}"; then
9043 :
9044 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009045 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009046 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009047 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009048 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009049 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009050 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009051 if test ${gcc_version} '<' 4.0
9052 then
9053 LIBTOOL_CRUFT="-lcc_dynamic"
9054 else
9055 LIBTOOL_CRUFT=""
9056 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009058 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009059else
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009061/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009062
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009063 #include <unistd.h>
9064 int main(int argc, char*argv[])
9065 {
9066 if (sizeof(long) == 4) {
9067 return 0;
9068 } else {
9069 return 1;
9070 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009071 }
9072
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009074if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009075 ac_osx_32bit=yes
9076else
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009081fi
9082
9083
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009084 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009085 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009086 i386)
9087 MACOSX_DEFAULT_ARCH="i386"
9088 ;;
9089 ppc)
9090 MACOSX_DEFAULT_ARCH="ppc"
9091 ;;
9092 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009093 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009094 ;;
9095 esac
9096 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009097 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009098 i386)
9099 MACOSX_DEFAULT_ARCH="x86_64"
9100 ;;
9101 ppc)
9102 MACOSX_DEFAULT_ARCH="ppc64"
9103 ;;
9104 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009105 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009106 ;;
9107 esac
9108
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009109 fi
9110
9111 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009112 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009113 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009114esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9116$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009117if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009118then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009119 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009120 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009121 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9126$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009127 if test $enable_shared = "yes"
9128 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009129 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 +00009130 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009131else
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009134fi
9135
Matthias Kloseb9621712010-04-24 17:59:49 +00009136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9137$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009138case $ac_sys_system/$ac_sys_release in
9139 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009140
Matthias Kloseb9621712010-04-24 17:59:49 +00009141$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9144$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009145 ;;
9146 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9148$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009149 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009150esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009151
Guido van Rossum0a516c91994-09-12 10:58:40 +00009152# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009153
Michael W. Hudson54241132001-12-07 15:38:26 +00009154
9155
9156
9157
Benjamin Peterson99f03762010-04-11 22:15:28 +00009158
Thomas Wouters477c8d52006-05-27 19:21:47 +00009159
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009160# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9161# -- usually .so, .sl on HP-UX, .dll on Cygwin
9162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9163$as_echo_n "checking the extension of shared libraries... " >&6; }
9164if test -z "$SHLIB_SUFFIX"; then
9165 case $ac_sys_system in
9166 hp*|HP*)
9167 case `uname -m` in
9168 ia64) SHLIB_SUFFIX=.so;;
9169 *) SHLIB_SUFFIX=.sl;;
9170 esac
9171 ;;
9172 CYGWIN*) SHLIB_SUFFIX=.dll;;
9173 *) SHLIB_SUFFIX=.so;;
9174 esac
9175fi
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9177$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009178
Guido van Rossum0a516c91994-09-12 10:58:40 +00009179# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009180# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009181# (Shared libraries in this instance are shared modules to be loaded into
9182# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9184$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009185if test -z "$LDSHARED"
9186then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009187 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009188 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009189 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009190 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009191 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009192 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009193 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009195 if test "$GCC" = "yes" ; then
9196 LDSHARED='$(CC) -shared'
9197 LDCXXSHARED='$(CXX) -shared'
9198 else
9199 LDSHARED='$(CC) -G'
9200 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009201 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009202 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009203 if test "$GCC" = "yes" ; then
9204 LDSHARED='$(CC) -shared'
9205 LDCXXSHARED='$(CXX) -shared'
9206 else
9207 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009208 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009209 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009210 LDSHARED='$(CC) -bundle'
9211 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009212 if test "$enable_framework" ; then
9213 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009214 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9215 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009216 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009217 else
9218 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009219 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009220 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009221 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009222 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009223 LDSHARED='$(CC) -bundle'
9224 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009225 if test "$enable_framework" ; then
9226 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009227 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9228 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009229 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009230 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009231 # No framework, use the Python app as bundle-loader
9232 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009233 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009234 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009235 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009236 Darwin/*)
9237 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9238 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009239
Ned Deily36820b62014-06-25 13:44:22 -07009240 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9241 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9242 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9243 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9244 if test ${dep_target_major} -eq 10 && \
9245 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009246 then
Ned Deily36820b62014-06-25 13:44:22 -07009247 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009248 LDSHARED='$(CC) -bundle'
9249 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009250 if test "$enable_framework" ; then
9251 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009252 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9253 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009254 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009255 else
9256 # No framework, use the Python app as bundle-loader
9257 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9258 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009259 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009260 fi
Ned Deily36820b62014-06-25 13:44:22 -07009261 else
9262 # building for OS X 10.3 and later
9263 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9264 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9265 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009266 fi
9267 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009268 Linux*|GNU*|QNX*)
9269 LDSHARED='$(CC) -shared'
9270 LDCXXSHARED='$(CXX) -shared';;
9271 BSD/OS*/4*)
9272 LDSHARED="gcc -shared"
9273 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009274 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009275 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009276 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009277 LDSHARED='$(CC) -shared'
9278 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009279 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009280 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009281 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009282 OpenBSD*)
9283 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9284 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009285 LDSHARED='$(CC) -shared $(CCSHARED)'
9286 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009287 else
9288 case `uname -r` in
9289 [01].* | 2.[0-7] | 2.[0-7].*)
9290 LDSHARED="ld -Bshareable ${LDFLAGS}"
9291 ;;
9292 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009293 LDSHARED='$(CC) -shared $(CCSHARED)'
9294 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009295 ;;
9296 esac
9297 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009298 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009299 LDSHARED='$(CC) -shared'
9300 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009301 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009302 if test "$GCC" = "yes" ; then
9303 LDSHARED='$(CC) -shared'
9304 LDCXXSHARED='$(CXX) -shared'
9305 else
9306 LDSHARED='$(CC) -G'
9307 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009308 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009309 SCO_SV*)
9310 LDSHARED='$(CC) -Wl,-G,-Bexport'
9311 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9312 CYGWIN*)
9313 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9314 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009315 *) LDSHARED="ld";;
9316 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9319$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009320LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009321BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009322# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009323# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9325$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326if test -z "$CCSHARED"
9327then
Guido van Rossum07397971997-04-29 21:49:50 +00009328 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009329 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009330 then CCSHARED="-fPIC";
9331 elif test `uname -p` = sparc;
9332 then CCSHARED="-xcode=pic32";
9333 else CCSHARED="-Kpic";
9334 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009335 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009336 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009337 else CCSHARED="+z";
9338 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009339 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009340 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009341 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009342 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009343 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009344 if test "$GCC" = "yes"
9345 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009346 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009347 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009348 SCO_SV*)
9349 if test "$GCC" = "yes"
9350 then CCSHARED="-fPIC"
9351 else CCSHARED="-Kpic -belf"
9352 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009353 IRIX*/6*) case $CC in
9354 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009355 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009356 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009357 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9360$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009361# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009362# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9364$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009365if test -z "$LINKFORSHARED"
9366then
Guido van Rossum07397971997-04-29 21:49:50 +00009367 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009368 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009369 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009370 LINKFORSHARED="-Wl,-E -Wl,+s";;
9371# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009372 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009373 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009374 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009375 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009377 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009378
9379 # Issue #18075: the default maximum stack size (8MBytes) is too
9380 # small for the default recursion limit. Increase the stack size
9381 # to ensure that tests don't crash
9382 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9383
Jack Jansene578a632001-08-15 01:27:14 +00009384 if test "$enable_framework"
9385 then
Jack Jansenda49e192005-01-07 13:08:22 +00009386 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009387 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009388 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009389 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009390 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009391 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009392 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009393 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9394 then
9395 LINKFORSHARED="-Wl,--export-dynamic"
9396 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009397 SunOS/5*) case $CC in
9398 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009399 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009400 then
9401 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009402 fi;;
9403 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009404 CYGWIN*)
9405 if test $enable_shared = "no"
9406 then
9407 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9408 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009409 QNX*)
9410 # -Wl,-E causes the symbols to be added to the dynamic
9411 # symbol table so that they can be found when a module
9412 # is loaded. -N 2048K causes the stack size to be set
9413 # to 2048 kilobytes so that the stack doesn't overflow
9414 # when running test_compile.py.
9415 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009416 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9419$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009420
Michael W. Hudson54241132001-12-07 15:38:26 +00009421
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009422
Matthias Kloseb9621712010-04-24 17:59:49 +00009423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9424$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009425if test ! "$LIBRARY" = "$LDLIBRARY"
9426then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009427 case $ac_sys_system in
9428 CYGWIN*)
9429 # Cygwin needs CCSHARED when building extension DLLs
9430 # but not when building the interpreter DLL.
9431 CFLAGSFORSHARED='';;
9432 *)
9433 CFLAGSFORSHARED='$(CCSHARED)'
9434 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9437$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009438
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009439# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9440# library (with --enable-shared).
9441# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009442# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9443# if it is not required, since it creates a dependency of the shared library
9444# to LIBS. This, in turn, means that applications linking the shared libpython
9445# don't need to link LIBS explicitly. The default should be only changed
9446# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009447
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9449$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009450case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009451 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009452 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009453esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9455$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009456
9457
Guido van Rossum627b2d71993-12-24 10:39:16 +00009458# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9460$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009461if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009462 $as_echo_n "(cached) " >&6
9463else
9464 ac_check_lib_save_LIBS=$LIBS
9465LIBS="-lsendfile $LIBS"
9466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9467/* end confdefs.h. */
9468
9469/* Override any GCC internal prototype to avoid an error.
9470 Use char because int might match the return type of a GCC
9471 builtin and then its argument prototype would still apply. */
9472#ifdef __cplusplus
9473extern "C"
9474#endif
9475char sendfile ();
9476int
9477main ()
9478{
9479return sendfile ();
9480 ;
9481 return 0;
9482}
9483_ACEOF
9484if ac_fn_c_try_link "$LINENO"; then :
9485 ac_cv_lib_sendfile_sendfile=yes
9486else
9487 ac_cv_lib_sendfile_sendfile=no
9488fi
9489rm -f core conftest.err conftest.$ac_objext \
9490 conftest$ac_exeext conftest.$ac_ext
9491LIBS=$ac_check_lib_save_LIBS
9492fi
9493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9494$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009496 cat >>confdefs.h <<_ACEOF
9497#define HAVE_LIBSENDFILE 1
9498_ACEOF
9499
9500 LIBS="-lsendfile $LIBS"
9501
9502fi
9503
Matthias Kloseb9621712010-04-24 17:59:49 +00009504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9505$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009506if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009507 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508else
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009510LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514/* Override any GCC internal prototype to avoid an error.
9515 Use char because int might match the return type of a GCC
9516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009517#ifdef __cplusplus
9518extern "C"
9519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009520char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009521int
9522main ()
9523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009524return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ;
9526 return 0;
9527}
9528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009531else
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009534rm -f core conftest.err conftest.$ac_objext \
9535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009536LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9539$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009540if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 cat >>confdefs.h <<_ACEOF
9542#define HAVE_LIBDL 1
9543_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009544
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009545 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009547fi
9548 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9550$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009551if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009553else
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009555LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559/* Override any GCC internal prototype to avoid an error.
9560 Use char because int might match the return type of a GCC
9561 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009562#ifdef __cplusplus
9563extern "C"
9564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009565char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009566int
9567main ()
9568{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 ;
9571 return 0;
9572}
9573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009574if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009576else
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009579rm -f core conftest.err conftest.$ac_objext \
9580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009581LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9584$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009585if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 cat >>confdefs.h <<_ACEOF
9587#define HAVE_LIBDLD 1
9588_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009589
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009590 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009591
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009592fi
9593 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009594
Georg Brandlb1441c72009-01-03 22:33:39 +00009595# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009596if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9598$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009599if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009601else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009602 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606/* Override any GCC internal prototype to avoid an error.
9607 Use char because int might match the return type of a GCC
9608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009609#ifdef __cplusplus
9610extern "C"
9611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009612char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009613int
9614main ()
9615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ;
9618 return 0;
9619}
9620_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621for ac_lib in '' pthread rt posix4; do
9622 if test -z "$ac_lib"; then
9623 ac_res="none required"
9624 else
9625 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009626 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009631rm -f core conftest.err conftest.$ac_objext \
9632 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009633 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636done
Victor Stinnere0be4232011-10-25 13:06:09 +02009637if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639else
9640 ac_cv_search_sem_init=no
9641fi
9642rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009643LIBS=$ac_func_search_save_LIBS
9644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9646$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009650
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009651fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009652 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009653 # posix4 on Solaris 2.6
9654 # pthread (first!) on Linux
9655fi
9656
Martin v. Löwis19d17342003-06-14 21:03:05 +00009657# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9659$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009660if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009661 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009662else
9663 ac_check_lib_save_LIBS=$LIBS
9664LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009666/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668/* Override any GCC internal prototype to avoid an error.
9669 Use char because int might match the return type of a GCC
9670 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009671#ifdef __cplusplus
9672extern "C"
9673#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009674char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009675int
9676main ()
9677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009679 ;
9680 return 0;
9681}
9682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009684 ac_cv_lib_intl_textdomain=yes
9685else
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688rm -f core conftest.err conftest.$ac_objext \
9689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009690LIBS=$ac_check_lib_save_LIBS
9691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9693$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009694if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009695
Matthias Kloseb9621712010-04-24 17:59:49 +00009696$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009697
Brett Cannonc6d936e2009-06-07 20:09:53 +00009698 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009699fi
9700
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009701
9702# checks for system dependent C++ extensions support
9703case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009704 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9705$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009707/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009708
Georg Brandl59e87bd2011-02-15 19:48:59 +00009709 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009710int
9711main ()
9712{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009713loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 ;
9715 return 0;
9716}
Matthias Kloseb159a552010-04-25 21:00:44 +00009717
Martin v. Löwis11437992002-04-12 09:54:03 +00009718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009719if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009720
Matthias Kloseb159a552010-04-25 21:00:44 +00009721
Matthias Kloseb9621712010-04-24 17:59:49 +00009722$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009723
Matthias Kloseb159a552010-04-25 21:00:44 +00009724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009725$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009726
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009727else
Matthias Kloseb159a552010-04-25 21:00:44 +00009728
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009730$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009731
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009733rm -f core conftest.err conftest.$ac_objext \
9734 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009735 *) ;;
9736esac
9737
Christian Heimes985ecdc2013-11-20 11:46:18 +01009738# check for systems that require aligned memory access
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9740$as_echo_n "checking aligned memory access is required... " >&6; }
9741if test "$cross_compiling" = yes; then :
9742 aligned_required=yes
9743else
9744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9745/* end confdefs.h. */
9746
9747int main()
9748{
9749 char s[16];
9750 int i, *p1, *p2;
9751 for (i=0; i < 16; i++)
9752 s[i] = i;
9753 p1 = (int*)(s+1);
9754 p2 = (int*)(s+2);
9755 if (*p1 == *p2)
9756 return 1;
9757 return 0;
9758}
9759
9760_ACEOF
9761if ac_fn_c_try_run "$LINENO"; then :
9762 aligned_required=no
9763else
9764 aligned_required=yes
9765fi
9766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9767 conftest.$ac_objext conftest.beam conftest.$ac_ext
9768fi
9769
9770
9771if test "$aligned_required" = yes ; then
9772
9773$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9774
9775fi
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9777$as_echo "$aligned_required" >&6; }
9778
9779
9780# str, bytes and memoryview hash algorithm
9781
9782
9783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9784$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9785
9786# Check whether --with-hash_algorithm was given.
9787if test "${with_hash_algorithm+set}" = set; then :
9788 withval=$with_hash_algorithm;
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9790$as_echo "$withval" >&6; }
9791case "$withval" in
9792 siphash24)
9793 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9794
9795 ;;
9796 fnv)
9797 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9798
9799 ;;
9800 *)
9801 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9802 ;;
9803esac
9804
9805else
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9807$as_echo "default" >&6; }
9808fi
9809
9810
Charles-François Natalid30b0222014-05-08 23:08:51 +01009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9812$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9813
9814# Check whether --with-address_sanitizer was given.
9815if test "${with_address_sanitizer+set}" = set; then :
9816 withval=$with_address_sanitizer;
9817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9818$as_echo "$withval" >&6; }
9819BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9820LDFLAGS="-fsanitize=address $LDFLAGS"
9821
9822else
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9824$as_echo "no" >&6; }
9825fi
9826
9827
Guido van Rossum70c7f481998-03-26 18:44:10 +00009828# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9830$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009831if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009833else
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009835LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839/* Override any GCC internal prototype to avoid an error.
9840 Use char because int might match the return type of a GCC
9841 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009842#ifdef __cplusplus
9843extern "C"
9844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009845char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009846int
9847main ()
9848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ;
9851 return 0;
9852}
9853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009854if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009856else
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859rm -f core conftest.err conftest.$ac_objext \
9860 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009861LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9864$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009865if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009866 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009867fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009868 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9870$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009871if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009873else
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009875LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879/* Override any GCC internal prototype to avoid an error.
9880 Use char because int might match the return type of a GCC
9881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882#ifdef __cplusplus
9883extern "C"
9884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009885char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899rm -f core conftest.err conftest.$ac_objext \
9900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009901LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9904$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009905if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009906 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009907fi
9908 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9911$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009914if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9917$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009918LIBS="$withval $LIBS"
9919
9920else
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923fi
9924
Guido van Rossum7f43da71994-08-01 12:15:30 +00009925
Victor Stinner8291b5e2015-03-20 16:03:14 +01009926
9927
9928
9929
9930
9931
9932
9933if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9934 if test -n "$ac_tool_prefix"; then
9935 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9936set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9938$as_echo_n "checking for $ac_word... " >&6; }
9939if ${ac_cv_path_PKG_CONFIG+:} false; then :
9940 $as_echo_n "(cached) " >&6
9941else
9942 case $PKG_CONFIG in
9943 [\\/]* | ?:[\\/]*)
9944 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9945 ;;
9946 *)
9947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9948for as_dir in $PATH
9949do
9950 IFS=$as_save_IFS
9951 test -z "$as_dir" && as_dir=.
9952 for ac_exec_ext in '' $ac_executable_extensions; do
9953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9954 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9956 break 2
9957 fi
9958done
9959 done
9960IFS=$as_save_IFS
9961
9962 ;;
9963esac
9964fi
9965PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9966if test -n "$PKG_CONFIG"; then
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9968$as_echo "$PKG_CONFIG" >&6; }
9969else
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971$as_echo "no" >&6; }
9972fi
9973
9974
9975fi
9976if test -z "$ac_cv_path_PKG_CONFIG"; then
9977 ac_pt_PKG_CONFIG=$PKG_CONFIG
9978 # Extract the first word of "pkg-config", so it can be a program name with args.
9979set dummy pkg-config; ac_word=$2
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9981$as_echo_n "checking for $ac_word... " >&6; }
9982if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9983 $as_echo_n "(cached) " >&6
9984else
9985 case $ac_pt_PKG_CONFIG in
9986 [\\/]* | ?:[\\/]*)
9987 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9988 ;;
9989 *)
9990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991for as_dir in $PATH
9992do
9993 IFS=$as_save_IFS
9994 test -z "$as_dir" && as_dir=.
9995 for ac_exec_ext in '' $ac_executable_extensions; do
9996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9997 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9999 break 2
10000 fi
10001done
10002 done
10003IFS=$as_save_IFS
10004
10005 ;;
10006esac
10007fi
10008ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10009if test -n "$ac_pt_PKG_CONFIG"; then
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10011$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10012else
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
10015fi
10016
10017 if test "x$ac_pt_PKG_CONFIG" = x; then
10018 PKG_CONFIG=""
10019 else
10020 case $cross_compiling:$ac_tool_warned in
10021yes:)
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10024ac_tool_warned=yes ;;
10025esac
10026 PKG_CONFIG=$ac_pt_PKG_CONFIG
10027 fi
10028else
10029 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10030fi
10031
10032fi
10033if test -n "$PKG_CONFIG"; then
10034 _pkg_min_version=0.9.0
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10036$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10037 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10039$as_echo "yes" >&6; }
10040 else
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043 PKG_CONFIG=""
10044 fi
10045fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010046
10047# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10049$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010050
10051# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010053 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010054else
10055 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056fi
10057
10058
Matthias Kloseb9621712010-04-24 17:59:49 +000010059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10060$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010061
10062# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10064$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010065
10066# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010068 withval=$with_system_ffi;
10069fi
10070
10071
Zachary Waref40d4dd2016-09-17 01:25:24 -050010072if test "$ac_sys_system" = "Darwin"
10073then
10074 case "$with_system_ffi" in
10075 "")
10076 with_system_ffi="no"
10077 ;;
10078 yes|no)
10079 ;;
10080 *)
10081 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10082 ;;
10083 esac
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10085$as_echo "$with_system_ffi" >&6; }
10086else
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10088$as_echo "yes" >&6; }
10089 if test "$with_system_ffi" != ""
10090 then
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10092$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10093 fi
10094 with_system_ffi="yes"
10095fi
Zachary Ware935043d2016-09-09 17:01:21 -070010096
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010097if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010098 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10099else
10100 LIBFFI_INCLUDEDIR=""
10101fi
10102
10103
Stefan Krah60187b52012-03-23 19:06:27 +010010104# Check for use of the system libmpdec library
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10106$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10107
10108# Check whether --with-system_libmpdec was given.
10109if test "${with_system_libmpdec+set}" = set; then :
10110 withval=$with_system_libmpdec;
10111else
10112 with_system_libmpdec="no"
10113fi
10114
10115
10116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10117$as_echo "$with_system_libmpdec" >&6; }
10118
Benjamin Peterson076ed002010-10-31 17:11:02 +000010119# Check for support for loadable sqlite extensions
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10121$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10122# Check whether --enable-loadable-sqlite-extensions was given.
10123if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10124 enableval=$enable_loadable_sqlite_extensions;
10125else
10126 enable_loadable_sqlite_extensions="no"
10127fi
10128
10129
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10131$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10132
Ned Deilyd819b932013-09-06 01:07:05 -070010133# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10134
10135
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10137$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10138
10139# Check whether --with-tcltk-includes was given.
10140if test "${with_tcltk_includes+set}" = set; then :
10141 withval=$with_tcltk_includes;
10142else
10143 with_tcltk_includes="default"
10144fi
10145
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10147$as_echo "$with_tcltk_includes" >&6; }
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10149$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10150
10151# Check whether --with-tcltk-libs was given.
10152if test "${with_tcltk_libs+set}" = set; then :
10153 withval=$with_tcltk_libs;
10154else
10155 with_tcltk_libs="default"
10156fi
10157
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10159$as_echo "$with_tcltk_libs" >&6; }
10160if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10161then
10162 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10163 then
10164 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10165 fi
10166 TCLTK_INCLUDES=""
10167 TCLTK_LIBS=""
10168else
10169 TCLTK_INCLUDES="$with_tcltk_includes"
10170 TCLTK_LIBS="$with_tcltk_libs"
10171fi
10172
Matthias Klose55708cc2009-04-30 08:06:49 +000010173# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10175$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010176
10177# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010178if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010179 withval=$with_dbmliborder;
10180if test x$with_dbmliborder = xyes
10181then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010182as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010183else
10184 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10185 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10186 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010187 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010188 fi
10189 done
10190fi
10191fi
10192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10194$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010195
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010196# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010197
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010198USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200
Martin v. Löwis11437992002-04-12 09:54:03 +000010201
10202# Templates for things AC_DEFINEd more than once.
10203# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010204
10205
Martin v. Löwis11437992002-04-12 09:54:03 +000010206
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10208$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010211if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212 withval=$with_threads;
10213fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010214
10215
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010216# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010219if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 withval=$with_thread; with_threads=$with_thread
10221fi
10222
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010223
10224if test -z "$with_threads"
10225then with_threads="yes"
10226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10228$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010229
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010230
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010231if test "$with_threads" = "no"
10232then
10233 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010234elif test "$ac_cv_pthread_is_default" = yes
10235then
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010237
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010238 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010240
10241 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010243elif test "$ac_cv_kpthread" = "yes"
10244then
10245 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010246 if test "$ac_cv_cxx_thread" = "yes"; then
10247 CXX="$CXX -Kpthread"
10248 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010250
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010251 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010252 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010253elif test "$ac_cv_kthread" = "yes"
10254then
10255 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010256 if test "$ac_cv_cxx_thread" = "yes"; then
10257 CXX="$CXX -Kthread"
10258 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010260
10261 posix_threads=yes
10262 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010263elif test "$ac_cv_pthread" = "yes"
10264then
10265 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010266 if test "$ac_cv_cxx_thread" = "yes"; then
10267 CXX="$CXX -pthread"
10268 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010270
10271 posix_threads=yes
10272 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010273else
10274 if test ! -z "$with_threads" -a -d "$with_threads"
10275 then LDFLAGS="$LDFLAGS -L$with_threads"
10276 fi
10277 if test ! -z "$withval" -a -d "$withval"
10278 then LDFLAGS="$LDFLAGS -L$withval"
10279 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010280
10281 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010282 # define _POSIX_THREADS in unistd.h. Some apparently don't
10283 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10285$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010288
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010289#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010290#ifdef _POSIX_THREADS
10291yes
10292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010293
10294_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010297 unistd_defines_pthreads=yes
10298else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010299 unistd_defines_pthreads=no
10300fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010301rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010302
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10304$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010305
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010307
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010308 # Just looking for pthread_create in libpthread is not enough:
10309 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10310 # So we really have to include pthread.h, and then link.
10311 _libs=$LIBS
10312 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10314$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010316/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010317
10318#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010319#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010320
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010321void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010325
10326pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ;
10328 return 0;
10329}
10330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10334$as_echo "yes" >&6; }
10335 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010336
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010337 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010338 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010339else
Martin v. Löwis11437992002-04-12 09:54:03 +000010340
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010341 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010343if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010345
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010346 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010347 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010348else
Guido van Rossumad678af1998-10-02 14:42:15 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10351$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010352if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010354else
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010356LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360/* Override any GCC internal prototype to avoid an error.
10361 Use char because int might match the return type of a GCC
10362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010363#ifdef __cplusplus
10364extern "C"
10365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010366char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010367int
10368main ()
10369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ;
10372 return 0;
10373}
10374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010377else
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010380rm -f core conftest.err conftest.$ac_objext \
10381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010382LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10385$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010386if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010388
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010389 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010390 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010391 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010392else
Greg Steinadf63d62000-07-05 10:38:09 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10395$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010396if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010398else
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010400LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404/* Override any GCC internal prototype to avoid an error.
10405 Use char because int might match the return type of a GCC
10406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407#ifdef __cplusplus
10408extern "C"
10409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010410char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010411int
10412main ()
10413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010421else
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010424rm -f core conftest.err conftest.$ac_objext \
10425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010426LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10429$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010430if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010432
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010433 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010434 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010435 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010436else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010437
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10439$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010440if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010442else
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010444LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448/* Override any GCC internal prototype to avoid an error.
10449 Use char because int might match the return type of a GCC
10450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010451#ifdef __cplusplus
10452extern "C"
10453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010454char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010455int
10456main ()
10457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ;
10460 return 0;
10461}
10462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010468rm -f core conftest.err conftest.$ac_objext \
10469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010470LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10473$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010474if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010476
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010477 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010478 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010479 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010480else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010481
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10483$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010484if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010486else
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010488LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492/* Override any GCC internal prototype to avoid an error.
10493 Use char because int might match the return type of a GCC
10494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495#ifdef __cplusplus
10496extern "C"
10497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010498char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010499int
10500main ()
10501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ;
10504 return 0;
10505}
10506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010509else
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512rm -f core conftest.err conftest.$ac_objext \
10513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010514LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10517$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010518if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010521 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010522 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010523 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010524else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010525
Martin v. Löwis130fb172001-07-19 11:00:41 +000010526 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010527fi
10528
Guido van Rossum627b2d71993-12-24 10:39:16 +000010529
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010530fi
10531
Guido van Rossum0be3e491997-05-22 20:33:33 +000010532fi
10533
Guido van Rossum49545951997-12-02 19:28:29 +000010534fi
10535
Guido van Rossumb93a8621998-05-07 13:27:32 +000010536fi
10537
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010539rm -f core conftest.err conftest.$ac_objext \
10540 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010541
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10543$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010544if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010546else
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010548LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010552/* Override any GCC internal prototype to avoid an error.
10553 Use char because int might match the return type of a GCC
10554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010555#ifdef __cplusplus
10556extern "C"
10557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010558char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010559int
10560main ()
10561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 ;
10564 return 0;
10565}
10566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010569else
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010572rm -f core conftest.err conftest.$ac_objext \
10573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010574LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10577$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010578if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010580
Martin v. Löwis130fb172001-07-19 11:00:41 +000010581 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010582 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010583 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584fi
10585
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010586
Neal Norwitza978ab02002-11-02 16:58:05 +000010587 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10589$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010590if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010592else
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010594LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598/* Override any GCC internal prototype to avoid an error.
10599 Use char because int might match the return type of a GCC
10600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010601#ifdef __cplusplus
10602extern "C"
10603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010604char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010605int
10606main ()
10607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010615else
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618rm -f core conftest.err conftest.$ac_objext \
10619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010620LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10623$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010624if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010626
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010627 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010628 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010629 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630fi
10631
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010632 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010634
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635if test "$posix_threads" = "yes"; then
10636 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010637
Matthias Kloseb9621712010-04-24 17:59:49 +000010638$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639
10640 fi
10641
10642 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10643 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010644 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010646
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010647 ;;
10648 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010650
10651 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010652 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010653$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010654
10655 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010656 esac
10657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10659$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010660 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662else
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010664 ac_cv_pthread_system_supported=no
10665else
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010668
10669 #include <stdio.h>
10670 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010671 void *foo(void *parm) {
10672 return NULL;
10673 }
10674 main() {
10675 pthread_attr_t attr;
10676 pthread_t id;
10677 if (pthread_attr_init(&attr)) exit(-1);
10678 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10679 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10680 exit(0);
10681 }
10682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684 ac_cv_pthread_system_supported=yes
10685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010690fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692
Guido van Rossum627b2d71993-12-24 10:39:16 +000010693fi
10694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10696$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010697 if test "$ac_cv_pthread_system_supported" = "yes"; then
10698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010700
10701 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 for ac_func in pthread_sigmask
10703do :
10704 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010705if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010707#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010709 case $ac_sys_system in
10710 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010713
10714 ;;
10715 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010716fi
10717done
10718
Christian Heimesf77b4b22013-08-21 13:26:05 +020010719 for ac_func in pthread_atfork
10720do :
10721 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10722if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10723 cat >>confdefs.h <<_ACEOF
10724#define HAVE_PTHREAD_ATFORK 1
10725_ACEOF
10726
10727fi
10728done
10729
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010730fi
10731
10732
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10736$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010738if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010740 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743 ipv6=no
10744 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10746$as_echo "yes" >&6; }
10747 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748
10749 ipv6=yes
10750 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752else
Martin v. Löwis11437992002-04-12 09:54:03 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010755/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756 /* AF_INET6 available check */
10757#include <sys/types.h>
10758#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010759int
10760main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010762int domain = AF_INET6;
10763 ;
10764 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765}
Martin v. Löwis11437992002-04-12 09:54:03 +000010766_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010767if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10770$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010772
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773else
Matthias Kloseb159a552010-04-25 21:00:44 +000010774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010778
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010782if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10784$as_echo_n "checking if RFC2553 API is available... " >&6; }
10785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010787
10788 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010789#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010790int
10791main ()
10792{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010793struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010794 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 ;
10796 return 0;
10797}
Matthias Kloseb159a552010-04-25 21:00:44 +000010798
Martin v. Löwis11437992002-04-12 09:54:03 +000010799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010800if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010801
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010803$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010804 ipv6=yes
10805
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010806else
Matthias Kloseb159a552010-04-25 21:00:44 +000010807
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010810 ipv6=no
10811
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010814fi
10815
10816if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010818
10819fi
10820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821fi
10822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823
10824ipv6type=unknown
10825ipv6lib=none
10826ipv6trylibc=no
10827
10828if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10830$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010831 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10832 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833 case $i in
10834 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838#include <netinet/in.h>
10839#ifdef IPV6_INRIA_VERSION
10840yes
10841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010845 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010847rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848
10849 ;;
10850 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010852/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010853
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854#include <netinet/in.h>
10855#ifdef __KAME__
10856yes
10857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010858_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 ipv6type=$i;
10862 ipv6lib=inet6
10863 ipv6libdir=/usr/local/v6/lib
10864 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010866rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867
10868 ;;
10869 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010871/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873#include <features.h>
10874#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10875yes
10876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010877_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880 ipv6type=$i;
10881 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010883rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884
10885 ;;
10886 linux-inet6)
10887 if test -d /usr/inet6; then
10888 ipv6type=$i
10889 ipv6lib=inet6
10890 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010891 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892 fi
10893 ;;
10894 solaris)
10895 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010896 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897 ipv6type=$i
10898 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899 fi
10900 fi
10901 ;;
10902 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010905
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906#include <sys/param.h>
10907#ifdef _TOSHIBA_INET6
10908yes
10909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010910_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913 ipv6type=$i;
10914 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010915 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010917rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918
10919 ;;
10920 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010922/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010923
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924#include </usr/local/v6/include/sys/v6config.h>
10925#ifdef __V6D__
10926yes
10927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010928_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931 ipv6type=$i;
10932 ipv6lib=v6;
10933 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010934 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010936rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937
10938 ;;
10939 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943#include <sys/param.h>
10944#ifdef _ZETA_MINAMI_INET6
10945yes
10946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010947_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950 ipv6type=$i;
10951 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010952 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010954rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955
10956 ;;
10957 esac
10958 if test "$ipv6type" != "unknown"; then
10959 break
10960 fi
10961 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10963$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964fi
10965
10966if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10967 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10968 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10969 echo "using lib$ipv6lib"
10970 else
10971 if test $ipv6trylibc = "yes"; then
10972 echo "using libc"
10973 else
10974 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10975 echo "You need to fetch lib$ipv6lib.a from appropriate"
10976 echo 'ipv6 kit and compile beforehand.'
10977 exit 1
10978 fi
10979 fi
10980fi
10981
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10983$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10985/* end confdefs.h. */
10986 /* CAN_RAW_FD_FRAMES available check */
10987#include <linux/can/raw.h>
10988int
10989main ()
10990{
10991int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10992 ;
10993 return 0;
10994}
10995_ACEOF
10996if ac_fn_c_try_compile "$LINENO"; then :
10997
10998
10999$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11000
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11002$as_echo "yes" >&6; }
11003
11004else
11005
11006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11007$as_echo "no" >&6; }
11008
11009fi
11010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011012# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11014$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018 withval=$with_doc_strings;
11019fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011020
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011021
11022if test -z "$with_doc_strings"
11023then with_doc_strings="yes"
11024fi
11025if test "$with_doc_strings" != "no"
11026then
11027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011029
11030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11032$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011033
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011034# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11036$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011039if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040 withval=$with_pymalloc;
11041fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011042
Neil Schemenauera35c6882001-02-27 04:45:05 +000011043
Neil Schemenauer16c22972002-03-22 15:34:49 +000011044if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011045then
11046 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011047fi
11048if test "$with_pymalloc" != "no"
11049then
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011052
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011053 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11056$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011057
Benjamin Peterson05159c42009-12-03 03:01:27 +000011058# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11060$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011061
11062# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011063if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011064 withval=$with_valgrind;
11065else
11066 with_valgrind=no
11067fi
11068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11070$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011071if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 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 +020011073if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011076
11077else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011078 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011079
11080fi
11081
11082
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011083 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011084fi
11085
Łukasz Langaa785c872016-09-09 17:37:37 -070011086# Check for DTrace support
11087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11088$as_echo_n "checking for --with-dtrace... " >&6; }
11089
11090# Check whether --with-dtrace was given.
11091if test "${with_dtrace+set}" = set; then :
11092 withval=$with_dtrace;
11093else
11094 with_dtrace=no
11095fi
11096
11097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11098$as_echo "$with_dtrace" >&6; }
11099
11100
11101
11102
11103
11104DTRACE=
11105DFLAGS=
11106DTRACE_HEADERS=
11107DTRACE_OBJS=
11108
11109if test "$with_dtrace" = "yes"
11110then
11111 # Extract the first word of "dtrace", so it can be a program name with args.
11112set dummy dtrace; ac_word=$2
11113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11114$as_echo_n "checking for $ac_word... " >&6; }
11115if ${ac_cv_path_DTRACE+:} false; then :
11116 $as_echo_n "(cached) " >&6
11117else
11118 case $DTRACE in
11119 [\\/]* | ?:[\\/]*)
11120 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11121 ;;
11122 *)
11123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11124for as_dir in $PATH
11125do
11126 IFS=$as_save_IFS
11127 test -z "$as_dir" && as_dir=.
11128 for ac_exec_ext in '' $ac_executable_extensions; do
11129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11130 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11132 break 2
11133 fi
11134done
11135 done
11136IFS=$as_save_IFS
11137
11138 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11139 ;;
11140esac
11141fi
11142DTRACE=$ac_cv_path_DTRACE
11143if test -n "$DTRACE"; then
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11145$as_echo "$DTRACE" >&6; }
11146else
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11148$as_echo "no" >&6; }
11149fi
11150
11151
11152 if test "$DTRACE" = "not found"; then
11153 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11154 fi
11155
11156$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11157
11158 DTRACE_HEADERS="Include/pydtrace_probes.h"
11159
11160 # On OS X, DTrace providers do not need to be explicitly compiled and
11161 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11162 # generation flag '-G'. We check for presence of this flag, rather than
11163 # hardcoding support by OS, in the interest of robustness.
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11165$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11166if ${ac_cv_dtrace_link+:} false; then :
11167 $as_echo_n "(cached) " >&6
11168else
11169 ac_cv_dtrace_link=no
11170 echo 'BEGIN' > conftest.d
11171 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11172 ac_cv_dtrace_link=yes
11173
11174fi
11175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11176$as_echo "$ac_cv_dtrace_link" >&6; }
11177 if test "$ac_cv_dtrace_link" = "yes"; then
11178 DTRACE_OBJS="Python/pydtrace.o"
11179 fi
11180fi
11181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011182# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011183
Guido van Rossum98935bf2001-09-05 19:13:16 +000011184DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011185
Guido van Rossume97ee181999-12-20 21:27:22 +000011186# the dlopen() function means we might want to use dynload_shlib.o. some
11187# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011188for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011189do :
11190 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011191if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011193#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011194_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011195
Guido van Rossume97ee181999-12-20 21:27:22 +000011196fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011197done
Guido van Rossume97ee181999-12-20 21:27:22 +000011198
Michael W. Hudson54241132001-12-07 15:38:26 +000011199
Guido van Rossume97ee181999-12-20 21:27:22 +000011200# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11201# loading of modules.
11202
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11204$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011205if test -z "$DYNLOADFILE"
11206then
11207 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011208 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11209 if test "$ac_cv_func_dlopen" = yes
11210 then DYNLOADFILE="dynload_shlib.o"
11211 else DYNLOADFILE="dynload_aix.o"
11212 fi
11213 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011214 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011215 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11216 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011217 *)
11218 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11219 # out any dynamic loading
11220 if test "$ac_cv_func_dlopen" = yes
11221 then DYNLOADFILE="dynload_shlib.o"
11222 else DYNLOADFILE="dynload_stub.o"
11223 fi
11224 ;;
11225 esac
11226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11228$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011229if test "$DYNLOADFILE" != "dynload_stub.o"
11230then
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
Matthias Kloseb9621712010-04-24 17:59:49 +000011232$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011233
11234fi
11235
Neil Schemenauer4e425612001-06-19 15:44:15 +000011236# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11237
Michael W. Hudson54241132001-12-07 15:38:26 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11240$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011241if test -z "$MACHDEP_OBJS"
11242then
Jack Jansene578a632001-08-15 01:27:14 +000011243 MACHDEP_OBJS=$extra_machdep_objs
11244else
11245 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011246fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011247if test -z "$MACHDEP_OBJS"; then
11248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11249$as_echo "none" >&6; }
11250else
11251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11252$as_echo "$MACHDEP_OBJS" >&6; }
11253fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011254
Guido van Rossum627b2d71993-12-24 10:39:16 +000011255# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011256for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011257 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011258 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011259 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011260 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011261 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011262 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011263 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011264 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011265 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011266 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011267 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011268 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011269 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011270 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11271 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011272 sigaction sigaltstack siginterrupt sigpending sigrelse \
11273 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011274 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011275 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011276 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011277do :
11278 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11279ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011280if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011282#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011283_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011284
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011285fi
11286done
11287
Michael W. Hudson54241132001-12-07 15:38:26 +000011288
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011289ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11290 #include <dirent.h>
11291"
11292if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11293
11294$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11295
11296fi
11297
11298
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011299# For some functions, having a definition is not sufficient, since
11300# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11302$as_echo_n "checking for chroot... " >&6; }
11303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011304/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306int
11307main ()
11308{
11309void *x=chroot
11310 ;
11311 return 0;
11312}
11313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315
Matthias Kloseb9621712010-04-24 17:59:49 +000011316$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011317
Matthias Kloseb159a552010-04-25 21:00:44 +000011318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320else
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011323
11324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11327$as_echo_n "checking for link... " >&6; }
11328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331int
11332main ()
11333{
11334void *x=link
11335 ;
11336 return 0;
11337}
11338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011342
Matthias Kloseb159a552010-04-25 21:00:44 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011344$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011345else
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011348
11349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11352$as_echo_n "checking for symlink... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011356int
11357main ()
11358{
11359void *x=symlink
11360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011367
Matthias Kloseb159a552010-04-25 21:00:44 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011369$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011370else
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011373
11374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11377$as_echo_n "checking for fchdir... " >&6; }
11378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011380#include <unistd.h>
11381int
11382main ()
11383{
11384void *x=fchdir
11385 ;
11386 return 0;
11387}
11388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011392
Matthias Kloseb159a552010-04-25 21:00:44 +000011393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011394$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011395else
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011398
11399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11402$as_echo_n "checking for fsync... " >&6; }
11403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405#include <unistd.h>
11406int
11407main ()
11408{
11409void *x=fsync
11410 ;
11411 return 0;
11412}
11413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011415
Matthias Kloseb9621712010-04-24 17:59:49 +000011416$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011417
Matthias Kloseb159a552010-04-25 21:00:44 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011419$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011420else
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011423
11424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11427$as_echo_n "checking for fdatasync... " >&6; }
11428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011429/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430#include <unistd.h>
11431int
11432main ()
11433{
11434void *x=fdatasync
11435 ;
11436 return 0;
11437}
11438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011440
Matthias Kloseb9621712010-04-24 17:59:49 +000011441$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011442
Matthias Kloseb159a552010-04-25 21:00:44 +000011443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011444$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011445else
Matthias Kloseb9621712010-04-24 17:59:49 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011448
11449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11452$as_echo_n "checking for epoll... " >&6; }
11453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011454/* end confdefs.h. */
11455#include <sys/epoll.h>
11456int
11457main ()
11458{
11459void *x=epoll_create
11460 ;
11461 return 0;
11462}
11463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011465
Matthias Kloseb9621712010-04-24 17:59:49 +000011466$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011467
Matthias Kloseb159a552010-04-25 21:00:44 +000011468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011469$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011470else
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11472$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011473
11474fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11477$as_echo_n "checking for epoll_create1... " >&6; }
11478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11479/* end confdefs.h. */
11480#include <sys/epoll.h>
11481int
11482main ()
11483{
11484void *x=epoll_create1
11485 ;
11486 return 0;
11487}
11488_ACEOF
11489if ac_fn_c_try_compile "$LINENO"; then :
11490
11491$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11492
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11494$as_echo "yes" >&6; }
11495else
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
11498
11499fi
11500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11502$as_echo_n "checking for kqueue... " >&6; }
11503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011504/* end confdefs.h. */
11505
11506#include <sys/types.h>
11507#include <sys/event.h>
11508
11509int
11510main ()
11511{
11512int x=kqueue()
11513 ;
11514 return 0;
11515}
11516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011517if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011520
Matthias Kloseb159a552010-04-25 21:00:44 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011523else
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011526
11527fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11530$as_echo_n "checking for prlimit... " >&6; }
11531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11532/* end confdefs.h. */
11533
11534#include <sys/time.h>
11535#include <sys/resource.h>
11536
11537int
11538main ()
11539{
11540void *x=prlimit
11541 ;
11542 return 0;
11543}
11544_ACEOF
11545if ac_fn_c_try_compile "$LINENO"; then :
11546
11547$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11548
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11550$as_echo "yes" >&6; }
11551else
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11553$as_echo "no" >&6; }
11554
11555fi
11556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11557
Martin v. Löwisd5843682002-11-21 20:41:28 +000011558# On some systems (eg. FreeBSD 5), we would find a definition of the
11559# functions ctermid_r, setgroups in the library, but no prototype
11560# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11561# address to avoid compiler warnings and potential miscompilations
11562# because of the missing prototypes.
11563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11565$as_echo_n "checking for ctermid_r... " >&6; }
11566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011567/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011568
Martin v. Löwisd5843682002-11-21 20:41:28 +000011569#include <stdio.h>
11570
Martin v. Löwisd5843682002-11-21 20:41:28 +000011571int
11572main ()
11573{
11574void* p = ctermid_r
11575 ;
11576 return 0;
11577}
11578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011580
Matthias Kloseb9621712010-04-24 17:59:49 +000011581$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011582
Matthias Kloseb159a552010-04-25 21:00:44 +000011583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011584$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011585else
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11587$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011588
11589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11591
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11593$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011594if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011595 $as_echo_n "(cached) " >&6
11596else
11597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011598/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011599#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011600int
11601main ()
11602{
11603void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011604
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011605 ;
11606 return 0;
11607}
11608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011609if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011610 ac_cv_flock_decl=yes
11611else
11612 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011613
11614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011616
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011617fi
11618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11619$as_echo "$ac_cv_flock_decl" >&6; }
11620if test "x${ac_cv_flock_decl}" = xyes; then
11621 for ac_func in flock
11622do :
11623 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011624if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011625 cat >>confdefs.h <<_ACEOF
11626#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011627_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011628
Antoine Pitroua3000072010-09-07 14:52:42 +000011629else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011631$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011632if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011633 $as_echo_n "(cached) " >&6
11634else
11635 ac_check_lib_save_LIBS=$LIBS
11636LIBS="-lbsd $LIBS"
11637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11638/* end confdefs.h. */
11639
11640/* Override any GCC internal prototype to avoid an error.
11641 Use char because int might match the return type of a GCC
11642 builtin and then its argument prototype would still apply. */
11643#ifdef __cplusplus
11644extern "C"
11645#endif
11646char flock ();
11647int
11648main ()
11649{
11650return flock ();
11651 ;
11652 return 0;
11653}
11654_ACEOF
11655if ac_fn_c_try_link "$LINENO"; then :
11656 ac_cv_lib_bsd_flock=yes
11657else
11658 ac_cv_lib_bsd_flock=no
11659fi
11660rm -f core conftest.err conftest.$ac_objext \
11661 conftest$ac_exeext conftest.$ac_ext
11662LIBS=$ac_check_lib_save_LIBS
11663fi
11664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11665$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011666if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011667 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011668
11669
11670$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11671
11672
11673fi
11674
11675
11676fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011677done
11678
Antoine Pitroua3000072010-09-07 14:52:42 +000011679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11682$as_echo_n "checking for getpagesize... " >&6; }
11683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011684/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011685
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011686#include <unistd.h>
11687
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011688int
11689main ()
11690{
11691void* p = getpagesize
11692 ;
11693 return 0;
11694}
11695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011699
Matthias Kloseb159a552010-04-25 21:00:44 +000011700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011701$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011702else
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011705
11706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011708
Victor Stinner984890f2011-11-24 13:53:38 +010011709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11710$as_echo_n "checking for broken unsetenv... " >&6; }
11711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11712/* end confdefs.h. */
11713
11714#include <stdlib.h>
11715
11716int
11717main ()
11718{
11719int res = unsetenv("DUMMY")
11720 ;
11721 return 0;
11722}
11723_ACEOF
11724if ac_fn_c_try_compile "$LINENO"; then :
11725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
11727else
11728
11729$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11730
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11732$as_echo "yes" >&6; }
11733
11734fi
11735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11736
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011737for ac_prog in true
11738do
11739 # Extract the first word of "$ac_prog", so it can be a program name with args.
11740set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011743if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011745else
11746 if test -n "$TRUE"; then
11747 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11748else
11749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11750for as_dir in $PATH
11751do
11752 IFS=$as_save_IFS
11753 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011756 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 $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 +000011758 break 2
11759 fi
11760done
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011762IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011763
11764fi
11765fi
11766TRUE=$ac_cv_prog_TRUE
11767if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11769$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011770else
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11772$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011773fi
11774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011776 test -n "$TRUE" && break
11777done
11778test -n "$TRUE" || TRUE="/bin/true"
11779
11780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11782$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011783if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011785else
11786 ac_check_lib_save_LIBS=$LIBS
11787LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011789/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791/* Override any GCC internal prototype to avoid an error.
11792 Use char because int might match the return type of a GCC
11793 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011794#ifdef __cplusplus
11795extern "C"
11796#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798int
11799main ()
11800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011801return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802 ;
11803 return 0;
11804}
11805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011807 ac_cv_lib_c_inet_aton=yes
11808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011811rm -f core conftest.err conftest.$ac_objext \
11812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011813LIBS=$ac_check_lib_save_LIBS
11814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11816$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011818 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11821$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011822if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011824else
11825 ac_check_lib_save_LIBS=$LIBS
11826LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011828/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830/* Override any GCC internal prototype to avoid an error.
11831 Use char because int might match the return type of a GCC
11832 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011833#ifdef __cplusplus
11834extern "C"
11835#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011837int
11838main ()
11839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011840return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011841 ;
11842 return 0;
11843}
11844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011846 ac_cv_lib_resolv_inet_aton=yes
11847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011850rm -f core conftest.err conftest.$ac_objext \
11851 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011852LIBS=$ac_check_lib_save_LIBS
11853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11855$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011856if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011857 cat >>confdefs.h <<_ACEOF
11858#define HAVE_LIBRESOLV 1
11859_ACEOF
11860
11861 LIBS="-lresolv $LIBS"
11862
11863fi
11864
11865
11866fi
11867
11868
Christian Heimesd0764e22007-12-04 15:00:33 +000011869# On Tru64, chflags seems to be present, but calling it will
11870# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11872$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011873if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011875else
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011877 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011880/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011881
Christian Heimesd0764e22007-12-04 15:00:33 +000011882#include <sys/stat.h>
11883#include <unistd.h>
11884int main(int argc, char*argv[])
11885{
11886 if(chflags(argv[0], 0) != 0)
11887 return 1;
11888 return 0;
11889}
Ned Deily3eb67d52011-06-28 00:00:28 -070011890
Christian Heimesd0764e22007-12-04 15:00:33 +000011891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011893 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011894else
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011899fi
11900
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011901
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11904$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011905if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011907if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011908 ac_cv_have_chflags="yes"
11909else
11910 ac_cv_have_chflags="no"
11911fi
11912
11913fi
11914if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011915
Matthias Kloseb9621712010-04-24 17:59:49 +000011916$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011917
11918fi
11919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11921$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011922if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011924else
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011926 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011927else
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011929/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011930
Christian Heimesd0764e22007-12-04 15:00:33 +000011931#include <sys/stat.h>
11932#include <unistd.h>
11933int main(int argc, char*argv[])
11934{
11935 if(lchflags(argv[0], 0) != 0)
11936 return 1;
11937 return 0;
11938}
Ned Deily3eb67d52011-06-28 00:00:28 -070011939
Christian Heimesd0764e22007-12-04 15:00:33 +000011940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011941if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011942 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011943else
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011948fi
11949
11950
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11953$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011954if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011956if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011957 ac_cv_have_lchflags="yes"
11958else
11959 ac_cv_have_lchflags="no"
11960fi
11961
11962fi
11963if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011966
11967fi
11968
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011969case $ac_sys_system/$ac_sys_release in
11970Darwin/*)
11971 _CUR_CFLAGS="${CFLAGS}"
11972 _CUR_LDFLAGS="${LDFLAGS}"
11973 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11974 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11975 ;;
11976esac
11977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11979$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011980if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011982else
11983 ac_check_lib_save_LIBS=$LIBS
11984LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011986/* end confdefs.h. */
11987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988/* Override any GCC internal prototype to avoid an error.
11989 Use char because int might match the return type of a GCC
11990 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011991#ifdef __cplusplus
11992extern "C"
11993#endif
11994char inflateCopy ();
11995int
11996main ()
11997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011998return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011999 ;
12000 return 0;
12001}
12002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012003if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012004 ac_cv_lib_z_inflateCopy=yes
12005else
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012008rm -f core conftest.err conftest.$ac_objext \
12009 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012010LIBS=$ac_check_lib_save_LIBS
12011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12013$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012014if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012017
12018fi
12019
12020
12021case $ac_sys_system/$ac_sys_release in
12022Darwin/*)
12023 CFLAGS="${_CUR_CFLAGS}"
12024 LDFLAGS="${_CUR_LDFLAGS}"
12025 ;;
12026esac
12027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12029$as_echo_n "checking for hstrerror... " >&6; }
12030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012032
Martin v. Löwise9416172003-05-03 10:12:45 +000012033#include <netdb.h>
12034
Martin v. Löwise9416172003-05-03 10:12:45 +000012035int
12036main ()
12037{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012038void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012039 ;
12040 return 0;
12041}
12042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012043if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012046
Matthias Kloseb159a552010-04-25 21:00:44 +000012047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012049else
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12051$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012052
12053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012054rm -f core conftest.err conftest.$ac_objext \
12055 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12058$as_echo_n "checking for inet_aton... " >&6; }
12059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012060/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012061
Martin v. Löwis86d66262006-02-17 08:40:11 +000012062#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012063#include <sys/socket.h>
12064#include <netinet/in.h>
12065#include <arpa/inet.h>
12066
Martin v. Löwise9416172003-05-03 10:12:45 +000012067int
12068main ()
12069{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012070void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012071 ;
12072 return 0;
12073}
12074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012076
Matthias Kloseb9621712010-04-24 17:59:49 +000012077$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012078
Matthias Kloseb159a552010-04-25 21:00:44 +000012079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12083$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012084
12085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012086rm -f core conftest.err conftest.$ac_objext \
12087 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012088
Matthias Kloseb9621712010-04-24 17:59:49 +000012089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12090$as_echo_n "checking for inet_pton... " >&6; }
12091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012092/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012093
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012094#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012095#include <sys/socket.h>
12096#include <netinet/in.h>
12097#include <arpa/inet.h>
12098
Martin v. Löwise9416172003-05-03 10:12:45 +000012099int
12100main ()
12101{
12102void* p = inet_pton
12103 ;
12104 return 0;
12105}
12106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012108
Matthias Kloseb9621712010-04-24 17:59:49 +000012109$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012110
Matthias Kloseb159a552010-04-25 21:00:44 +000012111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012113else
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012116
12117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012119
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012120# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12122$as_echo_n "checking for setgroups... " >&6; }
12123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012124/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012125
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012126#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012127#ifdef HAVE_GRP_H
12128#include <grp.h>
12129#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012130
Martin v. Löwisd5843682002-11-21 20:41:28 +000012131int
12132main ()
12133{
12134void* p = setgroups
12135 ;
12136 return 0;
12137}
12138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012139if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012142
Matthias Kloseb159a552010-04-25 21:00:44 +000012143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12147$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012148
12149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012151
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012152# check for openpty and forkpty
12153
12154for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012155do :
12156 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012157if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012159#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012160_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012161
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012162else
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12164$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012165if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012167else
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012169LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173/* Override any GCC internal prototype to avoid an error.
12174 Use char because int might match the return type of a GCC
12175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012176#ifdef __cplusplus
12177extern "C"
12178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012179char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012180int
12181main ()
12182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ;
12185 return 0;
12186}
12187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012188if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012190else
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012193rm -f core conftest.err conftest.$ac_objext \
12194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012195LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12198$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012199if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012201 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12204$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012205if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012207else
12208 ac_check_lib_save_LIBS=$LIBS
12209LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211/* end confdefs.h. */
12212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012213/* Override any GCC internal prototype to avoid an error.
12214 Use char because int might match the return type of a GCC
12215 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012216#ifdef __cplusplus
12217extern "C"
12218#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012219char openpty ();
12220int
12221main ()
12222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012224 ;
12225 return 0;
12226}
12227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012229 ac_cv_lib_bsd_openpty=yes
12230else
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233rm -f core conftest.err conftest.$ac_objext \
12234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012235LIBS=$ac_check_lib_save_LIBS
12236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12238$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012239if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012241 LIBS="$LIBS -lbsd"
12242fi
12243
12244
12245fi
12246
Fred Drake8cef4cf2000-06-28 16:40:38 +000012247
12248fi
12249done
12250
12251for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012252do :
12253 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012254if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012256#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012257_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012258
Fred Drake8cef4cf2000-06-28 16:40:38 +000012259else
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12261$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012262if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012264else
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012266LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270/* Override any GCC internal prototype to avoid an error.
12271 Use char because int might match the return type of a GCC
12272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012273#ifdef __cplusplus
12274extern "C"
12275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012276char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012277int
12278main ()
12279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012281 ;
12282 return 0;
12283}
12284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012285if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012287else
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012290rm -f core conftest.err conftest.$ac_objext \
12291 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012292LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12295$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012296if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012298 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012299else
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12301$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012302if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012304else
12305 ac_check_lib_save_LIBS=$LIBS
12306LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012308/* end confdefs.h. */
12309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310/* Override any GCC internal prototype to avoid an error.
12311 Use char because int might match the return type of a GCC
12312 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012313#ifdef __cplusplus
12314extern "C"
12315#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012316char forkpty ();
12317int
12318main ()
12319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012321 ;
12322 return 0;
12323}
12324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012325if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012326 ac_cv_lib_bsd_forkpty=yes
12327else
Matthias Kloseb9621712010-04-24 17:59:49 +000012328 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012330rm -f core conftest.err conftest.$ac_objext \
12331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012332LIBS=$ac_check_lib_save_LIBS
12333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12335$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012336if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012338 LIBS="$LIBS -lbsd"
12339fi
12340
12341
12342fi
12343
Fred Drake8cef4cf2000-06-28 16:40:38 +000012344
12345fi
12346done
12347
Jack Jansendd19cf82001-12-06 22:36:17 +000012348
Christian Heimesb186d002008-03-18 15:15:01 +000012349# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012350for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012351do :
12352 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012353if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012354 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012355#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012356_ACEOF
12357
12358fi
12359done
12360
12361
Michael W. Hudson54241132001-12-07 15:38:26 +000012362# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012363for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012364do :
12365 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12366ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012367if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012369#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012370_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012371
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012372fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012373done
12374
Michael W. Hudson54241132001-12-07 15:38:26 +000012375
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012376ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012378 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012379
Martin v. Löwis1142de32002-03-29 16:28:31 +000012380else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012382 *" dup2.$ac_objext "* ) ;;
12383 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012385esac
12386
Martin v. Löwis1142de32002-03-29 16:28:31 +000012387fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012388
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012389ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012390if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012391 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12392
12393else
12394 case " $LIBOBJS " in
12395 *" strdup.$ac_objext "* ) ;;
12396 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12397 ;;
12398esac
12399
12400fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012401
12402
12403for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012404do :
12405 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012406if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012407 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012408#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012411/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012412#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012413int
12414main ()
12415{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 ;
12418 return 0;
12419}
12420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Matthias Kloseb9621712010-04-24 17:59:49 +000012423$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012424
Guido van Rossum627b2d71993-12-24 10:39:16 +000012425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012427
Guido van Rossum627b2d71993-12-24 10:39:16 +000012428fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012429done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012430
Jack Jansen150753c2003-03-29 22:07:47 +000012431for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012432do :
12433 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012434if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012440#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012441int
12442main ()
12443{
12444setpgrp(0,0);
12445 ;
12446 return 0;
12447}
12448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012452
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012455
12456fi
12457done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012458
Thomas Wouters3a584202000-08-05 23:28:51 +000012459for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012460do :
12461 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012462if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012467/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012468#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012469int
12470main ()
12471{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012472gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012473 ;
12474 return 0;
12475}
12476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012477if ac_fn_c_try_compile "$LINENO"; then :
12478
Guido van Rossum627b2d71993-12-24 10:39:16 +000012479else
Skip Montanaro6dead952003-09-25 14:50:04 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012482
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Guido van Rossum627b2d71993-12-24 10:39:16 +000012484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012486
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012488done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489
Michael W. Hudson54241132001-12-07 15:38:26 +000012490
Victor Stinnere0be4232011-10-25 13:06:09 +020012491for ac_func in clock_gettime
12492do :
12493 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12494if test "x$ac_cv_func_clock_gettime" = xyes; then :
12495 cat >>confdefs.h <<_ACEOF
12496#define HAVE_CLOCK_GETTIME 1
12497_ACEOF
12498
12499else
12500
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12502$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12503if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12504 $as_echo_n "(cached) " >&6
12505else
12506 ac_check_lib_save_LIBS=$LIBS
12507LIBS="-lrt $LIBS"
12508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12509/* end confdefs.h. */
12510
12511/* Override any GCC internal prototype to avoid an error.
12512 Use char because int might match the return type of a GCC
12513 builtin and then its argument prototype would still apply. */
12514#ifdef __cplusplus
12515extern "C"
12516#endif
12517char clock_gettime ();
12518int
12519main ()
12520{
12521return clock_gettime ();
12522 ;
12523 return 0;
12524}
12525_ACEOF
12526if ac_fn_c_try_link "$LINENO"; then :
12527 ac_cv_lib_rt_clock_gettime=yes
12528else
12529 ac_cv_lib_rt_clock_gettime=no
12530fi
12531rm -f core conftest.err conftest.$ac_objext \
12532 conftest$ac_exeext conftest.$ac_ext
12533LIBS=$ac_check_lib_save_LIBS
12534fi
12535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12536$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12537if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12538
Victor Stinner7efb8332014-08-29 15:41:08 +020012539 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012540 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12541
12542
12543$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12544
12545
12546fi
12547
12548
12549fi
12550done
12551
12552
12553for ac_func in clock_getres
12554do :
12555 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12556if test "x$ac_cv_func_clock_getres" = xyes; then :
12557 cat >>confdefs.h <<_ACEOF
12558#define HAVE_CLOCK_GETRES 1
12559_ACEOF
12560
12561else
12562
12563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12564$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12565if ${ac_cv_lib_rt_clock_getres+:} false; then :
12566 $as_echo_n "(cached) " >&6
12567else
12568 ac_check_lib_save_LIBS=$LIBS
12569LIBS="-lrt $LIBS"
12570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12571/* end confdefs.h. */
12572
12573/* Override any GCC internal prototype to avoid an error.
12574 Use char because int might match the return type of a GCC
12575 builtin and then its argument prototype would still apply. */
12576#ifdef __cplusplus
12577extern "C"
12578#endif
12579char clock_getres ();
12580int
12581main ()
12582{
12583return clock_getres ();
12584 ;
12585 return 0;
12586}
12587_ACEOF
12588if ac_fn_c_try_link "$LINENO"; then :
12589 ac_cv_lib_rt_clock_getres=yes
12590else
12591 ac_cv_lib_rt_clock_getres=no
12592fi
12593rm -f core conftest.err conftest.$ac_objext \
12594 conftest$ac_exeext conftest.$ac_ext
12595LIBS=$ac_check_lib_save_LIBS
12596fi
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12598$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12599if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12600
12601 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12602
12603
12604fi
12605
12606
12607fi
12608done
12609
12610
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012611for ac_func in clock_settime
12612do :
12613 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12614if test "x$ac_cv_func_clock_settime" = xyes; then :
12615 cat >>confdefs.h <<_ACEOF
12616#define HAVE_CLOCK_SETTIME 1
12617_ACEOF
12618
12619else
12620
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12622$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12623if ${ac_cv_lib_rt_clock_settime+:} false; then :
12624 $as_echo_n "(cached) " >&6
12625else
12626 ac_check_lib_save_LIBS=$LIBS
12627LIBS="-lrt $LIBS"
12628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12629/* end confdefs.h. */
12630
12631/* Override any GCC internal prototype to avoid an error.
12632 Use char because int might match the return type of a GCC
12633 builtin and then its argument prototype would still apply. */
12634#ifdef __cplusplus
12635extern "C"
12636#endif
12637char clock_settime ();
12638int
12639main ()
12640{
12641return clock_settime ();
12642 ;
12643 return 0;
12644}
12645_ACEOF
12646if ac_fn_c_try_link "$LINENO"; then :
12647 ac_cv_lib_rt_clock_settime=yes
12648else
12649 ac_cv_lib_rt_clock_settime=no
12650fi
12651rm -f core conftest.err conftest.$ac_objext \
12652 conftest$ac_exeext conftest.$ac_ext
12653LIBS=$ac_check_lib_save_LIBS
12654fi
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12656$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12657if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12658
12659 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12660
12661
12662fi
12663
12664
12665fi
12666done
12667
12668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12670$as_echo_n "checking for major... " >&6; }
12671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012672/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012673
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012674#if defined(MAJOR_IN_MKDEV)
12675#include <sys/mkdev.h>
12676#elif defined(MAJOR_IN_SYSMACROS)
12677#include <sys/sysmacros.h>
12678#else
12679#include <sys/types.h>
12680#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012681
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012682int
12683main ()
12684{
12685
12686 makedev(major(0),minor(0));
12687
12688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012693
12694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12698$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012699
12700else
Skip Montanaro6dead952003-09-25 14:50:04 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12703$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012704
12705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012706rm -f core conftest.err conftest.$ac_objext \
12707 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012708
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012709# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12710# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12712$as_echo_n "checking for if_nameindex... " >&6; }
12713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12714/* end confdefs.h. */
12715
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012716#include <stdio.h>
12717#ifdef STDC_HEADERS
12718# include <stdlib.h>
12719# include <stddef.h>
12720#else
12721# ifdef HAVE_STDLIB_H
12722# include <stdlib.h>
12723# endif
12724#endif
12725#ifdef HAVE_SYS_SOCKET_H
12726# include <sys/socket.h>
12727#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012728#ifdef HAVE_NET_IF_H
12729# include <net/if.h>
12730#endif
12731
12732int
12733main ()
12734{
12735struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12736 ;
12737 return 0;
12738}
12739_ACEOF
12740if ac_fn_c_try_link "$LINENO"; then :
12741
12742$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12743
12744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12745$as_echo "yes" >&6; }
12746else
12747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12748$as_echo "no" >&6; }
12749
12750fi
12751rm -f core conftest.err conftest.$ac_objext \
12752 conftest$ac_exeext conftest.$ac_ext
12753
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012754# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12755# macro is not defined in android-ndk-r13.
12756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12757$as_echo_n "checking for lockf... " >&6; }
12758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759/* end confdefs.h. */
12760#include <unistd.h>
12761int
12762main ()
12763{
12764lockf(0, F_LOCK, 0);
12765 ;
12766 return 0;
12767}
12768_ACEOF
12769if ac_fn_c_try_link "$LINENO"; then :
12770
12771$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12772
12773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12774$as_echo "yes" >&6; }
12775else
12776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12777$as_echo "no" >&6; }
12778
12779fi
12780rm -f core conftest.err conftest.$ac_objext \
12781 conftest$ac_exeext conftest.$ac_ext
12782
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012783# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012784# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12786$as_echo_n "checking for getaddrinfo... " >&6; }
12787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012788/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012789
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012790#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012791#include <sys/socket.h>
12792#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012793#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012794
Martin v. Löwis11437992002-04-12 09:54:03 +000012795int
12796main ()
12797{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012798getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 ;
12800 return 0;
12801}
12802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012803if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012804 have_getaddrinfo=yes
12805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012808rm -f core conftest.err conftest.$ac_objext \
12809 conftest$ac_exeext conftest.$ac_ext
12810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12811$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012812if test $have_getaddrinfo = yes
12813then
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12815$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012816 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012820
12821if test "${enable_ipv6+set}" = set; then
12822 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12823else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012824 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012825fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012826else
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012828/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012829
Stefan Krah19c21392012-11-22 23:47:32 +010012830#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012831#include <sys/types.h>
12832#include <netdb.h>
12833#include <string.h>
12834#include <sys/socket.h>
12835#include <netinet/in.h>
12836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012837int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012838{
12839 int passive, gaierr, inet4 = 0, inet6 = 0;
12840 struct addrinfo hints, *ai, *aitop;
12841 char straddr[INET6_ADDRSTRLEN], strport[16];
12842
12843 for (passive = 0; passive <= 1; passive++) {
12844 memset(&hints, 0, sizeof(hints));
12845 hints.ai_family = AF_UNSPEC;
12846 hints.ai_flags = passive ? AI_PASSIVE : 0;
12847 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012848 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012849 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12850 (void)gai_strerror(gaierr);
12851 goto bad;
12852 }
12853 for (ai = aitop; ai; ai = ai->ai_next) {
12854 if (ai->ai_addr == NULL ||
12855 ai->ai_addrlen == 0 ||
12856 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12857 straddr, sizeof(straddr), strport, sizeof(strport),
12858 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12859 goto bad;
12860 }
12861 switch (ai->ai_family) {
12862 case AF_INET:
12863 if (strcmp(strport, "54321") != 0) {
12864 goto bad;
12865 }
12866 if (passive) {
12867 if (strcmp(straddr, "0.0.0.0") != 0) {
12868 goto bad;
12869 }
12870 } else {
12871 if (strcmp(straddr, "127.0.0.1") != 0) {
12872 goto bad;
12873 }
12874 }
12875 inet4++;
12876 break;
12877 case AF_INET6:
12878 if (strcmp(strport, "54321") != 0) {
12879 goto bad;
12880 }
12881 if (passive) {
12882 if (strcmp(straddr, "::") != 0) {
12883 goto bad;
12884 }
12885 } else {
12886 if (strcmp(straddr, "::1") != 0) {
12887 goto bad;
12888 }
12889 }
12890 inet6++;
12891 break;
12892 case AF_UNSPEC:
12893 goto bad;
12894 break;
12895 default:
12896 /* another family support? */
12897 break;
12898 }
12899 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012900 freeaddrinfo(aitop);
12901 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012902 }
12903
12904 if (!(inet4 == 0 || inet4 == 2))
12905 goto bad;
12906 if (!(inet6 == 0 || inet6 == 2))
12907 goto bad;
12908
12909 if (aitop)
12910 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012911 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912
12913 bad:
12914 if (aitop)
12915 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012916 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012917}
12918
Martin v. Löwis11437992002-04-12 09:54:03 +000012919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012920if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012921 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922else
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012929fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012930
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12934$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12935
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012936if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012937then
12938 if test $ipv6 = yes
12939 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012940 echo 'Fatal: You must get working getaddrinfo() function.'
12941 echo ' or you can specify "--disable-ipv6"'.
12942 exit 1
12943 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012944else
Martin v. Löwis11437992002-04-12 09:54:03 +000012945
Matthias Kloseb9621712010-04-24 17:59:49 +000012946$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012947
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012948fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012949
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012950for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012951do :
12952 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012953if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012955#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012956_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012957
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012958fi
12959done
12960
Michael W. Hudson54241132001-12-07 15:38:26 +000012961
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12964$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012965if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967else
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012969/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970#include <sys/types.h>
12971#include <sys/time.h>
12972#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
Martin v. Löwis11437992002-04-12 09:54:03 +000012974int
12975main ()
12976{
12977if ((struct tm *) 0)
12978return 0;
12979 ;
12980 return 0;
12981}
12982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012983if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012984 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012985else
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12991$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012992if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
Matthias Kloseb9621712010-04-24 17:59:49 +000012994$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012995
12996fi
12997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12999$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013000if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013002else
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005#include <sys/types.h>
13006#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013007
Martin v. Löwis11437992002-04-12 09:54:03 +000013008int
13009main ()
13010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011struct tm tm;
13012 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 ;
13015 return 0;
13016}
13017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013018if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013019 ac_cv_struct_tm=time.h
13020else
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13026$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013027if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013030
13031fi
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033ac_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 +000013034#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036"
Victor Stinnere0be4232011-10-25 13:06:09 +020013037if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013038
13039cat >>confdefs.h <<_ACEOF
13040#define HAVE_STRUCT_TM_TM_ZONE 1
13041_ACEOF
13042
13043
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013045
Martin v. Löwis11437992002-04-12 09:54:03 +000013046if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013049
13050else
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13052"
Victor Stinnere0be4232011-10-25 13:06:09 +020013053if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055else
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013057fi
13058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013060#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061_ACEOF
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13064$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013065if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013069/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013070#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071#if !HAVE_DECL_TZNAME
13072extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013074
Martin v. Löwis11437992002-04-12 09:54:03 +000013075int
13076main ()
13077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ;
13080 return 0;
13081}
13082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013083if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013084 ac_cv_var_tzname=yes
13085else
Matthias Kloseb9621712010-04-24 17:59:49 +000013086 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013088rm -f core conftest.err conftest.$ac_objext \
13089 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13092$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013093 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013096
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013097 fi
13098fi
13099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100ac_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 +020013101if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013102
13103cat >>confdefs.h <<_ACEOF
13104#define HAVE_STRUCT_STAT_ST_RDEV 1
13105_ACEOF
13106
13107
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013108fi
13109
Matthias Kloseb9621712010-04-24 17:59:49 +000013110ac_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 +020013111if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013112
Martin v. Löwis11437992002-04-12 09:54:03 +000013113cat >>confdefs.h <<_ACEOF
13114#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13115_ACEOF
13116
13117
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013118fi
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120ac_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 +020013121if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013122
13123cat >>confdefs.h <<_ACEOF
13124#define HAVE_STRUCT_STAT_ST_FLAGS 1
13125_ACEOF
13126
13127
13128fi
13129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130ac_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 +020013131if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013132
13133cat >>confdefs.h <<_ACEOF
13134#define HAVE_STRUCT_STAT_ST_GEN 1
13135_ACEOF
13136
13137
13138fi
13139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140ac_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 +020013141if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013142
13143cat >>confdefs.h <<_ACEOF
13144#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13145_ACEOF
13146
13147
13148fi
13149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150ac_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 +020013151if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013152
Martin v. Löwis11437992002-04-12 09:54:03 +000013153cat >>confdefs.h <<_ACEOF
13154#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13155_ACEOF
13156
13157
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013158fi
13159
Stefan Krah267b6392016-04-26 01:09:18 +020013160ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13161 #include <sys/types.h>
13162 #include <pwd.h>
13163
13164"
13165if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13166
13167cat >>confdefs.h <<_ACEOF
13168#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13169_ACEOF
13170
13171
13172fi
13173ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13174 #include <sys/types.h>
13175 #include <pwd.h>
13176
13177"
13178if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13179
13180cat >>confdefs.h <<_ACEOF
13181#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13182_ACEOF
13183
13184
13185fi
13186
Zachary Ware6a6967e2016-10-01 00:47:27 -050013187# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13188ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13189"
13190if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13191
13192cat >>confdefs.h <<_ACEOF
13193#define HAVE_SIGINFO_T_SI_BAND 1
13194_ACEOF
13195
13196
13197fi
13198
Michael W. Hudson54241132001-12-07 15:38:26 +000013199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13201$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013202if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013204else
Matthias Kloseb159a552010-04-25 21:00:44 +000013205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013207/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013208#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013209int
13210main ()
13211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013212return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 ;
13214 return 0;
13215}
13216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013218 ac_cv_header_time_altzone=yes
13219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224fi
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13227$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013228if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013231
13232fi
13233
Guido van Rossumda88dad1995-01-26 00:46:29 +000013234was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13236$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013238/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013239
13240#include <sys/types.h>
13241#include <sys/select.h>
13242#include <sys/time.h>
13243
Martin v. Löwis11437992002-04-12 09:54:03 +000013244int
13245main ()
13246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013247;
Martin v. Löwis11437992002-04-12 09:54:03 +000013248 ;
13249 return 0;
13250}
13251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013253
13254
Matthias Kloseb9621712010-04-24 17:59:49 +000013255$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013256
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013257 was_it_defined=yes
13258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13262$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013263
Matthias Kloseb9621712010-04-24 17:59:49 +000013264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13265$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013266if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268else
Matthias Kloseb9621712010-04-24 17:59:49 +000013269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013270/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013271#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013272int
13273main ()
13274{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 ;
13277 return 0;
13278}
13279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013281 ac_cv_struct_addrinfo=yes
13282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13286fi
13287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13289$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013293
13294fi
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13297$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013298if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013302/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013303
13304# include <sys/types.h>
13305# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013306int
13307main ()
13308{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013309struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 ;
13311 return 0;
13312}
13313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013315 ac_cv_struct_sockaddr_storage=yes
13316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13320fi
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13323$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327
13328fi
13329
Christian Heimesdffa3942016-09-05 23:54:41 +020013330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13331$as_echo_n "checking for sockaddr_alg... " >&6; }
13332if ${ac_cv_struct_sockaddr_alg+:} false; then :
13333 $as_echo_n "(cached) " >&6
13334else
13335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13336/* end confdefs.h. */
13337
13338# include <sys/types.h>
13339# include <sys/socket.h>
13340# include <linux/if_alg.h>
13341int
13342main ()
13343{
13344struct sockaddr_alg s
13345 ;
13346 return 0;
13347}
13348_ACEOF
13349if ac_fn_c_try_compile "$LINENO"; then :
13350 ac_cv_struct_sockaddr_alg=yes
13351else
13352 ac_cv_struct_sockaddr_alg=no
13353fi
13354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13355fi
13356
13357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13358$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13359if test $ac_cv_struct_sockaddr_alg = yes; then
13360
13361$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13362
13363fi
13364
Guido van Rossum627b2d71993-12-24 10:39:16 +000013365# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13368$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013369if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013374$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013375int
13376main ()
13377{
13378static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013379test_array [0] = 0;
13380return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
13382 ;
13383 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013384}
Martin v. Löwis11437992002-04-12 09:54:03 +000013385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013386if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013387 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13394$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013397
13398fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13401$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013402if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013404else
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013406/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407
Martin v. Löwis11437992002-04-12 09:54:03 +000013408int
13409main ()
13410{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013413 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013415 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417 char const *const *pcpcc;
13418 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 /* NEC SVR4.0.2 mips cc rejects this. */
13420 struct point {int x, y;};
13421 static struct point const zero = {0,0};
13422 /* AIX XL C 1.02.0.0 rejects this.
13423 It does not let you subtract one const X* pointer from another in
13424 an arm of an if-expression whose if-part is not a constant
13425 expression */
13426 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013429 ++pcpcc;
13430 ppc = (char**) pcpcc;
13431 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013432 { /* SCO 3.2v4 cc rejects this sort of thing. */
13433 char tx;
13434 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013438 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 }
13440 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13441 int x[] = {25, 17};
13442 const int *foo = &x[0];
13443 ++foo;
13444 }
13445 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13446 typedef const int *iptr;
13447 iptr p = 0;
13448 ++p;
13449 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013450 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013452 struct s { int j; const int *ap[3]; } bx;
13453 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 }
13455 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13456 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013457 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013458 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013459 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013460#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 ;
13463 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013464}
Martin v. Löwis11437992002-04-12 09:54:03 +000013465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013466if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013467 ac_cv_c_const=yes
13468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13474$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013475if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013478
13479fi
13480
Michael W. Hudson54241132001-12-07 15:38:26 +000013481
Guido van Rossumda88dad1995-01-26 00:46:29 +000013482works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13484$as_echo_n "checking for working volatile... " >&6; }
13485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013486/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013487
Martin v. Löwis11437992002-04-12 09:54:03 +000013488int
13489main ()
13490{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013491volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013497 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013498else
Skip Montanaro6dead952003-09-25 14:50:04 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013501
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013502
Guido van Rossum627b2d71993-12-24 10:39:16 +000013503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13506$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013507
Guido van Rossumda88dad1995-01-26 00:46:29 +000013508works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13510$as_echo_n "checking for working signed char... " >&6; }
13511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013512/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013513
Martin v. Löwis11437992002-04-12 09:54:03 +000013514int
13515main ()
13516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 ;
13519 return 0;
13520}
13521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013523 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013524else
Skip Montanaro6dead952003-09-25 14:50:04 +000013525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013527
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013528
Guido van Rossum7f43da71994-08-01 12:15:30 +000013529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13532$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013533
Guido van Rossumda88dad1995-01-26 00:46:29 +000013534have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13536$as_echo_n "checking for prototypes... " >&6; }
13537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013538/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013539int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013540int
13541main ()
13542{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013544 ;
13545 return 0;
13546}
13547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013548if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013551
Matthias Kloseb159a552010-04-25 21:00:44 +000013552 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13556$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013557
Guido van Rossumda88dad1995-01-26 00:46:29 +000013558works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13560$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013562/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013563
13564#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013565int foo(int x, ...) {
13566 va_list va;
13567 va_start(va, x);
13568 va_arg(va, int);
13569 va_arg(va, char *);
13570 va_arg(va, double);
13571 return 0;
13572}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013573
Martin v. Löwis11437992002-04-12 09:54:03 +000013574int
13575main ()
13576{
Guido van Rossum90eea071996-08-30 20:58:57 +000013577return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013578 ;
13579 return 0;
13580}
13581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013586
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013587 works=yes
13588
Guido van Rossum627b2d71993-12-24 10:39:16 +000013589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13592$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013593
Martin v. Löwisd6320502004-08-12 13:45:08 +000013594# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13596$as_echo_n "checking for socketpair... " >&6; }
13597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013598/* end confdefs.h. */
13599
13600#include <sys/types.h>
13601#include <sys/socket.h>
13602
13603int
13604main ()
13605{
13606void *x=socketpair
13607 ;
13608 return 0;
13609}
13610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013614
Matthias Kloseb159a552010-04-25 21:00:44 +000013615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013616$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13619$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013620
13621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013623
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13626$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013628/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013629#include <sys/types.h>
13630#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013631int
13632main ()
13633{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013634struct sockaddr x;
13635x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ;
13637 return 0;
13638}
13639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013640if ac_fn_c_try_compile "$LINENO"; then :
13641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13642$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013645
13646else
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13648$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013649
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013653# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
13655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013657if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13662$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013663 OLD_CFLAGS=$CFLAGS
13664 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013666/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013667
13668# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Martin v. Löwis11437992002-04-12 09:54:03 +000013670int
13671main ()
13672{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013673
13674 char *name;
13675 struct hostent *he, *res;
13676 char buffer[2048];
13677 int buflen = 2048;
13678 int h_errnop;
13679
13680 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
13682 ;
13683 return 0;
13684}
13685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013689
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13694$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013696else
Skip Montanaro6dead952003-09-25 14:50:04 +000013697
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13699$as_echo "no" >&6; }
13700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13701$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013703/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013704
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013705# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013706
Martin v. Löwis11437992002-04-12 09:54:03 +000013707int
13708main ()
13709{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013710
13711 char *name;
13712 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013713 char buffer[2048];
13714 int buflen = 2048;
13715 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013716
Matthias Kloseb159a552010-04-25 21:00:44 +000013717 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
13719 ;
13720 return 0;
13721}
13722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013723if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013726
Martin v. Löwis11437992002-04-12 09:54:03 +000013727
Matthias Kloseb159a552010-04-25 21:00:44 +000013728$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13731$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013732
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013733else
Skip Montanaro6dead952003-09-25 14:50:04 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13736$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13738$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13740/* end confdefs.h. */
13741
13742# include <netdb.h>
13743
13744int
13745main ()
13746{
13747
13748 char *name;
13749 struct hostent *he;
13750 struct hostent_data data;
13751
13752 (void) gethostbyname_r(name, he, &data);
13753
13754 ;
13755 return 0;
13756}
13757_ACEOF
13758if ac_fn_c_try_compile "$LINENO"; then :
13759
13760 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13761
13762
13763$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13764
13765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13766$as_echo "yes" >&6; }
13767
13768else
13769
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13771$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013775
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013778
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013781 CFLAGS=$OLD_CFLAGS
13782
13783else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 for ac_func in gethostbyname
13786do :
13787 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013788if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013790#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013791_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013792
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013793fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013794done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013795
Michael W. Hudson54241132001-12-07 15:38:26 +000013796
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013797fi
13798
Michael W. Hudson54241132001-12-07 15:38:26 +000013799
13800
13801
13802
13803
13804
Guido van Rossum627b2d71993-12-24 10:39:16 +000013805# checks for system services
13806# (none yet)
13807
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013808# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013809ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013810if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013811
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013812else
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13814$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013815if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013816 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013817else
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013819LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823/* Override any GCC internal prototype to avoid an error.
13824 Use char because int might match the return type of a GCC
13825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013826#ifdef __cplusplus
13827extern "C"
13828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013829char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013830int
13831main ()
13832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013843rm -f core conftest.err conftest.$ac_objext \
13844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013845LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13848$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013849if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 cat >>confdefs.h <<_ACEOF
13851#define HAVE_LIBIEEE 1
13852_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013854 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013855
Guido van Rossum627b2d71993-12-24 10:39:16 +000013856fi
13857
Michael W. Hudson54241132001-12-07 15:38:26 +000013858
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013859fi
13860
Michael W. Hudson54241132001-12-07 15:38:26 +000013861
Guido van Rossum7f253911997-05-09 02:42:48 +000013862# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13864$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013867if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013868 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013869if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013870then
13871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13875$as_echo "yes" >&6; }
13876else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13877$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013878fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013879else
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13881$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882fi
13883
Guido van Rossum7f253911997-05-09 02:42:48 +000013884
Guido van Rossum7f43da71994-08-01 12:15:30 +000013885# check for --with-libm=...
13886
Guido van Rossum563e7081996-09-10 18:20:48 +000013887case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013888Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013889*) LIBM=-lm
13890esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13892$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013895if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013896 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013897if test "$withval" = no
13898then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13900$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013901elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013902then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13904$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013905else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013906fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13909$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910fi
13911
Guido van Rossum7f43da71994-08-01 12:15:30 +000013912
13913# check for --with-libc=...
13914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13916$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013919if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013921if test "$withval" = no
13922then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13924$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013925elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013926then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13928$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013929else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013930fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013931else
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13933$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934fi
13935
Guido van Rossum7f43da71994-08-01 12:15:30 +000013936
Stefan Krah1919b7e2012-03-21 18:25:23 +010013937# **************************************
13938# * Check for gcc x64 inline assembler *
13939# **************************************
13940
13941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13942$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13944/* end confdefs.h. */
13945
13946int
13947main ()
13948{
13949
13950 __asm__ __volatile__ ("movq %rcx, %rax");
13951
13952 ;
13953 return 0;
13954}
13955_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013956if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013957 have_gcc_asm_for_x64=yes
13958else
13959 have_gcc_asm_for_x64=no
13960fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013961rm -f core conftest.err conftest.$ac_objext \
13962 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13964$as_echo "$have_gcc_asm_for_x64" >&6; }
13965if test "$have_gcc_asm_for_x64" = yes
13966then
13967
13968$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13969
13970fi
13971
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013972# **************************************************
13973# * Check for various properties of floating point *
13974# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13977$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013978if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013980else
13981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013983 ac_cv_little_endian_double=no
13984else
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013986/* end confdefs.h. */
13987
13988#include <string.h>
13989int main() {
13990 double x = 9006104071832581.0;
13991 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13992 return 0;
13993 else
13994 return 1;
13995}
13996
13997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013998if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013999 ac_cv_little_endian_double=yes
14000else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014005fi
14006
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014007fi
14008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14010$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011if test "$ac_cv_little_endian_double" = yes
14012then
14013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014015
14016fi
14017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14019$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014020if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014022else
14023
Matthias Kloseb9621712010-04-24 17:59:49 +000014024if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014025 ac_cv_big_endian_double=no
14026else
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014028/* end confdefs.h. */
14029
14030#include <string.h>
14031int main() {
14032 double x = 9006104071832581.0;
14033 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14034 return 0;
14035 else
14036 return 1;
14037}
14038
14039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014041 ac_cv_big_endian_double=yes
14042else
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014047fi
14048
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014049fi
14050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14052$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014053if test "$ac_cv_big_endian_double" = yes
14054then
14055
Matthias Kloseb9621712010-04-24 17:59:49 +000014056$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014057
14058fi
14059
14060# Some ARM platforms use a mixed-endian representation for doubles.
14061# While Python doesn't currently have full support for these platforms
14062# (see e.g., issue 1762561), we can at least make sure that float <-> string
14063# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14065$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014066if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014068else
14069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014071 ac_cv_mixed_endian_double=no
14072else
Matthias Kloseb9621712010-04-24 17:59:49 +000014073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014074/* end confdefs.h. */
14075
14076#include <string.h>
14077int main() {
14078 double x = 9006104071832581.0;
14079 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14080 return 0;
14081 else
14082 return 1;
14083}
14084
14085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014086if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087 ac_cv_mixed_endian_double=yes
14088else
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014093fi
14094
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014095fi
14096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14098$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014099if test "$ac_cv_mixed_endian_double" = yes
14100then
14101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014103
14104fi
14105
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014106# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014107# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014108# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014109# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014110# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014111# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014112
14113# This inline assembler syntax may also work for suncc and icc,
14114# so we try it on all platforms.
14115
Matthias Kloseb9621712010-04-24 17:59:49 +000014116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14117$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014119/* end confdefs.h. */
14120
14121int
14122main ()
14123{
14124
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014125 unsigned short cw;
14126 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14127 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014128
14129 ;
14130 return 0;
14131}
14132_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014133if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014134 have_gcc_asm_for_x87=yes
14135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014137fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014138rm -f core conftest.err conftest.$ac_objext \
14139 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14141$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014142if test "$have_gcc_asm_for_x87" = yes
14143then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014144
Matthias Kloseb9621712010-04-24 17:59:49 +000014145$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014146
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14150$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14152/* end confdefs.h. */
14153
14154int
14155main ()
14156{
14157
14158 unsigned int fpcr;
14159 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14160 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14161
14162 ;
14163 return 0;
14164}
14165_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014166if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014167 have_gcc_asm_for_mc68881=yes
14168else
14169 have_gcc_asm_for_mc68881=no
14170fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014171rm -f core conftest.err conftest.$ac_objext \
14172 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14174$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14175if test "$have_gcc_asm_for_mc68881" = yes
14176then
14177
14178$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14179
14180fi
14181
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014182# Detect whether system arithmetic is subject to x87-style double
14183# rounding issues. The result of this test has little meaning on non
14184# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14185# mode is round-to-nearest and double rounding issues are present, and
14186# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14188$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014189# $BASECFLAGS may affect the result
14190ac_save_cc="$CC"
14191CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193 ac_cv_x87_double_rounding=no
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014196/* end confdefs.h. */
14197
14198#include <stdlib.h>
14199#include <math.h>
14200int main() {
14201 volatile double x, y, z;
14202 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14203 x = 0.99999999999999989; /* 1-2**-53 */
14204 y = 1./x;
14205 if (y != 1.)
14206 exit(0);
14207 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14208 x = 1e16;
14209 y = 2.99999;
14210 z = x + y;
14211 if (z != 1e16+4.)
14212 exit(0);
14213 /* both tests show evidence of double rounding */
14214 exit(1);
14215}
14216
14217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014218if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014219 ac_cv_x87_double_rounding=no
14220else
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14224 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014225fi
14226
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014227CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14229$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014230if test "$ac_cv_x87_double_rounding" = yes
14231then
14232
Matthias Kloseb9621712010-04-24 17:59:49 +000014233$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014234
14235fi
14236
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014237# ************************************
14238# * Check for mathematical functions *
14239# ************************************
14240
14241LIBS_SAVE=$LIBS
14242LIBS="$LIBS $LIBM"
14243
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014244for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14245do :
14246 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14247ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014248if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014249 cat >>confdefs.h <<_ACEOF
14250#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14251_ACEOF
14252
14253fi
14254done
14255
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014256for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014257do :
14258 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14259ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014260if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014261 cat >>confdefs.h <<_ACEOF
14262#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14263_ACEOF
14264
14265fi
14266done
14267
14268ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14269"
Victor Stinnere0be4232011-10-25 13:06:09 +020014270if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014271 ac_have_decl=1
14272else
14273 ac_have_decl=0
14274fi
14275
14276cat >>confdefs.h <<_ACEOF
14277#define HAVE_DECL_ISINF $ac_have_decl
14278_ACEOF
14279ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14280"
Victor Stinnere0be4232011-10-25 13:06:09 +020014281if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014282 ac_have_decl=1
14283else
14284 ac_have_decl=0
14285fi
14286
14287cat >>confdefs.h <<_ACEOF
14288#define HAVE_DECL_ISNAN $ac_have_decl
14289_ACEOF
14290ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14291"
Victor Stinnere0be4232011-10-25 13:06:09 +020014292if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014293 ac_have_decl=1
14294else
14295 ac_have_decl=0
14296fi
14297
14298cat >>confdefs.h <<_ACEOF
14299#define HAVE_DECL_ISFINITE $ac_have_decl
14300_ACEOF
14301
14302
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014303# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14304# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14306$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014307if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014309else
14310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014312 ac_cv_tanh_preserves_zero_sign=no
14313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014315/* end confdefs.h. */
14316
14317#include <math.h>
14318#include <stdlib.h>
14319int main() {
14320 /* return 0 if either negative zeros don't exist
14321 on this platform or if negative zeros exist
14322 and tanh(-0.) == -0. */
14323 if (atan2(0., -1.) == atan2(-0., -1.) ||
14324 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14325 else exit(1);
14326}
14327
14328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014329if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014330 ac_cv_tanh_preserves_zero_sign=yes
14331else
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14335 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014336fi
14337
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014338fi
14339
Matthias Kloseb9621712010-04-24 17:59:49 +000014340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14341$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014342if test "$ac_cv_tanh_preserves_zero_sign" = yes
14343then
14344
Matthias Kloseb9621712010-04-24 17:59:49 +000014345$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014346
14347fi
14348
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014349if test "$ac_cv_func_log1p" = yes
14350then
14351 # On some versions of AIX, log1p(-0.) returns 0. instead of
14352 # -0. See issue #9920.
14353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14354$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014355 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014356 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014357else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014358
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014359 if test "$cross_compiling" = yes; then :
14360 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014361else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14363/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014364
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014365 #include <math.h>
14366 #include <stdlib.h>
14367 int main() {
14368 /* Fail if the signs of log1p(-0.) and -0. can be
14369 distinguished. */
14370 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14371 return 0;
14372 else
14373 return 1;
14374 }
14375
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014376_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014377if ac_fn_c_try_run "$LINENO"; then :
14378 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014379else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014380 ac_cv_log1p_drops_zero_sign=yes
14381fi
14382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14383 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014384fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014385
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014386fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014387
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14389$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14390fi
14391if test "$ac_cv_log1p_drops_zero_sign" = yes
14392then
14393
14394$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14395
14396fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014397
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014398LIBS=$LIBS_SAVE
14399
Mark Dickinsona614f042009-11-28 12:48:43 +000014400# For multiprocessing module, check that sem_open
14401# actually works. For FreeBSD versions <= 7.2,
14402# the kernel module that provides POSIX semaphores
14403# isn't loaded by default, so an attempt to call
14404# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14406$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014407if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014409else
Matthias Kloseb9621712010-04-24 17:59:49 +000014410 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014411 ac_cv_posix_semaphores_enabled=yes
14412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014414/* end confdefs.h. */
14415
14416#include <unistd.h>
14417#include <fcntl.h>
14418#include <stdio.h>
14419#include <semaphore.h>
14420#include <sys/stat.h>
14421
14422int main(void) {
14423 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14424 if (a == SEM_FAILED) {
14425 perror("sem_open");
14426 return 1;
14427 }
14428 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014429 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014430 return 0;
14431}
14432
14433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014434if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014435 ac_cv_posix_semaphores_enabled=yes
14436else
Matthias Kloseb9621712010-04-24 17:59:49 +000014437 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14440 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014441fi
14442
14443
Mark Dickinsona614f042009-11-28 12:48:43 +000014444fi
14445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14447$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014448if test $ac_cv_posix_semaphores_enabled = no
14449then
14450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014452
14453fi
14454
Mark Dickinson10683072009-04-18 21:18:19 +000014455# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14457$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014458if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014460else
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014462 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014463else
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014465/* end confdefs.h. */
14466
14467#include <unistd.h>
14468#include <fcntl.h>
14469#include <stdio.h>
14470#include <semaphore.h>
14471#include <sys/stat.h>
14472
14473int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014474 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014475 int count;
14476 int res;
14477 if(a==SEM_FAILED){
14478 perror("sem_open");
14479 return 1;
14480
14481 }
14482 res = sem_getvalue(a, &count);
14483 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014484 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014485 return res==-1 ? 1 : 0;
14486}
14487
Mark Dickinson10683072009-04-18 21:18:19 +000014488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014489if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014490 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014491else
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014496fi
14497
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014498
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014499fi
14500
Matthias Kloseb9621712010-04-24 17:59:49 +000014501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14502$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014503if test $ac_cv_broken_sem_getvalue = yes
14504then
14505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014507
14508fi
14509
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014510ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14511"
14512if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14513 ac_have_decl=1
14514else
14515 ac_have_decl=0
14516fi
14517
14518cat >>confdefs.h <<_ACEOF
14519#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14520_ACEOF
14521ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14522"
14523if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14524 ac_have_decl=1
14525else
14526 ac_have_decl=0
14527fi
14528
14529cat >>confdefs.h <<_ACEOF
14530#define HAVE_DECL_RTLD_NOW $ac_have_decl
14531_ACEOF
14532ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14533"
14534if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14535 ac_have_decl=1
14536else
14537 ac_have_decl=0
14538fi
14539
14540cat >>confdefs.h <<_ACEOF
14541#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14542_ACEOF
14543ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14544"
14545if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14546 ac_have_decl=1
14547else
14548 ac_have_decl=0
14549fi
14550
14551cat >>confdefs.h <<_ACEOF
14552#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14553_ACEOF
14554ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14555"
14556if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14557 ac_have_decl=1
14558else
14559 ac_have_decl=0
14560fi
14561
14562cat >>confdefs.h <<_ACEOF
14563#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14564_ACEOF
14565ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14566"
14567if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14568 ac_have_decl=1
14569else
14570 ac_have_decl=0
14571fi
14572
14573cat >>confdefs.h <<_ACEOF
14574#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14575_ACEOF
14576ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14577"
14578if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14579 ac_have_decl=1
14580else
14581 ac_have_decl=0
14582fi
14583
14584cat >>confdefs.h <<_ACEOF
14585#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14586_ACEOF
14587
14588
Mark Dickinsonbd792642009-03-18 20:06:12 +000014589# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14591$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014592# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014594 enableval=$enable_big_digits; case $enable_big_digits in
14595yes)
14596 enable_big_digits=30 ;;
14597no)
14598 enable_big_digits=15 ;;
1459915|30)
14600 ;;
14601*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014602 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 +000014603esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14605$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014606
14607cat >>confdefs.h <<_ACEOF
14608#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14609_ACEOF
14610
14611
14612else
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14614$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014615fi
14616
14617
Guido van Rossumef2255b2000-03-10 22:30:29 +000014618# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014619ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014620if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014621
14622
Matthias Kloseb9621712010-04-24 17:59:49 +000014623$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014624
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014625 wchar_h="yes"
14626
Guido van Rossumef2255b2000-03-10 22:30:29 +000014627else
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014629
14630fi
14631
Michael W. Hudson54241132001-12-07 15:38:26 +000014632
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014634# determine wchar_t size
14635if test "$wchar_h" = yes
14636then
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14639# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14640# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14642$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014643if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014645else
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14647"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014648
Martin v. Löwis11437992002-04-12 09:54:03 +000014649else
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 if test "$ac_cv_type_wchar_t" = yes; then
14651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014653as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014654See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655 else
14656 ac_cv_sizeof_wchar_t=0
14657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014659
Martin v. Löwis11437992002-04-12 09:54:03 +000014660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14662$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663
14664
14665
Martin v. Löwis11437992002-04-12 09:54:03 +000014666cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014667#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014668_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014669
Michael W. Hudson54241132001-12-07 15:38:26 +000014670
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014671fi
14672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14674$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014675have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014677/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014678
14679#include <tcl.h>
14680#if TCL_UTF_MAX != 6
14681# error "NOT UCS4_TCL"
14682#endif
14683int
14684main ()
14685{
14686
14687 ;
14688 return 0;
14689}
14690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014692
14693
Matthias Kloseb9621712010-04-24 17:59:49 +000014694$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014695
14696 have_ucs4_tcl=yes
14697
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14701$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014702
Skip Montanaro6dead952003-09-25 14:50:04 +000014703# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014704if test "$wchar_h" = yes
14705then
14706 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14708$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014709 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014711else
14712
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014714 ac_cv_wchar_t_signed=yes
14715else
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014717/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014718
14719 #include <wchar.h>
14720 int main()
14721 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014722 /* Success: exit code 0 */
14723 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014724 }
14725
14726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014727if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014728 ac_cv_wchar_t_signed=yes
14729else
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014734fi
14735
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014736fi
14737
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14739$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740fi
14741
Georg Brandl52d168a2008-01-07 18:10:24 +000014742# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014743if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014744 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014745then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014746 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014747
Matthias Kloseb9621712010-04-24 17:59:49 +000014748$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014749
Georg Brandl52d168a2008-01-07 18:10:24 +000014750else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014751 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014752fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14754$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014755
14756# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14758$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014759if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014761else
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 ac_cv_c_bigendian=unknown
14763 # See if we're dealing with a universal compiler.
14764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14765/* end confdefs.h. */
14766#ifndef __APPLE_CC__
14767 not a universal capable compiler
14768 #endif
14769 typedef int dummy;
14770
Skip Montanaro6dead952003-09-25 14:50:04 +000014771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014772if ac_fn_c_try_compile "$LINENO"; then :
14773
14774 # Check for potential -arch flags. It is not universal unless
14775 # there are at least two -arch flags with different values.
14776 ac_arch=
14777 ac_prev=
14778 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14779 if test -n "$ac_prev"; then
14780 case $ac_word in
14781 i?86 | x86_64 | ppc | ppc64)
14782 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14783 ac_arch=$ac_word
14784 else
14785 ac_cv_c_bigendian=universal
14786 break
14787 fi
14788 ;;
14789 esac
14790 ac_prev=
14791 elif test "x$ac_word" = "x-arch"; then
14792 ac_prev=arch
14793 fi
14794 done
14795fi
14796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14797 if test $ac_cv_c_bigendian = unknown; then
14798 # See if sys/param.h defines the BYTE_ORDER macro.
14799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014800/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014801#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014803
Martin v. Löwis11437992002-04-12 09:54:03 +000014804int
14805main ()
14806{
Matthias Kloseb9621712010-04-24 17:59:49 +000014807#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14808 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14809 && LITTLE_ENDIAN)
14810 bogus endian macros
14811 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
14813 ;
14814 return 0;
14815}
14816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014817if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014818 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014820/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014821#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014823
Martin v. Löwis11437992002-04-12 09:54:03 +000014824int
14825main ()
14826{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014827#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 not big endian
14829 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014830
14831 ;
14832 return 0;
14833}
14834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014836 ac_cv_c_bigendian=yes
14837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014841fi
14842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14843 fi
14844 if test $ac_cv_c_bigendian = unknown; then
14845 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014847/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014848#include <limits.h>
14849
Martin v. Löwis11437992002-04-12 09:54:03 +000014850int
14851main ()
14852{
Matthias Kloseb9621712010-04-24 17:59:49 +000014853#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14854 bogus endian macros
14855 #endif
14856
Martin v. Löwis11437992002-04-12 09:54:03 +000014857 ;
14858 return 0;
14859}
14860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014861if ac_fn_c_try_compile "$LINENO"; then :
14862 # It does; now see whether it defined to _BIG_ENDIAN or not.
14863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14864/* end confdefs.h. */
14865#include <limits.h>
14866
14867int
14868main ()
14869{
14870#ifndef _BIG_ENDIAN
14871 not big endian
14872 #endif
14873
14874 ;
14875 return 0;
14876}
14877_ACEOF
14878if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014880else
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14884fi
14885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14886 fi
14887 if test $ac_cv_c_bigendian = unknown; then
14888 # Compile a test program.
14889 if test "$cross_compiling" = yes; then :
14890 # Try to guess by grepping values from an object file.
14891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14892/* end confdefs.h. */
14893short int ascii_mm[] =
14894 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14895 short int ascii_ii[] =
14896 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14897 int use_ascii (int i) {
14898 return ascii_mm[i] + ascii_ii[i];
14899 }
14900 short int ebcdic_ii[] =
14901 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14902 short int ebcdic_mm[] =
14903 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14904 int use_ebcdic (int i) {
14905 return ebcdic_mm[i] + ebcdic_ii[i];
14906 }
14907 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908
Matthias Kloseb9621712010-04-24 17:59:49 +000014909int
14910main ()
14911{
14912return use_ascii (foo) == use_ebcdic (foo);
14913 ;
14914 return 0;
14915}
14916_ACEOF
14917if ac_fn_c_try_compile "$LINENO"; then :
14918 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14919 ac_cv_c_bigendian=yes
14920 fi
14921 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14922 if test "$ac_cv_c_bigendian" = unknown; then
14923 ac_cv_c_bigendian=no
14924 else
14925 # finding both strings is unlikely to happen, but who knows?
14926 ac_cv_c_bigendian=unknown
14927 fi
14928 fi
14929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014931else
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014933/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014935int
14936main ()
14937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 /* Are we little or big endian? From Harbison&Steele. */
14940 union
14941 {
14942 long int l;
14943 char c[sizeof (long int)];
14944 } u;
14945 u.l = 1;
14946 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947
14948 ;
14949 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014950}
Martin v. Löwis11437992002-04-12 09:54:03 +000014951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014952if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014953 ac_cv_c_bigendian=no
14954else
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14958 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14964$as_echo "$ac_cv_c_bigendian" >&6; }
14965 case $ac_cv_c_bigendian in #(
14966 yes)
14967 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14968;; #(
14969 no)
14970 ;; #(
14971 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014972
Matthias Kloseb9621712010-04-24 17:59:49 +000014973$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014974
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 ;; #(
14976 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014977 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014978 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014980
Michael W. Hudson54241132001-12-07 15:38:26 +000014981
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014982# ABI version string for Python extension modules. This appears between the
14983# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14984# from the following attributes which affect the ABI of this Python build (in
14985# this order):
14986#
14987# * The Python implementation (always 'cpython-' for us)
14988# * The major and minor version numbers
14989# * --with-pydebug (adds a 'd')
14990# * --with-pymalloc (adds a 'm')
14991# * --with-wide-unicode (adds a 'u')
14992#
14993# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014994# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14995# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014996
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14998$as_echo_n "checking ABIFLAGS... " >&6; }
14999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15000$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15002$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015003SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15005$as_echo "$SOABI" >&6; }
15006
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015007
15008case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015009 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015010 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15011 *)
15012 EXT_SUFFIX=${SHLIB_SUFFIX};;
15013esac
15014
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15016$as_echo_n "checking LDVERSION... " >&6; }
15017LDVERSION='$(VERSION)$(ABIFLAGS)'
15018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15019$as_echo "$LDVERSION" >&6; }
15020
doko@python.org87421192013-01-26 11:39:31 +010015021
doko@ubuntu.com55532312016-06-14 08:55:19 +020015022if test x$PLATFORM_TRIPLET = x; then
15023 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15024else
15025 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15026fi
doko@python.org87421192013-01-26 11:39:31 +010015027
15028
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015029# Check whether right shifting a negative integer extends the sign bit
15030# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15032$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015033if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015035else
Martin v. Löwis11437992002-04-12 09:54:03 +000015036
Matthias Kloseb9621712010-04-24 17:59:49 +000015037if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015038 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015039else
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015041/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015042
15043int main()
15044{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015045 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015046}
15047
Martin v. Löwis11437992002-04-12 09:54:03 +000015048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015049if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015050 ac_cv_rshift_extends_sign=yes
15051else
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015056fi
15057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058fi
15059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15061$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015062if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015063then
Martin v. Löwis11437992002-04-12 09:54:03 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015066
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015067fi
15068
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015069# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15071$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015072if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015074else
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015077/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015078#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015079int
15080main ()
15081{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015082
15083 FILE *f = fopen("/dev/null", "r");
15084 flockfile(f);
15085 getc_unlocked(f);
15086 funlockfile(f);
15087
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 ;
15089 return 0;
15090}
15091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015092if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015093 ac_cv_have_getc_unlocked=yes
15094else
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 ac_cv_have_getc_unlocked=no
15096fi
15097rm -f core conftest.err conftest.$ac_objext \
15098 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15102$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015103if test "$ac_cv_have_getc_unlocked" = yes
15104then
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
Matthias Kloseb9621712010-04-24 17:59:49 +000015106$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015107
15108fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015109
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015110# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015111# save the value of LIBS so we don't actually link Python with readline
15112LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015113
Gregory P. Smith18820942008-09-07 06:24:49 +000015114# On some systems we need to link readline to a termcap compatible
15115# library. NOTE: Keep the precedence of listed libraries synchronised
15116# with setup.py.
15117py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15119$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015120for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015121 if test -z "$py_libtermcap"; then
15122 READLINE_LIBS="-lreadline"
15123 else
15124 READLINE_LIBS="-lreadline -l$py_libtermcap"
15125 fi
15126 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015128/* end confdefs.h. */
15129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130/* Override any GCC internal prototype to avoid an error.
15131 Use char because int might match the return type of a GCC
15132 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015133#ifdef __cplusplus
15134extern "C"
15135#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015136char readline ();
15137int
15138main ()
15139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015141 ;
15142 return 0;
15143}
15144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015145if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015146 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015148rm -f core conftest.err conftest.$ac_objext \
15149 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015150 if test $py_cv_lib_readline = yes; then
15151 break
15152 fi
15153done
15154# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15155#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015156if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15158$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015159else
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15161$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015162
Matthias Kloseb9621712010-04-24 17:59:49 +000015163$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015164
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015165fi
15166
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015167# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15169$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015170if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172else
15173 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015174LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015176/* end confdefs.h. */
15177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178/* Override any GCC internal prototype to avoid an error.
15179 Use char because int might match the return type of a GCC
15180 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181#ifdef __cplusplus
15182extern "C"
15183#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015184char rl_callback_handler_install ();
15185int
15186main ()
15187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189 ;
15190 return 0;
15191}
15192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015193if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015194 ac_cv_lib_readline_rl_callback_handler_install=yes
15195else
Matthias Kloseb9621712010-04-24 17:59:49 +000015196 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015198rm -f core conftest.err conftest.$ac_objext \
15199 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015200LIBS=$ac_check_lib_save_LIBS
15201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15203$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015204if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015205
Matthias Kloseb9621712010-04-24 17:59:49 +000015206$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207
15208fi
15209
15210
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015211# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015213/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015214#include <readline/readline.h>
15215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015216if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015217 have_readline=yes
15218else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015219 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015220
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015221fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015222rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015223if test $have_readline = yes
15224then
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015226/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015227#include <readline/readline.h>
15228
15229_ACEOF
15230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015232
Matthias Kloseb9621712010-04-24 17:59:49 +000015233$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015234
15235fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015236rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015237
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015239/* end confdefs.h. */
15240#include <readline/readline.h>
15241
15242_ACEOF
15243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015244 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015247
15248fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015249rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015250
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015251fi
15252
Martin v. Löwis0daad592001-09-30 21:09:59 +000015253# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15255$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015256if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015258else
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015260LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264/* Override any GCC internal prototype to avoid an error.
15265 Use char because int might match the return type of a GCC
15266 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015267#ifdef __cplusplus
15268extern "C"
15269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015270char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015271int
15272main ()
15273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 ;
15276 return 0;
15277}
15278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015279if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015281else
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015284rm -f core conftest.err conftest.$ac_objext \
15285 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015286LIBS=$ac_check_lib_save_LIBS
15287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15289$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015290if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015291
Matthias Kloseb9621712010-04-24 17:59:49 +000015292$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015293
Martin v. Löwis0daad592001-09-30 21:09:59 +000015294fi
15295
Michael W. Hudson54241132001-12-07 15:38:26 +000015296
Thomas Wouters89d996e2007-09-08 17:39:28 +000015297# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15299$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015300if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015302else
15303 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015304LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015306/* end confdefs.h. */
15307
15308/* Override any GCC internal prototype to avoid an error.
15309 Use char because int might match the return type of a GCC
15310 builtin and then its argument prototype would still apply. */
15311#ifdef __cplusplus
15312extern "C"
15313#endif
15314char rl_completion_display_matches_hook ();
15315int
15316main ()
15317{
15318return rl_completion_display_matches_hook ();
15319 ;
15320 return 0;
15321}
15322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015323if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015324 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15325else
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015328rm -f core conftest.err conftest.$ac_objext \
15329 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015330LIBS=$ac_check_lib_save_LIBS
15331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15333$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015334if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015335
Matthias Kloseb9621712010-04-24 17:59:49 +000015336$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015337
15338fi
15339
15340
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015341# also in 4.0, but not in editline
15342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15343$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15344if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15345 $as_echo_n "(cached) " >&6
15346else
15347 ac_check_lib_save_LIBS=$LIBS
15348LIBS="-lreadline $READLINE_LIBS $LIBS"
15349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15350/* end confdefs.h. */
15351
15352/* Override any GCC internal prototype to avoid an error.
15353 Use char because int might match the return type of a GCC
15354 builtin and then its argument prototype would still apply. */
15355#ifdef __cplusplus
15356extern "C"
15357#endif
15358char rl_resize_terminal ();
15359int
15360main ()
15361{
15362return rl_resize_terminal ();
15363 ;
15364 return 0;
15365}
15366_ACEOF
15367if ac_fn_c_try_link "$LINENO"; then :
15368 ac_cv_lib_readline_rl_resize_terminal=yes
15369else
15370 ac_cv_lib_readline_rl_resize_terminal=no
15371fi
15372rm -f core conftest.err conftest.$ac_objext \
15373 conftest$ac_exeext conftest.$ac_ext
15374LIBS=$ac_check_lib_save_LIBS
15375fi
15376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15377$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15378if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15379
15380$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15381
15382fi
15383
15384
Martin v. Löwis0daad592001-09-30 21:09:59 +000015385# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15387$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015388if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015390else
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015392LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396/* Override any GCC internal prototype to avoid an error.
15397 Use char because int might match the return type of a GCC
15398 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015399#ifdef __cplusplus
15400extern "C"
15401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015402char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015403int
15404main ()
15405{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015407 ;
15408 return 0;
15409}
15410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015413else
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015416rm -f core conftest.err conftest.$ac_objext \
15417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015418LIBS=$ac_check_lib_save_LIBS
15419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15421$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015422if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015423
Matthias Kloseb9621712010-04-24 17:59:49 +000015424$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015425
Guido van Rossum353ae582001-07-10 16:45:32 +000015426fi
15427
Jack Jansendd19cf82001-12-06 22:36:17 +000015428
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015429# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015431/* end confdefs.h. */
15432#include <readline/readline.h>
15433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015434if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015435 have_readline=yes
15436else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015437 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015438
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015439fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015440rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015441if test $have_readline = yes
15442then
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015444/* end confdefs.h. */
15445#include <readline/readline.h>
15446
15447_ACEOF
15448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015449 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015450
Matthias Kloseb9621712010-04-24 17:59:49 +000015451$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015452
15453fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015454rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015455
15456fi
15457
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15459$as_echo_n "checking for append_history in -lreadline... " >&6; }
15460if ${ac_cv_lib_readline_append_history+:} false; then :
15461 $as_echo_n "(cached) " >&6
15462else
15463 ac_check_lib_save_LIBS=$LIBS
15464LIBS="-lreadline $READLINE_LIBS $LIBS"
15465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15466/* end confdefs.h. */
15467
15468/* Override any GCC internal prototype to avoid an error.
15469 Use char because int might match the return type of a GCC
15470 builtin and then its argument prototype would still apply. */
15471#ifdef __cplusplus
15472extern "C"
15473#endif
15474char append_history ();
15475int
15476main ()
15477{
15478return append_history ();
15479 ;
15480 return 0;
15481}
15482_ACEOF
15483if ac_fn_c_try_link "$LINENO"; then :
15484 ac_cv_lib_readline_append_history=yes
15485else
15486 ac_cv_lib_readline_append_history=no
15487fi
15488rm -f core conftest.err conftest.$ac_objext \
15489 conftest$ac_exeext conftest.$ac_ext
15490LIBS=$ac_check_lib_save_LIBS
15491fi
15492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15493$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15494if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15495
15496$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15497
15498fi
15499
15500
Martin v. Löwis82bca632006-02-10 20:49:30 +000015501# End of readline checks: restore LIBS
15502LIBS=$LIBS_no_readline
15503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15505$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015506if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015508else
Martin v. Löwis11437992002-04-12 09:54:03 +000015509
Matthias Kloseb9621712010-04-24 17:59:49 +000015510if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015511 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015512else
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015515
15516int main()
15517{
15518 int val1 = nice(1);
15519 if (val1 != -1 && val1 == nice(2))
15520 exit(0);
15521 exit(1);
15522}
15523
Martin v. Löwis11437992002-04-12 09:54:03 +000015524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015525if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015526 ac_cv_broken_nice=yes
15527else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15531 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015532fi
15533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015534fi
15535
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15537$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015538if test "$ac_cv_broken_nice" = yes
15539then
Martin v. Löwis11437992002-04-12 09:54:03 +000015540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015542
15543fi
15544
Matthias Kloseb9621712010-04-24 17:59:49 +000015545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15546$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015547if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015549else
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015551 ac_cv_broken_poll=no
15552else
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015554/* end confdefs.h. */
15555
15556#include <poll.h>
15557
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015558int main()
15559{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015560 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015561 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015562
15563 close (42);
15564
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015565 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015566 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015567 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015568 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015569 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015570 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015571 return 1;
15572}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015573
15574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015575if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015576 ac_cv_broken_poll=yes
15577else
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15581 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015584fi
15585
Matthias Kloseb9621712010-04-24 17:59:49 +000015586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15587$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015588if test "$ac_cv_broken_poll" = yes
15589then
15590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015592
15593fi
15594
Brett Cannon43802422005-02-10 20:48:03 +000015595# 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 +000015596# (which is not required by ISO C or UNIX spec) and/or if we support
15597# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015598ac_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 +000015599#include <$ac_cv_struct_tm>
15600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601"
Victor Stinnere0be4232011-10-25 13:06:09 +020015602if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015603
15604cat >>confdefs.h <<_ACEOF
15605#define HAVE_STRUCT_TM_TM_ZONE 1
15606_ACEOF
15607
15608
15609fi
15610
15611if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15612
Matthias Kloseb9621712010-04-24 17:59:49 +000015613$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015614
15615else
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15617"
Victor Stinnere0be4232011-10-25 13:06:09 +020015618if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015619 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620else
Matthias Kloseb9621712010-04-24 17:59:49 +000015621 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622fi
15623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015625#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626_ACEOF
15627
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15629$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015630if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632else
Matthias Kloseb9621712010-04-24 17:59:49 +000015633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015634/* end confdefs.h. */
15635#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636#if !HAVE_DECL_TZNAME
15637extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015638#endif
15639
15640int
15641main ()
15642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015643return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015644 ;
15645 return 0;
15646}
15647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015648if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015649 ac_cv_var_tzname=yes
15650else
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015653rm -f core conftest.err conftest.$ac_objext \
15654 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15657$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015658 if test $ac_cv_var_tzname = yes; then
15659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015661
15662 fi
15663fi
15664
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015665
Martin v. Löwis1d459062005-03-14 21:23:33 +000015666# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15668$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015669if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015671else
15672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015674 ac_cv_working_tzset=no
15675else
Matthias Kloseb9621712010-04-24 17:59:49 +000015676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015677/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015678
15679#include <stdlib.h>
15680#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015681#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015682
15683#if HAVE_TZNAME
15684extern char *tzname[];
15685#endif
15686
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015687int main()
15688{
Brett Cannon18367812003-09-19 00:59:16 +000015689 /* Note that we need to ensure that not only does tzset(3)
15690 do 'something' with localtime, but it works as documented
15691 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015692 This includes making sure that tzname is set properly if
15693 tm->tm_zone does not exist since it is the alternative way
15694 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015695
15696 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015697 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015698 */
15699
Martin v. Löwis1d459062005-03-14 21:23:33 +000015700 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015701 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15702
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015703 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015704 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015705 if (localtime(&groundhogday)->tm_hour != 0)
15706 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015707#if HAVE_TZNAME
15708 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15709 if (strcmp(tzname[0], "UTC") ||
15710 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15711 exit(1);
15712#endif
Brett Cannon18367812003-09-19 00:59:16 +000015713
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015714 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015715 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015716 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015717 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015718#if HAVE_TZNAME
15719 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15720 exit(1);
15721#endif
Brett Cannon18367812003-09-19 00:59:16 +000015722
15723 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15724 tzset();
15725 if (localtime(&groundhogday)->tm_hour != 11)
15726 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015727#if HAVE_TZNAME
15728 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15729 exit(1);
15730#endif
15731
15732#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015733 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15734 exit(1);
15735 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15736 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015737#endif
Brett Cannon18367812003-09-19 00:59:16 +000015738
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015739 exit(0);
15740}
15741
15742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015743if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015744 ac_cv_working_tzset=yes
15745else
Matthias Kloseb9621712010-04-24 17:59:49 +000015746 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015750fi
15751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752fi
15753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15755$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015756if test "$ac_cv_working_tzset" = yes
15757then
15758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015760
15761fi
15762
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015763# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15765$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015766if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015768else
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015770/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015771#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015772int
15773main ()
15774{
15775
15776struct stat st;
15777st.st_mtim.tv_nsec = 1;
15778
15779 ;
15780 return 0;
15781}
15782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015783if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015784 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015785else
Matthias Kloseb9621712010-04-24 17:59:49 +000015786 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15789fi
15790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15792$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015793if test "$ac_cv_stat_tv_nsec" = yes
15794then
15795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015797
15798fi
15799
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015800# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15802$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015803if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015805else
Matthias Kloseb9621712010-04-24 17:59:49 +000015806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015807/* end confdefs.h. */
15808#include <sys/stat.h>
15809int
15810main ()
15811{
15812
15813struct stat st;
15814st.st_mtimespec.tv_nsec = 1;
15815
15816 ;
15817 return 0;
15818}
15819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015821 ac_cv_stat_tv_nsec2=yes
15822else
Matthias Kloseb9621712010-04-24 17:59:49 +000015823 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15826fi
15827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15829$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015830if test "$ac_cv_stat_tv_nsec2" = yes
15831then
15832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015834
15835fi
15836
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015837# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015838ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015839if test "$cross_compiling" = no; then
15840 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15841fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015842
15843for ac_header in curses.h ncurses.h
15844do :
15845 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15846ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15847if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15848 cat >>confdefs.h <<_ACEOF
15849#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15850_ACEOF
15851
15852fi
15853
15854done
15855
15856
15857# On Solaris, term.h requires curses.h
15858for ac_header in term.h
15859do :
15860 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15861#ifdef HAVE_CURSES_H
15862#include <curses.h>
15863#endif
15864
15865"
15866if test "x$ac_cv_header_term_h" = xyes; then :
15867 cat >>confdefs.h <<_ACEOF
15868#define HAVE_TERM_H 1
15869_ACEOF
15870
15871fi
15872
15873done
15874
15875
Jack Jansen666b1e72001-10-31 12:11:48 +000015876# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15878$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015879if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015880 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015881else
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015883/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015884#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015885int
15886main ()
15887{
Jack Jansen666b1e72001-10-31 12:11:48 +000015888
15889 int rtn;
15890 rtn = mvwdelch(0,0,0);
15891
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 ;
15893 return 0;
15894}
15895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015896if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015897 ac_cv_mvwdelch_is_expression=yes
15898else
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15902fi
15903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15905$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015906
15907if test "$ac_cv_mvwdelch_is_expression" = yes
15908then
Martin v. Löwis11437992002-04-12 09:54:03 +000015909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015911
15912fi
15913
Matthias Kloseb9621712010-04-24 17:59:49 +000015914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15915$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015916if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015918else
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015920/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015921#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015922int
15923main ()
15924{
Jack Jansen666b1e72001-10-31 12:11:48 +000015925
15926 WINDOW *w;
15927 w->_flags = 0;
15928
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 ;
15930 return 0;
15931}
15932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015933if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015934 ac_cv_window_has_flags=yes
15935else
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15939fi
15940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15942$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015943
Jack Jansen666b1e72001-10-31 12:11:48 +000015944
15945if test "$ac_cv_window_has_flags" = yes
15946then
Martin v. Löwis11437992002-04-12 09:54:03 +000015947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015949
15950fi
15951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15953$as_echo_n "checking for is_term_resized... " >&6; }
15954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015955/* end confdefs.h. */
15956#include <curses.h>
15957int
15958main ()
15959{
15960void *x=is_term_resized
15961 ;
15962 return 0;
15963}
15964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015965if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015968
Matthias Kloseb159a552010-04-25 21:00:44 +000015969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015970$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015971else
Matthias Kloseb9621712010-04-24 17:59:49 +000015972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15973$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015974
15975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15977
Matthias Kloseb9621712010-04-24 17:59:49 +000015978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15979$as_echo_n "checking for resize_term... " >&6; }
15980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015981/* end confdefs.h. */
15982#include <curses.h>
15983int
15984main ()
15985{
15986void *x=resize_term
15987 ;
15988 return 0;
15989}
15990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015991if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015994
Matthias Kloseb159a552010-04-25 21:00:44 +000015995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015996$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015997else
Matthias Kloseb9621712010-04-24 17:59:49 +000015998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15999$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016000
16001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16005$as_echo_n "checking for resizeterm... " >&6; }
16006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016007/* end confdefs.h. */
16008#include <curses.h>
16009int
16010main ()
16011{
16012void *x=resizeterm
16013 ;
16014 return 0;
16015}
16016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016017if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016018
Matthias Kloseb9621712010-04-24 17:59:49 +000016019$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016020
Matthias Kloseb159a552010-04-25 21:00:44 +000016021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016022$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016023else
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16025$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016026
16027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016029# last curses configure check
16030CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016031
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16033$as_echo "$as_me: checking for device files" >&6;}
16034
16035if test "x$cross_compiling" = xyes; then
16036 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16038$as_echo_n "checking for /dev/ptmx... " >&6; }
16039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16040$as_echo "not set" >&6; }
16041 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16042 fi
16043 if test "${ac_cv_file__dev_ptc+set}" != set; then
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16045$as_echo_n "checking for /dev/ptc... " >&6; }
16046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16047$as_echo "not set" >&6; }
16048 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16049 fi
16050fi
16051
Matthias Kloseb9621712010-04-24 17:59:49 +000016052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16053$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016054if ${ac_cv_file__dev_ptmx+:} false; then :
16055 $as_echo_n "(cached) " >&6
16056else
16057 test "$cross_compiling" = yes &&
16058 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16059if test -r "/dev/ptmx"; then
16060 ac_cv_file__dev_ptmx=yes
16061else
16062 ac_cv_file__dev_ptmx=no
16063fi
16064fi
16065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16066$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16067if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016068
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016069fi
16070
16071if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016072
Matthias Kloseb9621712010-04-24 17:59:49 +000016073$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016074
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16077$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016078if ${ac_cv_file__dev_ptc+:} false; then :
16079 $as_echo_n "(cached) " >&6
16080else
16081 test "$cross_compiling" = yes &&
16082 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16083if test -r "/dev/ptc"; then
16084 ac_cv_file__dev_ptc=yes
16085else
16086 ac_cv_file__dev_ptc=no
16087fi
16088fi
16089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16090$as_echo "$ac_cv_file__dev_ptc" >&6; }
16091if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016092
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016093fi
16094
16095if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016096
Matthias Kloseb9621712010-04-24 17:59:49 +000016097$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016098
Neal Norwitz865400f2003-03-21 01:42:58 +000016099fi
16100
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016101if test $ac_sys_system = Darwin
16102then
16103 LIBS="$LIBS -framework CoreFoundation"
16104fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016105
Matthias Kloseb9621712010-04-24 17:59:49 +000016106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16107$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016108if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016109 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016110else
Matthias Kloseb9621712010-04-24 17:59:49 +000016111 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016112 ac_cv_have_size_t_format="cross -- assuming yes"
16113
Thomas Wouters477c8d52006-05-27 19:21:47 +000016114else
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016116/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016117
Thomas Wouters477c8d52006-05-27 19:21:47 +000016118#include <stdio.h>
16119#include <stddef.h>
16120#include <string.h>
16121
Christian Heimes2c181612007-12-17 20:04:13 +000016122#ifdef HAVE_SYS_TYPES_H
16123#include <sys/types.h>
16124#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016125
16126#ifdef HAVE_SSIZE_T
16127typedef ssize_t Py_ssize_t;
16128#elif SIZEOF_VOID_P == SIZEOF_LONG
16129typedef long Py_ssize_t;
16130#else
16131typedef int Py_ssize_t;
16132#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016133
Christian Heimes2c181612007-12-17 20:04:13 +000016134int main()
16135{
16136 char buffer[256];
16137
Thomas Wouters477c8d52006-05-27 19:21:47 +000016138 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16139 return 1;
16140
Thomas Wouters89f507f2006-12-13 04:49:30 +000016141 if (strcmp(buffer, "123"))
16142 return 1;
16143
16144 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16145 return 1;
16146
16147 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016148 return 1;
16149
16150 return 0;
16151}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016152
Thomas Wouters477c8d52006-05-27 19:21:47 +000016153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016154if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016155 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016156else
Matthias Kloseb9621712010-04-24 17:59:49 +000016157 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016161fi
16162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16165$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016166if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016169
16170fi
16171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016173#ifdef HAVE_SYS_TYPES_H
16174#include <sys/types.h>
16175#endif
16176#ifdef HAVE_SYS_SOCKET_H
16177#include <sys/socket.h>
16178#endif
16179
Matthias Kloseb9621712010-04-24 17:59:49 +000016180"
Victor Stinnere0be4232011-10-25 13:06:09 +020016181if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016182
Martin v. Löwis11437992002-04-12 09:54:03 +000016183else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016184
Matthias Kloseb9621712010-04-24 17:59:49 +000016185$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016186
16187fi
16188
Michael W. Hudson54241132001-12-07 15:38:26 +000016189
Matthias Kloseb9621712010-04-24 17:59:49 +000016190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16191$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016192if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016193 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016194else
Matthias Kloseb9621712010-04-24 17:59:49 +000016195 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016196 ac_cv_broken_mbstowcs=no
16197else
Matthias Kloseb9621712010-04-24 17:59:49 +000016198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016199/* end confdefs.h. */
16200
Stefan Krah19c21392012-11-22 23:47:32 +010016201#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016202#include<stdlib.h>
16203int main() {
16204 size_t len = -1;
16205 const char *str = "text";
16206 len = mbstowcs(NULL, str, 0);
16207 return (len != 4);
16208}
16209
16210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016211if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016212 ac_cv_broken_mbstowcs=no
16213else
Matthias Kloseb9621712010-04-24 17:59:49 +000016214 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016218fi
16219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016220fi
16221
Matthias Kloseb9621712010-04-24 17:59:49 +000016222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16223$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016224if test "$ac_cv_broken_mbstowcs" = yes
16225then
16226
Matthias Kloseb9621712010-04-24 17:59:49 +000016227$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016228
16229fi
16230
Antoine Pitroub52ec782009-01-25 16:34:23 +000016231# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16233$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016234
16235# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016236if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016237 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016238if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016239then
16240
Matthias Kloseb9621712010-04-24 17:59:49 +000016241$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016242
Matthias Kloseb9621712010-04-24 17:59:49 +000016243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16244$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016245fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016246if test "$withval" = no
16247then
16248
16249$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16250
Matthias Kloseb9621712010-04-24 17:59:49 +000016251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16252$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016253fi
16254
Antoine Pitrou042b1282010-08-13 21:15:58 +000016255else
16256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16257$as_echo "no value specified" >&6; }
16258fi
16259
Antoine Pitroub52ec782009-01-25 16:34:23 +000016260
Matthias Kloseb17289e2012-03-15 19:51:34 +010016261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16262$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16263if ${ac_cv_computed_gotos+:} false; then :
16264 $as_echo_n "(cached) " >&6
16265else
16266 if test "$cross_compiling" = yes; then :
16267 if test "${with_computed_gotos+set}" = set; then
16268 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16269 else
16270 ac_cv_computed_gotos=no
16271 fi
16272else
16273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16274/* end confdefs.h. */
16275
16276int main(int argc, char **argv)
16277{
16278 static void *targets[1] = { &&LABEL1 };
16279 goto LABEL2;
16280LABEL1:
16281 return 0;
16282LABEL2:
16283 goto *targets[0];
16284 return 1;
16285}
16286
16287_ACEOF
16288if ac_fn_c_try_run "$LINENO"; then :
16289 ac_cv_computed_gotos=yes
16290else
16291 ac_cv_computed_gotos=no
16292fi
16293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16294 conftest.$ac_objext conftest.beam conftest.$ac_ext
16295fi
16296
16297fi
16298
16299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16300$as_echo "$ac_cv_computed_gotos" >&6; }
16301case "$ac_cv_computed_gotos" in yes*)
16302
16303$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16304
16305esac
16306
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016307case $ac_sys_system in
16308AIX*)
16309
16310$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16311 ;;
16312esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016313
Michael W. Hudson54241132001-12-07 15:38:26 +000016314
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016315
16316
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016317for h in `(cd $srcdir;echo Python/thread_*.h)`
16318do
16319 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16320done
16321
Michael W. Hudson54241132001-12-07 15:38:26 +000016322
Ned Deily0db50cf2014-07-25 12:41:31 -070016323SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16325$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016326for dir in $SRCDIRS; do
16327 if test ! -d $dir; then
16328 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016329 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016330done
Matthias Kloseb9621712010-04-24 17:59:49 +000016331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16332$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016333
Stefan Krah1919b7e2012-03-21 18:25:23 +010016334# Availability of -O2:
16335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16336$as_echo_n "checking for -O2... " >&6; }
16337saved_cflags="$CFLAGS"
16338CFLAGS="-O2"
16339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16340/* end confdefs.h. */
16341
16342int
16343main ()
16344{
16345
16346
16347 ;
16348 return 0;
16349}
16350_ACEOF
16351if ac_fn_c_try_compile "$LINENO"; then :
16352 have_O2=yes
16353else
16354 have_O2=no
16355fi
16356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16358$as_echo "$have_O2" >&6; }
16359CFLAGS="$saved_cflags"
16360
16361# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16362# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16364$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16365saved_cflags="$CFLAGS"
16366CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16367if test "$have_O2" = no; then
16368 CFLAGS=""
16369fi
16370if test "$cross_compiling" = yes; then :
16371 have_glibc_memmove_bug=undefined
16372else
16373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16374/* end confdefs.h. */
16375
16376#include <stdio.h>
16377#include <stdlib.h>
16378#include <string.h>
16379void foo(void *p, void *q) { memmove(p, q, 19); }
16380int main() {
16381 char a[32] = "123456789000000000";
16382 foo(&a[9], a);
16383 if (strcmp(a, "123456789123456789000000000") != 0)
16384 return 1;
16385 foo(a, &a[9]);
16386 if (strcmp(a, "123456789000000000") != 0)
16387 return 1;
16388 return 0;
16389}
16390
16391_ACEOF
16392if ac_fn_c_try_run "$LINENO"; then :
16393 have_glibc_memmove_bug=no
16394else
16395 have_glibc_memmove_bug=yes
16396fi
16397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16398 conftest.$ac_objext conftest.beam conftest.$ac_ext
16399fi
16400
16401CFLAGS="$saved_cflags"
16402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16403$as_echo "$have_glibc_memmove_bug" >&6; }
16404if test "$have_glibc_memmove_bug" = yes; then
16405
16406$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16407
16408fi
16409
16410if test "$have_gcc_asm_for_x87" = yes; then
16411 # Some versions of gcc miscompile inline asm:
16412 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16413 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16414 case $CC in
16415 *gcc*)
16416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16417$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16418 saved_cflags="$CFLAGS"
16419 CFLAGS="-O2"
16420 if test "$cross_compiling" = yes; then :
16421 have_ipa_pure_const_bug=undefined
16422else
16423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16424/* end confdefs.h. */
16425
16426 __attribute__((noinline)) int
16427 foo(int *p) {
16428 int r;
16429 asm ( "movl \$6, (%1)\n\t"
16430 "xorl %0, %0\n\t"
16431 : "=r" (r) : "r" (p) : "memory"
16432 );
16433 return r;
16434 }
16435 int main() {
16436 int p = 8;
16437 if ((foo(&p) ? : p) != 6)
16438 return 1;
16439 return 0;
16440 }
16441
16442_ACEOF
16443if ac_fn_c_try_run "$LINENO"; then :
16444 have_ipa_pure_const_bug=no
16445else
16446 have_ipa_pure_const_bug=yes
16447fi
16448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16449 conftest.$ac_objext conftest.beam conftest.$ac_ext
16450fi
16451
16452 CFLAGS="$saved_cflags"
16453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16454$as_echo "$have_ipa_pure_const_bug" >&6; }
16455 if test "$have_ipa_pure_const_bug" = yes; then
16456
16457$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16458
16459 fi
16460 ;;
16461 esac
16462fi
16463
Victor Stinner4f5366e2015-01-09 02:13:19 +010016464# Check for stdatomic.h
16465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16466$as_echo_n "checking for stdatomic.h... " >&6; }
16467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16468/* end confdefs.h. */
16469
16470
16471 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016472 atomic_int value = ATOMIC_VAR_INIT(1);
16473 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016474 int main() {
16475 int loaded_value = atomic_load(&value);
16476 return 0;
16477 }
16478
16479
16480_ACEOF
16481if ac_fn_c_try_link "$LINENO"; then :
16482 have_stdatomic_h=yes
16483else
16484 have_stdatomic_h=no
16485fi
16486rm -f core conftest.err conftest.$ac_objext \
16487 conftest$ac_exeext conftest.$ac_ext
16488
16489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16490$as_echo "$have_stdatomic_h" >&6; }
16491
16492if test "$have_stdatomic_h" = yes; then
16493
16494$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16495
16496fi
16497
16498# Check for GCC >= 4.7 __atomic builtins
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16500$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16502/* end confdefs.h. */
16503
16504
16505 volatile int val = 1;
16506 int main() {
16507 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16508 return 0;
16509 }
16510
16511
16512_ACEOF
16513if ac_fn_c_try_link "$LINENO"; then :
16514 have_builtin_atomic=yes
16515else
16516 have_builtin_atomic=no
16517fi
16518rm -f core conftest.err conftest.$ac_objext \
16519 conftest$ac_exeext conftest.$ac_ext
16520
16521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16522$as_echo "$have_builtin_atomic" >&6; }
16523
16524if test "$have_builtin_atomic" = yes; then
16525
16526$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16527
16528fi
16529
Ned Deily322f5ba2013-11-21 23:01:59 -080016530# ensurepip option
16531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16532$as_echo_n "checking for ensurepip... " >&6; }
16533
16534# Check whether --with-ensurepip was given.
16535if test "${with_ensurepip+set}" = set; then :
16536 withval=$with_ensurepip;
16537else
16538 with_ensurepip=upgrade
16539fi
16540
16541case $with_ensurepip in #(
16542 yes|upgrade) :
16543 ENSUREPIP=upgrade ;; #(
16544 install) :
16545 ENSUREPIP=install ;; #(
16546 no) :
16547 ENSUREPIP=no ;; #(
16548 *) :
16549 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16550esac
16551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16552$as_echo "$ENSUREPIP" >&6; }
16553
16554
Victor Stinner35a97c02015-03-08 02:59:09 +010016555# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16557$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16559/* end confdefs.h. */
16560
16561
16562 #include <dirent.h>
16563
16564 int main() {
16565 struct dirent entry;
16566 return entry.d_type == DT_UNKNOWN;
16567 }
16568
16569
16570_ACEOF
16571if ac_fn_c_try_link "$LINENO"; then :
16572 have_dirent_d_type=yes
16573else
16574 have_dirent_d_type=no
16575fi
16576rm -f core conftest.err conftest.$ac_objext \
16577 conftest$ac_exeext conftest.$ac_ext
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16579$as_echo "$have_dirent_d_type" >&6; }
16580
16581if test "$have_dirent_d_type" = yes; then
16582
16583$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16584
16585fi
16586
Victor Stinner9eb57c52015-03-19 22:21:49 +010016587# check if the Linux getrandom() syscall is available
16588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16589$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16591/* end confdefs.h. */
16592
16593
Victor Stinner1b80b242016-04-12 22:34:58 +020016594 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016595 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016596 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016597
16598 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016599 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016600 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016601 const int flags = GRND_NONBLOCK;
16602 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016603 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016604 return 0;
16605 }
16606
16607
16608_ACEOF
16609if ac_fn_c_try_link "$LINENO"; then :
16610 have_getrandom_syscall=yes
16611else
16612 have_getrandom_syscall=no
16613fi
16614rm -f core conftest.err conftest.$ac_objext \
16615 conftest$ac_exeext conftest.$ac_ext
16616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16617$as_echo "$have_getrandom_syscall" >&6; }
16618
16619if test "$have_getrandom_syscall" = yes; then
16620
16621$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16622
16623fi
16624
Victor Stinner3abf44e2015-09-18 15:38:37 +020016625# check if the getrandom() function is available
16626# the test was written for the Solaris function of <sys/random.h>
16627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16628$as_echo_n "checking for the getrandom() function... " >&6; }
16629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16630/* end confdefs.h. */
16631
16632
16633 #include <sys/random.h>
16634
16635 int main() {
16636 char buffer[1];
16637 const size_t buflen = sizeof(buffer);
16638 const int flags = 0;
16639 /* ignore the result, Python checks for ENOSYS at runtime */
16640 (void)getrandom(buffer, buflen, flags);
16641 return 0;
16642 }
16643
16644
16645_ACEOF
16646if ac_fn_c_try_link "$LINENO"; then :
16647 have_getrandom=yes
16648else
16649 have_getrandom=no
16650fi
16651rm -f core conftest.err conftest.$ac_objext \
16652 conftest$ac_exeext conftest.$ac_ext
16653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16654$as_echo "$have_getrandom" >&6; }
16655
16656if test "$have_getrandom" = yes; then
16657
16658$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16659
16660fi
16661
Guido van Rossum627b2d71993-12-24 10:39:16 +000016662# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016663ac_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 +000016664
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016665ac_config_files="$ac_config_files Modules/ld_so_aix"
16666
Martin v. Löwis11437992002-04-12 09:54:03 +000016667cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016668# This file is a shell script that caches the results of configure
16669# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016670# scripts and configure runs, see configure's option --config-cache.
16671# It is not useful on other systems. If it contains results you don't
16672# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016673#
Martin v. Löwis11437992002-04-12 09:54:03 +000016674# config.status only pays attention to the cache file if you give it
16675# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016676#
Skip Montanaro6dead952003-09-25 14:50:04 +000016677# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016678# loading this file, other *unset* `ac_cv_foo' will be assigned the
16679# following values.
16680
16681_ACEOF
16682
Guido van Rossumf78abae1997-01-21 22:02:36 +000016683# The following way of writing the cache mishandles newlines in values,
16684# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016685# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016686# Ultrix sh set writes to stderr and can't be redirected directly,
16687# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688(
16689 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16690 eval ac_val=\$$ac_var
16691 case $ac_val in #(
16692 *${as_nl}*)
16693 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016694 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16695$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696 esac
16697 case $ac_var in #(
16698 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016699 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16700 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701 esac ;;
16702 esac
16703 done
16704
Martin v. Löwis11437992002-04-12 09:54:03 +000016705 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16707 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016708 # `set' does not quote correctly, so add quotes: double-quote
16709 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016711 "s/'/'\\\\''/g;
16712 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016714 *)
16715 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016717 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718 esac |
16719 sort
16720) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016724 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016725 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16726 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16728 :end' >>confcache
16729if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16730 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016731 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016732 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16733$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016734 if test ! -f "$cache_file" || test -h "$cache_file"; then
16735 cat confcache >"$cache_file"
16736 else
16737 case $cache_file in #(
16738 */* | ?:*)
16739 mv -f confcache "$cache_file"$$ &&
16740 mv -f "$cache_file"$$ "$cache_file" ;; #(
16741 *)
16742 mv -f confcache "$cache_file" ;;
16743 esac
16744 fi
16745 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016746 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016747 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16748$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016749 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016750fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016751rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016752
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016753test "x$prefix" = xNONE && prefix=$ac_default_prefix
16754# Let make expand exec_prefix.
16755test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016756
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016757DEFS=-DHAVE_CONFIG_H
16758
Skip Montanaro6dead952003-09-25 14:50:04 +000016759ac_libobjs=
16760ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016761U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016762for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16763 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016764 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016765 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16767 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016768 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16769 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016770done
16771LIBOBJS=$ac_libobjs
16772
16773LTLIBOBJS=$ac_ltlibobjs
16774
16775
Martin v. Löwis11437992002-04-12 09:54:03 +000016776
Matthias Kloseb9621712010-04-24 17:59:49 +000016777
Victor Stinnere0be4232011-10-25 13:06:09 +020016778: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016779ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016780ac_clean_files_save=$ac_clean_files
16781ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016782{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16783$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16784as_write_fail=0
16785cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016786#! $SHELL
16787# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016788# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016789# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016790# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016791
Martin v. Löwis11437992002-04-12 09:54:03 +000016792debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016793ac_cs_recheck=false
16794ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016795
Matthias Kloseb9621712010-04-24 17:59:49 +000016796SHELL=\${CONFIG_SHELL-$SHELL}
16797export SHELL
16798_ASEOF
16799cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16800## -------------------- ##
16801## M4sh Initialization. ##
16802## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804# Be more Bourne compatible
16805DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016806if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016807 emulate sh
16808 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016809 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016810 # is contrary to our usage. Disable this feature.
16811 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016813else
Matthias Kloseb9621712010-04-24 17:59:49 +000016814 case `(set -o) 2>/dev/null` in #(
16815 *posix*) :
16816 set -o posix ;; #(
16817 *) :
16818 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016820fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016821
16822
Matthias Kloseb9621712010-04-24 17:59:49 +000016823as_nl='
16824'
16825export as_nl
16826# Printing a long string crashes Solaris 7 /usr/bin/printf.
16827as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16828as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16829as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16830# Prefer a ksh shell builtin over an external printf program on Solaris,
16831# but without wasting forks for bash or zsh.
16832if test -z "$BASH_VERSION$ZSH_VERSION" \
16833 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16834 as_echo='print -r --'
16835 as_echo_n='print -rn --'
16836elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16837 as_echo='printf %s\n'
16838 as_echo_n='printf %s'
16839else
16840 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16841 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16842 as_echo_n='/usr/ucb/echo -n'
16843 else
16844 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16845 as_echo_n_body='eval
16846 arg=$1;
16847 case $arg in #(
16848 *"$as_nl"*)
16849 expr "X$arg" : "X\\(.*\\)$as_nl";
16850 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16851 esac;
16852 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16853 '
16854 export as_echo_n_body
16855 as_echo_n='sh -c $as_echo_n_body as_echo'
16856 fi
16857 export as_echo_body
16858 as_echo='sh -c $as_echo_body as_echo'
16859fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016860
16861# The user is always right.
16862if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016863 PATH_SEPARATOR=:
16864 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16865 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16866 PATH_SEPARATOR=';'
16867 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016870
16871# IFS
16872# We need space, tab and new line, in precisely that order. Quoting is
16873# there to prevent editors from complaining about space-tab.
16874# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16875# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876IFS=" "" $as_nl"
16877
16878# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016879as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016880case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881 *[\\/]* ) as_myself=$0 ;;
16882 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016883for as_dir in $PATH
16884do
16885 IFS=$as_save_IFS
16886 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016887 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16888 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016889IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891 ;;
16892esac
16893# We did not find ourselves, most probably we were run as `sh COMMAND'
16894# in which case we are not to be found in the path.
16895if test "x$as_myself" = x; then
16896 as_myself=$0
16897fi
16898if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016899 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16900 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016901fi
16902
Matthias Kloseb9621712010-04-24 17:59:49 +000016903# Unset variables that we do not need and which cause bugs (e.g. in
16904# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16905# suppresses any "Segmentation fault" message there. '((' could
16906# trigger a bug in pdksh 5.2.14.
16907for as_var in BASH_ENV ENV MAIL MAILPATH
16908do eval test x\${$as_var+set} = xset \
16909 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016910done
16911PS1='$ '
16912PS2='> '
16913PS4='+ '
16914
16915# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016916LC_ALL=C
16917export LC_ALL
16918LANGUAGE=C
16919export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920
Matthias Kloseb9621712010-04-24 17:59:49 +000016921# CDPATH.
16922(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16923
16924
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016925# as_fn_error STATUS ERROR [LINENO LOG_FD]
16926# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016927# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16928# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016929# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016930as_fn_error ()
16931{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016932 as_status=$1; test $as_status -eq 0 && as_status=1
16933 if test "$4"; then
16934 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16935 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016936 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016937 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016938 as_fn_exit $as_status
16939} # as_fn_error
16940
16941
16942# as_fn_set_status STATUS
16943# -----------------------
16944# Set $? to STATUS, without forking.
16945as_fn_set_status ()
16946{
16947 return $1
16948} # as_fn_set_status
16949
16950# as_fn_exit STATUS
16951# -----------------
16952# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16953as_fn_exit ()
16954{
16955 set +e
16956 as_fn_set_status $1
16957 exit $1
16958} # as_fn_exit
16959
16960# as_fn_unset VAR
16961# ---------------
16962# Portably unset VAR.
16963as_fn_unset ()
16964{
16965 { eval $1=; unset $1;}
16966}
16967as_unset=as_fn_unset
16968# as_fn_append VAR VALUE
16969# ----------------------
16970# Append the text in VALUE to the end of the definition contained in VAR. Take
16971# advantage of any shell optimizations that allow amortized linear growth over
16972# repeated appends, instead of the typical quadratic growth present in naive
16973# implementations.
16974if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16975 eval 'as_fn_append ()
16976 {
16977 eval $1+=\$2
16978 }'
16979else
16980 as_fn_append ()
16981 {
16982 eval $1=\$$1\$2
16983 }
16984fi # as_fn_append
16985
16986# as_fn_arith ARG...
16987# ------------------
16988# Perform arithmetic evaluation on the ARGs, and store the result in the
16989# global $as_val. Take advantage of shells that can avoid forks. The arguments
16990# must be portable across $(()) and expr.
16991if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16992 eval 'as_fn_arith ()
16993 {
16994 as_val=$(( $* ))
16995 }'
16996else
16997 as_fn_arith ()
16998 {
16999 as_val=`expr "$@" || test $? -eq 1`
17000 }
17001fi # as_fn_arith
17002
17003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004if expr a : '\(a\)' >/dev/null 2>&1 &&
17005 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17006 as_expr=expr
17007else
17008 as_expr=false
17009fi
17010
17011if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17012 as_basename=basename
17013else
17014 as_basename=false
17015fi
17016
Matthias Kloseb9621712010-04-24 17:59:49 +000017017if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17018 as_dirname=dirname
17019else
17020 as_dirname=false
17021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023as_me=`$as_basename -- "$0" ||
17024$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17025 X"$0" : 'X\(//\)$' \| \
17026 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017027$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028 sed '/^.*\/\([^/][^/]*\)\/*$/{
17029 s//\1/
17030 q
17031 }
17032 /^X\/\(\/\/\)$/{
17033 s//\1/
17034 q
17035 }
17036 /^X\/\(\/\).*/{
17037 s//\1/
17038 q
17039 }
17040 s/.*/./; q'`
17041
Matthias Kloseb9621712010-04-24 17:59:49 +000017042# Avoid depending upon Character Ranges.
17043as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17044as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17045as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17046as_cr_digits='0123456789'
17047as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048
17049ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017050case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017051-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017052 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017054 xy) ECHO_C='\c';;
17055 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17056 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057 esac;;
17058*)
17059 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017061
Martin v. Löwis11437992002-04-12 09:54:03 +000017062rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063if test -d conf$$.dir; then
17064 rm -f conf$$.dir/conf$$.file
17065else
17066 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017067 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017069if (echo >conf$$.file) 2>/dev/null; then
17070 if ln -s conf$$.file conf$$ 2>/dev/null; then
17071 as_ln_s='ln -s'
17072 # ... but there are two gotchas:
17073 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17074 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017075 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017076 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017077 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017078 elif ln conf$$.file conf$$ 2>/dev/null; then
17079 as_ln_s=ln
17080 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017081 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017083else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017084 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17087rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017088
Matthias Kloseb9621712010-04-24 17:59:49 +000017089
17090# as_fn_mkdir_p
17091# -------------
17092# Create "$as_dir" as a directory, including parents if necessary.
17093as_fn_mkdir_p ()
17094{
17095
17096 case $as_dir in #(
17097 -*) as_dir=./$as_dir;;
17098 esac
17099 test -d "$as_dir" || eval $as_mkdir_p || {
17100 as_dirs=
17101 while :; do
17102 case $as_dir in #(
17103 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17104 *) as_qdir=$as_dir;;
17105 esac
17106 as_dirs="'$as_qdir' $as_dirs"
17107 as_dir=`$as_dirname -- "$as_dir" ||
17108$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17109 X"$as_dir" : 'X\(//\)[^/]' \| \
17110 X"$as_dir" : 'X\(//\)$' \| \
17111 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17112$as_echo X"$as_dir" |
17113 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17114 s//\1/
17115 q
17116 }
17117 /^X\(\/\/\)[^/].*/{
17118 s//\1/
17119 q
17120 }
17121 /^X\(\/\/\)$/{
17122 s//\1/
17123 q
17124 }
17125 /^X\(\/\).*/{
17126 s//\1/
17127 q
17128 }
17129 s/.*/./; q'`
17130 test -d "$as_dir" && break
17131 done
17132 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017133 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017134
17135
17136} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017137if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017138 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017139else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017140 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017141 as_mkdir_p=false
17142fi
17143
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017144
17145# as_fn_executable_p FILE
17146# -----------------------
17147# Test if FILE is an executable regular file.
17148as_fn_executable_p ()
17149{
17150 test -f "$1" && test -x "$1"
17151} # as_fn_executable_p
17152as_test_x='test -x'
17153as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
17155# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017156as_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 +000017157
17158# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017159as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
17161
Martin v. Löwis11437992002-04-12 09:54:03 +000017162exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017163## ----------------------------------- ##
17164## Main body of $CONFIG_STATUS script. ##
17165## ----------------------------------- ##
17166_ASEOF
17167test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017168
Matthias Kloseb9621712010-04-24 17:59:49 +000017169cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17170# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017171# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017172# values after options handling.
17173ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017174This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017175generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
17177 CONFIG_FILES = $CONFIG_FILES
17178 CONFIG_HEADERS = $CONFIG_HEADERS
17179 CONFIG_LINKS = $CONFIG_LINKS
17180 CONFIG_COMMANDS = $CONFIG_COMMANDS
17181 $ $0 $@
17182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183on `(hostname || uname -n) 2>/dev/null | sed 1q`
17184"
17185
Martin v. Löwis11437992002-04-12 09:54:03 +000017186_ACEOF
17187
Matthias Kloseb9621712010-04-24 17:59:49 +000017188case $ac_config_files in *"
17189"*) set x $ac_config_files; shift; ac_config_files=$*;;
17190esac
17191
17192case $ac_config_headers in *"
17193"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17194esac
17195
17196
17197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017198# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017199config_files="$ac_config_files"
17200config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017203
Matthias Kloseb9621712010-04-24 17:59:49 +000017204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017205ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017206\`$as_me' instantiates files and other configuration actions
17207from templates according to the current configuration. Unless the files
17208and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017209
Matthias Kloseb9621712010-04-24 17:59:49 +000017210Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017211
17212 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017214 --config print configuration, then exit
17215 -q, --quiet, --silent
17216 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017217 -d, --debug don't remove temporary files
17218 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017219 --file=FILE[:TEMPLATE]
17220 instantiate the configuration file FILE
17221 --header=FILE[:TEMPLATE]
17222 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017223
17224Configuration files:
17225$config_files
17226
17227Configuration headers:
17228$config_headers
17229
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017230Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017233cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17234ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017235ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017236python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017237configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017238 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017239
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017240Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017241This config.status script is free software; the Free Software Foundation
17242gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017243
17244ac_pwd='$ac_pwd'
17245srcdir='$srcdir'
17246INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017247MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017248test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017249_ACEOF
17250
Matthias Kloseb9621712010-04-24 17:59:49 +000017251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17252# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017253ac_need_defaults=:
17254while test $# != 0
17255do
17256 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017257 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17259 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017260 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017261 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017262 --*=)
17263 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17264 ac_optarg=
17265 ac_shift=:
17266 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017268 ac_option=$1
17269 ac_optarg=$2
17270 ac_shift=shift
17271 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017272 esac
17273
Skip Montanaro6dead952003-09-25 14:50:04 +000017274 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017275 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017276 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17277 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017279 $as_echo "$ac_cs_version"; exit ;;
17280 --config | --confi | --conf | --con | --co | --c )
17281 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017283 debug=: ;;
17284 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017285 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017286 case $ac_optarg in
17287 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017288 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017289 esac
17290 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017291 ac_need_defaults=false;;
17292 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017293 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017294 case $ac_optarg in
17295 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17296 esac
17297 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017298 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299 --he | --h)
17300 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017301 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017302Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017304 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17306 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17307 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017308
17309 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017310 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017311Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017312
Matthias Kloseb9621712010-04-24 17:59:49 +000017313 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017314 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017315
17316 esac
17317 shift
17318done
17319
Skip Montanaro6dead952003-09-25 14:50:04 +000017320ac_configure_extra_args=
17321
17322if $ac_cs_silent; then
17323 exec 6>/dev/null
17324 ac_configure_extra_args="$ac_configure_extra_args --silent"
17325fi
17326
17327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017329if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017330 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017331 shift
17332 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17333 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017335 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017336fi
17337
Martin v. Löwis11437992002-04-12 09:54:03 +000017338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340exec 5>>config.log
17341{
17342 echo
17343 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17344## Running $as_me. ##
17345_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017346 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017352
Matthias Kloseb9621712010-04-24 17:59:49 +000017353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354
17355# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017356for ac_config_target in $ac_config_targets
17357do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017358 case $ac_config_target in
17359 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17360 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17361 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017362 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17363 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17365 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017366 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017367 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017368 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369
Victor Stinnere0be4232011-10-25 13:06:09 +020017370 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017371 esac
17372done
17373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374
Martin v. Löwis11437992002-04-12 09:54:03 +000017375# If the user did not use the arguments to specify the items to instantiate,
17376# then the envvar interface is used. Set only those that are not.
17377# We use the long form for the default assignment because of an extremely
17378# bizarre bug on SunOS 4.1.3.
17379if $ac_need_defaults; then
17380 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17381 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17382fi
17383
Skip Montanaro6dead952003-09-25 14:50:04 +000017384# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017386# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387# Hook for its removal unless debugging.
17388# Note that there is a small window in which the directory will not be cleaned:
17389# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017390$debug ||
17391{
Victor Stinnere0be4232011-10-25 13:06:09 +020017392 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017394 : "${ac_tmp:=$tmp}"
17395 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017397 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017398}
Martin v. Löwis11437992002-04-12 09:54:03 +000017399# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017400
Martin v. Löwis11437992002-04-12 09:54:03 +000017401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017403 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017404} ||
17405{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406 tmp=./conf$$-$RANDOM
17407 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017408} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017409ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017410
Matthias Kloseb9621712010-04-24 17:59:49 +000017411# Set up the scripts for CONFIG_FILES section.
17412# No need to generate them if there are no CONFIG_FILES.
17413# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017415
Matthias Kloseb9621712010-04-24 17:59:49 +000017416
17417ac_cr=`echo X | tr X '\015'`
17418# On cygwin, bash can eat \r inside `` if the user requested igncr.
17419# But we know of no other shell where ac_cr would be empty at this
17420# point, so we can use a bashism as a fallback.
17421if test "x$ac_cr" = x; then
17422 eval ac_cr=\$\'\\r\'
17423fi
17424ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17425if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017426 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017427else
17428 ac_cs_awk_cr=$ac_cr
17429fi
17430
Victor Stinnere0be4232011-10-25 13:06:09 +020017431echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017432_ACEOF
17433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434
Matthias Kloseb9621712010-04-24 17:59:49 +000017435{
17436 echo "cat >conf$$subs.awk <<_ACEOF" &&
17437 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17438 echo "_ACEOF"
17439} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017440 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17441ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442ac_delim='%!_!# '
17443for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017444 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017445 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446
Matthias Kloseb9621712010-04-24 17:59:49 +000017447 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17448 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449 break
17450 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017451 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452 else
17453 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017454 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455done
Matthias Kloseb9621712010-04-24 17:59:49 +000017456rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457
Matthias Kloseb9621712010-04-24 17:59:49 +000017458cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017459cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017461sed -n '
17462h
17463s/^/S["/; s/!.*/"]=/
17464p
17465g
17466s/^[^!]*!//
17467:repl
17468t repl
17469s/'"$ac_delim"'$//
17470t delim
17471:nl
17472h
17473s/\(.\{148\}\)..*/\1/
17474t more1
17475s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17476p
17477n
17478b repl
17479:more1
17480s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17481p
17482g
17483s/.\{148\}//
17484t nl
17485:delim
17486h
17487s/\(.\{148\}\)..*/\1/
17488t more2
17489s/["\\]/\\&/g; s/^/"/; s/$/"/
17490p
17491b
17492:more2
17493s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17494p
17495g
17496s/.\{148\}//
17497t delim
17498' <conf$$subs.awk | sed '
17499/^[^""]/{
17500 N
17501 s/\n//
17502}
17503' >>$CONFIG_STATUS || ac_write_fail=1
17504rm -f conf$$subs.awk
17505cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17506_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017507cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017508 for (key in S) S_is_set[key] = 1
17509 FS = ""
17510
17511}
17512{
17513 line = $ 0
17514 nfields = split(line, field, "@")
17515 substed = 0
17516 len = length(field[1])
17517 for (i = 2; i < nfields; i++) {
17518 key = field[i]
17519 keylen = length(key)
17520 if (S_is_set[key]) {
17521 value = S[key]
17522 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17523 len += length(value) + length(field[++i])
17524 substed = 1
17525 } else
17526 len += 1 + keylen
17527 }
17528
17529 print line
17530}
17531
17532_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017534cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17535if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17536 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17537else
17538 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017539fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017540 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017541_ACEOF
17542
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017543# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17544# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545# trailing colons and then remove the whole line if VPATH becomes empty
17546# (actually we leave an empty line to preserve line numbers).
17547if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017548 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17549h
17550s///
17551s/^/:/
17552s/[ ]*$/:/
17553s/:\$(srcdir):/:/g
17554s/:\${srcdir}:/:/g
17555s/:@srcdir@:/:/g
17556s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017558x
17559s/\(=[ ]*\).*/\1/
17560G
17561s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562s/^[^=]*=[ ]*$//
17563}'
17564fi
17565
Matthias Kloseb9621712010-04-24 17:59:49 +000017566cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017567fi # test -n "$CONFIG_FILES"
17568
Matthias Kloseb9621712010-04-24 17:59:49 +000017569# Set up the scripts for CONFIG_HEADERS section.
17570# No need to generate them if there are no CONFIG_HEADERS.
17571# This happens for instance with `./config.status Makefile'.
17572if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017573cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017574BEGIN {
17575_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017576
Matthias Kloseb9621712010-04-24 17:59:49 +000017577# Transform confdefs.h into an awk script `defines.awk', embedded as
17578# here-document in config.status, that substitutes the proper values into
17579# config.h.in to produce config.h.
17580
17581# Create a delimiter string that does not exist in confdefs.h, to ease
17582# handling of long lines.
17583ac_delim='%!_!# '
17584for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017585 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17586 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017587 break
17588 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017589 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017590 else
17591 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17592 fi
17593done
17594
17595# For the awk script, D is an array of macro values keyed by name,
17596# likewise P contains macro parameters if any. Preserve backslash
17597# newline sequences.
17598
17599ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17600sed -n '
17601s/.\{148\}/&'"$ac_delim"'/g
17602t rset
17603:rset
17604s/^[ ]*#[ ]*define[ ][ ]*/ /
17605t def
17606d
17607:def
17608s/\\$//
17609t bsnl
17610s/["\\]/\\&/g
17611s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17612D["\1"]=" \3"/p
17613s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17614d
17615:bsnl
17616s/["\\]/\\&/g
17617s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17618D["\1"]=" \3\\\\\\n"\\/p
17619t cont
17620s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17621t cont
17622d
17623:cont
17624n
17625s/.\{148\}/&'"$ac_delim"'/g
17626t clear
17627:clear
17628s/\\$//
17629t bsnlc
17630s/["\\]/\\&/g; s/^/"/; s/$/"/p
17631d
17632:bsnlc
17633s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17634b cont
17635' <confdefs.h | sed '
17636s/'"$ac_delim"'/"\\\
17637"/g' >>$CONFIG_STATUS || ac_write_fail=1
17638
17639cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17640 for (key in D) D_is_set[key] = 1
17641 FS = ""
17642}
17643/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17644 line = \$ 0
17645 split(line, arg, " ")
17646 if (arg[1] == "#") {
17647 defundef = arg[2]
17648 mac1 = arg[3]
17649 } else {
17650 defundef = substr(arg[1], 2)
17651 mac1 = arg[2]
17652 }
17653 split(mac1, mac2, "(") #)
17654 macro = mac2[1]
17655 prefix = substr(line, 1, index(line, defundef) - 1)
17656 if (D_is_set[macro]) {
17657 # Preserve the white space surrounding the "#".
17658 print prefix "define", macro P[macro] D[macro]
17659 next
17660 } else {
17661 # Replace #undef with comments. This is necessary, for example,
17662 # in the case of _POSIX_SOURCE, which is predefined and required
17663 # on some systems where configure will not decide to define it.
17664 if (defundef == "undef") {
17665 print "/*", prefix defundef, macro, "*/"
17666 next
17667 }
17668 }
17669}
17670{ print }
17671_ACAWK
17672_ACEOF
17673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017674 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017675fi # test -n "$CONFIG_HEADERS"
17676
17677
17678eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17679shift
17680for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681do
17682 case $ac_tag in
17683 :[FHLC]) ac_mode=$ac_tag; continue;;
17684 esac
17685 case $ac_mode$ac_tag in
17686 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017687 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688 :[FH]-) ac_tag=-:-;;
17689 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17690 esac
17691 ac_save_IFS=$IFS
17692 IFS=:
17693 set x $ac_tag
17694 IFS=$ac_save_IFS
17695 shift
17696 ac_file=$1
17697 shift
17698
17699 case $ac_mode in
17700 :L) ac_source=$1;;
17701 :[FH])
17702 ac_file_inputs=
17703 for ac_f
17704 do
17705 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017706 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707 *) # Look for the file first in the build tree, then in the source tree
17708 # (if the path is not absolute). The absolute path cannot be DOS-style,
17709 # because $ac_f cannot contain `:'.
17710 test -f "$ac_f" ||
17711 case $ac_f in
17712 [\\/$]*) false;;
17713 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17714 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017715 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017717 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17718 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 done
17720
17721 # Let's still pretend it is `configure' which instantiates (i.e., don't
17722 # use $as_me), people would be surprised to read:
17723 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017724 configure_input='Generated from '`
17725 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17726 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 if test x"$ac_file" != x-; then
17728 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017729 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17730$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017732 # Neutralize special characters interpreted by sed in replacement strings.
17733 case $configure_input in #(
17734 *\&* | *\|* | *\\* )
17735 ac_sed_conf_input=`$as_echo "$configure_input" |
17736 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17737 *) ac_sed_conf_input=$configure_input;;
17738 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739
17740 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017741 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17742 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743 esac
17744 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 esac
17746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017748$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017749 X"$ac_file" : 'X\(//\)[^/]' \| \
17750 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017752$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17754 s//\1/
17755 q
17756 }
17757 /^X\(\/\/\)[^/].*/{
17758 s//\1/
17759 q
17760 }
17761 /^X\(\/\/\)$/{
17762 s//\1/
17763 q
17764 }
17765 /^X\(\/\).*/{
17766 s//\1/
17767 q
17768 }
17769 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017770 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017771 ac_builddir=.
17772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773case "$ac_dir" in
17774.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17775*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017776 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017778 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779 case $ac_top_builddir_sub in
17780 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17781 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17782 esac ;;
17783esac
17784ac_abs_top_builddir=$ac_pwd
17785ac_abs_builddir=$ac_pwd$ac_dir_suffix
17786# for backward compatibility:
17787ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017788
17789case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017791 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792 ac_top_srcdir=$ac_top_builddir_sub
17793 ac_abs_top_srcdir=$ac_pwd ;;
17794 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796 ac_top_srcdir=$srcdir
17797 ac_abs_top_srcdir=$srcdir ;;
17798 *) # Relative name.
17799 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17800 ac_top_srcdir=$ac_top_build_prefix$srcdir
17801 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017802esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017804
Martin v. Löwis11437992002-04-12 09:54:03 +000017805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 case $ac_mode in
17807 :F)
17808 #
17809 # CONFIG_FILE
17810 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017811
17812 case $INSTALL in
17813 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017816 ac_MKDIR_P=$MKDIR_P
17817 case $MKDIR_P in
17818 [\\/$]* | ?:[\\/]* ) ;;
17819 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17820 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017821_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017822
Matthias Kloseb9621712010-04-24 17:59:49 +000017823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824# If the template does not know about datarootdir, expand it.
17825# FIXME: This hack should be removed a few years after 2.60.
17826ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017827ac_sed_dataroot='
17828/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829 p
17830 q
17831}
17832/@datadir@/p
17833/@docdir@/p
17834/@infodir@/p
17835/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017836/@mandir@/p'
17837case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838*datarootdir*) ac_datarootdir_seen=yes;;
17839*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17841$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017843cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844 ac_datarootdir_hack='
17845 s&@datadir@&$datadir&g
17846 s&@docdir@&$docdir&g
17847 s&@infodir@&$infodir&g
17848 s&@localedir@&$localedir&g
17849 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017850 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851esac
17852_ACEOF
17853
17854# Neutralize VPATH when `$srcdir' = `.'.
17855# Shell code in configure.ac might set extrasub.
17856# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017857cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17858ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017859$extrasub
17860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017861cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017862:t
17863/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017864s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017865s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017866s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867s&@srcdir@&$ac_srcdir&;t t
17868s&@abs_srcdir@&$ac_abs_srcdir&;t t
17869s&@top_srcdir@&$ac_top_srcdir&;t t
17870s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17871s&@builddir@&$ac_builddir&;t t
17872s&@abs_builddir@&$ac_abs_builddir&;t t
17873s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17874s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017875s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017877"
Victor Stinnere0be4232011-10-25 13:06:09 +020017878eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17879 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017882 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17883 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17884 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017886which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017887$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017888which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017889
Victor Stinnere0be4232011-10-25 13:06:09 +020017890 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017892 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17893 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017894 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017895 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896 ;;
17897 :H)
17898 #
17899 # CONFIG_HEADER
17900 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017902 {
17903 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017904 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17905 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017906 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017907 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017908 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17909$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017910 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017911 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017912 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017913 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 fi
17915 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017916 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017917 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017918 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017919 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017920 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922
17923 esac
17924
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017925
17926 case $ac_file$ac_mode in
17927 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17928
17929 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930done # for ac_tag
17931
Guido van Rossum627b2d71993-12-24 10:39:16 +000017932
Matthias Kloseb9621712010-04-24 17:59:49 +000017933as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017934_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017935ac_clean_files=$ac_clean_files_save
17936
Matthias Kloseb9621712010-04-24 17:59:49 +000017937test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017938 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017939
Martin v. Löwis11437992002-04-12 09:54:03 +000017940
17941# configure is writing to config.log, and then calls config.status.
17942# config.status does its own redirection, appending to config.log.
17943# Unfortunately, on DOS this fails, as config.log is still kept open
17944# by configure, so config.status won't be able to write to it; its
17945# output is simply discarded. So we exec the FD to /dev/null,
17946# effectively closing config.log, so it can be properly (re)opened and
17947# appended to by config.status. When coming back to configure, we
17948# need to make the FD available again.
17949if test "$no_create" != yes; then
17950 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017951 ac_config_status_args=
17952 test "$silent" = yes &&
17953 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017954 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017955 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017956 exec 5>>config.log
17957 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17958 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017959 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017960fi
17961if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17963$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017964fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017965
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017966
Christian Heimes75ed8902013-11-20 01:11:18 +010017967echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017968if test ! -f Modules/Setup
17969then
17970 cp $srcdir/Modules/Setup.dist Modules/Setup
17971fi
17972
Christian Heimes75ed8902013-11-20 01:11:18 +010017973echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017974if test ! -f Modules/Setup.local
17975then
17976 echo "# Edit this file for local setup changes" >Modules/Setup.local
17977fi
17978
Christian Heimes75ed8902013-11-20 01:11:18 +010017979echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017980$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17981 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017982 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017983mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017984
17985if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17986 echo "" >&6
17987 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017988 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 +000017989 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017990 echo "" >&6
17991 echo "" >&6
17992fi
17993