blob: 7138eb1776ec2fa5b390160dc2272e78689cfd48 [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.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
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'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
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
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000650LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
653PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700665CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000666BASECFLAGS
667OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700668LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700669target_os
670target_vendor
671target_cpu
672target
673LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_ERR
675LLVM_PROF_FILE
676LLVM_PROF_MERGER
677PGO_PROF_USE_FLAG
678PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700679LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700680DEF_MAKE_RULE
681DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000682ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000683LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100684MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000685INSTALL_DATA
686INSTALL_SCRIPT
687INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200688ac_ct_READELF
689READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000690ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200691ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000692AR
693RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000694USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000695GNULD
696LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000697LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000698RUNSHARED
699INSTSONAME
700LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000701PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000702BLDLIBRARY
703DLLLIBRARY
704LDLIBRARY
705LIBRARY
706BUILDEXEEXT
707EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200708NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200709MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200711PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200712MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200713ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MAINCC
715CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716GREP
717CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000718OBJEXT
719EXEEXT
720ac_ct_CC
721CPPFLAGS
722LDFLAGS
723CFLAGS
724CC
725EXPORT_MACOSX_DEPLOYMENT_TARGET
726CONFIGURE_MACOSX_DEPLOYMENT_TARGET
727SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200728_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000729MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000730FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800732FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKALTINSTALLLAST
734FRAMEWORKALTINSTALLFIRST
735FRAMEWORKINSTALLLAST
736FRAMEWORKINSTALLFIRST
737PYTHONFRAMEWORKINSTALLDIR
738PYTHONFRAMEWORKPREFIX
739PYTHONFRAMEWORKDIR
740PYTHONFRAMEWORKIDENTIFIER
741PYTHONFRAMEWORK
742LIPO_32BIT_FLAGS
743ARCH_RUN_32BIT
744UNIVERSALSDK
745CONFIG_ARGS
746SOVERSION
747VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000748GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200749PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200750PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100751host_os
752host_vendor
753host_cpu
754host
755build_os
756build_vendor
757build_cpu
758build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500759HAS_HG
760HGBRANCH
761HGTAG
762HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400763BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000764target_alias
765host_alias
766build_alias
767LIBS
768ECHO_T
769ECHO_N
770ECHO_C
771DEFS
772mandir
773localedir
774libdir
775psdir
776pdfdir
777dvidir
778htmldir
779infodir
780docdir
781oldincludedir
782includedir
Benjamin Petersona9296e72016-09-07 11:06:17 -0700783runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000784localstatedir
785sharedstatedir
786sysconfdir
787datadir
788datarootdir
789libexecdir
790sbindir
791bindir
792program_transform_name
793prefix
794exec_prefix
795PACKAGE_URL
796PACKAGE_BUGREPORT
797PACKAGE_STRING
798PACKAGE_VERSION
799PACKAGE_TARNAME
800PACKAGE_NAME
801PATH_SEPARATOR
802SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000803ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000804ac_user_opts='
805enable_option_checking
806enable_universalsdk
807with_universal_archs
808with_framework_name
809enable_framework
810with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600811with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Brett Cannon63d98bc2016-09-06 17:12:40 -0700817with_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700818with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100819with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100820with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_libs
822with_system_expat
823with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100824with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000825enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700826with_tcltk_includes
827with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_threads
830with_thread
831enable_ipv6
832with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_pymalloc
834with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_fpectl
836with_libm
837with_libc
838enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800840with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000841'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 ac_precious_vars='build_alias
843host_alias
844target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100845MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846CC
847CFLAGS
848LDFLAGS
849LIBS
850CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100851CPP
852PKG_CONFIG
853PKG_CONFIG_PATH
854PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000858ac_init_help=
859ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000860ac_unrecognized_opts=
861ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# The variables have the same names as the options, with
863# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867no_recursion=
868prefix=NONE
869program_prefix=NONE
870program_suffix=NONE
871program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876x_includes=NONE
877x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000878
879# Installation directory options.
880# These are left unexpanded so users can "make install exec_prefix=/foo"
881# and all the variables that are supposed to be based on exec_prefix
882# by default will actually change.
883# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885bindir='${exec_prefix}/bin'
886sbindir='${exec_prefix}/sbin'
887libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888datarootdir='${prefix}/share'
889datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890sysconfdir='${prefix}/etc'
891sharedstatedir='${prefix}/com'
892localstatedir='${prefix}/var'
Benjamin Petersona9296e72016-09-07 11:06:17 -0700893runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894includedir='${prefix}/include'
895oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897infodir='${datarootdir}/info'
898htmldir='${docdir}'
899dvidir='${docdir}'
900pdfdir='${docdir}'
901psdir='${docdir}'
902libdir='${exec_prefix}/lib'
903localedir='${datarootdir}/locale'
904mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 # If the previous option needs an argument, assign it.
911 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 ac_prev=
914 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200918 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919 *=) ac_optarg= ;;
920 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Accept the important Cygnus configure options, so we can diagnose typos.
924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_dashdash$ac_option in
926 --)
927 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 -bindir | --bindir | --bindi | --bind | --bin | --bi)
930 ac_prev=bindir ;;
931 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
934 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 -cache-file | --cache-file | --cache-fil | --cache-fi \
940 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941 ac_prev=cache_file ;;
942 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 cache_file=$ac_optarg ;;
945
946 --config-cache | -C)
947 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955 | --dataroo | --dataro | --datar)
956 ac_prev=datarootdir ;;
957 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959 datarootdir=$ac_optarg ;;
960
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200965 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970"enable_$ac_useropt"
971"*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976
977 -docdir | --docdir | --docdi | --doc | --do)
978 ac_prev=docdir ;;
979 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980 docdir=$ac_optarg ;;
981
982 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983 ac_prev=dvidir ;;
984 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200991 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005 | --exec | --exe | --ex)
1006 ac_prev=exec_prefix ;;
1007 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Obsolete; use --with-gas.
1014 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 -help | --help | --hel | --he | -h)
1017 ac_init_help=long ;;
1018 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019 ac_init_help=recursive ;;
1020 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001028 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029 ac_prev=htmldir ;;
1030 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031 | --ht=*)
1032 htmldir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -includedir | --includedir | --includedi | --included | --include \
1035 | --includ | --inclu | --incl | --inc)
1036 ac_prev=includedir ;;
1037 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -infodir | --infodir | --infodi | --infod | --info | --inf)
1042 ac_prev=infodir ;;
1043 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libdir | --libdir | --libdi | --libd)
1047 ac_prev=libdir ;;
1048 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052 | --libexe | --libex | --libe)
1053 ac_prev=libexecdir ;;
1054 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -localedir | --localedir | --localedi | --localed | --locale)
1059 ac_prev=localedir ;;
1060 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061 localedir=$ac_optarg ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 ac_prev=localstatedir ;;
1066 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071 ac_prev=mandir ;;
1072 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Obsolete; use --without-fp.
1077 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 no_create=yes ;;
1082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089 | --oldin | --oldi | --old | --ol | --o)
1090 ac_prev=oldincludedir ;;
1091 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097 ac_prev=prefix ;;
1098 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102 | --program-pre | --program-pr | --program-p)
1103 ac_prev=program_prefix ;;
1104 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109 | --program-suf | --program-su | --program-s)
1110 ac_prev=program_suffix ;;
1111 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-transform-name | --program-transform-name \
1116 | --program-transform-nam | --program-transform-na \
1117 | --program-transform-n | --program-transform- \
1118 | --program-transform | --program-transfor \
1119 | --program-transfo | --program-transf \
1120 | --program-trans | --program-tran \
1121 | --progr-tra | --program-tr | --program-t)
1122 ac_prev=program_transform_name ;;
1123 -program-transform-name=* | --program-transform-name=* \
1124 | --program-transform-nam=* | --program-transform-na=* \
1125 | --program-transform-n=* | --program-transform-=* \
1126 | --program-transform=* | --program-transfor=* \
1127 | --program-transfo=* | --program-transf=* \
1128 | --program-trans=* | --program-tran=* \
1129 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001132 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133 ac_prev=pdfdir ;;
1134 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135 pdfdir=$ac_optarg ;;
1136
1137 -psdir | --psdir | --psdi | --psd | --ps)
1138 ac_prev=psdir ;;
1139 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140 psdir=$ac_optarg ;;
1141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143 | -silent | --silent | --silen | --sile | --sil)
1144 silent=yes ;;
1145
Benjamin Petersona9296e72016-09-07 11:06:17 -07001146 -runstatedir | --runstatedir | --runstatedi | --runstated \
1147 | --runstate | --runstat | --runsta | --runst | --runs \
1148 | --run | --ru | --r)
1149 ac_prev=runstatedir ;;
1150 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1151 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1152 | --run=* | --ru=* | --r=*)
1153 runstatedir=$ac_optarg ;;
1154
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1156 ac_prev=sbindir ;;
1157 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1158 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
1161 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1162 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1163 | --sharedst | --shareds | --shared | --share | --shar \
1164 | --sha | --sh)
1165 ac_prev=sharedstatedir ;;
1166 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1167 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1168 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1169 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 -site | --site | --sit)
1173 ac_prev=site ;;
1174 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1178 ac_prev=srcdir ;;
1179 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1183 | --syscon | --sysco | --sysc | --sys | --sy)
1184 ac_prev=sysconfdir ;;
1185 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1186 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1195 verbose=yes ;;
1196
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 -version | --version | --versio | --versi | --vers | -V)
1198 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt_orig=$ac_useropt
1206 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207 case $ac_user_opts in
1208 *"
1209"with_$ac_useropt"
1210"*) ;;
1211 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1212 ac_unrecognized_sep=', ';;
1213 esac
1214 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001220 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt_orig=$ac_useropt
1222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 --x)
1233 # Obsolete; use --with-x.
1234 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1237 | --x-incl | --x-inc | --x-in | --x-i)
1238 ac_prev=x_includes ;;
1239 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1240 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1244 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1245 ac_prev=x_libraries ;;
1246 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1247 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1251Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ;;
1253
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 *=*)
1255 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1256 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 case $ac_envvar in #(
1258 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 export $ac_envvar ;;
1263
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001264 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001269 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270 ;;
1271
1272 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273done
1274
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278fi
1279
Matthias Kloseb9621712010-04-24 17:59:49 +00001280if test -n "$ac_unrecognized_opts"; then
1281 case $enable_option_checking in
1282 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001284 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1285 esac
1286fi
1287
1288# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1290 datadir sysconfdir sharedstatedir localstatedir includedir \
1291 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersona9296e72016-09-07 11:06:17 -07001292 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001295 # Remove trailing slashes.
1296 case $ac_val in
1297 */ )
1298 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1299 eval $ac_var=\$ac_val;;
1300 esac
1301 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001302 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 [\\/$]* | ?:[\\/]* ) continue;;
1304 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# There might be people who depend on the old broken behavior: `$host'
1310# used to hold the argument of --host etc.
1311# FIXME: To remove some day.
1312build=$build_alias
1313host=$host_alias
1314target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# FIXME: To remove some day.
1317if test "x$host_alias" != x; then
1318 if test "x$build_alias" = x; then
1319 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001320 elif test "x$build_alias" != "x$host_alias"; then
1321 cross_compiling=yes
1322 fi
1323fi
1324
1325ac_tool_prefix=
1326test -n "$host_alias" && ac_tool_prefix=$host_alias-
1327
1328test "$silent" = yes && exec 6>/dev/null
1329
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331ac_pwd=`pwd` && test -n "$ac_pwd" &&
1332ac_ls_di=`ls -di .` &&
1333ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337
1338
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339# Find the source files, if location was not specified.
1340if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 ac_confdir=`$as_dirname -- "$as_myself" ||
1344$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345 X"$as_myself" : 'X\(//\)[^/]' \| \
1346 X"$as_myself" : 'X\(//\)$' \| \
1347 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1348$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)[^/].*/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)$/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\).*/{
1362 s//\1/
1363 q
1364 }
1365 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001366 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368 srcdir=..
1369 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370else
1371 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373if test ! -r "$srcdir/$ac_unique_file"; then
1374 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1378ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380 pwd)`
1381# When building in place, set srcdir=.
1382if test "$ac_abs_confdir" = "$ac_pwd"; then
1383 srcdir=.
1384fi
1385# Remove unnecessary trailing slashes from srcdir.
1386# Double slashes in file names in object file debugging info
1387# mess up M-x gdb in Emacs.
1388case $srcdir in
1389*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1390esac
1391for ac_var in $ac_precious_vars; do
1392 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_env_${ac_var}_value=\$${ac_var}
1394 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1396done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398#
1399# Report the --help message.
1400#
1401if test "$ac_init_help" = "long"; then
1402 # Omit some internal or obsolete options to make the list less imposing.
1403 # This message is too long to be a string in the A/UX 3.1 sh.
1404 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001405\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407Usage: $0 [OPTION]... [VAR=VALUE]...
1408
1409To assign environment variables (e.g., CC, CFLAGS...), specify them as
1410VAR=VALUE. See below for descriptions of some of the useful variables.
1411
1412Defaults for the options are specified in brackets.
1413
1414Configuration:
1415 -h, --help display this help and exit
1416 --help=short display options specific to this package
1417 --help=recursive display the short help of all the included packages
1418 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001419 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --cache-file=FILE cache test results in FILE [disabled]
1421 -C, --config-cache alias for \`--cache-file=config.cache'
1422 -n, --no-create do not create output files
1423 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1424
Martin v. Löwis11437992002-04-12 09:54:03 +00001425Installation directories:
1426 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431By default, \`make install' will install all the files in
1432\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1433an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1434for instance \`--prefix=\$HOME'.
1435
1436For better control, use the options below.
1437
1438Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 --bindir=DIR user executables [EPREFIX/bin]
1440 --sbindir=DIR system admin executables [EPREFIX/sbin]
1441 --libexecdir=DIR program executables [EPREFIX/libexec]
1442 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1443 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1444 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersona9296e72016-09-07 11:06:17 -07001445 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --libdir=DIR object code libraries [EPREFIX/lib]
1447 --includedir=DIR C header files [PREFIX/include]
1448 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1449 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1450 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1451 --infodir=DIR info documentation [DATAROOTDIR/info]
1452 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1453 --mandir=DIR man documentation [DATAROOTDIR/man]
1454 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1455 --htmldir=DIR html documentation [DOCDIR]
1456 --dvidir=DIR dvi documentation [DOCDIR]
1457 --pdfdir=DIR pdf documentation [DOCDIR]
1458 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460
1461 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001462
1463System types:
1464 --build=BUILD configure for building on BUILD [guessed]
1465 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001466 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
1468fi
1469
1470if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001472 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 cat <<\_ACEOF
1475
1476Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1479 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001480 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001481 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-framework[=INSTALLDIR]
1483 Build (MacOSX|Darwin) framework
1484 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001485 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001486 --enable-loadable-sqlite-extensions
1487 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --enable-ipv6 Enable ipv6 (with ipv4) support
1489 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001490 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
1493Optional Packages:
1494 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1495 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001496 --with-universal-archs=ARCH
1497 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001498 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001499 --with-framework-name=FRAMEWORK
1500 specify an alternate name of the framework built
1501 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001503 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001504 --with-cxx-main=<compiler>
1505 compile main() and link python executable with C++
1506 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with-suffix=.exe set executable suffix
1508 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00001509 --with-optimizations Enable expensive optimizations (PGO, maybe LTO,
Brett Cannon63d98bc2016-09-06 17:12:40 -07001510 etc). Disabled by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001511 --with-lto Enable Link Time Optimization in PGO builds.
1512 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001513 --with-hash-algorithm=[fnv|siphash24]
1514 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001515 --with-address-sanitizer
1516 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001518 --with-system-expat build pyexpat module using an installed expat
1519 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001520 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001521 --with-system-libmpdec build _decimal module using an installed libmpdec
1522 library
Ned Deilyd819b932013-09-06 01:07:05 -07001523 --with-tcltk-includes='-I...'
1524 override search for Tcl and Tk include files
1525 --with-tcltk-libs='-L...'
1526 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001527 --with-dbmliborder=db1:db2:...
1528 order to check db backends for dbm. Valid value is a
1529 colon separated string with the backend names
1530 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-threads[=DIRECTORY]
1532 disable/enable thread support
1533 --with(out)-thread[=DIRECTORY]
1534 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with(out)-doc-strings disable/enable documentation strings
1536 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001537 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-fpectl enable SIGFPE catching
1539 --with-libm=STRING math library
1540 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001541 --with(out)-computed-gotos
1542 Use computed gotos in evaluation loop (enabled by
1543 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001544 --with(out)-ensurepip=[=upgrade]
1545 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001548 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 CC C compiler command
1550 CFLAGS C compiler flags
1551 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1552 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001554 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001557 PKG_CONFIG path to pkg-config utility
1558 PKG_CONFIG_PATH
1559 directories to add to pkg-config's search path
1560 PKG_CONFIG_LIBDIR
1561 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001562
1563Use these variables to override the choices made by `configure' or to help
1564it to find libraries and programs with nonstandard names/locations.
1565
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001566Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
1570
1571if test "$ac_init_help" = "recursive"; then
1572 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 test -d "$ac_dir" ||
1575 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1576 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 ac_builddir=.
1578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579case "$ac_dir" in
1580.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001582 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 case $ac_top_builddir_sub in
1586 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1588 esac ;;
1589esac
1590ac_abs_top_builddir=$ac_pwd
1591ac_abs_builddir=$ac_pwd$ac_dir_suffix
1592# for backward compatibility:
1593ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 ac_top_srcdir=$ac_top_builddir_sub
1599 ac_abs_top_srcdir=$ac_pwd ;;
1600 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$srcdir
1603 ac_abs_top_srcdir=$srcdir ;;
1604 *) # Relative name.
1605 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1606 ac_top_srcdir=$ac_top_build_prefix$srcdir
1607 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001608esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 cd "$ac_dir" || { ac_status=$?; continue; }
1612 # Check for guested configure.
1613 if test -f "$ac_srcdir/configure.gnu"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1616 elif test -f "$ac_srcdir/configure"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 fi || ac_status=$?
1622 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 done
1624fi
1625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001627if $ac_init_version; then
1628 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001629python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001630generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001631
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001633This configure script is free software; the Free Software Foundation
1634gives unlimited permission to copy, distribute and modify it.
1635_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001638
1639## ------------------------ ##
1640## Autoconf initialization. ##
1641## ------------------------ ##
1642
1643# ac_fn_c_try_compile LINENO
1644# --------------------------
1645# Try to compile conftest.$ac_ext, and return whether this succeeded.
1646ac_fn_c_try_compile ()
1647{
1648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649 rm -f conftest.$ac_objext
1650 if { { ac_try="$ac_compile"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_compile") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1665 test $ac_status = 0; } && {
1666 test -z "$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 } && test -s conftest.$ac_objext; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_compile
1680
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001681# ac_fn_c_try_cpp LINENO
1682# ----------------------
1683# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_cpp ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 if { { ac_try="$ac_cpp conftest.$ac_ext"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } > conftest.i && {
1703 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 }; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
1710
1711 ac_retval=1
1712fi
1713 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1714 as_fn_set_status $ac_retval
1715
1716} # ac_fn_c_try_cpp
1717
Matthias Kloseb9621712010-04-24 17:59:49 +00001718# ac_fn_c_try_link LINENO
1719# -----------------------
1720# Try to link conftest.$ac_ext, and return whether this succeeded.
1721ac_fn_c_try_link ()
1722{
1723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724 rm -f conftest.$ac_objext conftest$ac_exeext
1725 if { { ac_try="$ac_link"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_link") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } && {
1741 test -z "$ac_c_werror_flag" ||
1742 test ! -s conftest.err
1743 } && test -s conftest$ac_exeext && {
1744 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001745 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 }; then :
1747 ac_retval=0
1748else
1749 $as_echo "$as_me: failed program was:" >&5
1750sed 's/^/| /' conftest.$ac_ext >&5
1751
1752 ac_retval=1
1753fi
1754 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1755 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1756 # interfere with the next link command; also delete a directory that is
1757 # left behind by Apple's compiler. We do this before executing the actions.
1758 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_link
1763
Matthias Kloseb9621712010-04-24 17:59:49 +00001764# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1765# -------------------------------------------------------
1766# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1767# the include files in INCLUDES and setting the cache variable VAR
1768# accordingly.
1769ac_fn_c_check_header_mongrel ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001772 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001775if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 $as_echo_n "(cached) " >&6
1777fi
1778eval ac_res=\$$3
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1780$as_echo "$ac_res" >&6; }
1781else
1782 # Is the header compilable?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1784$as_echo_n "checking $2 usability... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787$4
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_compile "$LINENO"; then :
1791 ac_header_compiler=yes
1792else
1793 ac_header_compiler=no
1794fi
1795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1797$as_echo "$ac_header_compiler" >&6; }
1798
1799# Is the header present?
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1801$as_echo_n "checking $2 presence... " >&6; }
1802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_cpp "$LINENO"; then :
1807 ac_header_preproc=yes
1808else
1809 ac_header_preproc=no
1810fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001811rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1813$as_echo "$ac_header_preproc" >&6; }
1814
1815# So? What about this header?
1816case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1817 yes:no: )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1819$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1821$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1822 ;;
1823 no:yes:* )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1825$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1827$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1829$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1831$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1833$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001834( $as_echo "## --------------------------------------- ##
1835## Report this to https://bugs.python.org/ ##
1836## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 ) | sed "s/^/$as_me: WARNING: /" >&2
1838 ;;
1839esac
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 eval "$3=\$ac_header_compiler"
1846fi
1847eval ac_res=\$$3
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1849$as_echo "$ac_res" >&6; }
1850fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852
1853} # ac_fn_c_check_header_mongrel
1854
1855# ac_fn_c_try_run LINENO
1856# ----------------------
1857# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1858# that executables *can* be run.
1859ac_fn_c_try_run ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 if { { ac_try="$ac_link"
1863case "(($ac_try" in
1864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1865 *) ac_try_echo=$ac_try;;
1866esac
1867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1868$as_echo "$ac_try_echo"; } >&5
1869 (eval "$ac_link") 2>&5
1870 ac_status=$?
1871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1873 { { case "(($ac_try" in
1874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1875 *) ac_try_echo=$ac_try;;
1876esac
1877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1878$as_echo "$ac_try_echo"; } >&5
1879 (eval "$ac_try") 2>&5
1880 ac_status=$?
1881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1882 test $ac_status = 0; }; }; then :
1883 ac_retval=0
1884else
1885 $as_echo "$as_me: program exited with status $ac_status" >&5
1886 $as_echo "$as_me: failed program was:" >&5
1887sed 's/^/| /' conftest.$ac_ext >&5
1888
1889 ac_retval=$ac_status
1890fi
1891 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001892 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 as_fn_set_status $ac_retval
1894
1895} # ac_fn_c_try_run
1896
1897# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1898# -------------------------------------------------------
1899# Tests whether HEADER exists and can be compiled using the include files in
1900# INCLUDES, setting the cache variable VAR accordingly.
1901ac_fn_c_check_header_compile ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912#include <$2>
1913_ACEOF
1914if ac_fn_c_try_compile "$LINENO"; then :
1915 eval "$3=yes"
1916else
1917 eval "$3=no"
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_header_compile
1927
Matthias Kloseb9621712010-04-24 17:59:49 +00001928# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929# -------------------------------------------
1930# Tests whether TYPE exists after having included INCLUDES, setting cache
1931# variable VAR accordingly.
1932ac_fn_c_check_type ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof ($2))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof (($2)))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 eval "$3=yes"
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_check_type
1981
Matthias Kloseb9621712010-04-24 17:59:49 +00001982# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1983# --------------------------------------------
1984# Tries to find the compile-time value of EXPR in a program that includes
1985# INCLUDES, setting VAR accordingly. Returns whether the value could be
1986# computed
1987ac_fn_c_compute_int ()
1988{
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 if test "$cross_compiling" = yes; then
1991 # Depending upon the size, compute the lo and hi bounds.
1992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001999test_array [0] = 0;
2000return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_lo=0 ac_mid=0
2008 while :; do
2009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_hi=$ac_mid; break
2025else
2026 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2027 if test $ac_lo -le $ac_mid; then
2028 ac_lo= ac_hi=
2029 break
2030 fi
2031 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 done
2035else
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$4
2039int
2040main ()
2041{
2042static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_hi=-1 ac_mid=-1
2052 while :; do
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002160 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002173if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002229
2230} # ac_fn_c_check_func
2231
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002232# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2233# ---------------------------------------------
2234# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2235# accordingly.
2236ac_fn_c_check_decl ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 as_decl_name=`echo $2|sed 's/ *(.*//'`
2240 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2242$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2243if eval \${$3+:} false; then :
2244 $as_echo_n "(cached) " >&6
2245else
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$4
2249int
2250main ()
2251{
2252#ifndef $as_decl_name
2253#ifdef __cplusplus
2254 (void) $as_decl_use;
2255#else
2256 (void) $as_decl_name;
2257#endif
2258#endif
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270fi
2271eval ac_res=\$$3
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273$as_echo "$ac_res" >&6; }
2274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2275
2276} # ac_fn_c_check_decl
2277
Matthias Kloseb9621712010-04-24 17:59:49 +00002278# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2279# ----------------------------------------------------
2280# Tries to find if the field MEMBER exists in type AGGR, after including
2281# INCLUDES, setting cache variable VAR accordingly.
2282ac_fn_c_check_member ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2286$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$5
2293int
2294main ()
2295{
2296static $2 ac_aggr;
2297if (ac_aggr.$3)
2298return 0;
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303if ac_fn_c_try_compile "$LINENO"; then :
2304 eval "$4=yes"
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (sizeof ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 eval "$4=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$4
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002331 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
2333} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002338It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002339generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002597See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Trent Nelson4d4ec652012-10-16 08:51:24 -04002687
Trent Nelson5595ab52012-10-17 04:47:31 -04002688if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689 # If we're building out-of-tree, we need to make sure the following
2690 # resources get picked up before their $srcdir counterparts.
2691 # Objects/ -> typeslots.inc
2692 # Include/ -> Python-ast.h, graminit.h
2693 # Python/ -> importlib.h
2694 # (A side effect of this is that these resources will automatically be
2695 # regenerated when building out-of-tree, regardless of whether or not
2696 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2697 # off.)
2698 BASECPPFLAGS="-IObjects -IInclude -IPython"
2699else
2700 BASECPPFLAGS=""
2701fi
2702
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703
2704
2705
2706
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002707if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708then
2709# Extract the first word of "hg", so it can be a program name with args.
2710set dummy hg; ac_word=$2
2711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002713if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714 $as_echo_n "(cached) " >&6
2715else
2716 if test -n "$HAS_HG"; then
2717 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2718else
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
2723 test -z "$as_dir" && as_dir=.
2724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726 ac_cv_prog_HAS_HG="found"
2727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2728 break 2
2729 fi
2730done
2731 done
2732IFS=$as_save_IFS
2733
2734 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2735fi
2736fi
2737HAS_HG=$ac_cv_prog_HAS_HG
2738if test -n "$HAS_HG"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2740$as_echo "$HAS_HG" >&6; }
2741else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2743$as_echo "no" >&6; }
2744fi
2745
2746
2747else
2748HAS_HG=no-repository
2749fi
2750if test $HAS_HG = found
2751then
2752 HGVERSION="hg id -i \$(srcdir)"
2753 HGTAG="hg id -t \$(srcdir)"
2754 HGBRANCH="hg id -b \$(srcdir)"
2755else
2756 HGVERSION=""
2757 HGTAG=""
2758 HGBRANCH=""
2759fi
2760
2761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
2764
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002765ac_aux_dir=
2766for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2767 if test -f "$ac_dir/install-sh"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/install-sh -c"
2770 break
2771 elif test -f "$ac_dir/install.sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install.sh -c"
2774 break
2775 elif test -f "$ac_dir/shtool"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/shtool install -c"
2778 break
2779 fi
2780done
2781if test -z "$ac_aux_dir"; then
2782 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2783fi
2784
2785# These three variables are undocumented and unsupported,
2786# and are intended to be withdrawn in a future Autoconf release.
2787# They can cause serious problems if a builder's source tree is in a directory
2788# whose full name contains unusual characters.
2789ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2790ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2791ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2792
2793
2794# Make sure we can run config.sub.
2795$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2796 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2797
2798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2799$as_echo_n "checking build system type... " >&6; }
2800if ${ac_cv_build+:} false; then :
2801 $as_echo_n "(cached) " >&6
2802else
2803 ac_build_alias=$build_alias
2804test "x$ac_build_alias" = x &&
2805 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2806test "x$ac_build_alias" = x &&
2807 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2808ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2809 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2810
2811fi
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2813$as_echo "$ac_cv_build" >&6; }
2814case $ac_cv_build in
2815*-*-*) ;;
2816*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2817esac
2818build=$ac_cv_build
2819ac_save_IFS=$IFS; IFS='-'
2820set x $ac_cv_build
2821shift
2822build_cpu=$1
2823build_vendor=$2
2824shift; shift
2825# Remember, the first character of IFS is used to create $*,
2826# except with old shells:
2827build_os=$*
2828IFS=$ac_save_IFS
2829case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2830
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2833$as_echo_n "checking host system type... " >&6; }
2834if ${ac_cv_host+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 if test "x$host_alias" = x; then
2838 ac_cv_host=$ac_cv_build
2839else
2840 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2841 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2842fi
2843
2844fi
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2846$as_echo "$ac_cv_host" >&6; }
2847case $ac_cv_host in
2848*-*-*) ;;
2849*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2850esac
2851host=$ac_cv_host
2852ac_save_IFS=$IFS; IFS='-'
2853set x $ac_cv_host
2854shift
2855host_cpu=$1
2856host_vendor=$2
2857shift; shift
2858# Remember, the first character of IFS is used to create $*,
2859# except with old shells:
2860host_os=$*
2861IFS=$ac_save_IFS
2862case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2863
2864
2865
doko@python.orga10e4a92013-01-25 18:45:12 +01002866
2867
Ned Deilyfcbc2462014-08-22 13:32:49 -07002868# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2869rm -f pybuilddir.txt
2870
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002871for ac_prog in python$PACKAGE_VERSION python3 python
2872do
2873 # Extract the first word of "$ac_prog", so it can be a program name with args.
2874set dummy $ac_prog; ac_word=$2
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2876$as_echo_n "checking for $ac_word... " >&6; }
2877if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2878 $as_echo_n "(cached) " >&6
2879else
2880 if test -n "$PYTHON_FOR_GEN"; then
2881 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2882else
2883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2884for as_dir in $PATH
2885do
2886 IFS=$as_save_IFS
2887 test -z "$as_dir" && as_dir=.
2888 for ac_exec_ext in '' $ac_executable_extensions; do
2889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2890 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2892 break 2
2893 fi
2894done
2895 done
2896IFS=$as_save_IFS
2897
2898fi
2899fi
2900PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2901if test -n "$PYTHON_FOR_GEN"; then
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2903$as_echo "$PYTHON_FOR_GEN" >&6; }
2904else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2906$as_echo "no" >&6; }
2907fi
2908
2909
2910 test -n "$PYTHON_FOR_GEN" && break
2911done
2912test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2913
2914if test "$PYTHON_FOR_GEN" = not-found; then
2915 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2916 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2917 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2918fi
2919
2920
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002921if test "$cross_compiling" = yes; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2923$as_echo_n "checking for python interpreter for cross build... " >&6; }
2924 if test -z "$PYTHON_FOR_BUILD"; then
2925 for interp in python$PACKAGE_VERSION python3 python; do
2926 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002927 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 +02002928 break
2929 fi
2930 interp=
2931 done
2932 if test x$interp = x; then
2933 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2936$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002937 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:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002939 # Used to comment out stuff for rebuilding generated files
2940 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002945 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Martin Pantereac67be2016-07-28 01:28:27 +00002950
Benjamin Petersond23f8222009-04-05 19:13:16 +00002951if test "$prefix" != "/"; then
2952 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
2957
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002958# We don't use PACKAGE_ variables, and they cause conflicts
2959# with other autoconf-based packages that include Python.h
2960grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2961rm confdefs.h
2962mv confdefs.h.new confdefs.h
2963
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002964
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002965VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002966
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002967# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002968
2969SOVERSION=1.0
2970
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971# The later defininition of _XOPEN_SOURCE disables certain features
2972# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002975
2976
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982
2983
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2985# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989
2990
Martin v. Löwisd6320502004-08-12 13:45:08 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002995
2996
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2999# them.
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002
3003
3004
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003005define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003007# Arguments passed to configure.
3008
3009CONFIG_ARGS="$ac_configure_args"
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3012$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003013# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003014if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003015 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 case $enableval in
3017 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 # Locate the best usable SDK, see Mac/README.txt for more
3019 # information
3020 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003021 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3024 if test ! -d "${enableval}"
3025 then
3026 enableval=/
3027 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
3031 case $enableval in
3032 no)
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035 ;;
3036 *)
3037 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038 if test ! -d "${UNIVERSALSDK}"
3039 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003040 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042 ;;
3043 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046else
3047
3048 UNIVERSALSDK=
3049 enable_universalsdk=
3050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053if test -n "${UNIVERSALSDK}"
3054then
Matthias Kloseb9621712010-04-24 17:59:49 +00003055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3056$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057else
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003063
Ned Deily87adb6e2013-10-18 21:09:56 -07003064ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003065
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066# For backward compatibility reasons we prefer to select '32-bit' if available,
3067# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069if test "`uname -s`" = "Darwin"
3070then
3071 if test -n "${UNIVERSALSDK}"
3072 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003073 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074 then
3075 UNIVERSAL_ARCHS="intel"
3076 fi
3077 fi
3078fi
3079
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3082$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083
3084# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087 UNIVERSAL_ARCHS="$withval"
3088
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089fi
3090
Ned Deily87adb6e2013-10-18 21:09:56 -07003091if test -n "${UNIVERSALSDK}"
3092then
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3094$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3095else
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097$as_echo "no" >&6; }
3098fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003100
3101# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003102if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103 withval=$with_framework_name;
3104 PYTHONFRAMEWORK=${withval}
3105 PYTHONFRAMEWORKDIR=${withval}.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3107
3108else
3109
3110 PYTHONFRAMEWORK=Python
3111 PYTHONFRAMEWORKDIR=Python.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3113
3114fi
3115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003117if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003119 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003120 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003121 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003122 esac
3123 case $enableval in
3124 no)
3125 PYTHONFRAMEWORK=
3126 PYTHONFRAMEWORKDIR=no-framework
3127 PYTHONFRAMEWORKPREFIX=
3128 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 FRAMEWORKINSTALLFIRST=
3130 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003131 FRAMEWORKALTINSTALLFIRST=
3132 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003133 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 if test "x${prefix}" = "xNONE"; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003140 ;;
3141 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003144 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003145 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003146 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3147 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003148 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003151 if test "x${prefix}" = "xNONE" ; then
3152 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157
3158 case "${enableval}" in
3159 /System*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 if test "${prefix}" = "NONE" ; then
3162 # See below
3163 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3164 fi
3165 ;;
3166
3167 /Library*)
3168 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3169 ;;
3170
3171 */Library/Frameworks)
3172 MDIR="`dirname "${enableval}"`"
3173 MDIR="`dirname "${MDIR}"`"
3174 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3175
3176 if test "${prefix}" = "NONE"; then
3177 # User hasn't specified the
3178 # --prefix option, but wants to install
3179 # the framework in a non-default location,
3180 # ensure that the compatibility links get
3181 # installed relative to that prefix as well
3182 # instead of in /usr/local.
3183 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3184 fi
3185 ;;
3186
3187 *)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 ;;
3190 esac
3191
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3201
3202 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3203
Jack Jansene578a632001-08-15 01:27:14 +00003204 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Guido van Rossum563e7081996-09-10 18:20:48 +00003206else
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Jack Jansene578a632001-08-15 01:27:14 +00003208 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003210 PYTHONFRAMEWORKPREFIX=
3211 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 FRAMEWORKINSTALLFIRST=
3213 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003214 FRAMEWORKALTINSTALLFIRST=
3215 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003216 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3219 else
3220 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3221 fi
Jack Jansene578a632001-08-15 01:27:14 +00003222 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234
3235
3236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003238
Ned Deilyb8f944f2013-11-21 22:42:25 -08003239
Jack Jansene578a632001-08-15 01:27:14 +00003240##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003241## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003242## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003243##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244# Set name for machine-dependent library files
3245
Matthias Kloseb9621712010-04-24 17:59:49 +00003246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3247$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248if test -z "$MACHDEP"
3249then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 # avoid using uname for cross builds
3251 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003252 # ac_sys_system and ac_sys_release are used for setting
3253 # a lot of different things including 'define_xopen_source'
3254 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 case "$host" in
3256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
3262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003284 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003285 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003286 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003287 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3313fi
3314
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003315# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3316# disable features if it is defined, without any means to access these
3317# features as extensions. For these systems, we skip the definition of
3318# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3319# some feature, make sure there is no alternative way to access this
3320# feature. Also, when using wildcards, make sure you have verified the
3321# need for not defining _XOPEN_SOURCE on all systems matching the
3322# wildcard, and that the wildcard does not include future systems
3323# (which may remove their limitations).
3324case $ac_sys_system/$ac_sys_release in
3325 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3326 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003327 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003328 # In addition, Stefan Krah confirms that issue #1244610 exists through
3329 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003330 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331 define_xopen_source=no
3332 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3333 # also defined. This can be overridden by defining _BSD_SOURCE
3334 # As this has a different meaning on Linux, only define it on OpenBSD
3335
Matthias Kloseb9621712010-04-24 17:59:49 +00003336$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337
3338 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345
3346 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003347 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3348 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3349 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003350 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 +00003351 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003352 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3353 # request to enable features supported by the standard as a request
3354 # to disable features not supported by the standard. The best way
3355 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3356 # entirely and define __EXTENSIONS__ instead.
3357 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003358 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3360 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003361 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003362 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 define_xopen_source=no;;
3364 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003368 # On FreeBSD 4, the math functions C89 does not cover are never defined
3369 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3370 FreeBSD/4.*)
3371 define_xopen_source=no;;
3372 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3373 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3374 # identifies itself as Darwin/7.*
3375 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # disables platform specific features beyond repair.
3377 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3378 # has no effect, don't bother defining them
3379 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003380 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003381 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3384 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3385 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003386 AIX/4)
3387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 AIX/5)
3389 if test `uname -r` -eq 1; then
3390 define_xopen_source=no
3391 fi
3392 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003393 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3394 # defining NI_NUMERICHOST.
3395 QNX/6.3.2)
3396 define_xopen_source=no
3397 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003398
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003399esac
3400
3401if test $define_xopen_source = yes
3402then
Victor Stinner14d098d2011-09-07 22:29:43 +02003403 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
Victor Stinner14d098d2011-09-07 22:29:43 +02003405$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
3408 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3409 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3410 # several APIs are not declared. Since this is also needed in some
3411 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Matthias Kloseb9621712010-04-24 17:59:49 +00003413$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003416
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003417$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003419fi
3420
Christian Heimes647cd872013-12-07 23:39:33 +01003421# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3422case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003423 hp*|HP*)
3424 define_stdc_a1=yes;;
3425 *)
3426 define_stdc_a1=no;;
3427esac
3428
3429if test $define_stdc_a1 = yes
3430then
Christian Heimes647cd872013-12-07 23:39:33 +01003431
3432$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3433
Christian Heimesb02bcae2013-12-08 15:21:08 +01003434fi
Christian Heimes647cd872013-12-07 23:39:33 +01003435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003439# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3456# it may influence the way we can build extensions, so distutils
3457# needs to check it
3458
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459
Jack Jansen6b08a402004-06-03 12:41:45 +00003460CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003462
Guido van Rossum627b2d71993-12-24 10:39:16 +00003463# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003464
3465# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3466# for debug/optimization stuff. BASECFLAGS is for flags that are required
3467# just to get things to compile and link. Users are free to override OPT
3468# when running configure or make. The build should not break if they do.
3469# BASECFLAGS should generally not be messed with, however.
3470
3471# XXX shouldn't some/most/all of this code be merged with the stuff later
3472# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3474$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003477if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003479 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003480 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481 without_gcc=yes;;
3482 yes) CC=gcc
3483 without_gcc=no;;
3484 *) CC=$withval
3485 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003490 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003491 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003492 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003493 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494fi
3495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3497$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003498
Zachary Ware5af85642015-12-21 12:09:17 -06003499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3500$as_echo_n "checking for --with-icc... " >&6; }
3501
3502# Check whether --with-icc was given.
3503if test "${with_icc+set}" = set; then :
3504 withval=$with_icc;
3505 case $withval in
3506 no) CC=${CC:-cc}
3507 with_icc=no;;
3508 yes) CC=icc
3509 CXX=icpc
3510 with_icc=yes;;
3511 *) CC=$withval
3512 with_icc=$withval;;
3513 esac
3514else
3515
3516 with_icc=no
3517fi
3518
3519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3520$as_echo "$with_icc" >&6; }
3521
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522# If the user switches compilers, we can't believe the cache
3523if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3524then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003525 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003526(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527fi
3528
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003529# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3530# when the compiler supports them, but we don't always want -O2, and
3531# we set -g later.
3532if test -z "$CFLAGS"; then
3533 CFLAGS=
3534fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535
3536if test "$ac_sys_system" = "Darwin"
3537then
3538 # Compiler selection on MacOSX is more complicated than
3539 # AC_PROG_CC can handle, see Mac/README.txt for more
3540 # information
3541 if test -z "${CC}"
3542 then
3543 found_gcc=
3544 found_clang=
3545 as_save_IFS=$IFS; IFS=:
3546 for as_dir in $PATH
3547 do
3548 IFS=$as_save_IFS
3549 if test -x $as_dir/gcc; then
3550 if test -z "${found_gcc}"; then
3551 found_gcc=$as_dir/gcc
3552 fi
3553 fi
3554 if test -x $as_dir/clang; then
3555 if test -z "${found_clang}"; then
3556 found_clang=$as_dir/clang
3557 fi
3558 fi
3559 done
3560 IFS=$as_save_IFS
3561
3562 if test -n "$found_gcc" -a -n "$found_clang"
3563 then
3564 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3565 then
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3567$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3568 CC="$found_clang"
3569 CXX="$found_clang++"
3570 fi
3571
3572
3573 elif test -z "$found_gcc" -a -n "$found_clang"
3574 then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3576$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3577 CC="$found_clang"
3578 CXX="$found_clang++"
3579
3580 elif test -z "$found_gcc" -a -z "$found_clang"
3581 then
3582 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3583 if test -n "${found_clang}"
3584 then
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3586$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3587 CC="${found_clang}"
3588 CXX="`/usr/bin/xcrun -find clang++`"
3589
3590 # else: use default behaviour
3591 fi
3592 fi
3593 fi
3594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595ac_ext=c
3596ac_cpp='$CPP $CPPFLAGS'
3597ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3598ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3599ac_compiler_gnu=$ac_cv_c_compiler_gnu
3600if test -n "$ac_tool_prefix"; then
3601 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3602set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3604$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003605if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003607else
3608 if test -n "$CC"; then
3609 ac_cv_prog_CC="$CC" # Let the user override the test.
3610else
Martin v. Löwis11437992002-04-12 09:54:03 +00003611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612for as_dir in $PATH
3613do
3614 IFS=$as_save_IFS
3615 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003617 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 $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 +00003620 break 2
3621 fi
3622done
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003625
Jack Jansendd19cf82001-12-06 22:36:17 +00003626fi
3627fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003628CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003629if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3631$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003632else
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3634$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637
Martin v. Löwis11437992002-04-12 09:54:03 +00003638fi
3639if test -z "$ac_cv_prog_CC"; then
3640 ac_ct_CC=$CC
3641 # Extract the first word of "gcc", so it can be a program name with args.
3642set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3644$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003645if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
3648 if test -n "$ac_ct_CC"; then
3649 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3650else
3651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3652for as_dir in $PATH
3653do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 $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 +00003660 break 2
3661 fi
3662done
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003665
3666fi
3667fi
3668ac_ct_CC=$ac_cv_prog_ac_ct_CC
3669if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3671$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672else
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003675fi
3676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677 if test "x$ac_ct_CC" = x; then
3678 CC=""
3679 else
3680 case $cross_compiling:$ac_tool_warned in
3681yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003682{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3683$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684ac_tool_warned=yes ;;
3685esac
3686 CC=$ac_ct_CC
3687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003688else
3689 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003690fi
3691
Jack Jansendd19cf82001-12-06 22:36:17 +00003692if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 if test -n "$ac_tool_prefix"; then
3694 # 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 +00003695set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003698if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003700else
3701 if test -n "$CC"; then
3702 ac_cv_prog_CC="$CC" # Let the user override the test.
3703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3705for as_dir in $PATH
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 $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 +00003713 break 2
3714 fi
3715done
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003718
3719fi
3720fi
3721CC=$ac_cv_prog_CC
3722if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3724$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003725else
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3727$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003728fi
3729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003732fi
3733if test -z "$CC"; then
3734 # Extract the first word of "cc", so it can be a program name with args.
3735set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3737$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003738if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
3741 if test -n "$CC"; then
3742 ac_cv_prog_CC="$CC" # Let the user override the test.
3743else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3746for as_dir in $PATH
3747do
3748 IFS=$as_save_IFS
3749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3753 ac_prog_rejected=yes
3754 continue
3755 fi
3756 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $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 +00003758 break 2
3759 fi
3760done
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003763
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764if test $ac_prog_rejected = yes; then
3765 # We found a bogon in the path, so make sure we never use it.
3766 set dummy $ac_cv_prog_CC
3767 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 # We chose a different compiler from the bogus one.
3770 # However, it has the same basename, so the bogon will be chosen
3771 # first if we set CC to just the basename; use the full file name.
3772 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003773 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 fi
3775fi
3776fi
3777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3781$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782else
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3784$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003785fi
3786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
3789if test -z "$CC"; then
3790 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 do
3793 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3794set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003797if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003799else
3800 if test -n "$CC"; then
3801 ac_cv_prog_CC="$CC" # Let the user override the test.
3802else
Martin v. Löwis11437992002-04-12 09:54:03 +00003803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3804for as_dir in $PATH
3805do
3806 IFS=$as_save_IFS
3807 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 $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 +00003812 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003814done
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003817
3818fi
3819fi
3820CC=$ac_cv_prog_CC
3821if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3823$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003827fi
3828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 test -n "$CC" && break
3831 done
3832fi
3833if test -z "$CC"; then
3834 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003836do
3837 # Extract the first word of "$ac_prog", so it can be a program name with args.
3838set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3840$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003841if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
3844 if test -n "$ac_ct_CC"; then
3845 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3846else
3847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3848for as_dir in $PATH
3849do
3850 IFS=$as_save_IFS
3851 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 $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 +00003856 break 2
3857 fi
3858done
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863fi
3864ac_ct_CC=$ac_cv_prog_ac_ct_CC
3865if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3867$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868else
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 test -n "$ac_ct_CC" && break
3875done
Michael W. Hudson54241132001-12-07 15:38:26 +00003876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877 if test "x$ac_ct_CC" = x; then
3878 CC=""
3879 else
3880 case $cross_compiling:$ac_tool_warned in
3881yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003882{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3883$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884ac_tool_warned=yes ;;
3885esac
3886 CC=$ac_ct_CC
3887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003888fi
3889
3890fi
3891
3892
Matthias Kloseb9621712010-04-24 17:59:49 +00003893test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003895as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003896See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003897
3898# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003899$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3900set X $ac_compile
3901ac_compiler=$2
3902for ac_option in --version -v -V -qversion; do
3903 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904case "(($ac_try" in
3905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3906 *) ac_try_echo=$ac_try;;
3907esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3909$as_echo "$ac_try_echo"; } >&5
3910 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 if test -s conftest.err; then
3913 sed '10a\
3914... rest of stderr output deleted ...
3915 10q' conftest.err >conftest.er1
3916 cat conftest.er1 >&5
3917 fi
3918 rm -f conftest.er1 conftest.err
3919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3920 test $ac_status = 0; }
3921done
Martin v. Löwis11437992002-04-12 09:54:03 +00003922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003924/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003925
Martin v. Löwis11437992002-04-12 09:54:03 +00003926int
3927main ()
3928{
3929
3930 ;
3931 return 0;
3932}
3933_ACEOF
3934ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003935ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003936# Try to create an executable without -o first, disregard a.out.
3937# It will help us diagnose broken compilers, and finding out an intuition
3938# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3940$as_echo_n "checking whether the C compiler works... " >&6; }
3941ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3942
3943# The possible output files:
3944ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946ac_rmfiles=
3947for ac_file in $ac_files
3948do
3949 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3952 esac
3953done
3954rm -f $ac_rmfiles
3955
Matthias Kloseb9621712010-04-24 17:59:49 +00003956if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957case "(($ac_try" in
3958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3959 *) ac_try_echo=$ac_try;;
3960esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3962$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3966 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3968# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3969# in a Makefile. We should not override ac_cv_exeext if it was cached,
3970# so that the user can short-circuit this test for compilers unknown to
3971# Autoconf.
3972for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003973do
3974 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003975 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003977 ;;
3978 [ab].out )
3979 # We found the default executable, but exeext='' is most
3980 # certainly right.
3981 break;;
3982 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 then :; else
3985 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3986 fi
3987 # We set ac_cv_exeext here because the later test for it is not
3988 # safe: cross compilers may not add the suffix if given an `-o'
3989 # argument, so we may need to know it at that point already.
3990 # Even if this section looks crufty: it has the advantage of
3991 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992 break;;
3993 * )
3994 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 esac
3996done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997test "$ac_cv_exeext" = no && ac_cv_exeext=
3998
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003999else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 ac_file=''
4001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004002if test -z "$ac_file"; then :
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4004$as_echo "no" >&6; }
4005$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004006sed 's/^/| /' conftest.$ac_ext >&5
4007
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004010as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004011See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004012else
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4014$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4017$as_echo_n "checking for C compiler default output file name... " >&6; }
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4019$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021
Matthias Kloseb9621712010-04-24 17:59:49 +00004022rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4025$as_echo_n "checking for suffix of executables... " >&6; }
4026if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4038# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4039# work properly (i.e., refer to `conftest.exe'), while it won't with
4040# `rm'.
4041for ac_file in conftest.exe conftest conftest.*; do
4042 test -f "$ac_file" || continue
4043 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4046 break;;
4047 * ) break;;
4048 esac
4049done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004050else
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004053as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004054See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004056rm -f conftest conftest$ac_cv_exeext
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4058$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004059
4060rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004061EXEEXT=$ac_cv_exeext
4062ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4064/* end confdefs.h. */
4065#include <stdio.h>
4066int
4067main ()
4068{
4069FILE *f = fopen ("conftest.out", "w");
4070 return ferror (f) || fclose (f) != 0;
4071
4072 ;
4073 return 0;
4074}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004076ac_clean_files="$ac_clean_files conftest.out"
4077# Check that the compiler produces executables we can run. If not, either
4078# the compiler is broken, or we cross compile.
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4080$as_echo_n "checking whether we are cross compiling... " >&6; }
4081if test "$cross_compiling" != yes; then
4082 { { ac_try="$ac_link"
4083case "(($ac_try" in
4084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085 *) ac_try_echo=$ac_try;;
4086esac
4087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4088$as_echo "$ac_try_echo"; } >&5
4089 (eval "$ac_link") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }
4093 if { ac_try='./conftest$ac_cv_exeext'
4094 { { case "(($ac_try" in
4095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4096 *) ac_try_echo=$ac_try;;
4097esac
4098eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4099$as_echo "$ac_try_echo"; } >&5
4100 (eval "$ac_try") 2>&5
4101 ac_status=$?
4102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4103 test $ac_status = 0; }; }; then
4104 cross_compiling=no
4105 else
4106 if test "$cross_compiling" = maybe; then
4107 cross_compiling=yes
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004111as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004112If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004113See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 fi
4115 fi
4116fi
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4118$as_echo "$cross_compiling" >&6; }
4119
4120rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4121ac_clean_files=$ac_clean_files_save
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4123$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004124if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo_n "(cached) " >&6
4126else
4127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004128/* end confdefs.h. */
4129
4130int
4131main ()
4132{
4133
4134 ;
4135 return 0;
4136}
4137_ACEOF
4138rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004139if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140case "(($ac_try" in
4141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4142 *) ac_try_echo=$ac_try;;
4143esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4145$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4149 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150 for ac_file in conftest.o conftest.obj conftest.*; do
4151 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4155 break;;
4156 esac
4157done
4158else
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004160sed 's/^/| /' conftest.$ac_ext >&5
4161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004164as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004165See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004167rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4170$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171OBJEXT=$ac_cv_objext
4172ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4174$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004175if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004177else
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Martin v. Löwis11437992002-04-12 09:54:03 +00004181int
4182main ()
4183{
4184#ifndef __GNUC__
4185 choke me
4186#endif
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004193 ac_compiler_gnu=yes
4194else
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004198ac_cv_c_compiler_gnu=$ac_compiler_gnu
4199
4200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4202$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4203if test $ac_compiler_gnu = yes; then
4204 GCC=yes
4205else
4206 GCC=
4207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004208ac_test_CFLAGS=${CFLAGS+set}
4209ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4211$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004212if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004214else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 ac_save_c_werror_flag=$ac_c_werror_flag
4216 ac_c_werror_flag=yes
4217 ac_cv_prog_cc_g=no
4218 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004221
Martin v. Löwis11437992002-04-12 09:54:03 +00004222int
4223main ()
4224{
4225
4226 ;
4227 return 0;
4228}
4229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004230if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004231 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232else
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 CFLAGS=""
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246
Matthias Kloseb9621712010-04-24 17:59:49 +00004247else
4248 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251/* end confdefs.h. */
4252
4253int
4254main ()
4255{
4256
4257 ;
4258 return 0;
4259}
4260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004261if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4269 ac_c_werror_flag=$ac_save_c_werror_flag
4270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4272$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004275elif test $ac_cv_prog_cc_g = yes; then
4276 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004277 CFLAGS="-g -O2"
4278 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280 fi
4281else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004282 if test "$GCC" = yes; then
4283 CFLAGS="-O2"
4284 else
4285 CFLAGS=
4286 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4289$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004290if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004292else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004294ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296/* end confdefs.h. */
4297#include <stdarg.h>
4298#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004299struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004300/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4301struct buf { int x; };
4302FILE * (*rcsopen) (struct buf *, struct stat *, int);
4303static char *e (p, i)
4304 char **p;
4305 int i;
4306{
4307 return p[i];
4308}
4309static char *f (char * (*g) (char **, int), char **p, ...)
4310{
4311 char *s;
4312 va_list v;
4313 va_start (v,p);
4314 s = g (p, va_arg (v,int));
4315 va_end (v);
4316 return s;
4317}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318
4319/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4320 function prototypes and stuff, but not '\xHH' hex character constants.
4321 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4324 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4329 inside strings and character constants. */
4330#define FOO(x) 'x'
4331int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4332
Skip Montanaro6dead952003-09-25 14:50:04 +00004333int test (int i, double x);
4334struct s1 {int (*f) (int a);};
4335struct s2 {int (*f) (double a);};
4336int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4337int argc;
4338char **argv;
4339int
4340main ()
4341{
4342return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4343 ;
4344 return 0;
4345}
4346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4348 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004349do
4350 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354rm -f core conftest.err conftest.$ac_objext
4355 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004356done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004358CC=$ac_save_CC
4359
4360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361# AC_CACHE_VAL
4362case "x$ac_cv_prog_cc_c89" in
4363 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4365$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4368$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004369 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4372$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004373esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004374if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004375
Matthias Kloseb9621712010-04-24 17:59:49 +00004376fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004377
Martin v. Löwis11437992002-04-12 09:54:03 +00004378ac_ext=c
4379ac_cpp='$CPP $CPPFLAGS'
4380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4382ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4390$as_echo_n "checking how to run the C preprocessor... " >&6; }
4391# On Suns, sometimes $CPP names a directory.
4392if test -n "$CPP" && test -d "$CPP"; then
4393 CPP=
4394fi
4395if test -z "$CPP"; then
4396 if ${ac_cv_prog_CPP+:} false; then :
4397 $as_echo_n "(cached) " >&6
4398else
4399 # Double quotes because CPP needs to be expanded
4400 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4401 do
4402 ac_preproc_ok=false
4403for ac_c_preproc_warn_flag in '' yes
4404do
4405 # Use a header file that comes with gcc, so configuring glibc
4406 # with a fresh cross-compiler works.
4407 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4408 # <limits.h> exists even on freestanding compilers.
4409 # On the NeXT, cc -E runs the code through the compiler's parser,
4410 # not just through cpp. "Syntax error" is here to catch this case.
4411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412/* end confdefs.h. */
4413#ifdef __STDC__
4414# include <limits.h>
4415#else
4416# include <assert.h>
4417#endif
4418 Syntax error
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421
4422else
4423 # Broken: fails on valid input.
4424continue
4425fi
4426rm -f conftest.err conftest.i conftest.$ac_ext
4427
4428 # OK, works on sane cases. Now check whether nonexistent headers
4429 # can be detected and how.
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431/* end confdefs.h. */
4432#include <ac_nonexistent.h>
4433_ACEOF
4434if ac_fn_c_try_cpp "$LINENO"; then :
4435 # Broken: success on invalid input.
4436continue
4437else
4438 # Passes both tests.
4439ac_preproc_ok=:
4440break
4441fi
4442rm -f conftest.err conftest.i conftest.$ac_ext
4443
4444done
4445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4446rm -f conftest.i conftest.err conftest.$ac_ext
4447if $ac_preproc_ok; then :
4448 break
4449fi
4450
4451 done
4452 ac_cv_prog_CPP=$CPP
4453
4454fi
4455 CPP=$ac_cv_prog_CPP
4456else
4457 ac_cv_prog_CPP=$CPP
4458fi
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4460$as_echo "$CPP" >&6; }
4461ac_preproc_ok=false
4462for ac_c_preproc_warn_flag in '' yes
4463do
4464 # Use a header file that comes with gcc, so configuring glibc
4465 # with a fresh cross-compiler works.
4466 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4467 # <limits.h> exists even on freestanding compilers.
4468 # On the NeXT, cc -E runs the code through the compiler's parser,
4469 # not just through cpp. "Syntax error" is here to catch this case.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#ifdef __STDC__
4473# include <limits.h>
4474#else
4475# include <assert.h>
4476#endif
4477 Syntax error
4478_ACEOF
4479if ac_fn_c_try_cpp "$LINENO"; then :
4480
4481else
4482 # Broken: fails on valid input.
4483continue
4484fi
4485rm -f conftest.err conftest.i conftest.$ac_ext
4486
4487 # OK, works on sane cases. Now check whether nonexistent headers
4488 # can be detected and how.
4489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4490/* end confdefs.h. */
4491#include <ac_nonexistent.h>
4492_ACEOF
4493if ac_fn_c_try_cpp "$LINENO"; then :
4494 # Broken: success on invalid input.
4495continue
4496else
4497 # Passes both tests.
4498ac_preproc_ok=:
4499break
4500fi
4501rm -f conftest.err conftest.i conftest.$ac_ext
4502
4503done
4504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4505rm -f conftest.i conftest.err conftest.$ac_ext
4506if $ac_preproc_ok; then :
4507
4508else
4509 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4511as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4512See \`config.log' for more details" "$LINENO" 5; }
4513fi
4514
4515ac_ext=c
4516ac_cpp='$CPP $CPPFLAGS'
4517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4519ac_compiler_gnu=$ac_cv_c_compiler_gnu
4520
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4522$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4523if ${ac_cv_path_GREP+:} false; then :
4524 $as_echo_n "(cached) " >&6
4525else
4526 if test -z "$GREP"; then
4527 ac_path_GREP_found=false
4528 # Loop through the user's path and test for each of PROGNAME-LIST
4529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4530for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4531do
4532 IFS=$as_save_IFS
4533 test -z "$as_dir" && as_dir=.
4534 for ac_prog in grep ggrep; do
4535 for ac_exec_ext in '' $ac_executable_extensions; do
4536 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4537 as_fn_executable_p "$ac_path_GREP" || continue
4538# Check for GNU ac_path_GREP and select it if it is found.
4539 # Check for GNU $ac_path_GREP
4540case `"$ac_path_GREP" --version 2>&1` in
4541*GNU*)
4542 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4543*)
4544 ac_count=0
4545 $as_echo_n 0123456789 >"conftest.in"
4546 while :
4547 do
4548 cat "conftest.in" "conftest.in" >"conftest.tmp"
4549 mv "conftest.tmp" "conftest.in"
4550 cp "conftest.in" "conftest.nl"
4551 $as_echo 'GREP' >> "conftest.nl"
4552 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4553 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4554 as_fn_arith $ac_count + 1 && ac_count=$as_val
4555 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4556 # Best one so far, save it but keep looking for a better one
4557 ac_cv_path_GREP="$ac_path_GREP"
4558 ac_path_GREP_max=$ac_count
4559 fi
4560 # 10*(2^10) chars as input seems more than enough
4561 test $ac_count -gt 10 && break
4562 done
4563 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4564esac
4565
4566 $ac_path_GREP_found && break 3
4567 done
4568 done
4569 done
4570IFS=$as_save_IFS
4571 if test -z "$ac_cv_path_GREP"; then
4572 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4573 fi
4574else
4575 ac_cv_path_GREP=$GREP
4576fi
4577
4578fi
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4580$as_echo "$ac_cv_path_GREP" >&6; }
4581 GREP="$ac_cv_path_GREP"
4582
4583
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004584
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585
4586
Matthias Kloseb9621712010-04-24 17:59:49 +00004587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4588$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004590# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004591if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
4594 case $withval in
4595 no) with_cxx_main=no
4596 MAINCC='$(CC)';;
4597 yes) with_cxx_main=yes
4598 MAINCC='$(CXX)';;
4599 *) with_cxx_main=yes
4600 MAINCC=$withval
4601 if test -z "$CXX"
4602 then
4603 CXX=$withval
4604 fi;;
4605 esac
4606else
4607
4608 with_cxx_main=no
4609 MAINCC='$(CC)'
4610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004611fi
4612
Matthias Kloseb9621712010-04-24 17:59:49 +00004613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4614$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615
4616preset_cxx="$CXX"
4617if test -z "$CXX"
4618then
4619 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004620 gcc) if test -n "$ac_tool_prefix"; then
4621 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4622set dummy ${ac_tool_prefix}g++; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_CXX+:} false; then :
4626 $as_echo_n "(cached) " >&6
4627else
4628 case $CXX in
4629 [\\/]* | ?:[\\/]*)
4630 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4631 ;;
4632 *)
4633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in notfound
4635do
4636 IFS=$as_save_IFS
4637 test -z "$as_dir" && as_dir=.
4638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642 break 2
4643 fi
4644done
4645 done
4646IFS=$as_save_IFS
4647
4648 ;;
4649esac
4650fi
4651CXX=$ac_cv_path_CXX
4652if test -n "$CXX"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4654$as_echo "$CXX" >&6; }
4655else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660
4661fi
4662if test -z "$ac_cv_path_CXX"; then
4663 ac_pt_CXX=$CXX
4664 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004665set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668if ${ac_cv_path_ac_pt_CXX+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670else
4671 case $ac_pt_CXX in
4672 [\\/]* | ?:[\\/]*)
4673 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4674 ;;
4675 *)
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677for as_dir in notfound
4678do
4679 IFS=$as_save_IFS
4680 test -z "$as_dir" && as_dir=.
4681 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4685 break 2
4686 fi
4687done
4688 done
4689IFS=$as_save_IFS
4690
4691 ;;
4692esac
4693fi
4694ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4695if test -n "$ac_pt_CXX"; then
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4697$as_echo "$ac_pt_CXX" >&6; }
4698else
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4700$as_echo "no" >&6; }
4701fi
4702
4703 if test "x$ac_pt_CXX" = x; then
4704 CXX="g++"
4705 else
4706 case $cross_compiling:$ac_tool_warned in
4707yes:)
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4710ac_tool_warned=yes ;;
4711esac
4712 CXX=$ac_pt_CXX
4713 fi
4714else
4715 CXX="$ac_cv_path_CXX"
4716fi
4717 ;;
4718 cc) if test -n "$ac_tool_prefix"; then
4719 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4720set dummy ${ac_tool_prefix}c++; ac_word=$2
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004723if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725else
4726 case $CXX in
4727 [\\/]* | ?:[\\/]*)
4728 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4729 ;;
4730 *)
4731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in notfound
4733do
4734 IFS=$as_save_IFS
4735 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740 break 2
4741 fi
4742done
Matthias Kloseb9621712010-04-24 17:59:49 +00004743 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004744IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746 ;;
4747esac
4748fi
4749CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004750if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4752$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004753else
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004757
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758
4759fi
4760if test -z "$ac_cv_path_CXX"; then
4761 ac_pt_CXX=$CXX
4762 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4765$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 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 +00004772 ;;
4773 *)
4774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4775for as_dir in notfound
4776do
4777 IFS=$as_save_IFS
4778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004781 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 break 2
4784 fi
4785done
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789 ;;
4790esac
4791fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004792ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4793if test -n "$ac_pt_CXX"; then
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4795$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004796else
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4798$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 if test "x$ac_pt_CXX" = x; then
4802 CXX="c++"
4803 else
4804 case $cross_compiling:$ac_tool_warned in
4805yes:)
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4807$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4808ac_tool_warned=yes ;;
4809esac
4810 CXX=$ac_pt_CXX
4811 fi
4812else
4813 CXX="$ac_cv_path_CXX"
4814fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 clang|*/clang) if test -n "$ac_tool_prefix"; then
4817 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4818set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4820$as_echo_n "checking for $ac_word... " >&6; }
4821if ${ac_cv_path_CXX+:} false; then :
4822 $as_echo_n "(cached) " >&6
4823else
4824 case $CXX in
4825 [\\/]* | ?:[\\/]*)
4826 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4827 ;;
4828 *)
4829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830for as_dir in notfound
4831do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
4834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004836 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4838 break 2
4839 fi
4840done
4841 done
4842IFS=$as_save_IFS
4843
Ned Deilycbfb9a52012-06-23 16:02:19 -07004844 ;;
4845esac
4846fi
4847CXX=$ac_cv_path_CXX
4848if test -n "$CXX"; then
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4850$as_echo "$CXX" >&6; }
4851else
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4853$as_echo "no" >&6; }
4854fi
4855
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856
4857fi
4858if test -z "$ac_cv_path_CXX"; then
4859 ac_pt_CXX=$CXX
4860 # Extract the first word of "clang++", so it can be a program name with args.
4861set dummy clang++; ac_word=$2
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863$as_echo_n "checking for $ac_word... " >&6; }
4864if ${ac_cv_path_ac_pt_CXX+:} false; then :
4865 $as_echo_n "(cached) " >&6
4866else
4867 case $ac_pt_CXX in
4868 [\\/]* | ?:[\\/]*)
4869 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4870 ;;
4871 *)
4872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in notfound
4874do
4875 IFS=$as_save_IFS
4876 test -z "$as_dir" && as_dir=.
4877 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881 break 2
4882 fi
4883done
4884 done
4885IFS=$as_save_IFS
4886
4887 ;;
4888esac
4889fi
4890ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4891if test -n "$ac_pt_CXX"; then
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4893$as_echo "$ac_pt_CXX" >&6; }
4894else
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899 if test "x$ac_pt_CXX" = x; then
4900 CXX="clang++"
4901 else
4902 case $cross_compiling:$ac_tool_warned in
4903yes:)
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4906ac_tool_warned=yes ;;
4907esac
4908 CXX=$ac_pt_CXX
4909 fi
4910else
4911 CXX="$ac_cv_path_CXX"
4912fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004913 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004914 icc|*/icc) if test -n "$ac_tool_prefix"; then
4915 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4916set dummy ${ac_tool_prefix}icpc; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if ${ac_cv_path_CXX+:} false; then :
4920 $as_echo_n "(cached) " >&6
4921else
4922 case $CXX in
4923 [\\/]* | ?:[\\/]*)
4924 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4925 ;;
4926 *)
4927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in notfound
4929do
4930 IFS=$as_save_IFS
4931 test -z "$as_dir" && as_dir=.
4932 for ac_exec_ext in '' $ac_executable_extensions; do
4933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4934 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936 break 2
4937 fi
4938done
4939 done
4940IFS=$as_save_IFS
4941
4942 ;;
4943esac
4944fi
4945CXX=$ac_cv_path_CXX
4946if test -n "$CXX"; then
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4948$as_echo "$CXX" >&6; }
4949else
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954
4955fi
4956if test -z "$ac_cv_path_CXX"; then
4957 ac_pt_CXX=$CXX
4958 # Extract the first word of "icpc", so it can be a program name with args.
4959set dummy icpc; ac_word=$2
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961$as_echo_n "checking for $ac_word... " >&6; }
4962if ${ac_cv_path_ac_pt_CXX+:} false; then :
4963 $as_echo_n "(cached) " >&6
4964else
4965 case $ac_pt_CXX in
4966 [\\/]* | ?:[\\/]*)
4967 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4968 ;;
4969 *)
4970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in notfound
4972do
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4980 fi
4981done
4982 done
4983IFS=$as_save_IFS
4984
4985 ;;
4986esac
4987fi
4988ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4989if test -n "$ac_pt_CXX"; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4991$as_echo "$ac_pt_CXX" >&6; }
4992else
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997 if test "x$ac_pt_CXX" = x; then
4998 CXX="icpc"
4999 else
5000 case $cross_compiling:$ac_tool_warned in
5001yes:)
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5004ac_tool_warned=yes ;;
5005esac
5006 CXX=$ac_pt_CXX
5007 fi
5008else
5009 CXX="$ac_cv_path_CXX"
5010fi
5011 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005012 esac
5013 if test "$CXX" = "notfound"
5014 then
5015 CXX=""
5016 fi
5017fi
5018if test -z "$CXX"
5019then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005020 if test -n "$ac_tool_prefix"; then
5021 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5022 do
5023 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5024set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005027if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005029else
5030 if test -n "$CXX"; then
5031 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5032else
5033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005040 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042 break 2
5043 fi
5044done
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005047
5048fi
5049fi
5050CXX=$ac_cv_prog_CXX
5051if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5053$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054else
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057fi
5058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 test -n "$CXX" && break
5061 done
5062fi
5063if test -z "$CXX"; then
5064 ac_ct_CXX=$CXX
5065 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5066do
5067 # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5072 $as_echo_n "(cached) " >&6
5073else
5074 if test -n "$ac_ct_CXX"; then
5075 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
5082 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 ac_cv_prog_ac_ct_CXX="$ac_prog"
5085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086 break 2
5087 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005088done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005089 done
5090IFS=$as_save_IFS
5091
5092fi
5093fi
5094ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5095if test -n "$ac_ct_CXX"; then
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5097$as_echo "$ac_ct_CXX" >&6; }
5098else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104 test -n "$ac_ct_CXX" && break
5105done
5106
5107 if test "x$ac_ct_CXX" = x; then
5108 CXX="notfound"
5109 else
5110 case $cross_compiling:$ac_tool_warned in
5111yes:)
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5114ac_tool_warned=yes ;;
5115esac
5116 CXX=$ac_ct_CXX
5117 fi
5118fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119
5120 if test "$CXX" = "notfound"
5121 then
5122 CXX=""
5123 fi
5124fi
5125if test "$preset_cxx" != "$CXX"
5126then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005127 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128
5129 By default, distutils will build C++ extension modules with \"$CXX\".
5130 If this is not intended, then set CXX on the configure command line.
5131 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005132$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133
5134 By default, distutils will build C++ extension modules with \"$CXX\".
5135 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005136 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137fi
5138
5139
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005140MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5141
5142
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5144$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5145cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005146#undef bfin
5147#undef cris
5148#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005149#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef hppa
5151#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005154#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005155#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005157#if defined(__ANDROID__)
5158# if defined(__x86_64__) && defined(__LP64__)
5159 x86_64-linux-android
5160# elif defined(__i386__)
5161 i686-linux-android
5162# elif defined(__aarch64__) && defined(__AARCH64EL__)
5163# if defined(__ILP32__)
5164 aarch64_ilp32-linux-android
5165# else
5166 aarch64-linux-android
5167# endif
5168# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5169 arm-linux-androideabi
5170# elif defined(__mips_hard_float) && defined(_MIPSEL)
5171# if _MIPS_SIM == _ABIO32
5172 mipsel-linux-android
5173# elif _MIPS_SIM == _ABI64
5174 mips64el-linux-android
5175# else
5176# error unknown platform triplet
5177# endif
5178# else
5179# error unknown platform triplet
5180# endif
5181#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005182# if defined(__x86_64__) && defined(__LP64__)
5183 x86_64-linux-gnu
5184# elif defined(__x86_64__) && defined(__ILP32__)
5185 x86_64-linux-gnux32
5186# elif defined(__i386__)
5187 i386-linux-gnu
5188# elif defined(__aarch64__) && defined(__AARCH64EL__)
5189# if defined(__ILP32__)
5190 aarch64_ilp32-linux-gnu
5191# else
5192 aarch64-linux-gnu
5193# endif
5194# elif defined(__aarch64__) && defined(__AARCH64EB__)
5195# if defined(__ILP32__)
5196 aarch64_be_ilp32-linux-gnu
5197# else
5198 aarch64_be-linux-gnu
5199# endif
5200# elif defined(__alpha__)
5201 alpha-linux-gnu
5202# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5203# if defined(__ARMEL__)
5204 arm-linux-gnueabihf
5205# else
5206 armeb-linux-gnueabihf
5207# endif
5208# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5209# if defined(__ARMEL__)
5210 arm-linux-gnueabi
5211# else
5212 armeb-linux-gnueabi
5213# endif
5214# elif defined(__hppa__)
5215 hppa-linux-gnu
5216# elif defined(__ia64__)
5217 ia64-linux-gnu
5218# elif defined(__m68k__) && !defined(__mcoldfire__)
5219 m68k-linux-gnu
5220# elif defined(__mips_hard_float) && defined(_MIPSEL)
5221# if _MIPS_SIM == _ABIO32
5222 mipsel-linux-gnu
5223# elif _MIPS_SIM == _ABIN32
5224 mips64el-linux-gnuabin32
5225# elif _MIPS_SIM == _ABI64
5226 mips64el-linux-gnuabi64
5227# else
5228# error unknown platform triplet
5229# endif
5230# elif defined(__mips_hard_float)
5231# if _MIPS_SIM == _ABIO32
5232 mips-linux-gnu
5233# elif _MIPS_SIM == _ABIN32
5234 mips64-linux-gnuabin32
5235# elif _MIPS_SIM == _ABI64
5236 mips64-linux-gnuabi64
5237# else
5238# error unknown platform triplet
5239# endif
5240# elif defined(__or1k__)
5241 or1k-linux-gnu
5242# elif defined(__powerpc__) && defined(__SPE__)
5243 powerpc-linux-gnuspe
5244# elif defined(__powerpc64__)
5245# if defined(__LITTLE_ENDIAN__)
5246 powerpc64le-linux-gnu
5247# else
5248 powerpc64-linux-gnu
5249# endif
5250# elif defined(__powerpc__)
5251 powerpc-linux-gnu
5252# elif defined(__s390x__)
5253 s390x-linux-gnu
5254# elif defined(__s390__)
5255 s390-linux-gnu
5256# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5257 sh4-linux-gnu
5258# elif defined(__sparc__) && defined(__arch64__)
5259 sparc64-linux-gnu
5260# elif defined(__sparc__)
5261 sparc-linux-gnu
5262# else
5263# error unknown platform triplet
5264# endif
5265#elif defined(__FreeBSD_kernel__)
5266# if defined(__LP64__)
5267 x86_64-kfreebsd-gnu
5268# elif defined(__i386__)
5269 i386-kfreebsd-gnu
5270# else
5271# error unknown platform triplet
5272# endif
5273#elif defined(__gnu_hurd__)
5274 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005275#elif defined(__APPLE__)
5276 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277#else
5278# error unknown platform triplet
5279#endif
5280
5281EOF
5282
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005283if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005284 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5286$as_echo "$PLATFORM_TRIPLET" >&6; }
5287else
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5289$as_echo "none" >&6; }
5290fi
5291rm -f conftest.c conftest.out
5292
5293if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5294 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5295 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5296 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005297elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5298 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005299fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005300if test x$PLATFORM_TRIPLET = x; then
5301 PLATDIR=plat-$MACHDEP
5302else
5303 PLATDIR=plat-$PLATFORM_TRIPLET
5304fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305
5306
doko@ubuntu.com55532312016-06-14 08:55:19 +02005307if test x$MULTIARCH != x; then
5308 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5309fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310
5311
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5313$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5314save_LDFLAGS="$LDFLAGS"
5315LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005316
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5318/* end confdefs.h. */
5319
5320int
5321main ()
5322{
5323
5324 ;
5325 return 0;
5326}
5327_ACEOF
5328if ac_fn_c_try_link "$LINENO"; then :
5329 NO_AS_NEEDED="-Wl,--no-as-needed"
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5331$as_echo "yes" >&6; }
5332else
5333 NO_AS_NEEDED=""
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337rm -f core conftest.err conftest.$ac_objext \
5338 conftest$ac_exeext conftest.$ac_ext
5339LDFLAGS="$save_LDFLAGS"
5340
5341
5342
5343# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344
Matthias Kloseb9621712010-04-24 17:59:49 +00005345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5346$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005347if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349else
5350 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5351 then ac_cv_path_EGREP="$GREP -E"
5352 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005353 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 # Loop through the user's path and test for each of PROGNAME-LIST
5356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5358do
5359 IFS=$as_save_IFS
5360 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005361 for ac_prog in egrep; do
5362 for ac_exec_ext in '' $ac_executable_extensions; do
5363 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005364 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005365# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366 # Check for GNU $ac_path_EGREP
5367case `"$ac_path_EGREP" --version 2>&1` in
5368*GNU*)
5369 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5370*)
5371 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 while :
5374 do
5375 cat "conftest.in" "conftest.in" >"conftest.tmp"
5376 mv "conftest.tmp" "conftest.in"
5377 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5380 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5383 # Best one so far, save it but keep looking for a better one
5384 ac_cv_path_EGREP="$ac_path_EGREP"
5385 ac_path_EGREP_max=$ac_count
5386 fi
5387 # 10*(2^10) chars as input seems more than enough
5388 test $ac_count -gt 10 && break
5389 done
5390 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5391esac
5392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $ac_path_EGREP_found && break 3
5394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005399 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 +00005400 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401else
5402 ac_cv_path_EGREP=$EGREP
5403fi
5404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 fi
5406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5408$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005410
5411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5413$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005414if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $as_echo_n "(cached) " >&6
5416else
5417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005418/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005419#include <stdlib.h>
5420#include <stdarg.h>
5421#include <string.h>
5422#include <float.h>
5423
5424int
5425main ()
5426{
5427
5428 ;
5429 return 0;
5430}
5431_ACEOF
5432if ac_fn_c_try_compile "$LINENO"; then :
5433 ac_cv_header_stdc=yes
5434else
5435 ac_cv_header_stdc=no
5436fi
5437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5438
5439if test $ac_cv_header_stdc = yes; then
5440 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5442/* end confdefs.h. */
5443#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005444
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005445_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005449else
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005452rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454fi
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h. */
5460#include <stdlib.h>
5461
5462_ACEOF
5463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5464 $EGREP "free" >/dev/null 2>&1; then :
5465
5466else
5467 ac_cv_header_stdc=no
5468fi
5469rm -f conftest*
5470
5471fi
5472
5473if test $ac_cv_header_stdc = yes; then
5474 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5475 if test "$cross_compiling" = yes; then :
5476 :
5477else
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479/* end confdefs.h. */
5480#include <ctype.h>
5481#include <stdlib.h>
5482#if ((' ' & 0x0FF) == 0x020)
5483# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5484# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5485#else
5486# define ISLOWER(c) \
5487 (('a' <= (c) && (c) <= 'i') \
5488 || ('j' <= (c) && (c) <= 'r') \
5489 || ('s' <= (c) && (c) <= 'z'))
5490# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5491#endif
5492
5493#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5494int
5495main ()
5496{
5497 int i;
5498 for (i = 0; i < 256; i++)
5499 if (XOR (islower (i), ISLOWER (i))
5500 || toupper (i) != TOUPPER (i))
5501 return 2;
5502 return 0;
5503}
5504_ACEOF
5505if ac_fn_c_try_run "$LINENO"; then :
5506
5507else
5508 ac_cv_header_stdc=no
5509fi
5510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5511 conftest.$ac_objext conftest.beam conftest.$ac_ext
5512fi
5513
5514fi
5515fi
5516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5517$as_echo "$ac_cv_header_stdc" >&6; }
5518if test $ac_cv_header_stdc = yes; then
5519
5520$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5521
5522fi
5523
5524# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5525for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5526 inttypes.h stdint.h unistd.h
5527do :
5528 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5529ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5530"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005531if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 cat >>confdefs.h <<_ACEOF
5533#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5534_ACEOF
5535
5536fi
5537
5538done
5539
5540
5541
5542 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 +02005543if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 MINIX=yes
5545else
5546 MINIX=
5547fi
5548
5549
5550 if test "$MINIX" = yes; then
5551
5552$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5553
5554
5555$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5556
5557
5558$as_echo "#define _MINIX 1" >>confdefs.h
5559
5560 fi
5561
5562
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5564$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005565if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 $as_echo_n "(cached) " >&6
5567else
5568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5569/* end confdefs.h. */
5570
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005571# define __EXTENSIONS__ 1
5572 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005573int
5574main ()
5575{
5576
5577 ;
5578 return 0;
5579}
5580_ACEOF
5581if ac_fn_c_try_compile "$LINENO"; then :
5582 ac_cv_safe_to_define___extensions__=yes
5583else
5584 ac_cv_safe_to_define___extensions__=no
5585fi
5586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5587fi
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5589$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5590 test $ac_cv_safe_to_define___extensions__ = yes &&
5591 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5592
5593 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5594
5595 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5596
5597 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5598
5599 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5600
5601
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
Xavier de Gaye95750b12016-07-09 11:05:42 +02005603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5604$as_echo_n "checking for the Android API level... " >&6; }
5605cat >> conftest.c <<EOF
5606#ifdef __ANDROID__
5607#include <android/api-level.h>
5608__ANDROID_API__
5609#else
5610#error not Android
5611#endif
5612EOF
5613
5614if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5615 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5617$as_echo "$ANDROID_API_LEVEL" >&6; }
5618
5619cat >>confdefs.h <<_ACEOF
5620#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5621_ACEOF
5622
5623else
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5625$as_echo "not Android" >&6; }
5626fi
5627rm -f conftest.c conftest.out
5628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629# Check for unsupported systems
5630case $ac_sys_system/$ac_sys_release in
5631atheos*|Linux*/1*)
5632 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5633 echo See README for details.
5634 exit 1;;
5635esac
5636
5637
Matthias Kloseb9621712010-04-24 17:59:49 +00005638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5639$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
5641# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005642if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 withval=$with_suffix;
5644 case $withval in
5645 no) EXEEXT=;;
5646 yes) EXEEXT=.exe;;
5647 *) EXEEXT=$withval;;
5648 esac
5649fi
5650
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5652$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
5654# Test whether we're running on a non-case-sensitive system, in which
5655# case we give a warning if no ext is given
5656
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5658$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659if test ! -d CaseSensitiveTestDir; then
5660mkdir CaseSensitiveTestDir
5661fi
5662
5663if test -d casesensitivetestdir
5664then
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5666$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 BUILDEXEEXT=.exe
5668else
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 BUILDEXEEXT=$EXEEXT
5672fi
5673rmdir CaseSensitiveTestDir
5674
5675case $MACHDEP in
5676bsdos*)
5677 case $CC in
5678 gcc) CC="$CC -D_HAVE_BSDI";;
5679 esac;;
5680esac
5681
5682case $ac_sys_system in
5683hp*|HP*)
5684 case $CC in
5685 cc|*/cc) CC="$CC -Ae";;
5686 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687esac
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
Matthias Kloseb9621712010-04-24 17:59:49 +00005690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5691$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692if test -z "$LIBRARY"
5693then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005694 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5697$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699# LDLIBRARY is the name of the library to link against (as opposed to the
5700# name of the library into which to insert object files). BLDLIBRARY is also
5701# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5702# is blank as the main program is not linked directly against LDLIBRARY.
5703# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5704# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5705# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5706# DLLLIBRARY is the shared (i.e., DLL) library.
5707#
5708# RUNSHARED is used to run shared python without installed libraries
5709#
5710# INSTSONAME is the name of the shared library that will be use to install
5711# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005712#
5713# LDVERSION is the shared library version number, normally the Python version
5714# with the ABI build flags appended.
5715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717
5718
5719
5720
5721
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723LDLIBRARY="$LIBRARY"
5724BLDLIBRARY='$(LDLIBRARY)'
5725INSTSONAME='$(LDLIBRARY)'
5726DLLLIBRARY=''
5727LDLIBRARYDIR=''
5728RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005729LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731# LINKCC is the command that links the python executable -- default is $(CC).
5732# If CXX is set, and if it is needed to link a main function that was
5733# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5734# python might then depend on the C++ runtime
5735# This is altered for AIX in order to build the export list before
5736# linking.
5737
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5739$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740if test -z "$LINKCC"
5741then
5742 LINKCC='$(PURIFY) $(MAINCC)'
5743 case $ac_sys_system in
5744 AIX*)
5745 exp_extra="\"\""
5746 if test $ac_sys_release -ge 5 -o \
5747 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5748 exp_extra="."
5749 fi
5750 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 QNX*)
5752 # qcc must be used because the other compilers do not
5753 # support -N.
5754 LINKCC=qcc;;
5755 esac
5756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5758$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5761# make sure we default having it set to "no": this is used by
5762# distutils.unixccompiler to know if it should add --enable-new-dtags
5763# to linker command lines, and failing to detect GNU ld simply results
5764# in the same bahaviour as before.
5765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5767$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768ac_prog=ld
5769if test "$GCC" = yes; then
5770 ac_prog=`$CC -print-prog-name=ld`
5771fi
5772case `"$ac_prog" -V 2>&1 < /dev/null` in
5773 *GNU*)
5774 GNULD=yes;;
5775 *)
5776 GNULD=no;;
5777esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5779$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5782$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005783if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005784 $as_echo_n "(cached) " >&6
5785else
5786 ac_cv_c_inline=no
5787for ac_kw in inline __inline__ __inline; do
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789/* end confdefs.h. */
5790#ifndef __cplusplus
5791typedef int foo_t;
5792static $ac_kw foo_t static_foo () {return 0; }
5793$ac_kw foo_t foo () {return 0; }
5794#endif
5795
5796_ACEOF
5797if ac_fn_c_try_compile "$LINENO"; then :
5798 ac_cv_c_inline=$ac_kw
5799fi
5800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5801 test "$ac_cv_c_inline" != no && break
5802done
5803
5804fi
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5806$as_echo "$ac_cv_c_inline" >&6; }
5807
5808case $ac_cv_c_inline in
5809 inline | yes) ;;
5810 *)
5811 case $ac_cv_c_inline in
5812 no) ac_val=;;
5813 *) ac_val=$ac_cv_c_inline;;
5814 esac
5815 cat >>confdefs.h <<_ACEOF
5816#ifndef __cplusplus
5817#define inline $ac_val
5818#endif
5819_ACEOF
5820 ;;
5821esac
5822
5823if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005824
5825$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005826
5827
5828fi
5829
5830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005834if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835 enableval=$enable_shared;
5836fi
5837
5838
5839if test -z "$enable_shared"
5840then
5841 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005842 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843 enable_shared="yes";;
5844 *)
5845 enable_shared="no";;
5846 esac
5847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5849$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855 enableval=$enable_profiling;
5856fi
5857
5858if test "x$enable_profiling" = xyes; then
5859 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005860 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862/* end confdefs.h. */
5863int main() { return 0; }
5864_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865if ac_fn_c_try_link "$LINENO"; then :
5866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005870rm -f core conftest.err conftest.$ac_objext \
5871 conftest$ac_exeext conftest.$ac_ext
5872 CC="$ac_save_cc"
5873else
5874 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5877$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879if test "x$enable_profiling" = xyes; then
5880 BASECFLAGS="-pg $BASECFLAGS"
5881 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5885$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5888# library that we build, but we do not want to link against it (we
5889# will find it with a -framework option). For this reason there is an
5890# extra variable BLDLIBRARY against which Python and the extension
5891# modules are linked, BLDLIBRARY. This is normally the same as
5892# LDLIBRARY, but empty for MacOSX framework builds.
5893if test "$enable_framework"
5894then
5895 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 BLDLIBRARY=''
5898else
5899 BLDLIBRARY='$(LDLIBRARY)'
5900fi
5901
5902# Other platforms follow
5903if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005904 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905
Matthias Kloseb9621712010-04-24 17:59:49 +00005906$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
5908 case $ac_sys_system in
5909 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).dll.a'
5911 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).so'
5915 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005918 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005919 then
5920 PY3LIBRARY=libpython3.so
5921 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005923 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
5925 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005929 then
5930 PY3LIBRARY=libpython3.so
5931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 hp*|HP*)
5934 case `uname -m` in
5935 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 ;;
5938 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).dylib'
5947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005950 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005952 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005953 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
5955 esac
5956else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005957 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 case $ac_sys_system in
5959 CYGWIN*)
5960 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 esac
5964fi
5965
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005966if test "$cross_compiling" = yes; then
5967 RUNSHARED=
5968fi
5969
Matthias Kloseb9621712010-04-24 17:59:49 +00005970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5971$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972
5973if test -n "$ac_tool_prefix"; then
5974 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5975set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005978if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
5981 if test -n "$RANLIB"; then
5982 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5983else
5984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 break 2
5994 fi
5995done
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997IFS=$as_save_IFS
5998
5999fi
6000fi
6001RANLIB=$ac_cv_prog_RANLIB
6002if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6004$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005else
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008fi
6009
6010
6011fi
6012if test -z "$ac_cv_prog_RANLIB"; then
6013 ac_ct_RANLIB=$RANLIB
6014 # Extract the first word of "ranlib", so it can be a program name with args.
6015set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6017$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006018if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020else
6021 if test -n "$ac_ct_RANLIB"; then
6022 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6023else
6024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH
6026do
6027 IFS=$as_save_IFS
6028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 break 2
6034 fi
6035done
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037IFS=$as_save_IFS
6038
6039fi
6040fi
6041ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6042if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6044$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048fi
6049
6050 if test "x$ac_ct_RANLIB" = x; then
6051 RANLIB=":"
6052 else
6053 case $cross_compiling:$ac_tool_warned in
6054yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057ac_tool_warned=yes ;;
6058esac
6059 RANLIB=$ac_ct_RANLIB
6060 fi
6061else
6062 RANLIB="$ac_cv_prog_RANLIB"
6063fi
6064
6065
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006066if test -n "$ac_tool_prefix"; then
6067 for ac_prog in ar aal
6068 do
6069 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6072$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006073if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075else
6076 if test -n "$AR"; then
6077 ac_cv_prog_AR="$AR" # Let the user override the test.
6078else
6079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082 IFS=$as_save_IFS
6083 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006086 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088 break 2
6089 fi
6090done
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092IFS=$as_save_IFS
6093
6094fi
6095fi
6096AR=$ac_cv_prog_AR
6097if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6099$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006100else
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103fi
6104
6105
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006106 test -n "$AR" && break
6107 done
6108fi
6109if test -z "$AR"; then
6110 ac_ct_AR=$AR
6111 for ac_prog in ar aal
6112do
6113 # Extract the first word of "$ac_prog", so it can be a program name with args.
6114set dummy $ac_prog; ac_word=$2
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116$as_echo_n "checking for $ac_word... " >&6; }
6117if ${ac_cv_prog_ac_ct_AR+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119else
6120 if test -n "$ac_ct_AR"; then
6121 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6122else
6123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH
6125do
6126 IFS=$as_save_IFS
6127 test -z "$as_dir" && as_dir=.
6128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130 ac_cv_prog_ac_ct_AR="$ac_prog"
6131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132 break 2
6133 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135 done
6136IFS=$as_save_IFS
6137
6138fi
6139fi
6140ac_ct_AR=$ac_cv_prog_ac_ct_AR
6141if test -n "$ac_ct_AR"; then
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6143$as_echo "$ac_ct_AR" >&6; }
6144else
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146$as_echo "no" >&6; }
6147fi
6148
6149
6150 test -n "$ac_ct_AR" && break
6151done
6152
6153 if test "x$ac_ct_AR" = x; then
6154 AR="ar"
6155 else
6156 case $cross_compiling:$ac_tool_warned in
6157yes:)
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6160ac_tool_warned=yes ;;
6161esac
6162 AR=$ac_ct_AR
6163 fi
6164fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165
6166
6167# tweak ARFLAGS only if the user didn't set it on the command line
6168
6169if test -z "$ARFLAGS"
6170then
6171 ARFLAGS="rc"
6172fi
6173
doko@ubuntu.com58844492012-06-30 18:25:32 +02006174if test -n "$ac_tool_prefix"; then
6175 for ac_prog in readelf
6176 do
6177 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6178set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_prog_READELF+:} false; then :
6182 $as_echo_n "(cached) " >&6
6183else
6184 if test -n "$READELF"; then
6185 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6186else
6187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190 IFS=$as_save_IFS
6191 test -z "$as_dir" && as_dir=.
6192 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006194 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6196 break 2
6197 fi
6198done
6199 done
6200IFS=$as_save_IFS
6201
6202fi
6203fi
6204READELF=$ac_cv_prog_READELF
6205if test -n "$READELF"; then
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6207$as_echo "$READELF" >&6; }
6208else
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6210$as_echo "no" >&6; }
6211fi
6212
6213
6214 test -n "$READELF" && break
6215 done
6216fi
6217if test -z "$READELF"; then
6218 ac_ct_READELF=$READELF
6219 for ac_prog in readelf
6220do
6221 # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6226 $as_echo_n "(cached) " >&6
6227else
6228 if test -n "$ac_ct_READELF"; then
6229 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6230else
6231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234 IFS=$as_save_IFS
6235 test -z "$as_dir" && as_dir=.
6236 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006238 ac_cv_prog_ac_ct_READELF="$ac_prog"
6239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240 break 2
6241 fi
6242done
6243 done
6244IFS=$as_save_IFS
6245
6246fi
6247fi
6248ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6249if test -n "$ac_ct_READELF"; then
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6251$as_echo "$ac_ct_READELF" >&6; }
6252else
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258 test -n "$ac_ct_READELF" && break
6259done
6260
6261 if test "x$ac_ct_READELF" = x; then
6262 READELF=":"
6263 else
6264 case $cross_compiling:$ac_tool_warned in
6265yes:)
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6268ac_tool_warned=yes ;;
6269esac
6270 READELF=$ac_ct_READELF
6271 fi
6272fi
6273
6274if test "$cross_compiling" = yes; then
6275 case "$READELF" in
6276 readelf|:)
6277 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6278 ;;
6279 esac
6280fi
6281
6282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284case $MACHDEP in
6285bsdos*|hp*|HP*)
6286 # install -d does not work on BSDI or HP-UX
6287 if test -z "$INSTALL"
6288 then
6289 INSTALL="${srcdir}/install-sh -c"
6290 fi
6291esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292# Find a good install program. We prefer a C program (faster),
6293# so one script is as good as another. But avoid the broken or
6294# incompatible versions:
6295# SysV /etc/install, /usr/sbin/install
6296# SunOS /usr/etc/install
6297# IRIX /sbin/install
6298# AIX /bin/install
6299# AmigaOS /C/install, which installs bootblocks on floppy discs
6300# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6301# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6302# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6303# OS/2's system install, which has a completely different semantic
6304# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006305# Reject install programs that cannot install multiple files.
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6307$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006309if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006310 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311else
6312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315 IFS=$as_save_IFS
6316 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 # Account for people who put trailing slashes in PATH elements.
6318case $as_dir/ in #((
6319 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 /usr/ucb/* ) ;;
6323 *)
6324 # OSF1 and SCO ODT 3.0 have their own names for install.
6325 # Don't use installbsd from OSF since it installs stuff as root
6326 # by default.
6327 for ac_prog in ginstall scoinst install; do
6328 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006329 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 if test $ac_prog = install &&
6331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6332 # AIX install. It has an incompatible calling convention.
6333 :
6334 elif test $ac_prog = install &&
6335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6336 # program-specific install script used by HP pwplus--don't use.
6337 :
6338 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006339 rm -rf conftest.one conftest.two conftest.dir
6340 echo one > conftest.one
6341 echo two > conftest.two
6342 mkdir conftest.dir
6343 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6344 test -s conftest.one && test -s conftest.two &&
6345 test -s conftest.dir/conftest.one &&
6346 test -s conftest.dir/conftest.two
6347 then
6348 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6349 break 3
6350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351 fi
6352 fi
6353 done
6354 done
6355 ;;
6356esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006357
6358 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359IFS=$as_save_IFS
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362
6363fi
6364 if test "${ac_cv_path_install+set}" = set; then
6365 INSTALL=$ac_cv_path_install
6366 else
6367 # As a last resort, use the slow shell script. Don't cache a
6368 # value for INSTALL within a source directory, because that will
6369 # break other packages using the cache if that directory is
6370 # removed, or if the value is a relative name.
6371 INSTALL=$ac_install_sh
6372 fi
6373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6375$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
6377# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6378# It thinks the first close brace ends the variable substitution.
6379test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6380
6381test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6382
6383test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6384
Matthias Klose93a0ef12012-03-15 18:08:34 +01006385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6386$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6387if test -z "$MKDIR_P"; then
6388 if ${ac_cv_path_mkdir+:} false; then :
6389 $as_echo_n "(cached) " >&6
6390else
6391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6393do
6394 IFS=$as_save_IFS
6395 test -z "$as_dir" && as_dir=.
6396 for ac_prog in mkdir gmkdir; do
6397 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006398 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006399 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6400 'mkdir (GNU coreutils) '* | \
6401 'mkdir (coreutils) '* | \
6402 'mkdir (fileutils) '4.1*)
6403 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6404 break 3;;
6405 esac
6406 done
6407 done
6408 done
6409IFS=$as_save_IFS
6410
6411fi
6412
6413 test -d ./--version && rmdir ./--version
6414 if test "${ac_cv_path_mkdir+set}" = set; then
6415 MKDIR_P="$ac_cv_path_mkdir -p"
6416 else
6417 # As a last resort, use the slow shell script. Don't cache a
6418 # value for MKDIR_P within a source directory, because that will
6419 # break other packages using the cache if that directory is
6420 # removed, or if the value is a relative name.
6421 MKDIR_P="$ac_install_sh -d"
6422 fi
6423fi
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6425$as_echo "$MKDIR_P" >&6; }
6426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427
6428# Not every filesystem supports hard links
6429
6430if test -z "$LN" ; then
6431 case $ac_sys_system in
6432 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 *) LN=ln;;
6434 esac
6435fi
6436
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006437# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006438
6439ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006440
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6443$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444
6445# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006446if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447 withval=$with_pydebug;
6448if test "$withval" != no
6449then
6450
Matthias Kloseb9621712010-04-24 17:59:49 +00006451$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452
Matthias Kloseb9621712010-04-24 17:59:49 +00006453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6454$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006456 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006457else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459fi
6460else
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463fi
6464
6465
Brett Cannon63d98bc2016-09-06 17:12:40 -07006466# Enable optimization flags
6467
6468
6469Py_OPT='false'
6470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6471$as_echo_n "checking for --with-optimizations... " >&6; }
6472
6473# Check whether --with-optimizations was given.
6474if test "${with_optimizations+set}" = set; then :
6475 withval=$with_optimizations;
6476if test "$withval" != no
6477then
6478 Py_OPT='true'
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; };
6481else
6482 Py_OPT='false'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; };
6485fi
6486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
6489fi
6490
6491if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006492 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6493 # compile working code using it and both test_distutils and test_gdb are
6494 # broken when you do managed to get a toolchain that works with it. People
6495 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006496 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006498 DEF_MAKE_RULE="build_all"
6499else
6500 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006501 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006502 DEF_MAKE_RULE="all"
6503fi
6504
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006505# Enable LTO flags
6506
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6508$as_echo_n "checking for --with-lto... " >&6; }
6509
6510# Check whether --with-lto was given.
6511if test "${with_lto+set}" = set; then :
6512 withval=$with_lto;
6513if test "$withval" != no
6514then
6515 Py_LTO='true'
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6517$as_echo "yes" >&6; };
6518else
6519 Py_LTO='false'
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; };
6522fi
6523else
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525$as_echo "no" >&6; }
6526fi
6527
6528if test "$Py_LTO" = 'true' ; then
6529 case $CC in
6530 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006531 case $ac_sys_system in
6532 Darwin*)
6533 # Any changes made here should be reflected in the GCC+Darwin case below
6534 LTOFLAGS="-flto -Wl,-export_dynamic"
6535 ;;
6536 *)
6537 LTOFLAGS="-flto"
6538 ;;
6539 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006540 ;;
6541 *gcc*)
6542 case $ac_sys_system in
6543 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006544 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006545 ;;
6546 *)
6547 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6548 ;;
6549 esac
6550 ;;
6551 esac
6552fi
6553
Brett Cannon7188a3e2015-09-18 15:13:44 -07006554# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006555
6556
6557
6558
6559
Gregory P. Smith799520c2016-09-07 16:10:00 -07006560# Make this work on systems where llvm tools are not installed with their
6561# normal names in the default $PATH (ie: Ubuntu). They exist under the
6562# non-suffixed name in their versioned llvm directory.
6563llvm_bin_dir=''
6564llvm_path="${PATH}"
6565if test "${CC}" = "clang"
6566then
6567 clang_bin=`which clang`
6568 # Some systems install clang elsewhere as a symlink to the real path
6569 # which is where the related llvm tools are located.
6570 if test -L "${clang_bin}"
6571 then
6572 clang_dir=`dirname "${clang_bin}"`
6573 clang_bin=`readlink "${clang_bin}"`
6574 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6575 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6576 fi
6577fi
Zachary Ware5af85642015-12-21 12:09:17 -06006578
Gregory P. Smith799520c2016-09-07 16:10:00 -07006579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6580$as_echo_n "checking target system type... " >&6; }
6581if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006582 $as_echo_n "(cached) " >&6
6583else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006584 if test "x$target_alias" = x; then
6585 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006586else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006587 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6588 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6589fi
6590
6591fi
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6593$as_echo "$ac_cv_target" >&6; }
6594case $ac_cv_target in
6595*-*-*) ;;
6596*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6597esac
6598target=$ac_cv_target
6599ac_save_IFS=$IFS; IFS='-'
6600set x $ac_cv_target
6601shift
6602target_cpu=$1
6603target_vendor=$2
6604shift; shift
6605# Remember, the first character of IFS is used to create $*,
6606# except with old shells:
6607target_os=$*
6608IFS=$ac_save_IFS
6609case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6610
6611
6612# The aliases save the names the user supplied, while $host etc.
6613# will get canonicalized.
6614test -n "$target_alias" &&
6615 test "$program_prefix$program_suffix$program_transform_name" = \
6616 NONENONEs,x,x, &&
6617 program_prefix=${target_alias}-
6618# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6619set dummy $target_alias-llvm-profdata; ac_word=$2
6620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6621$as_echo_n "checking for $ac_word... " >&6; }
6622if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6623 $as_echo_n "(cached) " >&6
6624else
6625 case $LLVM_PROFDATA in
6626 [\\/]* | ?:[\\/]*)
6627 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6628 ;;
6629 *)
6630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6631for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632do
6633 IFS=$as_save_IFS
6634 test -z "$as_dir" && as_dir=.
6635 for ac_exec_ext in '' $ac_executable_extensions; do
6636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006637 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6639 break 2
6640 fi
6641done
6642 done
6643IFS=$as_save_IFS
6644
Gregory P. Smith799520c2016-09-07 16:10:00 -07006645 ;;
6646esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006648LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6649if test -n "$LLVM_PROFDATA"; then
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6651$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006652else
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654$as_echo "no" >&6; }
6655fi
6656
6657
Gregory P. Smith799520c2016-09-07 16:10:00 -07006658if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6659 if test "$build" = "$target"; then
6660 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6661 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6662set dummy llvm-profdata; ac_word=$2
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $ac_pt_LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
6675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6680 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
6688 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6689 ;;
6690esac
6691fi
6692ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6693if test -n "$ac_pt_LLVM_PROFDATA"; then
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6695$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6696else
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
6699fi
6700
6701 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6702 else
6703 LLVM_PROFDATA="''"
6704 fi
6705else
6706 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6707fi
6708
6709
6710if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6711then
6712 LLVM_PROF_FOUND="found"
6713else
6714 LLVM_PROF_FOUND="not-found"
6715fi
6716if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6717then
6718 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6719 if test -n "${found_llvm_profdata}"
6720 then
6721 # llvm-profdata isn't directly in $PATH in some cases.
6722 # https://apple.stackexchange.com/questions/197053/
6723 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6724 LLVM_PROF_FOUND=found
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6726$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6727 fi
6728fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006729LLVM_PROF_ERR=no
6730case $CC in
6731 *clang*)
6732 # Any changes made here should be reflected in the GCC+Darwin case below
6733 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6734 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006735 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006736 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6737 if test $LLVM_PROF_FOUND = not-found
6738 then
6739 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006740 if test "${REQUIRE_PGO}" = "yes"
6741 then
6742 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6743 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006744 fi
6745 ;;
6746 *gcc*)
6747 case $ac_sys_system in
6748 Darwin*)
6749 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6750 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006751 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006752 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754 then
6755 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006756 if test "${REQUIRE_PGO}" = "yes"
6757 then
6758 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6759 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006760 fi
6761 ;;
6762 *)
6763 PGO_PROF_GEN_FLAG="-fprofile-generate"
6764 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6765 LLVM_PROF_MERGER="true"
6766 LLVM_PROF_FILE=""
6767 ;;
6768 esac
6769 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006770 *icc*)
6771 PGO_PROF_GEN_FLAG="-prof-gen"
6772 PGO_PROF_USE_FLAG="-prof-use"
6773 LLVM_PROF_MERGER="true"
6774 LLVM_PROF_FILE=""
6775 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006776esac
6777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6779# merged with this chunk of code?
6780
6781# Optimizer/debugger flags
6782# ------------------------
6783# (The following bit of code is complicated enough - please keep things
6784# indented properly. Just pretend you're editing Python code. ;-)
6785
6786# There are two parallel sets of case statements below, one that checks to
6787# see if OPT was set and one that does BASECFLAGS setting based upon
6788# compiler and platform. BASECFLAGS tweaks need to be made even if the
6789# user set OPT.
6790
6791# tweak OPT based on compiler and platform, only if the user didn't set
6792# it on the command line
6793
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006794if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795then
6796 case $GCC in
6797 yes)
6798 if test "$CC" != 'g++' ; then
6799 STRICT_PROTO="-Wstrict-prototypes"
6800 fi
6801 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6802 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6803 WRAP="-fwrapv"
6804 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006805
6806 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006807 case $CC in
6808 *clang*) WRAP="-fwrapv"
6809 ;;
6810 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812 case $ac_cv_prog_cc_g in
6813 yes)
6814 if test "$Py_DEBUG" = 'true' ; then
6815 # Optimization messes up debuggers, so turn it off for
6816 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006817 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6818 OPT="-g -Og -Wall $STRICT_PROTO"
6819 else
6820 OPT="-g -O0 -Wall $STRICT_PROTO"
6821 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822 else
6823 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6824 fi
6825 ;;
6826 *)
6827 OPT="-O3 -Wall $STRICT_PROTO"
6828 ;;
6829 esac
6830 case $ac_sys_system in
6831 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6832 ;;
6833 esac
6834 ;;
6835
6836 *)
6837 OPT="-O"
6838 ;;
6839 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840fi
6841
6842
6843
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845# The -arch flags for universal builds on OSX
6846UNIVERSAL_ARCH_FLAGS=
6847
6848
6849# tweak BASECFLAGS based on compiler and platform
6850case $GCC in
6851yes)
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07006852 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006853
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006854 # Python doesn't violate C99 aliasing rules, but older versions of
6855 # GCC produce warnings for legal Python code. Enable
6856 # -fno-strict-aliasing on versions of GCC that support but produce
6857 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6859$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 ac_save_cc="$CC"
6861 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006862 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006863 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006868
Matthias Kloseb159a552010-04-25 21:00:44 +00006869
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006870int
6871main ()
6872{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006873
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006874 ;
6875 return 0;
6876}
Matthias Kloseb159a552010-04-25 21:00:44 +00006877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006879if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006880
6881 CC="$ac_save_cc -fstrict-aliasing"
6882 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006884/* end confdefs.h. */
6885
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006886 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006887int
6888main ()
6889{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006890double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006891 ;
6892 return 0;
6893}
Matthias Kloseb159a552010-04-25 21:00:44 +00006894
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006896if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006897
6898 ac_cv_no_strict_aliasing=no
6899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900else
Matthias Kloseb159a552010-04-25 21:00:44 +00006901
6902 ac_cv_no_strict_aliasing=yes
6903
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006904fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006906
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006907else
Matthias Kloseb159a552010-04-25 21:00:44 +00006908
6909 ac_cv_no_strict_aliasing=no
6910
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006913fi
6914
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006915 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6918$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006919 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920 then
6921 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6922 fi
6923
Zachary Ware5af85642015-12-21 12:09:17 -06006924 # ICC doesn't recognize the option, but only emits a warning
6925 ## XXX does it emit an unused result warning and can it be disabled?
6926 case "$CC" in
6927 *icc*)
6928 ac_cv_disable_unused_result_warning=no
6929 ;;
6930 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6932$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6933 ac_save_cc="$CC"
6934 CC="$CC -Wunused-result -Werror"
6935 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006936 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006937 $as_echo_n "(cached) " >&6
6938else
6939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6940/* end confdefs.h. */
6941
6942
6943int
6944main ()
6945{
6946
6947 ;
6948 return 0;
6949}
6950
6951_ACEOF
6952if ac_fn_c_try_compile "$LINENO"; then :
6953
6954 ac_cv_disable_unused_result_warning=yes
6955
6956else
6957
6958 ac_cv_disable_unused_result_warning=no
6959
6960fi
6961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6962fi
6963
6964 CFLAGS="$save_CFLAGS"
6965 CC="$ac_save_cc"
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6967$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006968 ;;
6969 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006970
6971 if test $ac_cv_disable_unused_result_warning = yes
6972 then
6973 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6974 fi
6975
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6977$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6978 ac_save_cc="$CC"
6979 CC="$CC -Wsign-compare"
6980 save_CFLAGS="$CFLAGS"
6981 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6982 $as_echo_n "(cached) " >&6
6983else
6984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6985/* end confdefs.h. */
6986
6987
6988int
6989main ()
6990{
6991
6992 ;
6993 return 0;
6994}
6995
6996_ACEOF
6997if ac_fn_c_try_compile "$LINENO"; then :
6998
6999 ac_cv_enable_sign_compare_warning=yes
7000
7001else
7002
7003 ac_cv_enable_sign_compare_warning=no
7004
7005fi
7006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7007fi
7008
7009 CFLAGS="$save_CFLAGS"
7010 CC="$ac_save_cc"
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7012$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7013
7014 if test $ac_cv_enable_sign_compare_warning = yes
7015 then
7016 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7017 fi
7018
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7020$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7021 ac_save_cc="$CC"
7022 CC="$CC -Wunreachable-code"
7023 save_CFLAGS="$CFLAGS"
7024 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7025 $as_echo_n "(cached) " >&6
7026else
7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7028/* end confdefs.h. */
7029
7030
7031int
7032main ()
7033{
7034
7035 ;
7036 return 0;
7037}
7038
7039_ACEOF
7040if ac_fn_c_try_compile "$LINENO"; then :
7041
7042 ac_cv_enable_unreachable_code_warning=yes
7043
7044else
7045
7046 ac_cv_enable_unreachable_code_warning=no
7047
7048fi
7049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7050fi
7051
7052 CFLAGS="$save_CFLAGS"
7053 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007054
7055 # Don't enable unreachable code warning in debug mode, since it usually
7056 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007057 # Issue #24324: Unfortunately, the unreachable code warning does not work
7058 # correctly on gcc and has been silently removed from the compiler.
7059 # It is supported on clang but on OS X systems gcc may be an alias
7060 # for clang. Try to determine if the compiler is not really gcc and,
7061 # if so, only then enable the warning.
7062 if test $ac_cv_enable_unreachable_code_warning = yes && \
7063 test "$Py_DEBUG" != "true" && \
7064 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007065 then
7066 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007067 else
7068 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007069 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7071$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007072
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7074 # support. Without this, treatment of subnormals doesn't follow
7075 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007076 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007077 alpha*)
7078 BASECFLAGS="$BASECFLAGS -mieee"
7079 ;;
7080 esac
7081
7082 case $ac_sys_system in
7083 SCO_SV*)
7084 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7085 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007086
7087 # is there any other compiler on Darwin besides gcc?
7088 Darwin*)
7089 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7090 # used to be here, but non-Apple gcc doesn't accept them.
7091 if test "${CC}" = gcc
7092 then
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007094$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007095 case "${UNIVERSALSDK}" in
7096 */MacOSX10.4u.sdk)
7097 # Build using 10.4 SDK, force usage of gcc when the
7098 # compiler is gcc, otherwise the user will get very
7099 # confusing error messages when building on OSX 10.6
7100 CC=gcc-4.0
7101 CPP=cpp-4.0
7102 ;;
7103 esac
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007105$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007106 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007107
Ned Deily87adb6e2013-10-18 21:09:56 -07007108 if test "${enable_universalsdk}"
7109 then
7110 case "$UNIVERSAL_ARCHS" in
7111 32-bit)
7112 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7113 LIPO_32BIT_FLAGS=""
7114 ARCH_RUN_32BIT=""
7115 ;;
7116 64-bit)
7117 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7118 LIPO_32BIT_FLAGS=""
7119 ARCH_RUN_32BIT="true"
7120 ;;
7121 all)
7122 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7123 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7124 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7125 ;;
7126 intel)
7127 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7128 LIPO_32BIT_FLAGS="-extract i386"
7129 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7130 ;;
7131 intel-32)
7132 UNIVERSAL_ARCH_FLAGS="-arch i386"
7133 LIPO_32BIT_FLAGS=""
7134 ARCH_RUN_32BIT=""
7135 ;;
7136 3-way)
7137 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7138 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7139 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7140 ;;
7141 *)
7142 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7143 ;;
7144 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007145
Ned Deily87adb6e2013-10-18 21:09:56 -07007146 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7147 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7148 if test "${UNIVERSALSDK}" != "/"
7149 then
7150 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7151 fi
7152 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007153
Ned Deily87adb6e2013-10-18 21:09:56 -07007154 # Calculate an appropriate deployment target for this build:
7155 # The deployment target value is used explicitly to enable certain
7156 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007157 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007158 # component of the string returned by distutils.get_platform().
7159 #
7160 # Use the value from:
7161 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7162 # 2. the operating system version of the build machine if >= 10.6
7163 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7164 # below to pick either 10.3, 10.4, or 10.5 as the target.
7165 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007166
Ned Deily87adb6e2013-10-18 21:09:56 -07007167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7168$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007169 cur_target_major=`sw_vers -productVersion | \
7170 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7171 cur_target_minor=`sw_vers -productVersion | \
7172 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7173 cur_target="${cur_target_major}.${cur_target_minor}"
7174 if test ${cur_target_major} -eq 10 && \
7175 test ${cur_target_minor} -ge 3 && \
7176 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007177 then
Ned Deily36820b62014-06-25 13:44:22 -07007178 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007179 cur_target=10.3
7180 if test ${enable_universalsdk}
7181 then
7182 case "$UNIVERSAL_ARCHS" in
7183 all|3-way|intel|64-bit)
7184 # These configurations were first supported in 10.5
7185 cur_target='10.5'
7186 ;;
7187 esac
7188 else
7189 if test `/usr/bin/arch` = "i386"
7190 then
7191 # 10.4 was the first release to support Intel archs
7192 cur_target="10.4"
7193 fi
7194 fi
7195 fi
7196 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007197
Ned Deily87adb6e2013-10-18 21:09:56 -07007198 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7199 # environment with a value that is the same as what we'll use
7200 # in the Makefile to ensure that we'll get the same compiler
7201 # environment during configure and build time.
7202 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7203 export MACOSX_DEPLOYMENT_TARGET
7204 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7206$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007207
Ned Deily87adb6e2013-10-18 21:09:56 -07007208 # end of Darwin* tests
7209 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007210 esac
7211 ;;
7212
7213*)
7214 case $ac_sys_system in
7215 OpenUNIX*|UnixWare*)
7216 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7217 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218 SCO_SV*)
7219 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7220 ;;
7221 esac
7222 ;;
7223esac
7224
Zachary Ware5af85642015-12-21 12:09:17 -06007225# ICC needs -fp-model strict or floats behave badly
7226case "$CC" in
7227*icc*)
7228 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7229 ;;
7230esac
7231
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232if test "$Py_DEBUG" = 'true'; then
7233 :
7234else
7235 OPT="-DNDEBUG $OPT"
7236fi
7237
7238if test "$ac_arch_flags"
7239then
7240 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7241fi
7242
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007243# On some compilers, pthreads are available without further options
7244# (e.g. MacOS X). On some of these systems, the compiler will not
7245# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7246# So we have to see first whether pthreads are available without
7247# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7249$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007250if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007252else
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254 ac_cv_pthread_is_default=no
7255else
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007257/* end confdefs.h. */
7258
Stefan Krah7dba5942012-11-22 22:49:11 +01007259#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260#include <pthread.h>
7261
7262void* routine(void* p){return NULL;}
7263
7264int main(){
7265 pthread_t p;
7266 if(pthread_create(&p,NULL,routine,NULL)!=0)
7267 return 1;
7268 (void)pthread_detach(p);
7269 return 0;
7270}
7271
7272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007273if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274
7275 ac_cv_pthread_is_default=yes
7276 ac_cv_kthread=no
7277 ac_cv_pthread=no
7278
7279else
Matthias Kloseb9621712010-04-24 17:59:49 +00007280 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7283 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007284fi
7285
7286
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287fi
7288
Matthias Kloseb9621712010-04-24 17:59:49 +00007289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7290$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291
7292
7293if test $ac_cv_pthread_is_default = yes
7294then
7295 ac_cv_kpthread=no
7296else
7297# -Kpthread, if available, provides the right #defines
7298# and linker options to make pthread_create available
7299# Some compilers won't report that they do not support -Kpthread,
7300# so we need to run a program to see whether it really made the
7301# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7303$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007304if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007306else
7307 ac_save_cc="$CC"
7308CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007309if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007310 ac_cv_kpthread=no
7311else
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007313/* end confdefs.h. */
7314
Stefan Krah7dba5942012-11-22 22:49:11 +01007315#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316#include <pthread.h>
7317
7318void* routine(void* p){return NULL;}
7319
7320int main(){
7321 pthread_t p;
7322 if(pthread_create(&p,NULL,routine,NULL)!=0)
7323 return 1;
7324 (void)pthread_detach(p);
7325 return 0;
7326}
7327
7328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007329if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007330 ac_cv_kpthread=yes
7331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7335 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336fi
7337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338CC="$ac_save_cc"
7339fi
7340
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7342$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343fi
7344
7345if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7346then
7347# -Kthread, if available, provides the right #defines
7348# and linker options to make pthread_create available
7349# Some compilers won't report that they do not support -Kthread,
7350# so we need to run a program to see whether it really made the
7351# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7353$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007354if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007355 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007356else
7357 ac_save_cc="$CC"
7358CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007359if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360 ac_cv_kthread=no
7361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363/* end confdefs.h. */
7364
Stefan Krah7dba5942012-11-22 22:49:11 +01007365#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366#include <pthread.h>
7367
7368void* routine(void* p){return NULL;}
7369
7370int main(){
7371 pthread_t p;
7372 if(pthread_create(&p,NULL,routine,NULL)!=0)
7373 return 1;
7374 (void)pthread_detach(p);
7375 return 0;
7376}
7377
7378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007379if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380 ac_cv_kthread=yes
7381else
Matthias Kloseb9621712010-04-24 17:59:49 +00007382 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7385 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386fi
7387
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388CC="$ac_save_cc"
7389fi
7390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7392$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393fi
7394
7395if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7396then
7397# -pthread, if available, provides the right #defines
7398# and linker options to make pthread_create available
7399# Some compilers won't report that they do not support -pthread,
7400# so we need to run a program to see whether it really made the
7401# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7403$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007404if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406else
7407 ac_save_cc="$CC"
7408CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007409if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410 ac_cv_pthread=no
7411else
Matthias Kloseb9621712010-04-24 17:59:49 +00007412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413/* end confdefs.h. */
7414
Stefan Krah7dba5942012-11-22 22:49:11 +01007415#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416#include <pthread.h>
7417
7418void* routine(void* p){return NULL;}
7419
7420int main(){
7421 pthread_t p;
7422 if(pthread_create(&p,NULL,routine,NULL)!=0)
7423 return 1;
7424 (void)pthread_detach(p);
7425 return 0;
7426}
7427
7428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007429if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430 ac_cv_pthread=yes
7431else
Matthias Kloseb9621712010-04-24 17:59:49 +00007432 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436fi
7437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438CC="$ac_save_cc"
7439fi
7440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7442$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443fi
7444
7445# If we have set a CC compiler flag for thread support then
7446# check if it works for CXX, too.
7447ac_cv_cxx_thread=no
7448if test ! -z "$CXX"
7449then
Matthias Kloseb9621712010-04-24 17:59:49 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7451$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452ac_save_cxx="$CXX"
7453
7454if test "$ac_cv_kpthread" = "yes"
7455then
7456 CXX="$CXX -Kpthread"
7457 ac_cv_cxx_thread=yes
7458elif test "$ac_cv_kthread" = "yes"
7459then
7460 CXX="$CXX -Kthread"
7461 ac_cv_cxx_thread=yes
7462elif test "$ac_cv_pthread" = "yes"
7463then
7464 CXX="$CXX -pthread"
7465 ac_cv_cxx_thread=yes
7466fi
7467
7468if test $ac_cv_cxx_thread = yes
7469then
7470 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7471 $CXX -c conftest.$ac_ext 2>&5
7472 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7473 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7474 then
7475 ac_cv_cxx_thread=yes
7476 else
7477 ac_cv_cxx_thread=no
7478 fi
7479 rm -fr conftest*
7480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7482$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483fi
7484CXX="$ac_save_cxx"
7485
7486
7487# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7489$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007490if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494/* end confdefs.h. */
7495#include <stdlib.h>
7496#include <stdarg.h>
7497#include <string.h>
7498#include <float.h>
7499
7500int
7501main ()
7502{
7503
7504 ;
7505 return 0;
7506}
7507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007508if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509 ac_cv_header_stdc=yes
7510else
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7514
7515if test $ac_cv_header_stdc = yes; then
7516 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518/* end confdefs.h. */
7519#include <string.h>
7520
7521_ACEOF
7522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007523 $EGREP "memchr" >/dev/null 2>&1; then :
7524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525else
7526 ac_cv_header_stdc=no
7527fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007528rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529
7530fi
7531
7532if test $ac_cv_header_stdc = yes; then
7533 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535/* end confdefs.h. */
7536#include <stdlib.h>
7537
7538_ACEOF
7539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 $EGREP "free" >/dev/null 2>&1; then :
7541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542else
7543 ac_cv_header_stdc=no
7544fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007545rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546
7547fi
7548
7549if test $ac_cv_header_stdc = yes; then
7550 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552 :
7553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555/* end confdefs.h. */
7556#include <ctype.h>
7557#include <stdlib.h>
7558#if ((' ' & 0x0FF) == 0x020)
7559# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7560# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7561#else
7562# define ISLOWER(c) \
7563 (('a' <= (c) && (c) <= 'i') \
7564 || ('j' <= (c) && (c) <= 'r') \
7565 || ('s' <= (c) && (c) <= 'z'))
7566# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7567#endif
7568
7569#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7570int
7571main ()
7572{
7573 int i;
7574 for (i = 0; i < 256; i++)
7575 if (XOR (islower (i), ISLOWER (i))
7576 || toupper (i) != TOUPPER (i))
7577 return 2;
7578 return 0;
7579}
7580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if ac_fn_c_try_run "$LINENO"; then :
7582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588fi
7589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590fi
7591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7593$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594if test $ac_cv_header_stdc = yes; then
7595
Matthias Kloseb9621712010-04-24 17:59:49 +00007596$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597
7598fi
7599
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007600for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007601fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007602ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007603sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007604unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007605poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007606sys/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 +01007607sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007608sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007609sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007610sys/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 -07007611libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007612linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007613sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007614do :
7615 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7616ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007617if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007619#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007620_ACEOF
7621
7622fi
7623
Guido van Rossum627b2d71993-12-24 10:39:16 +00007624done
7625
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007626ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007627for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7630$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007633else
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007635/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007636#include <sys/types.h>
7637#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639int
7640main ()
7641{
7642if ((DIR *) 0)
7643return 0;
7644 ;
7645 return 0;
7646}
7647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655eval ac_res=\$$as_ac_Header
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7657$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007658if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007660#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007661_ACEOF
7662
7663ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007664fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007665
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007666done
7667# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7668if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7670$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007671if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007672 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007673else
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678/* Override any GCC internal prototype to avoid an error.
7679 Use char because int might match the return type of a GCC
7680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007681#ifdef __cplusplus
7682extern "C"
7683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007684char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007685int
7686main ()
7687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007689 ;
7690 return 0;
7691}
7692_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693for ac_lib in '' dir; do
7694 if test -z "$ac_lib"; then
7695 ac_res="none required"
7696 else
7697 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007698 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703rm -f core conftest.err conftest.$ac_objext \
7704 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007705 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708done
Victor Stinnere0be4232011-10-25 13:06:09 +02007709if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711else
7712 ac_cv_search_opendir=no
7713fi
7714rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007715LIBS=$ac_func_search_save_LIBS
7716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7718$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007720if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007722
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007723fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007724
Michael W. Hudson54241132001-12-07 15:38:26 +00007725else
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7727$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007728if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
7731 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735/* Override any GCC internal prototype to avoid an error.
7736 Use char because int might match the return type of a GCC
7737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007738#ifdef __cplusplus
7739extern "C"
7740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007741char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007742int
7743main ()
7744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ;
7747 return 0;
7748}
7749_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750for ac_lib in '' x; do
7751 if test -z "$ac_lib"; then
7752 ac_res="none required"
7753 else
7754 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007755 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007760rm -f core conftest.err conftest.$ac_objext \
7761 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007762 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765done
Victor Stinnere0be4232011-10-25 13:06:09 +02007766if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768else
7769 ac_cv_search_opendir=no
7770fi
7771rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007772LIBS=$ac_func_search_save_LIBS
7773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7775$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007777if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007780fi
7781
7782fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7785$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007786if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007791#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007792int
7793main ()
7794{
7795return makedev(0, 0);
7796 ;
7797 return 0;
7798}
7799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007800if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007801 ac_cv_header_sys_types_h_makedev=yes
7802else
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805rm -f core conftest.err conftest.$ac_objext \
7806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007807
7808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7810$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007811
7812if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007813ac_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 +02007814if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007815
Matthias Kloseb9621712010-04-24 17:59:49 +00007816$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007817
7818fi
7819
7820
7821
7822 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 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 +02007824if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007825
Matthias Kloseb9621712010-04-24 17:59:49 +00007826$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007827
7828fi
7829
7830
7831 fi
7832fi
7833
Michael W. Hudson54241132001-12-07 15:38:26 +00007834
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007835# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7836# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7837SAVE_CFLAGS=$CFLAGS
7838CFLAGS="-std=c99 $CFLAGS"
7839for ac_header in bluetooth/bluetooth.h
7840do :
7841 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7842if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7843 cat >>confdefs.h <<_ACEOF
7844#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7845_ACEOF
7846
7847fi
7848
7849done
7850
7851CFLAGS=$SAVE_CFLAGS
7852
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007853# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7854for ac_header in net/if.h
7855do :
7856 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7857#ifdef STDC_HEADERS
7858# include <stdlib.h>
7859# include <stddef.h>
7860#else
7861# ifdef HAVE_STDLIB_H
7862# include <stdlib.h>
7863# endif
7864#endif
7865#ifdef HAVE_SYS_SOCKET_H
7866# include <sys/socket.h>
7867#endif
7868
7869"
Victor Stinnere0be4232011-10-25 13:06:09 +02007870if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007871 cat >>confdefs.h <<_ACEOF
7872#define HAVE_NET_IF_H 1
7873_ACEOF
7874
7875fi
7876
7877done
7878
7879
Martin v. Löwis11017b12006-01-14 18:12:57 +00007880# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007881for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007882do :
7883 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 +00007884#ifdef HAVE_ASM_TYPES_H
7885#include <asm/types.h>
7886#endif
7887#ifdef HAVE_SYS_SOCKET_H
7888#include <sys/socket.h>
7889#endif
7890
Matthias Kloseb9621712010-04-24 17:59:49 +00007891"
Victor Stinnere0be4232011-10-25 13:06:09 +02007892if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007893 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007894#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007895_ACEOF
7896
7897fi
7898
7899done
7900
7901
Charles-François Natali47413c12011-10-06 19:47:44 +02007902# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007903for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007904do :
7905 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7906ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7907#ifdef HAVE_SYS_SOCKET_H
7908#include <sys/socket.h>
7909#endif
7910
7911"
7912if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7913 cat >>confdefs.h <<_ACEOF
7914#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7915_ACEOF
7916
7917fi
7918
7919done
7920
7921
Guido van Rossum627b2d71993-12-24 10:39:16 +00007922# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007923was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7925$as_echo_n "checking for clock_t in time.h... " >&6; }
7926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007927/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007928#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007929
7930_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007933 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007934else
Martin v. Löwis11437992002-04-12 09:54:03 +00007935
7936
Matthias Kloseb9621712010-04-24 17:59:49 +00007937$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007938
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007939
Guido van Rossum627b2d71993-12-24 10:39:16 +00007940fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007941rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7944$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007945
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7947$as_echo_n "checking for makedev... " >&6; }
7948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007949/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007950
Jesus Cea740f53a2010-04-28 11:35:30 +00007951#if defined(MAJOR_IN_MKDEV)
7952#include <sys/mkdev.h>
7953#elif defined(MAJOR_IN_SYSMACROS)
7954#include <sys/sysmacros.h>
7955#else
7956#include <sys/types.h>
7957#endif
7958
Neal Norwitz11690112002-07-30 01:08:28 +00007959int
7960main ()
7961{
Jesus Cea740f53a2010-04-28 11:35:30 +00007962
7963 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007964 ;
7965 return 0;
7966}
Matthias Kloseb159a552010-04-25 21:00:44 +00007967
Neal Norwitz11690112002-07-30 01:08:28 +00007968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007969if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007970 ac_cv_has_makedev=yes
7971else
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007974rm -f core conftest.err conftest.$ac_objext \
7975 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7977$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007978if test "$ac_cv_has_makedev" = "yes"; then
7979
Matthias Kloseb9621712010-04-24 17:59:49 +00007980$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007981
7982fi
7983
Christian Heimes985ecdc2013-11-20 11:46:18 +01007984# byte swapping
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7986$as_echo_n "checking for le64toh... " >&6; }
7987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7988/* end confdefs.h. */
7989
7990#ifdef HAVE_ENDIAN_H
7991#include <endian.h>
7992#elif defined(HAVE_SYS_ENDIAN_H)
7993#include <sys/endian.h>
7994#endif
7995
7996int
7997main ()
7998{
7999
8000 le64toh(1)
8001 ;
8002 return 0;
8003}
8004
8005_ACEOF
8006if ac_fn_c_try_link "$LINENO"; then :
8007 ac_cv_has_le64toh=yes
8008else
8009 ac_cv_has_le64toh=no
8010fi
8011rm -f core conftest.err conftest.$ac_objext \
8012 conftest$ac_exeext conftest.$ac_ext
8013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8014$as_echo "$ac_cv_has_le64toh" >&6; }
8015if test "$ac_cv_has_le64toh" = "yes"; then
8016
8017$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8018
8019fi
8020
Martin v. Löwis399a6892002-10-04 10:22:02 +00008021# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8022# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8023# defined, but the compiler does not support pragma redefine_extname,
8024# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8025# structures (such as rlimit64) without declaring them. As a
8026# work-around, disable LFS on such configurations
8027
8028use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8030$as_echo_n "checking Solaris LFS bug... " >&6; }
8031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008033
8034#define _LARGEFILE_SOURCE 1
8035#define _FILE_OFFSET_BITS 64
8036#include <sys/resource.h>
8037
Martin v. Löwis399a6892002-10-04 10:22:02 +00008038int
8039main ()
8040{
8041struct rlimit foo;
8042 ;
8043 return 0;
8044}
8045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008047 sol_lfs_bug=no
8048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8053$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008054if test "$sol_lfs_bug" = "yes"; then
8055 use_lfs=no
8056fi
8057
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008058# Don't use largefile support for GNU/Hurd
8059case $ac_sys_system in GNU*)
8060 use_lfs=no
8061esac
8062
Martin v. Löwis399a6892002-10-04 10:22:02 +00008063if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008064# Two defines needed to enable largefile support on various platforms
8065# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008066case $ac_sys_system/$ac_sys_release in
8067AIX*)
8068
8069$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8070
8071 ;;
8072esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008073
Matthias Kloseb9621712010-04-24 17:59:49 +00008074$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
8076
Matthias Kloseb9621712010-04-24 17:59:49 +00008077$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008078
Martin v. Löwis399a6892002-10-04 10:22:02 +00008079fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008080
Guido van Rossum84e7b241996-08-19 21:59:00 +00008081# Add some code to confdefs.h so that the test for off_t works on SCO
8082cat >> confdefs.h <<\EOF
8083#if defined(SCO_DS)
8084#undef _OFF_T
8085#endif
8086EOF
8087
Guido van Rossumef2255b2000-03-10 22:30:29 +00008088# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008089ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008090if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092else
Martin v. Löwis11437992002-04-12 09:54:03 +00008093
8094cat >>confdefs.h <<_ACEOF
8095#define mode_t int
8096_ACEOF
8097
8098fi
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008101if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008102
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008103else
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
8105cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008107_ACEOF
8108
8109fi
8110
Matthias Kloseb9621712010-04-24 17:59:49 +00008111ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008112if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114else
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
8116cat >>confdefs.h <<_ACEOF
8117#define pid_t int
8118_ACEOF
8119
8120fi
8121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008122
Martin v. Löwis11437992002-04-12 09:54:03 +00008123cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008124#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008125_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008128if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008130else
Martin v. Löwis11437992002-04-12 09:54:03 +00008131
8132cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008134_ACEOF
8135
8136fi
8137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8139$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008140if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008142else
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008144/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008145#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008146
8147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008150 ac_cv_type_uid_t=yes
8151else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008152 ac_cv_type_uid_t=no
8153fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008154rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8158$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008159if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008165
8166fi
8167
Mark Dickinson983bc162012-12-02 12:11:38 +00008168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008170if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171
Matthias Kloseb9621712010-04-24 17:59:49 +00008172$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008173
8174fi
8175
Stefan Krah1919b7e2012-03-21 18:25:23 +01008176ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8177if test "x$ac_cv_type___uint128_t" = xyes; then :
8178
8179$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8180
8181fi
8182
Jack Jansendd19cf82001-12-06 22:36:17 +00008183
Michael W. Hudson54241132001-12-07 15:38:26 +00008184# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008185# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186# The cast to long int works around a bug in the HP C Compiler
8187# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8188# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8189# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8191$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008192if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008194else
Matthias Kloseb9621712010-04-24 17:59:49 +00008195 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 +00008196
Martin v. Löwis11437992002-04-12 09:54:03 +00008197else
Matthias Kloseb9621712010-04-24 17:59:49 +00008198 if test "$ac_cv_type_int" = yes; then
8199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008201as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008202See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 else
8204 ac_cv_sizeof_int=0
8205 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8210$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211
8212
8213
Martin v. Löwis11437992002-04-12 09:54:03 +00008214cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008215#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008216_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008217
8218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219# The cast to long int works around a bug in the HP C Compiler
8220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8222# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8224$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008225if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008227else
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 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 +00008229
Martin v. Löwis11437992002-04-12 09:54:03 +00008230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 if test "$ac_cv_type_long" = yes; then
8232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008234as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008235See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236 else
8237 ac_cv_sizeof_long=0
8238 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8243$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244
8245
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008248#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008249_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008250
8251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252# The cast to long int works around a bug in the HP C Compiler
8253# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8254# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8255# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8257$as_echo_n "checking size of long long... " >&6; }
8258if ${ac_cv_sizeof_long_long+:} false; then :
8259 $as_echo_n "(cached) " >&6
8260else
8261 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8262
8263else
8264 if test "$ac_cv_type_long_long" = yes; then
8265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8267as_fn_error 77 "cannot compute sizeof (long long)
8268See \`config.log' for more details" "$LINENO" 5; }
8269 else
8270 ac_cv_sizeof_long_long=0
8271 fi
8272fi
8273
8274fi
8275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8276$as_echo "$ac_cv_sizeof_long_long" >&6; }
8277
8278
8279
8280cat >>confdefs.h <<_ACEOF
8281#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8282_ACEOF
8283
8284
8285# The cast to long int works around a bug in the HP C Compiler
8286# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8287# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8288# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8290$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008291if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008293else
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 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 +00008295
Martin v. Löwis11437992002-04-12 09:54:03 +00008296else
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 if test "$ac_cv_type_void_p" = yes; then
8298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008300as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008301See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302 else
8303 ac_cv_sizeof_void_p=0
8304 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8309$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310
8311
8312
Martin v. Löwis11437992002-04-12 09:54:03 +00008313cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008314#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008315_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008316
8317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318# The cast to long int works around a bug in the HP C Compiler
8319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8321# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8323$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008324if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008326else
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 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 +00008328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329else
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 if test "$ac_cv_type_short" = yes; then
8331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008333as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008334See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008335 else
8336 ac_cv_sizeof_short=0
8337 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8342$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343
8344
8345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008347#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008348_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008349
8350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351# The cast to long int works around a bug in the HP C Compiler
8352# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8353# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8354# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8356$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008357if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008359else
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 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 +00008361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 if test "$ac_cv_type_float" = yes; then
8364 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8365$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008366as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008367See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368 else
8369 ac_cv_sizeof_float=0
8370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8375$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376
8377
8378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008380#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008381_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008382
8383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384# The cast to long int works around a bug in the HP C Compiler
8385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8387# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8389$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008390if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 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 +00008394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395else
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 if test "$ac_cv_type_double" = yes; then
8397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008399as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008400See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 else
8402 ac_cv_sizeof_double=0
8403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8408$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409
8410
8411
Martin v. Löwis11437992002-04-12 09:54:03 +00008412cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008413#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008414_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008415
8416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417# The cast to long int works around a bug in the HP C Compiler
8418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8420# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8422$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008423if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 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 +00008427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428else
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 if test "$ac_cv_type_fpos_t" = yes; then
8430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008432as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008433See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434 else
8435 ac_cv_sizeof_fpos_t=0
8436 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8441$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442
8443
8444
Martin v. Löwis11437992002-04-12 09:54:03 +00008445cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008446#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008447_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008448
Michael W. Hudson54241132001-12-07 15:38:26 +00008449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450# The cast to long int works around a bug in the HP C Compiler
8451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8453# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8455$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008456if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008458else
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 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 +00008460
Martin v. Löwis18e16552006-02-15 17:27:45 +00008461else
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 if test "$ac_cv_type_size_t" = yes; then
8463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008465as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008466See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467 else
8468 ac_cv_sizeof_size_t=0
8469 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471
Martin v. Löwis18e16552006-02-15 17:27:45 +00008472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8474$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475
8476
8477
Martin v. Löwis18e16552006-02-15 17:27:45 +00008478cat >>confdefs.h <<_ACEOF
8479#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8480_ACEOF
8481
8482
Christian Heimes400adb02008-02-01 08:12:03 +00008483# The cast to long int works around a bug in the HP C Compiler
8484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8486# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8488$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008489if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 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 +00008493
Christian Heimes400adb02008-02-01 08:12:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 if test "$ac_cv_type_pid_t" = yes; then
8496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008498as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008499See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008500 else
8501 ac_cv_sizeof_pid_t=0
8502 fi
8503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504
Christian Heimes400adb02008-02-01 08:12:03 +00008505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8507$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008508
8509
8510
8511cat >>confdefs.h <<_ACEOF
8512#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8513_ACEOF
8514
8515
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008516# The cast to long int works around a bug in the HP C Compiler
8517# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8518# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8519# This bug is HP SR number 8606223364.
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8521$as_echo_n "checking size of uintptr_t... " >&6; }
8522if ${ac_cv_sizeof_uintptr_t+:} false; then :
8523 $as_echo_n "(cached) " >&6
8524else
8525 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8526
8527else
8528 if test "$ac_cv_type_uintptr_t" = yes; then
8529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8531as_fn_error 77 "cannot compute sizeof (uintptr_t)
8532See \`config.log' for more details" "$LINENO" 5; }
8533 else
8534 ac_cv_sizeof_uintptr_t=0
8535 fi
8536fi
8537
8538fi
8539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8540$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8541
8542
8543
8544cat >>confdefs.h <<_ACEOF
8545#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8546_ACEOF
8547
8548
Michael W. Hudson54241132001-12-07 15:38:26 +00008549
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8551$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008552have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008554/* end confdefs.h. */
8555
8556int
8557main ()
8558{
8559long double x; x = (long double)0;
8560 ;
8561 return 0;
8562}
8563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008564if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008565
8566
Matthias Kloseb9621712010-04-24 17:59:49 +00008567$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008568
8569 have_long_double=yes
8570
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008571fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8574$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008575if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008576# The cast to long int works around a bug in the HP C Compiler
8577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8579# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8581$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008582if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008584else
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 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 +00008586
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 if test "$ac_cv_type_long_double" = yes; then
8589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008591as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008592See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008593 else
8594 ac_cv_sizeof_long_double=0
8595 fi
8596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8600$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008601
8602
8603
8604cat >>confdefs.h <<_ACEOF
8605#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8606_ACEOF
8607
8608
8609fi
8610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611# The cast to long int works around a bug in the HP C Compiler
8612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8614# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8616$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008617if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 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 +00008621
Thomas Woutersb2137042007-02-01 18:02:27 +00008622else
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 if test "$ac_cv_type__Bool" = yes; then
8624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008626as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008627See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 else
8629 ac_cv_sizeof__Bool=0
8630 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632
Thomas Woutersb2137042007-02-01 18:02:27 +00008633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8635$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636
8637
8638
Thomas Woutersb2137042007-02-01 18:02:27 +00008639cat >>confdefs.h <<_ACEOF
8640#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8641_ACEOF
8642
8643
Thomas Woutersb2137042007-02-01 18:02:27 +00008644
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008645# The cast to long int works around a bug in the HP C Compiler
8646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8650$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008655#ifdef HAVE_SYS_TYPES_H
8656#include <sys/types.h>
8657#endif
8658
Matthias Kloseb9621712010-04-24 17:59:49 +00008659"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 if test "$ac_cv_type_off_t" = yes; then
8663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008665as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008666See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008667 else
8668 ac_cv_sizeof_off_t=0
8669 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008671
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8674$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008675
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008676
8677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008679#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008680_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008681
Michael W. Hudson54241132001-12-07 15:38:26 +00008682
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008683
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8685$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008686if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008687 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008688
Matthias Kloseb9621712010-04-24 17:59:49 +00008689$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8692$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8695$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008696fi
8697
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008698# The cast to long int works around a bug in the HP C Compiler
8699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8703$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008708#ifdef HAVE_SYS_TYPES_H
8709#include <sys/types.h>
8710#endif
8711#ifdef HAVE_TIME_H
8712#include <time.h>
8713#endif
8714
Matthias Kloseb9621712010-04-24 17:59:49 +00008715"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008716
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_time_t" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008723 else
8724 ac_cv_sizeof_time_t=0
8725 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8730$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008731
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008735#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008737
Michael W. Hudson54241132001-12-07 15:38:26 +00008738
8739
Trent Mick635f6fb2000-08-23 21:33:05 +00008740# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008741ac_save_cc="$CC"
8742if test "$ac_cv_kpthread" = "yes"
8743then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008744elif test "$ac_cv_kthread" = "yes"
8745then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008746elif test "$ac_cv_pthread" = "yes"
8747then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008748fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008749
Matthias Kloseb9621712010-04-24 17:59:49 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8751$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008752have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008755
8756 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008757int
8758main ()
8759{
Guido van Rossum12580492000-09-24 16:47:19 +00008760pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ;
8762 return 0;
8763}
Matthias Kloseb159a552010-04-25 21:00:44 +00008764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008766if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008767 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8771$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008772if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8778$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008779if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783#ifdef HAVE_PTHREAD_H
8784#include <pthread.h>
8785#endif
8786
Matthias Kloseb9621712010-04-24 17:59:49 +00008787"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008789else
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 if test "$ac_cv_type_pthread_t" = yes; then
8791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008793as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008794See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008795 else
8796 ac_cv_sizeof_pthread_t=0
8797 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008799
Trent Mick635f6fb2000-08-23 21:33:05 +00008800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8802$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008804
8805
Martin v. Löwis11437992002-04-12 09:54:03 +00008806cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008807#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008808_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008809
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810
Trent Mick635f6fb2000-08-23 21:33:05 +00008811fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008812CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008813
Michael W. Hudson54241132001-12-07 15:38:26 +00008814
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008815case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008816 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008817 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8818 ;;
8819 Darwin/*)
8820 OTHER_LIBTOOL_OPT=""
8821 ;;
8822esac
8823
8824
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008825
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008826case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008827 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008828 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8829 if test "${enable_universalsdk}"; then
8830 :
8831 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008832 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008833 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008834 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008835 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008836 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008837 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008838 if test ${gcc_version} '<' 4.0
8839 then
8840 LIBTOOL_CRUFT="-lcc_dynamic"
8841 else
8842 LIBTOOL_CRUFT=""
8843 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008845 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008848/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008849
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008850 #include <unistd.h>
8851 int main(int argc, char*argv[])
8852 {
8853 if (sizeof(long) == 4) {
8854 return 0;
8855 } else {
8856 return 1;
8857 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008858 }
8859
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008861if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008862 ac_osx_32bit=yes
8863else
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008868fi
8869
8870
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008871 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008872 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008873 i386)
8874 MACOSX_DEFAULT_ARCH="i386"
8875 ;;
8876 ppc)
8877 MACOSX_DEFAULT_ARCH="ppc"
8878 ;;
8879 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008880 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008881 ;;
8882 esac
8883 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008884 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008885 i386)
8886 MACOSX_DEFAULT_ARCH="x86_64"
8887 ;;
8888 ppc)
8889 MACOSX_DEFAULT_ARCH="ppc64"
8890 ;;
8891 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008892 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008893 ;;
8894 esac
8895
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008896 fi
8897
8898 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008899 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008900 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008901esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8903$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008904if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008905then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008906 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008908 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008911
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8913$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008914 if test $enable_shared = "yes"
8915 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008916 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 +00008917 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008918else
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8920$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008921fi
8922
Matthias Kloseb9621712010-04-24 17:59:49 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8924$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008925case $ac_sys_system/$ac_sys_release in
8926 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008929
Matthias Kloseb9621712010-04-24 17:59:49 +00008930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8931$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008932 ;;
8933 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8935$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008936 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008937esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008938
Guido van Rossum0a516c91994-09-12 10:58:40 +00008939# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008940
Michael W. Hudson54241132001-12-07 15:38:26 +00008941
8942
8943
8944
Benjamin Peterson99f03762010-04-11 22:15:28 +00008945
Thomas Wouters477c8d52006-05-27 19:21:47 +00008946
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008947# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8948# -- usually .so, .sl on HP-UX, .dll on Cygwin
8949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8950$as_echo_n "checking the extension of shared libraries... " >&6; }
8951if test -z "$SHLIB_SUFFIX"; then
8952 case $ac_sys_system in
8953 hp*|HP*)
8954 case `uname -m` in
8955 ia64) SHLIB_SUFFIX=.so;;
8956 *) SHLIB_SUFFIX=.sl;;
8957 esac
8958 ;;
8959 CYGWIN*) SHLIB_SUFFIX=.dll;;
8960 *) SHLIB_SUFFIX=.so;;
8961 esac
8962fi
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8964$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008965
Guido van Rossum0a516c91994-09-12 10:58:40 +00008966# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008967# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008968# (Shared libraries in this instance are shared modules to be loaded into
8969# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8971$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008972if test -z "$LDSHARED"
8973then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008974 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008975 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008976 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008977 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008978 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008979 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008980 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008982 if test "$GCC" = "yes" ; then
8983 LDSHARED='$(CC) -shared'
8984 LDCXXSHARED='$(CXX) -shared'
8985 else
8986 LDSHARED='$(CC) -G'
8987 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008988 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008989 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008990 if test "$GCC" = "yes" ; then
8991 LDSHARED='$(CC) -shared'
8992 LDCXXSHARED='$(CXX) -shared'
8993 else
8994 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008995 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008996 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008997 LDSHARED='$(CC) -bundle'
8998 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008999 if test "$enable_framework" ; then
9000 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009001 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9002 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009003 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009004 else
9005 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009006 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009007 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009008 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009009 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009010 LDSHARED='$(CC) -bundle'
9011 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009012 if test "$enable_framework" ; then
9013 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009014 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9015 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009016 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009017 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009018 # No framework, use the Python app as bundle-loader
9019 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009020 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009021 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009022 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009023 Darwin/*)
9024 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9025 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009026
Ned Deily36820b62014-06-25 13:44:22 -07009027 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9028 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9029 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9030 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9031 if test ${dep_target_major} -eq 10 && \
9032 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009033 then
Ned Deily36820b62014-06-25 13:44:22 -07009034 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009035 LDSHARED='$(CC) -bundle'
9036 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009037 if test "$enable_framework" ; then
9038 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009039 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9040 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009041 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009042 else
9043 # No framework, use the Python app as bundle-loader
9044 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9045 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009046 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009047 fi
Ned Deily36820b62014-06-25 13:44:22 -07009048 else
9049 # building for OS X 10.3 and later
9050 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9051 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9052 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009053 fi
9054 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009055 Linux*|GNU*|QNX*)
9056 LDSHARED='$(CC) -shared'
9057 LDCXXSHARED='$(CXX) -shared';;
9058 BSD/OS*/4*)
9059 LDSHARED="gcc -shared"
9060 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009061 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009062 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009063 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009064 LDSHARED='$(CC) -shared'
9065 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009066 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009067 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009068 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009069 OpenBSD*)
9070 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9071 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009072 LDSHARED='$(CC) -shared $(CCSHARED)'
9073 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009074 else
9075 case `uname -r` in
9076 [01].* | 2.[0-7] | 2.[0-7].*)
9077 LDSHARED="ld -Bshareable ${LDFLAGS}"
9078 ;;
9079 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009080 LDSHARED='$(CC) -shared $(CCSHARED)'
9081 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009082 ;;
9083 esac
9084 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009085 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009086 LDSHARED='$(CC) -shared'
9087 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009088 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009089 if test "$GCC" = "yes" ; then
9090 LDSHARED='$(CC) -shared'
9091 LDCXXSHARED='$(CXX) -shared'
9092 else
9093 LDSHARED='$(CC) -G'
9094 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009095 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009096 SCO_SV*)
9097 LDSHARED='$(CC) -Wl,-G,-Bexport'
9098 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9099 CYGWIN*)
9100 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9101 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009102 *) LDSHARED="ld";;
9103 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9106$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009107LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009108BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009109# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009110# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9112$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009113if test -z "$CCSHARED"
9114then
Guido van Rossum07397971997-04-29 21:49:50 +00009115 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009116 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009117 then CCSHARED="-fPIC";
9118 elif test `uname -p` = sparc;
9119 then CCSHARED="-xcode=pic32";
9120 else CCSHARED="-Kpic";
9121 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009122 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009123 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009124 else CCSHARED="+z";
9125 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009126 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009127 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009128 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009129 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009130 if test "$GCC" = "yes"
9131 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009132 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009133 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009134 SCO_SV*)
9135 if test "$GCC" = "yes"
9136 then CCSHARED="-fPIC"
9137 else CCSHARED="-Kpic -belf"
9138 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009139 IRIX*/6*) case $CC in
9140 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009141 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009142 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009143 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9146$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009147# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009148# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9150$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009151if test -z "$LINKFORSHARED"
9152then
Guido van Rossum07397971997-04-29 21:49:50 +00009153 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009154 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009155 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009156 LINKFORSHARED="-Wl,-E -Wl,+s";;
9157# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009158 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009159 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009160 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009162 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009163
9164 # Issue #18075: the default maximum stack size (8MBytes) is too
9165 # small for the default recursion limit. Increase the stack size
9166 # to ensure that tests don't crash
9167 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9168
Jack Jansene578a632001-08-15 01:27:14 +00009169 if test "$enable_framework"
9170 then
Jack Jansenda49e192005-01-07 13:08:22 +00009171 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009172 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009173 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009174 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009175 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009176 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009177 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009178 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9179 then
9180 LINKFORSHARED="-Wl,--export-dynamic"
9181 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009182 SunOS/5*) case $CC in
9183 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009184 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009185 then
9186 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009187 fi;;
9188 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009189 CYGWIN*)
9190 if test $enable_shared = "no"
9191 then
9192 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9193 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009194 QNX*)
9195 # -Wl,-E causes the symbols to be added to the dynamic
9196 # symbol table so that they can be found when a module
9197 # is loaded. -N 2048K causes the stack size to be set
9198 # to 2048 kilobytes so that the stack doesn't overflow
9199 # when running test_compile.py.
9200 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009201 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9204$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009205
Michael W. Hudson54241132001-12-07 15:38:26 +00009206
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009207
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9209$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009210if test ! "$LIBRARY" = "$LDLIBRARY"
9211then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009212 case $ac_sys_system in
9213 CYGWIN*)
9214 # Cygwin needs CCSHARED when building extension DLLs
9215 # but not when building the interpreter DLL.
9216 CFLAGSFORSHARED='';;
9217 *)
9218 CFLAGSFORSHARED='$(CCSHARED)'
9219 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9222$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009223
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009224# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9225# library (with --enable-shared).
9226# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009227# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9228# if it is not required, since it creates a dependency of the shared library
9229# to LIBS. This, in turn, means that applications linking the shared libpython
9230# don't need to link LIBS explicitly. The default should be only changed
9231# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9234$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009235case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009236 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009237 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009238esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9240$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009241
9242
Guido van Rossum627b2d71993-12-24 10:39:16 +00009243# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9245$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009246if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009247 $as_echo_n "(cached) " >&6
9248else
9249 ac_check_lib_save_LIBS=$LIBS
9250LIBS="-lsendfile $LIBS"
9251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252/* end confdefs.h. */
9253
9254/* Override any GCC internal prototype to avoid an error.
9255 Use char because int might match the return type of a GCC
9256 builtin and then its argument prototype would still apply. */
9257#ifdef __cplusplus
9258extern "C"
9259#endif
9260char sendfile ();
9261int
9262main ()
9263{
9264return sendfile ();
9265 ;
9266 return 0;
9267}
9268_ACEOF
9269if ac_fn_c_try_link "$LINENO"; then :
9270 ac_cv_lib_sendfile_sendfile=yes
9271else
9272 ac_cv_lib_sendfile_sendfile=no
9273fi
9274rm -f core conftest.err conftest.$ac_objext \
9275 conftest$ac_exeext conftest.$ac_ext
9276LIBS=$ac_check_lib_save_LIBS
9277fi
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9279$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009280if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009281 cat >>confdefs.h <<_ACEOF
9282#define HAVE_LIBSENDFILE 1
9283_ACEOF
9284
9285 LIBS="-lsendfile $LIBS"
9286
9287fi
9288
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9290$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009291if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009293else
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009295LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009299/* Override any GCC internal prototype to avoid an error.
9300 Use char because int might match the return type of a GCC
9301 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009302#ifdef __cplusplus
9303extern "C"
9304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009305char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009306int
9307main ()
9308{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009309return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ;
9311 return 0;
9312}
9313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009314if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009316else
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319rm -f core conftest.err conftest.$ac_objext \
9320 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009321LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9324$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009325if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 cat >>confdefs.h <<_ACEOF
9327#define HAVE_LIBDL 1
9328_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009329
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009330 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009331
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009332fi
9333 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9335$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009336if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009338else
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009340LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009343
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344/* Override any GCC internal prototype to avoid an error.
9345 Use char because int might match the return type of a GCC
9346 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009347#ifdef __cplusplus
9348extern "C"
9349#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009350char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009351int
9352main ()
9353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 ;
9356 return 0;
9357}
9358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009359if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009361else
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009364rm -f core conftest.err conftest.$ac_objext \
9365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009366LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9369$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009370if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 cat >>confdefs.h <<_ACEOF
9372#define HAVE_LIBDLD 1
9373_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009374
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009375 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009376
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009377fi
9378 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009379
Georg Brandlb1441c72009-01-03 22:33:39 +00009380# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009381if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9383$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009384if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009386else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009387 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391/* Override any GCC internal prototype to avoid an error.
9392 Use char because int might match the return type of a GCC
9393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394#ifdef __cplusplus
9395extern "C"
9396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009397char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
9400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 ;
9403 return 0;
9404}
9405_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406for ac_lib in '' pthread rt posix4; do
9407 if test -z "$ac_lib"; then
9408 ac_res="none required"
9409 else
9410 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009411 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009416rm -f core conftest.err conftest.$ac_objext \
9417 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009418 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421done
Victor Stinnere0be4232011-10-25 13:06:09 +02009422if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424else
9425 ac_cv_search_sem_init=no
9426fi
9427rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009428LIBS=$ac_func_search_save_LIBS
9429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9431$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009435
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009436fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009437 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009438 # posix4 on Solaris 2.6
9439 # pthread (first!) on Linux
9440fi
9441
Martin v. Löwis19d17342003-06-14 21:03:05 +00009442# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9444$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009445if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009447else
9448 ac_check_lib_save_LIBS=$LIBS
9449LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009451/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453/* Override any GCC internal prototype to avoid an error.
9454 Use char because int might match the return type of a GCC
9455 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009456#ifdef __cplusplus
9457extern "C"
9458#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009459char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009460int
9461main ()
9462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009464 ;
9465 return 0;
9466}
9467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009469 ac_cv_lib_intl_textdomain=yes
9470else
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009473rm -f core conftest.err conftest.$ac_objext \
9474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009475LIBS=$ac_check_lib_save_LIBS
9476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9478$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009479if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009480
Matthias Kloseb9621712010-04-24 17:59:49 +00009481$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009482
Brett Cannonc6d936e2009-06-07 20:09:53 +00009483 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009484fi
9485
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009486
9487# checks for system dependent C++ extensions support
9488case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9490$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009493
Georg Brandl59e87bd2011-02-15 19:48:59 +00009494 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009495int
9496main ()
9497{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009498loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ;
9500 return 0;
9501}
Matthias Kloseb159a552010-04-25 21:00:44 +00009502
Martin v. Löwis11437992002-04-12 09:54:03 +00009503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009504if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009505
Matthias Kloseb159a552010-04-25 21:00:44 +00009506
Matthias Kloseb9621712010-04-24 17:59:49 +00009507$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009508
Matthias Kloseb159a552010-04-25 21:00:44 +00009509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009510$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009511
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009512else
Matthias Kloseb159a552010-04-25 21:00:44 +00009513
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009515$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009516
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518rm -f core conftest.err conftest.$ac_objext \
9519 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009520 *) ;;
9521esac
9522
Christian Heimes985ecdc2013-11-20 11:46:18 +01009523# check for systems that require aligned memory access
9524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9525$as_echo_n "checking aligned memory access is required... " >&6; }
9526if test "$cross_compiling" = yes; then :
9527 aligned_required=yes
9528else
9529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9530/* end confdefs.h. */
9531
9532int main()
9533{
9534 char s[16];
9535 int i, *p1, *p2;
9536 for (i=0; i < 16; i++)
9537 s[i] = i;
9538 p1 = (int*)(s+1);
9539 p2 = (int*)(s+2);
9540 if (*p1 == *p2)
9541 return 1;
9542 return 0;
9543}
9544
9545_ACEOF
9546if ac_fn_c_try_run "$LINENO"; then :
9547 aligned_required=no
9548else
9549 aligned_required=yes
9550fi
9551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9552 conftest.$ac_objext conftest.beam conftest.$ac_ext
9553fi
9554
9555
9556if test "$aligned_required" = yes ; then
9557
9558$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9559
9560fi
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9562$as_echo "$aligned_required" >&6; }
9563
9564
9565# str, bytes and memoryview hash algorithm
9566
9567
9568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9569$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9570
9571# Check whether --with-hash_algorithm was given.
9572if test "${with_hash_algorithm+set}" = set; then :
9573 withval=$with_hash_algorithm;
9574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9575$as_echo "$withval" >&6; }
9576case "$withval" in
9577 siphash24)
9578 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9579
9580 ;;
9581 fnv)
9582 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9583
9584 ;;
9585 *)
9586 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9587 ;;
9588esac
9589
9590else
9591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9592$as_echo "default" >&6; }
9593fi
9594
9595
Charles-François Natalid30b0222014-05-08 23:08:51 +01009596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9597$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9598
9599# Check whether --with-address_sanitizer was given.
9600if test "${with_address_sanitizer+set}" = set; then :
9601 withval=$with_address_sanitizer;
9602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9603$as_echo "$withval" >&6; }
9604BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9605LDFLAGS="-fsanitize=address $LDFLAGS"
9606
9607else
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
Guido van Rossum70c7f481998-03-26 18:44:10 +00009613# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9615$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009616if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009618else
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009620LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624/* Override any GCC internal prototype to avoid an error.
9625 Use char because int might match the return type of a GCC
9626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009627#ifdef __cplusplus
9628extern "C"
9629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009630char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009631int
9632main ()
9633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 ;
9636 return 0;
9637}
9638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009641else
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644rm -f core conftest.err conftest.$ac_objext \
9645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9649$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009650if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009651 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009652fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009653 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9655$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009656if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009658else
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009660LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664/* Override any GCC internal prototype to avoid an error.
9665 Use char because int might match the return type of a GCC
9666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009667#ifdef __cplusplus
9668extern "C"
9669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009670char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009671int
9672main ()
9673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ;
9676 return 0;
9677}
9678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009681else
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009684rm -f core conftest.err conftest.$ac_objext \
9685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009686LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9689$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009690if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009691 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009692fi
9693 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9696$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009699if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009700 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9702$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009703LIBS="$withval $LIBS"
9704
9705else
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9707$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708fi
9709
Guido van Rossum7f43da71994-08-01 12:15:30 +00009710
Victor Stinner8291b5e2015-03-20 16:03:14 +01009711
9712
9713
9714
9715
9716
9717
9718if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9719 if test -n "$ac_tool_prefix"; then
9720 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9721set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723$as_echo_n "checking for $ac_word... " >&6; }
9724if ${ac_cv_path_PKG_CONFIG+:} false; then :
9725 $as_echo_n "(cached) " >&6
9726else
9727 case $PKG_CONFIG in
9728 [\\/]* | ?:[\\/]*)
9729 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9730 ;;
9731 *)
9732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9733for as_dir in $PATH
9734do
9735 IFS=$as_save_IFS
9736 test -z "$as_dir" && as_dir=.
9737 for ac_exec_ext in '' $ac_executable_extensions; do
9738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9741 break 2
9742 fi
9743done
9744 done
9745IFS=$as_save_IFS
9746
9747 ;;
9748esac
9749fi
9750PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9751if test -n "$PKG_CONFIG"; then
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9753$as_echo "$PKG_CONFIG" >&6; }
9754else
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
9757fi
9758
9759
9760fi
9761if test -z "$ac_cv_path_PKG_CONFIG"; then
9762 ac_pt_PKG_CONFIG=$PKG_CONFIG
9763 # Extract the first word of "pkg-config", so it can be a program name with args.
9764set dummy pkg-config; ac_word=$2
9765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9766$as_echo_n "checking for $ac_word... " >&6; }
9767if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9768 $as_echo_n "(cached) " >&6
9769else
9770 case $ac_pt_PKG_CONFIG in
9771 [\\/]* | ?:[\\/]*)
9772 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9773 ;;
9774 *)
9775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9776for as_dir in $PATH
9777do
9778 IFS=$as_save_IFS
9779 test -z "$as_dir" && as_dir=.
9780 for ac_exec_ext in '' $ac_executable_extensions; do
9781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9782 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9784 break 2
9785 fi
9786done
9787 done
9788IFS=$as_save_IFS
9789
9790 ;;
9791esac
9792fi
9793ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9794if test -n "$ac_pt_PKG_CONFIG"; then
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9796$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9797else
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
9800fi
9801
9802 if test "x$ac_pt_PKG_CONFIG" = x; then
9803 PKG_CONFIG=""
9804 else
9805 case $cross_compiling:$ac_tool_warned in
9806yes:)
9807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9809ac_tool_warned=yes ;;
9810esac
9811 PKG_CONFIG=$ac_pt_PKG_CONFIG
9812 fi
9813else
9814 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9815fi
9816
9817fi
9818if test -n "$PKG_CONFIG"; then
9819 _pkg_min_version=0.9.0
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9821$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9822 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9824$as_echo "yes" >&6; }
9825 else
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9827$as_echo "no" >&6; }
9828 PKG_CONFIG=""
9829 fi
9830fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009831
9832# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9834$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009835
9836# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009837if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009838 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009839else
9840 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009841fi
9842
9843
Matthias Kloseb9621712010-04-24 17:59:49 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9845$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009846
9847# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9849$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009850
9851# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009852if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009853 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009854else
9855 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009856fi
9857
9858
9859if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009860 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9861else
9862 LIBFFI_INCLUDEDIR=""
9863fi
9864
9865
Matthias Kloseb9621712010-04-24 17:59:49 +00009866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9867$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009868
Stefan Krah60187b52012-03-23 19:06:27 +01009869# Check for use of the system libmpdec library
9870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9871$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9872
9873# Check whether --with-system_libmpdec was given.
9874if test "${with_system_libmpdec+set}" = set; then :
9875 withval=$with_system_libmpdec;
9876else
9877 with_system_libmpdec="no"
9878fi
9879
9880
9881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9882$as_echo "$with_system_libmpdec" >&6; }
9883
Benjamin Peterson076ed002010-10-31 17:11:02 +00009884# Check for support for loadable sqlite extensions
9885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9886$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9887# Check whether --enable-loadable-sqlite-extensions was given.
9888if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9889 enableval=$enable_loadable_sqlite_extensions;
9890else
9891 enable_loadable_sqlite_extensions="no"
9892fi
9893
9894
9895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9896$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9897
Ned Deilyd819b932013-09-06 01:07:05 -07009898# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9899
9900
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9902$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9903
9904# Check whether --with-tcltk-includes was given.
9905if test "${with_tcltk_includes+set}" = set; then :
9906 withval=$with_tcltk_includes;
9907else
9908 with_tcltk_includes="default"
9909fi
9910
9911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9912$as_echo "$with_tcltk_includes" >&6; }
9913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9914$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9915
9916# Check whether --with-tcltk-libs was given.
9917if test "${with_tcltk_libs+set}" = set; then :
9918 withval=$with_tcltk_libs;
9919else
9920 with_tcltk_libs="default"
9921fi
9922
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9924$as_echo "$with_tcltk_libs" >&6; }
9925if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9926then
9927 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9928 then
9929 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9930 fi
9931 TCLTK_INCLUDES=""
9932 TCLTK_LIBS=""
9933else
9934 TCLTK_INCLUDES="$with_tcltk_includes"
9935 TCLTK_LIBS="$with_tcltk_libs"
9936fi
9937
Matthias Klose55708cc2009-04-30 08:06:49 +00009938# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9940$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009941
9942# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009943if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009944 withval=$with_dbmliborder;
9945if test x$with_dbmliborder = xyes
9946then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009947as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009948else
9949 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9950 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9951 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009952 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009953 fi
9954 done
9955fi
9956fi
9957
Matthias Kloseb9621712010-04-24 17:59:49 +00009958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9959$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009960
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009961# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009962
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009963USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965
Martin v. Löwis11437992002-04-12 09:54:03 +00009966
9967# Templates for things AC_DEFINEd more than once.
9968# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009969
9970
Martin v. Löwis11437992002-04-12 09:54:03 +00009971
Matthias Kloseb9621712010-04-24 17:59:49 +00009972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9973$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009976if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977 withval=$with_threads;
9978fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009979
9980
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009981# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009984if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985 withval=$with_thread; with_threads=$with_thread
9986fi
9987
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009988
9989if test -z "$with_threads"
9990then with_threads="yes"
9991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9993$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009994
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009995
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009996if test "$with_threads" = "no"
9997then
9998 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009999elif test "$ac_cv_pthread_is_default" = yes
10000then
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010002
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010003 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010005
10006 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010008elif test "$ac_cv_kpthread" = "yes"
10009then
10010 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010011 if test "$ac_cv_cxx_thread" = "yes"; then
10012 CXX="$CXX -Kpthread"
10013 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010015
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010016 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010017 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010018elif test "$ac_cv_kthread" = "yes"
10019then
10020 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010021 if test "$ac_cv_cxx_thread" = "yes"; then
10022 CXX="$CXX -Kthread"
10023 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010024 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010025
10026 posix_threads=yes
10027 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010028elif test "$ac_cv_pthread" = "yes"
10029then
10030 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010031 if test "$ac_cv_cxx_thread" = "yes"; then
10032 CXX="$CXX -pthread"
10033 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010035
10036 posix_threads=yes
10037 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010038else
10039 if test ! -z "$with_threads" -a -d "$with_threads"
10040 then LDFLAGS="$LDFLAGS -L$with_threads"
10041 fi
10042 if test ! -z "$withval" -a -d "$withval"
10043 then LDFLAGS="$LDFLAGS -L$withval"
10044 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010045
10046 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010047 # define _POSIX_THREADS in unistd.h. Some apparently don't
10048 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10050$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010052/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010053
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010054#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010055#ifdef _POSIX_THREADS
10056yes
10057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010058
10059_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010062 unistd_defines_pthreads=yes
10063else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010064 unistd_defines_pthreads=no
10065fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010066rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010067
Matthias Kloseb9621712010-04-24 17:59:49 +000010068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10069$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010070
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010072
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010073 # Just looking for pthread_create in libpthread is not enough:
10074 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10075 # So we really have to include pthread.h, and then link.
10076 _libs=$LIBS
10077 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10079$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010081/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010082
10083#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010084#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010085
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010086void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010087int
10088main ()
10089{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010090
10091pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 ;
10093 return 0;
10094}
10095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10099$as_echo "yes" >&6; }
10100 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010101
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010102 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010103 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010104else
Martin v. Löwis11437992002-04-12 09:54:03 +000010105
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010106 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010108if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010109 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010110
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010111 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010112 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010113else
Guido van Rossumad678af1998-10-02 14:42:15 +000010114
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10116$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010117if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010119else
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010121LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125/* Override any GCC internal prototype to avoid an error.
10126 Use char because int might match the return type of a GCC
10127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128#ifdef __cplusplus
10129extern "C"
10130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010131char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010132int
10133main ()
10134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ;
10137 return 0;
10138}
10139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010142else
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145rm -f core conftest.err conftest.$ac_objext \
10146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010147LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10150$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010151if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010154 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010155 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010156 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010157else
Greg Steinadf63d62000-07-05 10:38:09 +000010158
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10160$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010161if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010163else
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010165LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169/* Override any GCC internal prototype to avoid an error.
10170 Use char because int might match the return type of a GCC
10171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010172#ifdef __cplusplus
10173extern "C"
10174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010175char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010176int
10177main ()
10178{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ;
10181 return 0;
10182}
10183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010184if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010186else
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189rm -f core conftest.err conftest.$ac_objext \
10190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010191LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10194$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010195if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010198 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010199 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010200 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010201else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010202
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10204$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010205if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010207else
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010209LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213/* Override any GCC internal prototype to avoid an error.
10214 Use char because int might match the return type of a GCC
10215 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216#ifdef __cplusplus
10217extern "C"
10218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010219char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010220int
10221main ()
10222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 ;
10225 return 0;
10226}
10227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010230else
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010233rm -f core conftest.err conftest.$ac_objext \
10234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010235LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10238$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010239if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010241
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010242 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010243 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010244 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010245else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010246
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10248$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010249if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010251else
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010253LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257/* Override any GCC internal prototype to avoid an error.
10258 Use char because int might match the return type of a GCC
10259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010260#ifdef __cplusplus
10261extern "C"
10262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010263char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010264int
10265main ()
10266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 ;
10269 return 0;
10270}
10271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277rm -f core conftest.err conftest.$ac_objext \
10278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010279LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10282$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010283if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010285
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010286 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010287 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010288 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010289else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010290
Martin v. Löwis130fb172001-07-19 11:00:41 +000010291 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010292fi
10293
Guido van Rossum627b2d71993-12-24 10:39:16 +000010294
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010295fi
10296
Guido van Rossum0be3e491997-05-22 20:33:33 +000010297fi
10298
Guido van Rossum49545951997-12-02 19:28:29 +000010299fi
10300
Guido van Rossumb93a8621998-05-07 13:27:32 +000010301fi
10302
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010304rm -f core conftest.err conftest.$ac_objext \
10305 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010306
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10308$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010309if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010311else
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010313LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317/* Override any GCC internal prototype to avoid an error.
10318 Use char because int might match the return type of a GCC
10319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010320#ifdef __cplusplus
10321extern "C"
10322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010323char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010324int
10325main ()
10326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ;
10329 return 0;
10330}
10331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010334else
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010337rm -f core conftest.err conftest.$ac_objext \
10338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010339LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10342$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010343if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010345
Martin v. Löwis130fb172001-07-19 11:00:41 +000010346 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010347 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010348 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010349fi
10350
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010351
Neal Norwitza978ab02002-11-02 16:58:05 +000010352 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10354$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010355if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010357else
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010359LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363/* Override any GCC internal prototype to avoid an error.
10364 Use char because int might match the return type of a GCC
10365 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010366#ifdef __cplusplus
10367extern "C"
10368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010369char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010370int
10371main ()
10372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ;
10375 return 0;
10376}
10377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010378if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010380else
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383rm -f core conftest.err conftest.$ac_objext \
10384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010385LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10388$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010389if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010391
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010392 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010393 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010394 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010395fi
10396
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010397 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010398fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010399
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010400if test "$posix_threads" = "yes"; then
10401 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010404
10405 fi
10406
10407 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10408 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010409 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010410$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010411
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010412 ;;
10413 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010414$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010415
10416 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010417 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010418$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010419
10420 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010421 esac
10422
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10424$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010425 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010429 ac_cv_pthread_system_supported=no
10430else
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010433
10434 #include <stdio.h>
10435 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010436 void *foo(void *parm) {
10437 return NULL;
10438 }
10439 main() {
10440 pthread_attr_t attr;
10441 pthread_t id;
10442 if (pthread_attr_init(&attr)) exit(-1);
10443 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10444 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10445 exit(0);
10446 }
10447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010448if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010449 ac_cv_pthread_system_supported=yes
10450else
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10454 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010455fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457
Guido van Rossum627b2d71993-12-24 10:39:16 +000010458fi
10459
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10461$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010462 if test "$ac_cv_pthread_system_supported" = "yes"; then
10463
Matthias Kloseb9621712010-04-24 17:59:49 +000010464$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010465
10466 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 for ac_func in pthread_sigmask
10468do :
10469 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010470if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010471 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010472#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010473_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010474 case $ac_sys_system in
10475 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010476
Matthias Kloseb9621712010-04-24 17:59:49 +000010477$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010478
10479 ;;
10480 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010481fi
10482done
10483
Christian Heimesf77b4b22013-08-21 13:26:05 +020010484 for ac_func in pthread_atfork
10485do :
10486 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10487if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10488 cat >>confdefs.h <<_ACEOF
10489#define HAVE_PTHREAD_ATFORK 1
10490_ACEOF
10491
10492fi
10493done
10494
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010495fi
10496
10497
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010498# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10501$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010503if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010505 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10507$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010508 ipv6=no
10509 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10511$as_echo "yes" >&6; }
10512 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010513
10514 ipv6=yes
10515 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010516 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010517else
Martin v. Löwis11437992002-04-12 09:54:03 +000010518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010521 /* AF_INET6 available check */
10522#include <sys/types.h>
10523#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010524int
10525main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010526{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010527int domain = AF_INET6;
10528 ;
10529 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010530}
Martin v. Löwis11437992002-04-12 09:54:03 +000010531_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010532if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010533
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10535$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010536 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010537
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010538else
Matthias Kloseb159a552010-04-25 21:00:44 +000010539
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10541$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010542 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010543
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010544fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010547if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10549$as_echo_n "checking if RFC2553 API is available... " >&6; }
10550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010551/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010552
10553 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010554#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010555int
10556main ()
10557{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010558struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010559 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 ;
10561 return 0;
10562}
Matthias Kloseb159a552010-04-25 21:00:44 +000010563
Martin v. Löwis11437992002-04-12 09:54:03 +000010564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010565if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010566
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010568$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010569 ipv6=yes
10570
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010571else
Matthias Kloseb159a552010-04-25 21:00:44 +000010572
10573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010574$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010575 ipv6=no
10576
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010579fi
10580
10581if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010583
10584fi
10585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586fi
10587
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010588
10589ipv6type=unknown
10590ipv6lib=none
10591ipv6trylibc=no
10592
10593if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10595$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010596 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10597 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010598 case $i in
10599 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010601/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010602
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603#include <netinet/in.h>
10604#ifdef IPV6_INRIA_VERSION
10605yes
10606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010610 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010611fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010612rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613
10614 ;;
10615 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010617/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010618
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010619#include <netinet/in.h>
10620#ifdef __KAME__
10621yes
10622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010623_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010626 ipv6type=$i;
10627 ipv6lib=inet6
10628 ipv6libdir=/usr/local/v6/lib
10629 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010630fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010631rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632
10633 ;;
10634 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010636/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010637
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638#include <features.h>
10639#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10640yes
10641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010642_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645 ipv6type=$i;
10646 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010647fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010648rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010649
10650 ;;
10651 linux-inet6)
10652 if test -d /usr/inet6; then
10653 ipv6type=$i
10654 ipv6lib=inet6
10655 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010656 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010657 fi
10658 ;;
10659 solaris)
10660 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010661 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010662 ipv6type=$i
10663 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010664 fi
10665 fi
10666 ;;
10667 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010669/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010670
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010671#include <sys/param.h>
10672#ifdef _TOSHIBA_INET6
10673yes
10674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010675_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678 ipv6type=$i;
10679 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010680 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010681fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010682rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010683
10684 ;;
10685 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010687/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010688
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689#include </usr/local/v6/include/sys/v6config.h>
10690#ifdef __V6D__
10691yes
10692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010693_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010694if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010696 ipv6type=$i;
10697 ipv6lib=v6;
10698 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010699 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010700fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010701rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702
10703 ;;
10704 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010706/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010707
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708#include <sys/param.h>
10709#ifdef _ZETA_MINAMI_INET6
10710yes
10711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010712_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715 ipv6type=$i;
10716 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010717 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010719rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720
10721 ;;
10722 esac
10723 if test "$ipv6type" != "unknown"; then
10724 break
10725 fi
10726 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10728$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729fi
10730
10731if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10732 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10733 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10734 echo "using lib$ipv6lib"
10735 else
10736 if test $ipv6trylibc = "yes"; then
10737 echo "using libc"
10738 else
10739 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10740 echo "You need to fetch lib$ipv6lib.a from appropriate"
10741 echo 'ipv6 kit and compile beforehand.'
10742 exit 1
10743 fi
10744 fi
10745fi
10746
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10748$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10750/* end confdefs.h. */
10751 /* CAN_RAW_FD_FRAMES available check */
10752#include <linux/can/raw.h>
10753int
10754main ()
10755{
10756int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10757 ;
10758 return 0;
10759}
10760_ACEOF
10761if ac_fn_c_try_compile "$LINENO"; then :
10762
10763
10764$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10765
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10767$as_echo "yes" >&6; }
10768
10769else
10770
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772$as_echo "no" >&6; }
10773
10774fi
10775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10776
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010777# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10779$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783 withval=$with_doc_strings;
10784fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010785
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010786
10787if test -z "$with_doc_strings"
10788then with_doc_strings="yes"
10789fi
10790if test "$with_doc_strings" != "no"
10791then
10792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010794
10795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10797$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010798
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010799# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10801$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010804if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805 withval=$with_pymalloc;
10806fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010807
Neil Schemenauera35c6882001-02-27 04:45:05 +000010808
Neil Schemenauer16c22972002-03-22 15:34:49 +000010809if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010810then
10811 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010812fi
10813if test "$with_pymalloc" != "no"
10814then
Martin v. Löwis11437992002-04-12 09:54:03 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010817
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010818 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10821$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010822
Benjamin Peterson05159c42009-12-03 03:01:27 +000010823# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10825$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010826
10827# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010829 withval=$with_valgrind;
10830else
10831 with_valgrind=no
10832fi
10833
Matthias Kloseb9621712010-04-24 17:59:49 +000010834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10835$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010836if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 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 +020010838if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010841
10842else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010843 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010844
10845fi
10846
10847
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010848 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010849fi
10850
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010851# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010852
Guido van Rossum98935bf2001-09-05 19:13:16 +000010853DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010854
Guido van Rossume97ee181999-12-20 21:27:22 +000010855# the dlopen() function means we might want to use dynload_shlib.o. some
10856# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010857for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010858do :
10859 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010860if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010861 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010862#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010863_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010864
Guido van Rossume97ee181999-12-20 21:27:22 +000010865fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010866done
Guido van Rossume97ee181999-12-20 21:27:22 +000010867
Michael W. Hudson54241132001-12-07 15:38:26 +000010868
Guido van Rossume97ee181999-12-20 21:27:22 +000010869# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10870# loading of modules.
10871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10873$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010874if test -z "$DYNLOADFILE"
10875then
10876 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010877 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10878 if test "$ac_cv_func_dlopen" = yes
10879 then DYNLOADFILE="dynload_shlib.o"
10880 else DYNLOADFILE="dynload_aix.o"
10881 fi
10882 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010883 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010884 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10885 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010886 *)
10887 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10888 # out any dynamic loading
10889 if test "$ac_cv_func_dlopen" = yes
10890 then DYNLOADFILE="dynload_shlib.o"
10891 else DYNLOADFILE="dynload_stub.o"
10892 fi
10893 ;;
10894 esac
10895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10897$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010898if test "$DYNLOADFILE" != "dynload_stub.o"
10899then
Martin v. Löwis11437992002-04-12 09:54:03 +000010900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010902
10903fi
10904
Neil Schemenauer4e425612001-06-19 15:44:15 +000010905# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10906
Michael W. Hudson54241132001-12-07 15:38:26 +000010907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10909$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010910if test -z "$MACHDEP_OBJS"
10911then
Jack Jansene578a632001-08-15 01:27:14 +000010912 MACHDEP_OBJS=$extra_machdep_objs
10913else
10914 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010915fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010916if test -z "$MACHDEP_OBJS"; then
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10918$as_echo "none" >&6; }
10919else
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10921$as_echo "$MACHDEP_OBJS" >&6; }
10922fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010923
Guido van Rossum627b2d71993-12-24 10:39:16 +000010924# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010925for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010926 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010927 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010928 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010929 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010930 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010931 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010932 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10933 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010934 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010935 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010936 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010937 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010938 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010939 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010940 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10941 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010942 sigaction sigaltstack siginterrupt sigpending sigrelse \
10943 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010944 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010945 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010946 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010947do :
10948 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10949ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010950if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010951 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010952#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010953_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010954
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010955fi
10956done
10957
Michael W. Hudson54241132001-12-07 15:38:26 +000010958
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010959ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10960 #include <dirent.h>
10961"
10962if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10963
10964$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10965
10966fi
10967
10968
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010969# For some functions, having a definition is not sufficient, since
10970# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10972$as_echo_n "checking for chroot... " >&6; }
10973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010975#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010976int
10977main ()
10978{
10979void *x=chroot
10980 ;
10981 return 0;
10982}
10983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010987
Matthias Kloseb159a552010-04-25 21:00:44 +000010988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010989$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010990else
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10992$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010993
10994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10997$as_echo_n "checking for link... " >&6; }
10998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011000#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011001int
11002main ()
11003{
11004void *x=link
11005 ;
11006 return 0;
11007}
11008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011009if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011012
Matthias Kloseb159a552010-04-25 21:00:44 +000011013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011015else
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11017$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011018
11019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11022$as_echo_n "checking for symlink... " >&6; }
11023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011024/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011025#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011026int
11027main ()
11028{
11029void *x=symlink
11030 ;
11031 return 0;
11032}
11033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011037
Matthias Kloseb159a552010-04-25 21:00:44 +000011038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011039$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011040else
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11042$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011043
11044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11047$as_echo_n "checking for fchdir... " >&6; }
11048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011050#include <unistd.h>
11051int
11052main ()
11053{
11054void *x=fchdir
11055 ;
11056 return 0;
11057}
11058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011059if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011062
Matthias Kloseb159a552010-04-25 21:00:44 +000011063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011065else
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11067$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011068
11069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11072$as_echo_n "checking for fsync... " >&6; }
11073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011074/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011075#include <unistd.h>
11076int
11077main ()
11078{
11079void *x=fsync
11080 ;
11081 return 0;
11082}
11083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011087
Matthias Kloseb159a552010-04-25 21:00:44 +000011088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011089$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011093
11094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11097$as_echo_n "checking for fdatasync... " >&6; }
11098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011099/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011100#include <unistd.h>
11101int
11102main ()
11103{
11104void *x=fdatasync
11105 ;
11106 return 0;
11107}
11108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011110
Matthias Kloseb9621712010-04-24 17:59:49 +000011111$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011112
Matthias Kloseb159a552010-04-25 21:00:44 +000011113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011114$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011115else
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011118
11119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11122$as_echo_n "checking for epoll... " >&6; }
11123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011124/* end confdefs.h. */
11125#include <sys/epoll.h>
11126int
11127main ()
11128{
11129void *x=epoll_create
11130 ;
11131 return 0;
11132}
11133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011135
Matthias Kloseb9621712010-04-24 17:59:49 +000011136$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011137
Matthias Kloseb159a552010-04-25 21:00:44 +000011138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011139$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011140else
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11142$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011143
11144fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11147$as_echo_n "checking for epoll_create1... " >&6; }
11148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11149/* end confdefs.h. */
11150#include <sys/epoll.h>
11151int
11152main ()
11153{
11154void *x=epoll_create1
11155 ;
11156 return 0;
11157}
11158_ACEOF
11159if ac_fn_c_try_compile "$LINENO"; then :
11160
11161$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11162
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11164$as_echo "yes" >&6; }
11165else
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11167$as_echo "no" >&6; }
11168
11169fi
11170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11172$as_echo_n "checking for kqueue... " >&6; }
11173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011174/* end confdefs.h. */
11175
11176#include <sys/types.h>
11177#include <sys/event.h>
11178
11179int
11180main ()
11181{
11182int x=kqueue()
11183 ;
11184 return 0;
11185}
11186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011187if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011188
Matthias Kloseb9621712010-04-24 17:59:49 +000011189$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011190
Matthias Kloseb159a552010-04-25 21:00:44 +000011191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011192$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011193else
Matthias Kloseb9621712010-04-24 17:59:49 +000011194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11195$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011196
11197fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11200$as_echo_n "checking for prlimit... " >&6; }
11201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11202/* end confdefs.h. */
11203
11204#include <sys/time.h>
11205#include <sys/resource.h>
11206
11207int
11208main ()
11209{
11210void *x=prlimit
11211 ;
11212 return 0;
11213}
11214_ACEOF
11215if ac_fn_c_try_compile "$LINENO"; then :
11216
11217$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11218
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11220$as_echo "yes" >&6; }
11221else
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223$as_echo "no" >&6; }
11224
11225fi
11226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11227
Martin v. Löwisd5843682002-11-21 20:41:28 +000011228# On some systems (eg. FreeBSD 5), we would find a definition of the
11229# functions ctermid_r, setgroups in the library, but no prototype
11230# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11231# address to avoid compiler warnings and potential miscompilations
11232# because of the missing prototypes.
11233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11235$as_echo_n "checking for ctermid_r... " >&6; }
11236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011237/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011238
Martin v. Löwisd5843682002-11-21 20:41:28 +000011239#include <stdio.h>
11240
Martin v. Löwisd5843682002-11-21 20:41:28 +000011241int
11242main ()
11243{
11244void* p = ctermid_r
11245 ;
11246 return 0;
11247}
11248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011250
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011252
Matthias Kloseb159a552010-04-25 21:00:44 +000011253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011254$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011255else
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11257$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011258
11259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11261
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11263$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011264if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011265 $as_echo_n "(cached) " >&6
11266else
11267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011269#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011270int
11271main ()
11272{
11273void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011274
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011275 ;
11276 return 0;
11277}
11278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011279if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011280 ac_cv_flock_decl=yes
11281else
11282 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011283
11284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011286
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011287fi
11288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11289$as_echo "$ac_cv_flock_decl" >&6; }
11290if test "x${ac_cv_flock_decl}" = xyes; then
11291 for ac_func in flock
11292do :
11293 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011294if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011295 cat >>confdefs.h <<_ACEOF
11296#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011297_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011298
Antoine Pitroua3000072010-09-07 14:52:42 +000011299else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011301$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011302if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011303 $as_echo_n "(cached) " >&6
11304else
11305 ac_check_lib_save_LIBS=$LIBS
11306LIBS="-lbsd $LIBS"
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11308/* end confdefs.h. */
11309
11310/* Override any GCC internal prototype to avoid an error.
11311 Use char because int might match the return type of a GCC
11312 builtin and then its argument prototype would still apply. */
11313#ifdef __cplusplus
11314extern "C"
11315#endif
11316char flock ();
11317int
11318main ()
11319{
11320return flock ();
11321 ;
11322 return 0;
11323}
11324_ACEOF
11325if ac_fn_c_try_link "$LINENO"; then :
11326 ac_cv_lib_bsd_flock=yes
11327else
11328 ac_cv_lib_bsd_flock=no
11329fi
11330rm -f core conftest.err conftest.$ac_objext \
11331 conftest$ac_exeext conftest.$ac_ext
11332LIBS=$ac_check_lib_save_LIBS
11333fi
11334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11335$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011336if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011337 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011338
11339
11340$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11341
11342
11343fi
11344
11345
11346fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011347done
11348
Antoine Pitroua3000072010-09-07 14:52:42 +000011349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11352$as_echo_n "checking for getpagesize... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011355
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011356#include <unistd.h>
11357
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011358int
11359main ()
11360{
11361void* p = getpagesize
11362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011367
Matthias Kloseb9621712010-04-24 17:59:49 +000011368$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011369
Matthias Kloseb159a552010-04-25 21:00:44 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011372else
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11374$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011375
11376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011378
Victor Stinner984890f2011-11-24 13:53:38 +010011379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11380$as_echo_n "checking for broken unsetenv... " >&6; }
11381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11382/* end confdefs.h. */
11383
11384#include <stdlib.h>
11385
11386int
11387main ()
11388{
11389int res = unsetenv("DUMMY")
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394if ac_fn_c_try_compile "$LINENO"; then :
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
11397else
11398
11399$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11400
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11402$as_echo "yes" >&6; }
11403
11404fi
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11406
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011407for ac_prog in true
11408do
11409 # Extract the first word of "$ac_prog", so it can be a program name with args.
11410set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11412$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011413if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011414 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011415else
11416 if test -n "$TRUE"; then
11417 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11418else
11419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11420for as_dir in $PATH
11421do
11422 IFS=$as_save_IFS
11423 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011425 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011426 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 $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 +000011428 break 2
11429 fi
11430done
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011433
11434fi
11435fi
11436TRUE=$ac_cv_prog_TRUE
11437if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11439$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011443fi
11444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011446 test -n "$TRUE" && break
11447done
11448test -n "$TRUE" || TRUE="/bin/true"
11449
11450
Matthias Kloseb9621712010-04-24 17:59:49 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11452$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011453if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011455else
11456 ac_check_lib_save_LIBS=$LIBS
11457LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011459/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461/* Override any GCC internal prototype to avoid an error.
11462 Use char because int might match the return type of a GCC
11463 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011464#ifdef __cplusplus
11465extern "C"
11466#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011467char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011468int
11469main ()
11470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011472 ;
11473 return 0;
11474}
11475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011477 ac_cv_lib_c_inet_aton=yes
11478else
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011481rm -f core conftest.err conftest.$ac_objext \
11482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011483LIBS=$ac_check_lib_save_LIBS
11484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11486$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011487if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011488 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011489else
Matthias Kloseb9621712010-04-24 17:59:49 +000011490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11491$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011492if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011494else
11495 ac_check_lib_save_LIBS=$LIBS
11496LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011498/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500/* Override any GCC internal prototype to avoid an error.
11501 Use char because int might match the return type of a GCC
11502 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011503#ifdef __cplusplus
11504extern "C"
11505#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011506char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011507int
11508main ()
11509{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011511 ;
11512 return 0;
11513}
11514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011516 ac_cv_lib_resolv_inet_aton=yes
11517else
Matthias Kloseb9621712010-04-24 17:59:49 +000011518 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011520rm -f core conftest.err conftest.$ac_objext \
11521 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011522LIBS=$ac_check_lib_save_LIBS
11523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11525$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011526if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011527 cat >>confdefs.h <<_ACEOF
11528#define HAVE_LIBRESOLV 1
11529_ACEOF
11530
11531 LIBS="-lresolv $LIBS"
11532
11533fi
11534
11535
11536fi
11537
11538
Christian Heimesd0764e22007-12-04 15:00:33 +000011539# On Tru64, chflags seems to be present, but calling it will
11540# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11542$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011543if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011545else
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011547 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011550/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011551
Christian Heimesd0764e22007-12-04 15:00:33 +000011552#include <sys/stat.h>
11553#include <unistd.h>
11554int main(int argc, char*argv[])
11555{
11556 if(chflags(argv[0], 0) != 0)
11557 return 1;
11558 return 0;
11559}
Ned Deily3eb67d52011-06-28 00:00:28 -070011560
Christian Heimesd0764e22007-12-04 15:00:33 +000011561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011563 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011564else
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11568 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011569fi
11570
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011571
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11574$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011575if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011577if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011578 ac_cv_have_chflags="yes"
11579else
11580 ac_cv_have_chflags="no"
11581fi
11582
11583fi
11584if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011587
11588fi
11589
Matthias Kloseb9621712010-04-24 17:59:49 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11591$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011592if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011594else
Matthias Kloseb9621712010-04-24 17:59:49 +000011595 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011596 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011599/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011600
Christian Heimesd0764e22007-12-04 15:00:33 +000011601#include <sys/stat.h>
11602#include <unistd.h>
11603int main(int argc, char*argv[])
11604{
11605 if(lchflags(argv[0], 0) != 0)
11606 return 1;
11607 return 0;
11608}
Ned Deily3eb67d52011-06-28 00:00:28 -070011609
Christian Heimesd0764e22007-12-04 15:00:33 +000011610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011612 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011613else
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011618fi
11619
11620
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11623$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011624if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011626if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011627 ac_cv_have_lchflags="yes"
11628else
11629 ac_cv_have_lchflags="no"
11630fi
11631
11632fi
11633if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011636
11637fi
11638
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011639case $ac_sys_system/$ac_sys_release in
11640Darwin/*)
11641 _CUR_CFLAGS="${CFLAGS}"
11642 _CUR_LDFLAGS="${LDFLAGS}"
11643 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11644 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11645 ;;
11646esac
11647
Matthias Kloseb9621712010-04-24 17:59:49 +000011648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11649$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011650if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011652else
11653 ac_check_lib_save_LIBS=$LIBS
11654LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011656/* end confdefs.h. */
11657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011658/* Override any GCC internal prototype to avoid an error.
11659 Use char because int might match the return type of a GCC
11660 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011661#ifdef __cplusplus
11662extern "C"
11663#endif
11664char inflateCopy ();
11665int
11666main ()
11667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011668return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011674 ac_cv_lib_z_inflateCopy=yes
11675else
Matthias Kloseb9621712010-04-24 17:59:49 +000011676 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011678rm -f core conftest.err conftest.$ac_objext \
11679 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011680LIBS=$ac_check_lib_save_LIBS
11681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11683$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011684if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011687
11688fi
11689
11690
11691case $ac_sys_system/$ac_sys_release in
11692Darwin/*)
11693 CFLAGS="${_CUR_CFLAGS}"
11694 LDFLAGS="${_CUR_LDFLAGS}"
11695 ;;
11696esac
11697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11699$as_echo_n "checking for hstrerror... " >&6; }
11700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011701/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011702
Martin v. Löwise9416172003-05-03 10:12:45 +000011703#include <netdb.h>
11704
Martin v. Löwise9416172003-05-03 10:12:45 +000011705int
11706main ()
11707{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011708void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011709 ;
11710 return 0;
11711}
11712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011713if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011714
Matthias Kloseb9621712010-04-24 17:59:49 +000011715$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011716
Matthias Kloseb159a552010-04-25 21:00:44 +000011717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011718$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11721$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011722
11723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011724rm -f core conftest.err conftest.$ac_objext \
11725 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726
Matthias Kloseb9621712010-04-24 17:59:49 +000011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11728$as_echo_n "checking for inet_aton... " >&6; }
11729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011730/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011731
Martin v. Löwis86d66262006-02-17 08:40:11 +000011732#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011733#include <sys/socket.h>
11734#include <netinet/in.h>
11735#include <arpa/inet.h>
11736
Martin v. Löwise9416172003-05-03 10:12:45 +000011737int
11738main ()
11739{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011740void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011741 ;
11742 return 0;
11743}
11744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011746
Matthias Kloseb9621712010-04-24 17:59:49 +000011747$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011748
Matthias Kloseb159a552010-04-25 21:00:44 +000011749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011750$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011751else
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11753$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011754
11755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011756rm -f core conftest.err conftest.$ac_objext \
11757 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011758
Matthias Kloseb9621712010-04-24 17:59:49 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11760$as_echo_n "checking for inet_pton... " >&6; }
11761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011762/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011763
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011764#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011765#include <sys/socket.h>
11766#include <netinet/in.h>
11767#include <arpa/inet.h>
11768
Martin v. Löwise9416172003-05-03 10:12:45 +000011769int
11770main ()
11771{
11772void* p = inet_pton
11773 ;
11774 return 0;
11775}
11776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011778
Matthias Kloseb9621712010-04-24 17:59:49 +000011779$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011780
Matthias Kloseb159a552010-04-25 21:00:44 +000011781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011782$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11785$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011786
11787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011789
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011790# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11792$as_echo_n "checking for setgroups... " >&6; }
11793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011794/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011795
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011796#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011797#ifdef HAVE_GRP_H
11798#include <grp.h>
11799#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011800
Martin v. Löwisd5843682002-11-21 20:41:28 +000011801int
11802main ()
11803{
11804void* p = setgroups
11805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011812
Matthias Kloseb159a552010-04-25 21:00:44 +000011813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011818
11819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011821
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011822# check for openpty and forkpty
11823
11824for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011825do :
11826 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011827if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011828 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011830_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011831
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11834$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011837else
Martin v. Löwis11437992002-04-12 09:54:03 +000011838 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011839LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843/* Override any GCC internal prototype to avoid an error.
11844 Use char because int might match the return type of a GCC
11845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011846#ifdef __cplusplus
11847extern "C"
11848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011849char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011850int
11851main ()
11852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011853return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 ;
11855 return 0;
11856}
11857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011863rm -f core conftest.err conftest.$ac_objext \
11864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011865LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11868$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011871 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11874$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011875if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011877else
11878 ac_check_lib_save_LIBS=$LIBS
11879LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011881/* end confdefs.h. */
11882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011883/* Override any GCC internal prototype to avoid an error.
11884 Use char because int might match the return type of a GCC
11885 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011886#ifdef __cplusplus
11887extern "C"
11888#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011889char openpty ();
11890int
11891main ()
11892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011894 ;
11895 return 0;
11896}
11897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011899 ac_cv_lib_bsd_openpty=yes
11900else
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011903rm -f core conftest.err conftest.$ac_objext \
11904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011905LIBS=$ac_check_lib_save_LIBS
11906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11908$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011909if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011911 LIBS="$LIBS -lbsd"
11912fi
11913
11914
11915fi
11916
Fred Drake8cef4cf2000-06-28 16:40:38 +000011917
11918fi
11919done
11920
11921for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011922do :
11923 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011924if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011926#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011927_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011928
Fred Drake8cef4cf2000-06-28 16:40:38 +000011929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11931$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011932if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011934else
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011936LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011940/* Override any GCC internal prototype to avoid an error.
11941 Use char because int might match the return type of a GCC
11942 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011943#ifdef __cplusplus
11944extern "C"
11945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011946char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011947int
11948main ()
11949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011950return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 ;
11952 return 0;
11953}
11954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011956 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011957else
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011960rm -f core conftest.err conftest.$ac_objext \
11961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011962LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11965$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011966if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011968 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011969else
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11971$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011972if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011974else
11975 ac_check_lib_save_LIBS=$LIBS
11976LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011978/* end confdefs.h. */
11979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011980/* Override any GCC internal prototype to avoid an error.
11981 Use char because int might match the return type of a GCC
11982 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011983#ifdef __cplusplus
11984extern "C"
11985#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011986char forkpty ();
11987int
11988main ()
11989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011990return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011991 ;
11992 return 0;
11993}
11994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011996 ac_cv_lib_bsd_forkpty=yes
11997else
Matthias Kloseb9621712010-04-24 17:59:49 +000011998 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012000rm -f core conftest.err conftest.$ac_objext \
12001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012002LIBS=$ac_check_lib_save_LIBS
12003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12005$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012006if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012008 LIBS="$LIBS -lbsd"
12009fi
12010
12011
12012fi
12013
Fred Drake8cef4cf2000-06-28 16:40:38 +000012014
12015fi
12016done
12017
Jack Jansendd19cf82001-12-06 22:36:17 +000012018
Christian Heimesb186d002008-03-18 15:15:01 +000012019# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012020for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012021do :
12022 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012023if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012024 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012025#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012026_ACEOF
12027
12028fi
12029done
12030
12031
Michael W. Hudson54241132001-12-07 15:38:26 +000012032# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012033for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012034do :
12035 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12036ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012037if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012038 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012040_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012041
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012043done
12044
Michael W. Hudson54241132001-12-07 15:38:26 +000012045
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012046ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012047if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012048 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012049
Martin v. Löwis1142de32002-03-29 16:28:31 +000012050else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012052 *" dup2.$ac_objext "* ) ;;
12053 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012055esac
12056
Martin v. Löwis1142de32002-03-29 16:28:31 +000012057fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012058
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012059ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012061 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12062
12063else
12064 case " $LIBOBJS " in
12065 *" strdup.$ac_objext "* ) ;;
12066 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12067 ;;
12068esac
12069
12070fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012071
12072
12073for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012074do :
12075 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012076if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012077 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012081/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012082#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012083int
12084main ()
12085{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012086getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 ;
12088 return 0;
12089}
12090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012094
Guido van Rossum627b2d71993-12-24 10:39:16 +000012095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012097
Guido van Rossum627b2d71993-12-24 10:39:16 +000012098fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012099done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012100
Jack Jansen150753c2003-03-29 22:07:47 +000012101for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012102do :
12103 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012105 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012106#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012109/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012110#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012111int
12112main ()
12113{
12114setpgrp(0,0);
12115 ;
12116 return 0;
12117}
12118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012122
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012125
12126fi
12127done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012128
Thomas Wouters3a584202000-08-05 23:28:51 +000012129for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012130do :
12131 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012132if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012134#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012137/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012138#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012139int
12140main ()
12141{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012142gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 ;
12144 return 0;
12145}
12146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012147if ac_fn_c_try_compile "$LINENO"; then :
12148
Guido van Rossum627b2d71993-12-24 10:39:16 +000012149else
Skip Montanaro6dead952003-09-25 14:50:04 +000012150
Matthias Kloseb9621712010-04-24 17:59:49 +000012151$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153
Guido van Rossum627b2d71993-12-24 10:39:16 +000012154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012156
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012158done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159
Michael W. Hudson54241132001-12-07 15:38:26 +000012160
Victor Stinnere0be4232011-10-25 13:06:09 +020012161for ac_func in clock_gettime
12162do :
12163 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12164if test "x$ac_cv_func_clock_gettime" = xyes; then :
12165 cat >>confdefs.h <<_ACEOF
12166#define HAVE_CLOCK_GETTIME 1
12167_ACEOF
12168
12169else
12170
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12172$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12173if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12174 $as_echo_n "(cached) " >&6
12175else
12176 ac_check_lib_save_LIBS=$LIBS
12177LIBS="-lrt $LIBS"
12178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12179/* end confdefs.h. */
12180
12181/* Override any GCC internal prototype to avoid an error.
12182 Use char because int might match the return type of a GCC
12183 builtin and then its argument prototype would still apply. */
12184#ifdef __cplusplus
12185extern "C"
12186#endif
12187char clock_gettime ();
12188int
12189main ()
12190{
12191return clock_gettime ();
12192 ;
12193 return 0;
12194}
12195_ACEOF
12196if ac_fn_c_try_link "$LINENO"; then :
12197 ac_cv_lib_rt_clock_gettime=yes
12198else
12199 ac_cv_lib_rt_clock_gettime=no
12200fi
12201rm -f core conftest.err conftest.$ac_objext \
12202 conftest$ac_exeext conftest.$ac_ext
12203LIBS=$ac_check_lib_save_LIBS
12204fi
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12206$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12207if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12208
Victor Stinner7efb8332014-08-29 15:41:08 +020012209 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012210 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12211
12212
12213$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12214
12215
12216fi
12217
12218
12219fi
12220done
12221
12222
12223for ac_func in clock_getres
12224do :
12225 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12226if test "x$ac_cv_func_clock_getres" = xyes; then :
12227 cat >>confdefs.h <<_ACEOF
12228#define HAVE_CLOCK_GETRES 1
12229_ACEOF
12230
12231else
12232
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12234$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12235if ${ac_cv_lib_rt_clock_getres+:} false; then :
12236 $as_echo_n "(cached) " >&6
12237else
12238 ac_check_lib_save_LIBS=$LIBS
12239LIBS="-lrt $LIBS"
12240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241/* end confdefs.h. */
12242
12243/* Override any GCC internal prototype to avoid an error.
12244 Use char because int might match the return type of a GCC
12245 builtin and then its argument prototype would still apply. */
12246#ifdef __cplusplus
12247extern "C"
12248#endif
12249char clock_getres ();
12250int
12251main ()
12252{
12253return clock_getres ();
12254 ;
12255 return 0;
12256}
12257_ACEOF
12258if ac_fn_c_try_link "$LINENO"; then :
12259 ac_cv_lib_rt_clock_getres=yes
12260else
12261 ac_cv_lib_rt_clock_getres=no
12262fi
12263rm -f core conftest.err conftest.$ac_objext \
12264 conftest$ac_exeext conftest.$ac_ext
12265LIBS=$ac_check_lib_save_LIBS
12266fi
12267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12268$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12269if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12270
12271 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12272
12273
12274fi
12275
12276
12277fi
12278done
12279
12280
Matthias Kloseb9621712010-04-24 17:59:49 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12282$as_echo_n "checking for major... " >&6; }
12283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012284/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012285
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012286#if defined(MAJOR_IN_MKDEV)
12287#include <sys/mkdev.h>
12288#elif defined(MAJOR_IN_SYSMACROS)
12289#include <sys/sysmacros.h>
12290#else
12291#include <sys/types.h>
12292#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012293
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012294int
12295main ()
12296{
12297
12298 makedev(major(0),minor(0));
12299
12300 ;
12301 return 0;
12302}
12303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012304if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012305
12306
Matthias Kloseb9621712010-04-24 17:59:49 +000012307$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12310$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012311
12312else
Skip Montanaro6dead952003-09-25 14:50:04 +000012313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12315$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012316
12317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012318rm -f core conftest.err conftest.$ac_objext \
12319 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012320
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012321# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012322# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12324$as_echo_n "checking for getaddrinfo... " >&6; }
12325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012326/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012327
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012328#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012329#include <sys/socket.h>
12330#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012331#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012332
Martin v. Löwis11437992002-04-12 09:54:03 +000012333int
12334main ()
12335{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012336getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 ;
12338 return 0;
12339}
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012342 have_getaddrinfo=yes
12343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012346rm -f core conftest.err conftest.$ac_objext \
12347 conftest$ac_exeext conftest.$ac_ext
12348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12349$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012350if test $have_getaddrinfo = yes
12351then
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12353$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012354 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012356else
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012358
12359if test "${enable_ipv6+set}" = set; then
12360 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12361else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012362 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012363fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012364else
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012366/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012367
Stefan Krah19c21392012-11-22 23:47:32 +010012368#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012369#include <sys/types.h>
12370#include <netdb.h>
12371#include <string.h>
12372#include <sys/socket.h>
12373#include <netinet/in.h>
12374
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012375int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012376{
12377 int passive, gaierr, inet4 = 0, inet6 = 0;
12378 struct addrinfo hints, *ai, *aitop;
12379 char straddr[INET6_ADDRSTRLEN], strport[16];
12380
12381 for (passive = 0; passive <= 1; passive++) {
12382 memset(&hints, 0, sizeof(hints));
12383 hints.ai_family = AF_UNSPEC;
12384 hints.ai_flags = passive ? AI_PASSIVE : 0;
12385 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012386 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12388 (void)gai_strerror(gaierr);
12389 goto bad;
12390 }
12391 for (ai = aitop; ai; ai = ai->ai_next) {
12392 if (ai->ai_addr == NULL ||
12393 ai->ai_addrlen == 0 ||
12394 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12395 straddr, sizeof(straddr), strport, sizeof(strport),
12396 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12397 goto bad;
12398 }
12399 switch (ai->ai_family) {
12400 case AF_INET:
12401 if (strcmp(strport, "54321") != 0) {
12402 goto bad;
12403 }
12404 if (passive) {
12405 if (strcmp(straddr, "0.0.0.0") != 0) {
12406 goto bad;
12407 }
12408 } else {
12409 if (strcmp(straddr, "127.0.0.1") != 0) {
12410 goto bad;
12411 }
12412 }
12413 inet4++;
12414 break;
12415 case AF_INET6:
12416 if (strcmp(strport, "54321") != 0) {
12417 goto bad;
12418 }
12419 if (passive) {
12420 if (strcmp(straddr, "::") != 0) {
12421 goto bad;
12422 }
12423 } else {
12424 if (strcmp(straddr, "::1") != 0) {
12425 goto bad;
12426 }
12427 }
12428 inet6++;
12429 break;
12430 case AF_UNSPEC:
12431 goto bad;
12432 break;
12433 default:
12434 /* another family support? */
12435 break;
12436 }
12437 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012438 freeaddrinfo(aitop);
12439 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012440 }
12441
12442 if (!(inet4 == 0 || inet4 == 2))
12443 goto bad;
12444 if (!(inet6 == 0 || inet6 == 2))
12445 goto bad;
12446
12447 if (aitop)
12448 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012449 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012450
12451 bad:
12452 if (aitop)
12453 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012454 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012455}
12456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012459 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12464 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012467fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012468
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12472$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12473
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012474if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012475then
12476 if test $ipv6 = yes
12477 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012478 echo 'Fatal: You must get working getaddrinfo() function.'
12479 echo ' or you can specify "--disable-ipv6"'.
12480 exit 1
12481 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012482else
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012485
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012486fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012487
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012488for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012489do :
12490 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012491if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012493#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012494_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012495
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012496fi
12497done
12498
Michael W. Hudson54241132001-12-07 15:38:26 +000012499
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012500# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12502$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012503if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012505else
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012507/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508#include <sys/types.h>
12509#include <sys/time.h>
12510#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
Martin v. Löwis11437992002-04-12 09:54:03 +000012512int
12513main ()
12514{
12515if ((struct tm *) 0)
12516return 0;
12517 ;
12518 return 0;
12519}
12520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012521if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012523else
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12529$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012530if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533
12534fi
12535
Matthias Kloseb9621712010-04-24 17:59:49 +000012536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12537$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012538if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012543#include <sys/types.h>
12544#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012545
Martin v. Löwis11437992002-04-12 09:54:03 +000012546int
12547main ()
12548{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549struct tm tm;
12550 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ;
12553 return 0;
12554}
12555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012557 ac_cv_struct_tm=time.h
12558else
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12564$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012565if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012568
12569fi
12570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571ac_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 +000012572#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574"
Victor Stinnere0be4232011-10-25 13:06:09 +020012575if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
12577cat >>confdefs.h <<_ACEOF
12578#define HAVE_STRUCT_TM_TM_ZONE 1
12579_ACEOF
12580
12581
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012582fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012583
Martin v. Löwis11437992002-04-12 09:54:03 +000012584if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12585
Matthias Kloseb9621712010-04-24 17:59:49 +000012586$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012587
12588else
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12590"
Victor Stinnere0be4232011-10-25 13:06:09 +020012591if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593else
Matthias Kloseb9621712010-04-24 17:59:49 +000012594 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595fi
12596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012598#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599_ACEOF
12600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12602$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012603if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012605else
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012607/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012608#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012609#if !HAVE_DECL_TZNAME
12610extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
Martin v. Löwis11437992002-04-12 09:54:03 +000012613int
12614main ()
12615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 ;
12618 return 0;
12619}
12620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012621if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012622 ac_cv_var_tzname=yes
12623else
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012626rm -f core conftest.err conftest.$ac_objext \
12627 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12630$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012631 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012634
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012635 fi
12636fi
12637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638ac_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 +020012639if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
12641cat >>confdefs.h <<_ACEOF
12642#define HAVE_STRUCT_STAT_ST_RDEV 1
12643_ACEOF
12644
12645
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012646fi
12647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648ac_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 +020012649if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012650
Martin v. Löwis11437992002-04-12 09:54:03 +000012651cat >>confdefs.h <<_ACEOF
12652#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12653_ACEOF
12654
12655
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012656fi
12657
Matthias Kloseb9621712010-04-24 17:59:49 +000012658ac_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 +020012659if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012660
12661cat >>confdefs.h <<_ACEOF
12662#define HAVE_STRUCT_STAT_ST_FLAGS 1
12663_ACEOF
12664
12665
12666fi
12667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668ac_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 +020012669if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012670
12671cat >>confdefs.h <<_ACEOF
12672#define HAVE_STRUCT_STAT_ST_GEN 1
12673_ACEOF
12674
12675
12676fi
12677
Matthias Kloseb9621712010-04-24 17:59:49 +000012678ac_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 +020012679if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012680
12681cat >>confdefs.h <<_ACEOF
12682#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12683_ACEOF
12684
12685
12686fi
12687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688ac_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 +020012689if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012690
Martin v. Löwis11437992002-04-12 09:54:03 +000012691cat >>confdefs.h <<_ACEOF
12692#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12693_ACEOF
12694
12695
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012696fi
12697
Stefan Krah267b6392016-04-26 01:09:18 +020012698ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12699 #include <sys/types.h>
12700 #include <pwd.h>
12701
12702"
12703if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12704
12705cat >>confdefs.h <<_ACEOF
12706#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12707_ACEOF
12708
12709
12710fi
12711ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12712 #include <sys/types.h>
12713 #include <pwd.h>
12714
12715"
12716if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12717
12718cat >>confdefs.h <<_ACEOF
12719#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12720_ACEOF
12721
12722
12723fi
12724
Michael W. Hudson54241132001-12-07 15:38:26 +000012725
Matthias Kloseb9621712010-04-24 17:59:49 +000012726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12727$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012728if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012730else
Matthias Kloseb159a552010-04-25 21:00:44 +000012731
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012734#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012735int
12736main ()
12737{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012739 ;
12740 return 0;
12741}
12742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744 ac_cv_header_time_altzone=yes
12745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012750fi
12751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12753$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012754if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012757
12758fi
12759
Guido van Rossumda88dad1995-01-26 00:46:29 +000012760was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12762$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012764/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012765
12766#include <sys/types.h>
12767#include <sys/select.h>
12768#include <sys/time.h>
12769
Martin v. Löwis11437992002-04-12 09:54:03 +000012770int
12771main ()
12772{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773;
Martin v. Löwis11437992002-04-12 09:54:03 +000012774 ;
12775 return 0;
12776}
12777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012778if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012779
12780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012783 was_it_defined=yes
12784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12788$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789
Matthias Kloseb9621712010-04-24 17:59:49 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12791$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012792if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012796/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012797#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012798int
12799main ()
12800{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012801struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 ;
12803 return 0;
12804}
12805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012807 ac_cv_struct_addrinfo=yes
12808else
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12812fi
12813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12815$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012816if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012819
12820fi
12821
Matthias Kloseb9621712010-04-24 17:59:49 +000012822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12823$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012824if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 $as_echo_n "(cached) " >&6
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
12830# include <sys/types.h>
12831# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012832int
12833main ()
12834{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012835struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 ;
12837 return 0;
12838}
12839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841 ac_cv_struct_sockaddr_storage=yes
12842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12846fi
12847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12849$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012850if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853
12854fi
12855
Christian Heimesdffa3942016-09-05 23:54:41 +020012856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12857$as_echo_n "checking for sockaddr_alg... " >&6; }
12858if ${ac_cv_struct_sockaddr_alg+:} false; then :
12859 $as_echo_n "(cached) " >&6
12860else
12861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12862/* end confdefs.h. */
12863
12864# include <sys/types.h>
12865# include <sys/socket.h>
12866# include <linux/if_alg.h>
12867int
12868main ()
12869{
12870struct sockaddr_alg s
12871 ;
12872 return 0;
12873}
12874_ACEOF
12875if ac_fn_c_try_compile "$LINENO"; then :
12876 ac_cv_struct_sockaddr_alg=yes
12877else
12878 ac_cv_struct_sockaddr_alg=no
12879fi
12880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12881fi
12882
12883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12884$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12885if test $ac_cv_struct_sockaddr_alg = yes; then
12886
12887$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12888
12889fi
12890
Guido van Rossum627b2d71993-12-24 10:39:16 +000012891# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12894$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012895if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012900$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012901int
12902main ()
12903{
12904static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012905test_array [0] = 0;
12906return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
12908 ;
12909 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012910}
Martin v. Löwis11437992002-04-12 09:54:03 +000012911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012912if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012913 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12920$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923
12924fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012925
Matthias Kloseb9621712010-04-24 17:59:49 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12927$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012928if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012932/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934int
12935main ()
12936{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012937
Martin v. Löwis11437992002-04-12 09:54:03 +000012938#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012939 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012941 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 char const *const *pcpcc;
12944 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 /* NEC SVR4.0.2 mips cc rejects this. */
12946 struct point {int x, y;};
12947 static struct point const zero = {0,0};
12948 /* AIX XL C 1.02.0.0 rejects this.
12949 It does not let you subtract one const X* pointer from another in
12950 an arm of an if-expression whose if-part is not a constant
12951 expression */
12952 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955 ++pcpcc;
12956 ppc = (char**) pcpcc;
12957 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012958 { /* SCO 3.2v4 cc rejects this sort of thing. */
12959 char tx;
12960 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 }
12966 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12967 int x[] = {25, 17};
12968 const int *foo = &x[0];
12969 ++foo;
12970 }
12971 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12972 typedef const int *iptr;
12973 iptr p = 0;
12974 ++p;
12975 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012976 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012978 struct s { int j; const int *ap[3]; } bx;
12979 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 }
12981 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12982 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012986#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012987
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012990}
Martin v. Löwis11437992002-04-12 09:54:03 +000012991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993 ac_cv_c_const=yes
12994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13000$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013001if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004
13005fi
13006
Michael W. Hudson54241132001-12-07 15:38:26 +000013007
Guido van Rossumda88dad1995-01-26 00:46:29 +000013008works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13010$as_echo_n "checking for working volatile... " >&6; }
13011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013012/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014int
13015main ()
13016{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013017volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 ;
13019 return 0;
13020}
13021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013022if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013023 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013024else
Skip Montanaro6dead952003-09-25 14:50:04 +000013025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013027
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013028
Guido van Rossum627b2d71993-12-24 10:39:16 +000013029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13032$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013033
Guido van Rossumda88dad1995-01-26 00:46:29 +000013034works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13036$as_echo_n "checking for working signed char... " >&6; }
13037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013038/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013039
Martin v. Löwis11437992002-04-12 09:54:03 +000013040int
13041main ()
13042{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013043signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 ;
13045 return 0;
13046}
13047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013048if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013049 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013050else
Skip Montanaro6dead952003-09-25 14:50:04 +000013051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013053
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013054
Guido van Rossum7f43da71994-08-01 12:15:30 +000013055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13058$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013059
Guido van Rossumda88dad1995-01-26 00:46:29 +000013060have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13062$as_echo_n "checking for prototypes... " >&6; }
13063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013064/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013065int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013066int
13067main ()
13068{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 ;
13071 return 0;
13072}
13073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013077
Matthias Kloseb159a552010-04-25 21:00:44 +000013078 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13082$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083
Guido van Rossumda88dad1995-01-26 00:46:29 +000013084works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13086$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013088/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013089
13090#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013091int foo(int x, ...) {
13092 va_list va;
13093 va_start(va, x);
13094 va_arg(va, int);
13095 va_arg(va, char *);
13096 va_arg(va, double);
13097 return 0;
13098}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100int
13101main ()
13102{
Guido van Rossum90eea071996-08-30 20:58:57 +000013103return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 ;
13105 return 0;
13106}
13107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013112
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013113 works=yes
13114
Guido van Rossum627b2d71993-12-24 10:39:16 +000013115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13118$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119
Martin v. Löwisd6320502004-08-12 13:45:08 +000013120# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13122$as_echo_n "checking for socketpair... " >&6; }
13123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013124/* end confdefs.h. */
13125
13126#include <sys/types.h>
13127#include <sys/socket.h>
13128
13129int
13130main ()
13131{
13132void *x=socketpair
13133 ;
13134 return 0;
13135}
13136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013140
Matthias Kloseb159a552010-04-25 21:00:44 +000013141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013142$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013143else
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13145$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013146
13147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013149
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013150# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13152$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013154/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013155#include <sys/types.h>
13156#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013157int
13158main ()
13159{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013160struct sockaddr x;
13161x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 ;
13163 return 0;
13164}
13165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013166if ac_fn_c_try_compile "$LINENO"; then :
13167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13168$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013171
13172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13174$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013175
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013178
Guido van Rossumda88dad1995-01-26 00:46:29 +000013179va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13181$as_echo_n "checking whether va_list is an array... " >&6; }
13182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013183/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013184
13185#ifdef HAVE_STDARG_PROTOTYPES
13186#include <stdarg.h>
13187#else
13188#include <varargs.h>
13189#endif
13190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191int
13192main ()
13193{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013194va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 ;
13196 return 0;
13197}
13198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013199if ac_fn_c_try_compile "$LINENO"; then :
13200
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013201else
Skip Montanaro6dead952003-09-25 14:50:04 +000013202
Martin v. Löwis11437992002-04-12 09:54:03 +000013203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013205
Guido van Rossumda88dad1995-01-26 00:46:29 +000013206 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013207
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13211$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013212
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013213# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
13215
Matthias Kloseb9621712010-04-24 17:59:49 +000013216ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013217if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13222$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013223 OLD_CFLAGS=$CFLAGS
13224 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013226/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013227
13228# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
Martin v. Löwis11437992002-04-12 09:54:03 +000013230int
13231main ()
13232{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013233
13234 char *name;
13235 struct hostent *he, *res;
13236 char buffer[2048];
13237 int buflen = 2048;
13238 int h_errnop;
13239
13240 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013241
13242 ;
13243 return 0;
13244}
13245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13254$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013255
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013256else
Skip Montanaro6dead952003-09-25 14:50:04 +000013257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13259$as_echo "no" >&6; }
13260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13261$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013264
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013265# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Martin v. Löwis11437992002-04-12 09:54:03 +000013267int
13268main ()
13269{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013270
13271 char *name;
13272 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013273 char buffer[2048];
13274 int buflen = 2048;
13275 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013276
Matthias Kloseb159a552010-04-25 21:00:44 +000013277 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
13279 ;
13280 return 0;
13281}
13282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013286
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
Matthias Kloseb159a552010-04-25 21:00:44 +000013288$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13291$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013292
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013293else
Skip Montanaro6dead952003-09-25 14:50:04 +000013294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13296$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13298$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300/* end confdefs.h. */
13301
13302# include <netdb.h>
13303
13304int
13305main ()
13306{
13307
13308 char *name;
13309 struct hostent *he;
13310 struct hostent_data data;
13311
13312 (void) gethostbyname_r(name, he, &data);
13313
13314 ;
13315 return 0;
13316}
13317_ACEOF
13318if ac_fn_c_try_compile "$LINENO"; then :
13319
13320 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13321
13322
13323$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13324
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13326$as_echo "yes" >&6; }
13327
13328else
13329
13330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13331$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013341 CFLAGS=$OLD_CFLAGS
13342
13343else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 for ac_func in gethostbyname
13346do :
13347 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013348if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013351_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013353fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013354done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013355
Michael W. Hudson54241132001-12-07 15:38:26 +000013356
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013357fi
13358
Michael W. Hudson54241132001-12-07 15:38:26 +000013359
13360
13361
13362
13363
13364
Guido van Rossum627b2d71993-12-24 10:39:16 +000013365# checks for system services
13366# (none yet)
13367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013369ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013370if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013371
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13374$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013375if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013377else
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013379LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383/* Override any GCC internal prototype to avoid an error.
13384 Use char because int might match the return type of a GCC
13385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013386#ifdef __cplusplus
13387extern "C"
13388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013389char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013390int
13391main ()
13392{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 ;
13395 return 0;
13396}
13397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013398if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013400else
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013403rm -f core conftest.err conftest.$ac_objext \
13404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013405LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13408$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013409if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 cat >>confdefs.h <<_ACEOF
13411#define HAVE_LIBIEEE 1
13412_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013413
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013414 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415
Guido van Rossum627b2d71993-12-24 10:39:16 +000013416fi
13417
Michael W. Hudson54241132001-12-07 15:38:26 +000013418
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013419fi
13420
Michael W. Hudson54241132001-12-07 15:38:26 +000013421
Guido van Rossum7f253911997-05-09 02:42:48 +000013422# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13424$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013426# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013427if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013428 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013429if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013430then
13431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13435$as_echo "yes" >&6; }
13436else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13437$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013438fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013439else
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13441$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442fi
13443
Guido van Rossum7f253911997-05-09 02:42:48 +000013444
Guido van Rossum7f43da71994-08-01 12:15:30 +000013445# check for --with-libm=...
13446
Guido van Rossum563e7081996-09-10 18:20:48 +000013447case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013448Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013449*) LIBM=-lm
13450esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13452$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013456 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013457if test "$withval" = no
13458then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13460$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013461elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013462then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13464$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013465else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013466fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013467else
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13469$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013470fi
13471
Guido van Rossum7f43da71994-08-01 12:15:30 +000013472
13473# check for --with-libc=...
13474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13476$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013478# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013479if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013480 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013481if test "$withval" = no
13482then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13484$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013485elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013486then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13488$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013489else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013490fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013491else
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13493$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494fi
13495
Guido van Rossum7f43da71994-08-01 12:15:30 +000013496
Stefan Krah1919b7e2012-03-21 18:25:23 +010013497# **************************************
13498# * Check for gcc x64 inline assembler *
13499# **************************************
13500
13501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13502$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13504/* end confdefs.h. */
13505
13506int
13507main ()
13508{
13509
13510 __asm__ __volatile__ ("movq %rcx, %rax");
13511
13512 ;
13513 return 0;
13514}
13515_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013516if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013517 have_gcc_asm_for_x64=yes
13518else
13519 have_gcc_asm_for_x64=no
13520fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013521rm -f core conftest.err conftest.$ac_objext \
13522 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13524$as_echo "$have_gcc_asm_for_x64" >&6; }
13525if test "$have_gcc_asm_for_x64" = yes
13526then
13527
13528$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13529
13530fi
13531
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013532# **************************************************
13533# * Check for various properties of floating point *
13534# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13537$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013538if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013540else
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013543 ac_cv_little_endian_double=no
13544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013546/* end confdefs.h. */
13547
13548#include <string.h>
13549int main() {
13550 double x = 9006104071832581.0;
13551 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13552 return 0;
13553 else
13554 return 1;
13555}
13556
13557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013559 ac_cv_little_endian_double=yes
13560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13564 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013565fi
13566
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013567fi
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13570$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013571if test "$ac_cv_little_endian_double" = yes
13572then
13573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013575
13576fi
13577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13579$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013580if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013582else
13583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013585 ac_cv_big_endian_double=no
13586else
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013588/* end confdefs.h. */
13589
13590#include <string.h>
13591int main() {
13592 double x = 9006104071832581.0;
13593 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13594 return 0;
13595 else
13596 return 1;
13597}
13598
13599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013600if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013601 ac_cv_big_endian_double=yes
13602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013607fi
13608
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013609fi
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13612$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013613if test "$ac_cv_big_endian_double" = yes
13614then
13615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013617
13618fi
13619
13620# Some ARM platforms use a mixed-endian representation for doubles.
13621# While Python doesn't currently have full support for these platforms
13622# (see e.g., issue 1762561), we can at least make sure that float <-> string
13623# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13625$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013626if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013628else
13629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013631 ac_cv_mixed_endian_double=no
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013634/* end confdefs.h. */
13635
13636#include <string.h>
13637int main() {
13638 double x = 9006104071832581.0;
13639 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13640 return 0;
13641 else
13642 return 1;
13643}
13644
13645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013646if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013647 ac_cv_mixed_endian_double=yes
13648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013650fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13652 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013653fi
13654
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013655fi
13656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13658$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013659if test "$ac_cv_mixed_endian_double" = yes
13660then
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013663
13664fi
13665
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013666# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013667# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013668# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013669# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013670# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013671# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013672
13673# This inline assembler syntax may also work for suncc and icc,
13674# so we try it on all platforms.
13675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13677$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013679/* end confdefs.h. */
13680
13681int
13682main ()
13683{
13684
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013685 unsigned short cw;
13686 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13687 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013688
13689 ;
13690 return 0;
13691}
13692_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013693if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013694 have_gcc_asm_for_x87=yes
13695else
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013697fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013698rm -f core conftest.err conftest.$ac_objext \
13699 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13701$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013702if test "$have_gcc_asm_for_x87" = yes
13703then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013706
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013707fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013708
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13710$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13712/* end confdefs.h. */
13713
13714int
13715main ()
13716{
13717
13718 unsigned int fpcr;
13719 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13720 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13721
13722 ;
13723 return 0;
13724}
13725_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013726if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013727 have_gcc_asm_for_mc68881=yes
13728else
13729 have_gcc_asm_for_mc68881=no
13730fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013731rm -f core conftest.err conftest.$ac_objext \
13732 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13734$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13735if test "$have_gcc_asm_for_mc68881" = yes
13736then
13737
13738$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13739
13740fi
13741
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013742# Detect whether system arithmetic is subject to x87-style double
13743# rounding issues. The result of this test has little meaning on non
13744# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13745# mode is round-to-nearest and double rounding issues are present, and
13746# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13748$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013749# $BASECFLAGS may affect the result
13750ac_save_cc="$CC"
13751CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013752if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013753 ac_cv_x87_double_rounding=no
13754else
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013756/* end confdefs.h. */
13757
13758#include <stdlib.h>
13759#include <math.h>
13760int main() {
13761 volatile double x, y, z;
13762 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13763 x = 0.99999999999999989; /* 1-2**-53 */
13764 y = 1./x;
13765 if (y != 1.)
13766 exit(0);
13767 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13768 x = 1e16;
13769 y = 2.99999;
13770 z = x + y;
13771 if (z != 1e16+4.)
13772 exit(0);
13773 /* both tests show evidence of double rounding */
13774 exit(1);
13775}
13776
13777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013778if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013779 ac_cv_x87_double_rounding=no
13780else
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013785fi
13786
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013787CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13789$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013790if test "$ac_cv_x87_double_rounding" = yes
13791then
13792
Matthias Kloseb9621712010-04-24 17:59:49 +000013793$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013794
13795fi
13796
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013797# ************************************
13798# * Check for mathematical functions *
13799# ************************************
13800
13801LIBS_SAVE=$LIBS
13802LIBS="$LIBS $LIBM"
13803
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013804for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13805do :
13806 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13807ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013808if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013809 cat >>confdefs.h <<_ACEOF
13810#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13811_ACEOF
13812
13813fi
13814done
13815
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013816for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013817do :
13818 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13819ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013820if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013821 cat >>confdefs.h <<_ACEOF
13822#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13823_ACEOF
13824
13825fi
13826done
13827
13828ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13829"
Victor Stinnere0be4232011-10-25 13:06:09 +020013830if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013831 ac_have_decl=1
13832else
13833 ac_have_decl=0
13834fi
13835
13836cat >>confdefs.h <<_ACEOF
13837#define HAVE_DECL_ISINF $ac_have_decl
13838_ACEOF
13839ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13840"
Victor Stinnere0be4232011-10-25 13:06:09 +020013841if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013842 ac_have_decl=1
13843else
13844 ac_have_decl=0
13845fi
13846
13847cat >>confdefs.h <<_ACEOF
13848#define HAVE_DECL_ISNAN $ac_have_decl
13849_ACEOF
13850ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13851"
Victor Stinnere0be4232011-10-25 13:06:09 +020013852if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013853 ac_have_decl=1
13854else
13855 ac_have_decl=0
13856fi
13857
13858cat >>confdefs.h <<_ACEOF
13859#define HAVE_DECL_ISFINITE $ac_have_decl
13860_ACEOF
13861
13862
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013863# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13864# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13866$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013867if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013869else
13870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013872 ac_cv_tanh_preserves_zero_sign=no
13873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013875/* end confdefs.h. */
13876
13877#include <math.h>
13878#include <stdlib.h>
13879int main() {
13880 /* return 0 if either negative zeros don't exist
13881 on this platform or if negative zeros exist
13882 and tanh(-0.) == -0. */
13883 if (atan2(0., -1.) == atan2(-0., -1.) ||
13884 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13885 else exit(1);
13886}
13887
13888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013889if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013890 ac_cv_tanh_preserves_zero_sign=yes
13891else
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013896fi
13897
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013898fi
13899
Matthias Kloseb9621712010-04-24 17:59:49 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13901$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013902if test "$ac_cv_tanh_preserves_zero_sign" = yes
13903then
13904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013906
13907fi
13908
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013909if test "$ac_cv_func_log1p" = yes
13910then
13911 # On some versions of AIX, log1p(-0.) returns 0. instead of
13912 # -0. See issue #9920.
13913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13914$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013915 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013916 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013917else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013918
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013919 if test "$cross_compiling" = yes; then :
13920 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013921else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13923/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013924
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013925 #include <math.h>
13926 #include <stdlib.h>
13927 int main() {
13928 /* Fail if the signs of log1p(-0.) and -0. can be
13929 distinguished. */
13930 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13931 return 0;
13932 else
13933 return 1;
13934 }
13935
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013936_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013937if ac_fn_c_try_run "$LINENO"; then :
13938 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013939else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013940 ac_cv_log1p_drops_zero_sign=yes
13941fi
13942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13943 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013944fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013945
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013946fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013947
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13949$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13950fi
13951if test "$ac_cv_log1p_drops_zero_sign" = yes
13952then
13953
13954$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13955
13956fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013957
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013958LIBS=$LIBS_SAVE
13959
Mark Dickinsona614f042009-11-28 12:48:43 +000013960# For multiprocessing module, check that sem_open
13961# actually works. For FreeBSD versions <= 7.2,
13962# the kernel module that provides POSIX semaphores
13963# isn't loaded by default, so an attempt to call
13964# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13966$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013967if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013971 ac_cv_posix_semaphores_enabled=yes
13972else
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013974/* end confdefs.h. */
13975
13976#include <unistd.h>
13977#include <fcntl.h>
13978#include <stdio.h>
13979#include <semaphore.h>
13980#include <sys/stat.h>
13981
13982int main(void) {
13983 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13984 if (a == SEM_FAILED) {
13985 perror("sem_open");
13986 return 1;
13987 }
13988 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013989 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013990 return 0;
13991}
13992
13993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013994if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013995 ac_cv_posix_semaphores_enabled=yes
13996else
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014001fi
14002
14003
Mark Dickinsona614f042009-11-28 12:48:43 +000014004fi
14005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14007$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014008if test $ac_cv_posix_semaphores_enabled = no
14009then
14010
Matthias Kloseb9621712010-04-24 17:59:49 +000014011$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014012
14013fi
14014
Mark Dickinson10683072009-04-18 21:18:19 +000014015# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14017$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014018if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014020else
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014022 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014023else
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014025/* end confdefs.h. */
14026
14027#include <unistd.h>
14028#include <fcntl.h>
14029#include <stdio.h>
14030#include <semaphore.h>
14031#include <sys/stat.h>
14032
14033int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014034 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014035 int count;
14036 int res;
14037 if(a==SEM_FAILED){
14038 perror("sem_open");
14039 return 1;
14040
14041 }
14042 res = sem_getvalue(a, &count);
14043 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014044 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014045 return res==-1 ? 1 : 0;
14046}
14047
Mark Dickinson10683072009-04-18 21:18:19 +000014048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014049if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014050 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014051else
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014056fi
14057
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014059fi
14060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14062$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014063if test $ac_cv_broken_sem_getvalue = yes
14064then
14065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014067
14068fi
14069
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014070ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14071"
14072if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14073 ac_have_decl=1
14074else
14075 ac_have_decl=0
14076fi
14077
14078cat >>confdefs.h <<_ACEOF
14079#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14080_ACEOF
14081ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14082"
14083if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14084 ac_have_decl=1
14085else
14086 ac_have_decl=0
14087fi
14088
14089cat >>confdefs.h <<_ACEOF
14090#define HAVE_DECL_RTLD_NOW $ac_have_decl
14091_ACEOF
14092ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14093"
14094if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14095 ac_have_decl=1
14096else
14097 ac_have_decl=0
14098fi
14099
14100cat >>confdefs.h <<_ACEOF
14101#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14102_ACEOF
14103ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14104"
14105if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14106 ac_have_decl=1
14107else
14108 ac_have_decl=0
14109fi
14110
14111cat >>confdefs.h <<_ACEOF
14112#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14113_ACEOF
14114ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14115"
14116if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14117 ac_have_decl=1
14118else
14119 ac_have_decl=0
14120fi
14121
14122cat >>confdefs.h <<_ACEOF
14123#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14124_ACEOF
14125ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14126"
14127if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14128 ac_have_decl=1
14129else
14130 ac_have_decl=0
14131fi
14132
14133cat >>confdefs.h <<_ACEOF
14134#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14135_ACEOF
14136ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14137"
14138if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14139 ac_have_decl=1
14140else
14141 ac_have_decl=0
14142fi
14143
14144cat >>confdefs.h <<_ACEOF
14145#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14146_ACEOF
14147
14148
Mark Dickinsonbd792642009-03-18 20:06:12 +000014149# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14151$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014152# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014153if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014154 enableval=$enable_big_digits; case $enable_big_digits in
14155yes)
14156 enable_big_digits=30 ;;
14157no)
14158 enable_big_digits=15 ;;
1415915|30)
14160 ;;
14161*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014162 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 +000014163esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14165$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014166
14167cat >>confdefs.h <<_ACEOF
14168#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14169_ACEOF
14170
14171
14172else
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14174$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014175fi
14176
14177
Guido van Rossumef2255b2000-03-10 22:30:29 +000014178# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014179ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014180if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
14182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014185 wchar_h="yes"
14186
Guido van Rossumef2255b2000-03-10 22:30:29 +000014187else
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014189
14190fi
14191
Michael W. Hudson54241132001-12-07 15:38:26 +000014192
Martin v. Löwis11437992002-04-12 09:54:03 +000014193
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014194# determine wchar_t size
14195if test "$wchar_h" = yes
14196then
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14199# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14200# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14202$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014203if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014205else
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14207"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014208
Martin v. Löwis11437992002-04-12 09:54:03 +000014209else
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 if test "$ac_cv_type_wchar_t" = yes; then
14211 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14212$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014213as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014214See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215 else
14216 ac_cv_sizeof_wchar_t=0
14217 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014219
Martin v. Löwis11437992002-04-12 09:54:03 +000014220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14222$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223
14224
14225
Martin v. Löwis11437992002-04-12 09:54:03 +000014226cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014227#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014228_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014229
Michael W. Hudson54241132001-12-07 15:38:26 +000014230
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014231fi
14232
Matthias Kloseb9621712010-04-24 17:59:49 +000014233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14234$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014235have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014237/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014238
14239#include <tcl.h>
14240#if TCL_UTF_MAX != 6
14241# error "NOT UCS4_TCL"
14242#endif
14243int
14244main ()
14245{
14246
14247 ;
14248 return 0;
14249}
14250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014251if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014252
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014255
14256 have_ucs4_tcl=yes
14257
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14261$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014262
Skip Montanaro6dead952003-09-25 14:50:04 +000014263# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014264if test "$wchar_h" = yes
14265then
14266 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14268$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014269 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014271else
14272
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014274 ac_cv_wchar_t_signed=yes
14275else
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014277/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014278
14279 #include <wchar.h>
14280 int main()
14281 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014282 /* Success: exit code 0 */
14283 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014284 }
14285
14286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014287if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014288 ac_cv_wchar_t_signed=yes
14289else
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14293 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014294fi
14295
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014296fi
14297
Matthias Kloseb9621712010-04-24 17:59:49 +000014298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14299$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300fi
14301
Georg Brandl52d168a2008-01-07 18:10:24 +000014302# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014303if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014304 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014305then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014306 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014309
Georg Brandl52d168a2008-01-07 18:10:24 +000014310else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014311 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014312fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14314$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014315
14316# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14318$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014319if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014321else
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 ac_cv_c_bigendian=unknown
14323 # See if we're dealing with a universal compiler.
14324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14325/* end confdefs.h. */
14326#ifndef __APPLE_CC__
14327 not a universal capable compiler
14328 #endif
14329 typedef int dummy;
14330
Skip Montanaro6dead952003-09-25 14:50:04 +000014331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014332if ac_fn_c_try_compile "$LINENO"; then :
14333
14334 # Check for potential -arch flags. It is not universal unless
14335 # there are at least two -arch flags with different values.
14336 ac_arch=
14337 ac_prev=
14338 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14339 if test -n "$ac_prev"; then
14340 case $ac_word in
14341 i?86 | x86_64 | ppc | ppc64)
14342 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14343 ac_arch=$ac_word
14344 else
14345 ac_cv_c_bigendian=universal
14346 break
14347 fi
14348 ;;
14349 esac
14350 ac_prev=
14351 elif test "x$ac_word" = "x-arch"; then
14352 ac_prev=arch
14353 fi
14354 done
14355fi
14356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14357 if test $ac_cv_c_bigendian = unknown; then
14358 # See if sys/param.h defines the BYTE_ORDER macro.
14359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014360/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014361#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014363
Martin v. Löwis11437992002-04-12 09:54:03 +000014364int
14365main ()
14366{
Matthias Kloseb9621712010-04-24 17:59:49 +000014367#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14368 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14369 && LITTLE_ENDIAN)
14370 bogus endian macros
14371 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
14373 ;
14374 return 0;
14375}
14376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014377if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014378 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014380/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014381#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384int
14385main ()
14386{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014387#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 not big endian
14389 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
14391 ;
14392 return 0;
14393}
14394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014395if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014396 ac_cv_c_bigendian=yes
14397else
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014401fi
14402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14403 fi
14404 if test $ac_cv_c_bigendian = unknown; then
14405 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014407/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014408#include <limits.h>
14409
Martin v. Löwis11437992002-04-12 09:54:03 +000014410int
14411main ()
14412{
Matthias Kloseb9621712010-04-24 17:59:49 +000014413#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14414 bogus endian macros
14415 #endif
14416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 ;
14418 return 0;
14419}
14420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014421if ac_fn_c_try_compile "$LINENO"; then :
14422 # It does; now see whether it defined to _BIG_ENDIAN or not.
14423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14424/* end confdefs.h. */
14425#include <limits.h>
14426
14427int
14428main ()
14429{
14430#ifndef _BIG_ENDIAN
14431 not big endian
14432 #endif
14433
14434 ;
14435 return 0;
14436}
14437_ACEOF
14438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014439 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014440else
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14444fi
14445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14446 fi
14447 if test $ac_cv_c_bigendian = unknown; then
14448 # Compile a test program.
14449 if test "$cross_compiling" = yes; then :
14450 # Try to guess by grepping values from an object file.
14451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14452/* end confdefs.h. */
14453short int ascii_mm[] =
14454 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14455 short int ascii_ii[] =
14456 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14457 int use_ascii (int i) {
14458 return ascii_mm[i] + ascii_ii[i];
14459 }
14460 short int ebcdic_ii[] =
14461 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14462 short int ebcdic_mm[] =
14463 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14464 int use_ebcdic (int i) {
14465 return ebcdic_mm[i] + ebcdic_ii[i];
14466 }
14467 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469int
14470main ()
14471{
14472return use_ascii (foo) == use_ebcdic (foo);
14473 ;
14474 return 0;
14475}
14476_ACEOF
14477if ac_fn_c_try_compile "$LINENO"; then :
14478 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14479 ac_cv_c_bigendian=yes
14480 fi
14481 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14482 if test "$ac_cv_c_bigendian" = unknown; then
14483 ac_cv_c_bigendian=no
14484 else
14485 # finding both strings is unlikely to happen, but who knows?
14486 ac_cv_c_bigendian=unknown
14487 fi
14488 fi
14489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014491else
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014493/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014495int
14496main ()
14497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014498
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 /* Are we little or big endian? From Harbison&Steele. */
14500 union
14501 {
14502 long int l;
14503 char c[sizeof (long int)];
14504 } u;
14505 u.l = 1;
14506 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507
14508 ;
14509 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014510}
Martin v. Löwis11437992002-04-12 09:54:03 +000014511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014512if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014513 ac_cv_c_bigendian=no
14514else
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14518 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14524$as_echo "$ac_cv_c_bigendian" >&6; }
14525 case $ac_cv_c_bigendian in #(
14526 yes)
14527 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14528;; #(
14529 no)
14530 ;; #(
14531 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014532
Matthias Kloseb9621712010-04-24 17:59:49 +000014533$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 ;; #(
14536 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014537 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014538 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014539 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014540
Michael W. Hudson54241132001-12-07 15:38:26 +000014541
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014542# ABI version string for Python extension modules. This appears between the
14543# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14544# from the following attributes which affect the ABI of this Python build (in
14545# this order):
14546#
14547# * The Python implementation (always 'cpython-' for us)
14548# * The major and minor version numbers
14549# * --with-pydebug (adds a 'd')
14550# * --with-pymalloc (adds a 'm')
14551# * --with-wide-unicode (adds a 'u')
14552#
14553# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014554# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14555# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014556
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14558$as_echo_n "checking ABIFLAGS... " >&6; }
14559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14560$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14562$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014563SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14565$as_echo "$SOABI" >&6; }
14566
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014567
14568case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014569 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014570 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14571 *)
14572 EXT_SUFFIX=${SHLIB_SUFFIX};;
14573esac
14574
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14576$as_echo_n "checking LDVERSION... " >&6; }
14577LDVERSION='$(VERSION)$(ABIFLAGS)'
14578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14579$as_echo "$LDVERSION" >&6; }
14580
doko@python.org87421192013-01-26 11:39:31 +010014581
doko@ubuntu.com55532312016-06-14 08:55:19 +020014582if test x$PLATFORM_TRIPLET = x; then
14583 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14584else
14585 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14586fi
doko@python.org87421192013-01-26 11:39:31 +010014587
14588
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014589# Check whether right shifting a negative integer extends the sign bit
14590# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14592$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014593if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014595else
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014598 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014599else
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014601/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014602
14603int main()
14604{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014605 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014606}
14607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014609if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014610 ac_cv_rshift_extends_sign=yes
14611else
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14615 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014616fi
14617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618fi
14619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14621$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014622if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014623then
Martin v. Löwis11437992002-04-12 09:54:03 +000014624
Matthias Kloseb9621712010-04-24 17:59:49 +000014625$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014626
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014627fi
14628
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014629# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14631$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014632if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014633 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014634else
Martin v. Löwis11437992002-04-12 09:54:03 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014637/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014638#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014639int
14640main ()
14641{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014642
14643 FILE *f = fopen("/dev/null", "r");
14644 flockfile(f);
14645 getc_unlocked(f);
14646 funlockfile(f);
14647
Martin v. Löwis11437992002-04-12 09:54:03 +000014648 ;
14649 return 0;
14650}
14651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014652if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014653 ac_cv_have_getc_unlocked=yes
14654else
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 ac_cv_have_getc_unlocked=no
14656fi
14657rm -f core conftest.err conftest.$ac_objext \
14658 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14662$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014663if test "$ac_cv_have_getc_unlocked" = yes
14664then
Martin v. Löwis11437992002-04-12 09:54:03 +000014665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014667
14668fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014669
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014670# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014671# save the value of LIBS so we don't actually link Python with readline
14672LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014673
Gregory P. Smith18820942008-09-07 06:24:49 +000014674# On some systems we need to link readline to a termcap compatible
14675# library. NOTE: Keep the precedence of listed libraries synchronised
14676# with setup.py.
14677py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14679$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014680for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014681 if test -z "$py_libtermcap"; then
14682 READLINE_LIBS="-lreadline"
14683 else
14684 READLINE_LIBS="-lreadline -l$py_libtermcap"
14685 fi
14686 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014688/* end confdefs.h. */
14689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690/* Override any GCC internal prototype to avoid an error.
14691 Use char because int might match the return type of a GCC
14692 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014693#ifdef __cplusplus
14694extern "C"
14695#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014696char readline ();
14697int
14698main ()
14699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014701 ;
14702 return 0;
14703}
14704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014705if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014706 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014708rm -f core conftest.err conftest.$ac_objext \
14709 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014710 if test $py_cv_lib_readline = yes; then
14711 break
14712 fi
14713done
14714# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14715#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014716if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14718$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14721$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014724
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014725fi
14726
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014727# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14729$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014730if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014732else
14733 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014734LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014736/* end confdefs.h. */
14737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738/* Override any GCC internal prototype to avoid an error.
14739 Use char because int might match the return type of a GCC
14740 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014741#ifdef __cplusplus
14742extern "C"
14743#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014744char rl_callback_handler_install ();
14745int
14746main ()
14747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014748return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014749 ;
14750 return 0;
14751}
14752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014753if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014754 ac_cv_lib_readline_rl_callback_handler_install=yes
14755else
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014758rm -f core conftest.err conftest.$ac_objext \
14759 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014760LIBS=$ac_check_lib_save_LIBS
14761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14763$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014764if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014765
Matthias Kloseb9621712010-04-24 17:59:49 +000014766$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014767
14768fi
14769
14770
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014771# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014773/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014774#include <readline/readline.h>
14775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014776if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014777 have_readline=yes
14778else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014779 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014780
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014781fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014782rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014783if test $have_readline = yes
14784then
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014786/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014787#include <readline/readline.h>
14788
14789_ACEOF
14790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014794
14795fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014796rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014799/* end confdefs.h. */
14800#include <readline/readline.h>
14801
14802_ACEOF
14803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014805
Matthias Kloseb9621712010-04-24 17:59:49 +000014806$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014807
14808fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014809rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014810
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014811fi
14812
Martin v. Löwis0daad592001-09-30 21:09:59 +000014813# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14815$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014816if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014818else
Martin v. Löwis11437992002-04-12 09:54:03 +000014819 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014820LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824/* Override any GCC internal prototype to avoid an error.
14825 Use char because int might match the return type of a GCC
14826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014827#ifdef __cplusplus
14828extern "C"
14829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014830char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014831int
14832main ()
14833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014835 ;
14836 return 0;
14837}
14838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014839if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014840 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014841else
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014844rm -f core conftest.err conftest.$ac_objext \
14845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014846LIBS=$ac_check_lib_save_LIBS
14847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14849$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014850if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014853
Martin v. Löwis0daad592001-09-30 21:09:59 +000014854fi
14855
Michael W. Hudson54241132001-12-07 15:38:26 +000014856
Thomas Wouters89d996e2007-09-08 17:39:28 +000014857# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14859$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014860if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014862else
14863 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014864LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014866/* end confdefs.h. */
14867
14868/* Override any GCC internal prototype to avoid an error.
14869 Use char because int might match the return type of a GCC
14870 builtin and then its argument prototype would still apply. */
14871#ifdef __cplusplus
14872extern "C"
14873#endif
14874char rl_completion_display_matches_hook ();
14875int
14876main ()
14877{
14878return rl_completion_display_matches_hook ();
14879 ;
14880 return 0;
14881}
14882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014883if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014884 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14885else
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014888rm -f core conftest.err conftest.$ac_objext \
14889 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014890LIBS=$ac_check_lib_save_LIBS
14891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14893$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014894if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014897
14898fi
14899
14900
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014901# also in 4.0, but not in editline
14902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14903$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14904if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14905 $as_echo_n "(cached) " >&6
14906else
14907 ac_check_lib_save_LIBS=$LIBS
14908LIBS="-lreadline $READLINE_LIBS $LIBS"
14909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14910/* end confdefs.h. */
14911
14912/* Override any GCC internal prototype to avoid an error.
14913 Use char because int might match the return type of a GCC
14914 builtin and then its argument prototype would still apply. */
14915#ifdef __cplusplus
14916extern "C"
14917#endif
14918char rl_resize_terminal ();
14919int
14920main ()
14921{
14922return rl_resize_terminal ();
14923 ;
14924 return 0;
14925}
14926_ACEOF
14927if ac_fn_c_try_link "$LINENO"; then :
14928 ac_cv_lib_readline_rl_resize_terminal=yes
14929else
14930 ac_cv_lib_readline_rl_resize_terminal=no
14931fi
14932rm -f core conftest.err conftest.$ac_objext \
14933 conftest$ac_exeext conftest.$ac_ext
14934LIBS=$ac_check_lib_save_LIBS
14935fi
14936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14937$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14938if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14939
14940$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14941
14942fi
14943
14944
Martin v. Löwis0daad592001-09-30 21:09:59 +000014945# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14947$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014948if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014950else
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014952LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956/* Override any GCC internal prototype to avoid an error.
14957 Use char because int might match the return type of a GCC
14958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014959#ifdef __cplusplus
14960extern "C"
14961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014962char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014963int
14964main ()
14965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 ;
14968 return 0;
14969}
14970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014973else
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014976rm -f core conftest.err conftest.$ac_objext \
14977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014978LIBS=$ac_check_lib_save_LIBS
14979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14981$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014982if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014983
Matthias Kloseb9621712010-04-24 17:59:49 +000014984$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014985
Guido van Rossum353ae582001-07-10 16:45:32 +000014986fi
14987
Jack Jansendd19cf82001-12-06 22:36:17 +000014988
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014989# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014991/* end confdefs.h. */
14992#include <readline/readline.h>
14993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014994if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014995 have_readline=yes
14996else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014997 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014998
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014999fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015000rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015001if test $have_readline = yes
15002then
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015004/* end confdefs.h. */
15005#include <readline/readline.h>
15006
15007_ACEOF
15008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015012
15013fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015014rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015015
15016fi
15017
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15019$as_echo_n "checking for append_history in -lreadline... " >&6; }
15020if ${ac_cv_lib_readline_append_history+:} false; then :
15021 $as_echo_n "(cached) " >&6
15022else
15023 ac_check_lib_save_LIBS=$LIBS
15024LIBS="-lreadline $READLINE_LIBS $LIBS"
15025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15026/* end confdefs.h. */
15027
15028/* Override any GCC internal prototype to avoid an error.
15029 Use char because int might match the return type of a GCC
15030 builtin and then its argument prototype would still apply. */
15031#ifdef __cplusplus
15032extern "C"
15033#endif
15034char append_history ();
15035int
15036main ()
15037{
15038return append_history ();
15039 ;
15040 return 0;
15041}
15042_ACEOF
15043if ac_fn_c_try_link "$LINENO"; then :
15044 ac_cv_lib_readline_append_history=yes
15045else
15046 ac_cv_lib_readline_append_history=no
15047fi
15048rm -f core conftest.err conftest.$ac_objext \
15049 conftest$ac_exeext conftest.$ac_ext
15050LIBS=$ac_check_lib_save_LIBS
15051fi
15052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15053$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15054if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15055
15056$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15057
15058fi
15059
15060
Martin v. Löwis82bca632006-02-10 20:49:30 +000015061# End of readline checks: restore LIBS
15062LIBS=$LIBS_no_readline
15063
Matthias Kloseb9621712010-04-24 17:59:49 +000015064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15065$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015066if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015068else
Martin v. Löwis11437992002-04-12 09:54:03 +000015069
Matthias Kloseb9621712010-04-24 17:59:49 +000015070if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015071 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015074/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015075
15076int main()
15077{
15078 int val1 = nice(1);
15079 if (val1 != -1 && val1 == nice(2))
15080 exit(0);
15081 exit(1);
15082}
15083
Martin v. Löwis11437992002-04-12 09:54:03 +000015084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015085if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015086 ac_cv_broken_nice=yes
15087else
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015092fi
15093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094fi
15095
Matthias Kloseb9621712010-04-24 17:59:49 +000015096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15097$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015098if test "$ac_cv_broken_nice" = yes
15099then
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015102
15103fi
15104
Matthias Kloseb9621712010-04-24 17:59:49 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15106$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015107if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015109else
Matthias Kloseb9621712010-04-24 17:59:49 +000015110 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015111 ac_cv_broken_poll=no
15112else
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015114/* end confdefs.h. */
15115
15116#include <poll.h>
15117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015118int main()
15119{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015120 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015121 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015122
15123 close (42);
15124
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015125 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015126 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015127 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015128 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015129 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015130 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015131 return 1;
15132}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015133
15134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015135if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015136 ac_cv_broken_poll=yes
15137else
Matthias Kloseb9621712010-04-24 17:59:49 +000015138 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15141 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015144fi
15145
Matthias Kloseb9621712010-04-24 17:59:49 +000015146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15147$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015148if test "$ac_cv_broken_poll" = yes
15149then
15150
Matthias Kloseb9621712010-04-24 17:59:49 +000015151$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015152
15153fi
15154
Brett Cannon43802422005-02-10 20:48:03 +000015155# 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 +000015156# (which is not required by ISO C or UNIX spec) and/or if we support
15157# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015158ac_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 +000015159#include <$ac_cv_struct_tm>
15160
Matthias Kloseb9621712010-04-24 17:59:49 +000015161"
Victor Stinnere0be4232011-10-25 13:06:09 +020015162if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015163
15164cat >>confdefs.h <<_ACEOF
15165#define HAVE_STRUCT_TM_TM_ZONE 1
15166_ACEOF
15167
15168
15169fi
15170
15171if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015174
15175else
Matthias Kloseb9621712010-04-24 17:59:49 +000015176 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15177"
Victor Stinnere0be4232011-10-25 13:06:09 +020015178if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180else
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182fi
15183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015185#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186_ACEOF
15187
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15189$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015190if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192else
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015194/* end confdefs.h. */
15195#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196#if !HAVE_DECL_TZNAME
15197extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015198#endif
15199
15200int
15201main ()
15202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015204 ;
15205 return 0;
15206}
15207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015208if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015209 ac_cv_var_tzname=yes
15210else
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015213rm -f core conftest.err conftest.$ac_objext \
15214 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15217$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015218 if test $ac_cv_var_tzname = yes; then
15219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015221
15222 fi
15223fi
15224
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015225
Martin v. Löwis1d459062005-03-14 21:23:33 +000015226# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15228$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015229if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015231else
15232
Matthias Kloseb9621712010-04-24 17:59:49 +000015233if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015234 ac_cv_working_tzset=no
15235else
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015237/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015238
15239#include <stdlib.h>
15240#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015241#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015242
15243#if HAVE_TZNAME
15244extern char *tzname[];
15245#endif
15246
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015247int main()
15248{
Brett Cannon18367812003-09-19 00:59:16 +000015249 /* Note that we need to ensure that not only does tzset(3)
15250 do 'something' with localtime, but it works as documented
15251 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015252 This includes making sure that tzname is set properly if
15253 tm->tm_zone does not exist since it is the alternative way
15254 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015255
15256 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015257 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015258 */
15259
Martin v. Löwis1d459062005-03-14 21:23:33 +000015260 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015261 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15262
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015263 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015264 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015265 if (localtime(&groundhogday)->tm_hour != 0)
15266 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015267#if HAVE_TZNAME
15268 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15269 if (strcmp(tzname[0], "UTC") ||
15270 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15271 exit(1);
15272#endif
Brett Cannon18367812003-09-19 00:59:16 +000015273
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015274 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015275 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015276 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015277 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015278#if HAVE_TZNAME
15279 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15280 exit(1);
15281#endif
Brett Cannon18367812003-09-19 00:59:16 +000015282
15283 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15284 tzset();
15285 if (localtime(&groundhogday)->tm_hour != 11)
15286 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015287#if HAVE_TZNAME
15288 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15289 exit(1);
15290#endif
15291
15292#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015293 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15294 exit(1);
15295 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15296 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015297#endif
Brett Cannon18367812003-09-19 00:59:16 +000015298
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015299 exit(0);
15300}
15301
15302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015303if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015304 ac_cv_working_tzset=yes
15305else
Matthias Kloseb9621712010-04-24 17:59:49 +000015306 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015310fi
15311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312fi
15313
Matthias Kloseb9621712010-04-24 17:59:49 +000015314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15315$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015316if test "$ac_cv_working_tzset" = yes
15317then
15318
Matthias Kloseb9621712010-04-24 17:59:49 +000015319$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015320
15321fi
15322
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015323# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15325$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015326if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015328else
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015330/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015331#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015332int
15333main ()
15334{
15335
15336struct stat st;
15337st.st_mtim.tv_nsec = 1;
15338
15339 ;
15340 return 0;
15341}
15342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015344 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015345else
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15349fi
15350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15352$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015353if test "$ac_cv_stat_tv_nsec" = yes
15354then
15355
Matthias Kloseb9621712010-04-24 17:59:49 +000015356$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015357
15358fi
15359
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015360# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15362$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015363if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015365else
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015367/* end confdefs.h. */
15368#include <sys/stat.h>
15369int
15370main ()
15371{
15372
15373struct stat st;
15374st.st_mtimespec.tv_nsec = 1;
15375
15376 ;
15377 return 0;
15378}
15379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015381 ac_cv_stat_tv_nsec2=yes
15382else
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15386fi
15387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15389$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015390if test "$ac_cv_stat_tv_nsec2" = yes
15391then
15392
Matthias Kloseb9621712010-04-24 17:59:49 +000015393$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015394
15395fi
15396
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015397# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015398ac_save_cppflags="$CPPFLAGS"
15399CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015400
15401for ac_header in curses.h ncurses.h
15402do :
15403 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15404ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15405if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15406 cat >>confdefs.h <<_ACEOF
15407#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15408_ACEOF
15409
15410fi
15411
15412done
15413
15414
15415# On Solaris, term.h requires curses.h
15416for ac_header in term.h
15417do :
15418 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15419#ifdef HAVE_CURSES_H
15420#include <curses.h>
15421#endif
15422
15423"
15424if test "x$ac_cv_header_term_h" = xyes; then :
15425 cat >>confdefs.h <<_ACEOF
15426#define HAVE_TERM_H 1
15427_ACEOF
15428
15429fi
15430
15431done
15432
15433
Jack Jansen666b1e72001-10-31 12:11:48 +000015434# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15436$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015437if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015438 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015439else
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015441/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015442#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015443int
15444main ()
15445{
Jack Jansen666b1e72001-10-31 12:11:48 +000015446
15447 int rtn;
15448 rtn = mvwdelch(0,0,0);
15449
Martin v. Löwis11437992002-04-12 09:54:03 +000015450 ;
15451 return 0;
15452}
15453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015454if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015455 ac_cv_mvwdelch_is_expression=yes
15456else
Matthias Kloseb9621712010-04-24 17:59:49 +000015457 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15460fi
15461
Matthias Kloseb9621712010-04-24 17:59:49 +000015462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15463$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015464
15465if test "$ac_cv_mvwdelch_is_expression" = yes
15466then
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015469
15470fi
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15473$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015474if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015476else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015478/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015479#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015480int
15481main ()
15482{
Jack Jansen666b1e72001-10-31 12:11:48 +000015483
15484 WINDOW *w;
15485 w->_flags = 0;
15486
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 ;
15488 return 0;
15489}
15490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015491if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015492 ac_cv_window_has_flags=yes
15493else
Matthias Kloseb9621712010-04-24 17:59:49 +000015494 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15497fi
15498
Matthias Kloseb9621712010-04-24 17:59:49 +000015499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15500$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015501
Jack Jansen666b1e72001-10-31 12:11:48 +000015502
15503if test "$ac_cv_window_has_flags" = yes
15504then
Martin v. Löwis11437992002-04-12 09:54:03 +000015505
Matthias Kloseb9621712010-04-24 17:59:49 +000015506$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015507
15508fi
15509
Matthias Kloseb9621712010-04-24 17:59:49 +000015510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15511$as_echo_n "checking for is_term_resized... " >&6; }
15512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015513/* end confdefs.h. */
15514#include <curses.h>
15515int
15516main ()
15517{
15518void *x=is_term_resized
15519 ;
15520 return 0;
15521}
15522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015524
Matthias Kloseb9621712010-04-24 17:59:49 +000015525$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015526
Matthias Kloseb159a552010-04-25 21:00:44 +000015527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015528$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015529else
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15531$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015532
15533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15535
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15537$as_echo_n "checking for resize_term... " >&6; }
15538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015539/* end confdefs.h. */
15540#include <curses.h>
15541int
15542main ()
15543{
15544void *x=resize_term
15545 ;
15546 return 0;
15547}
15548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015549if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015550
Matthias Kloseb9621712010-04-24 17:59:49 +000015551$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015552
Matthias Kloseb159a552010-04-25 21:00:44 +000015553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015554$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015555else
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15557$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015558
15559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15561
Matthias Kloseb9621712010-04-24 17:59:49 +000015562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15563$as_echo_n "checking for resizeterm... " >&6; }
15564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015565/* end confdefs.h. */
15566#include <curses.h>
15567int
15568main ()
15569{
15570void *x=resizeterm
15571 ;
15572 return 0;
15573}
15574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015575if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015578
Matthias Kloseb159a552010-04-25 21:00:44 +000015579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015580$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015581else
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15583$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015584
15585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015587# last curses configure check
15588CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15591$as_echo "$as_me: checking for device files" >&6;}
15592
15593if test "x$cross_compiling" = xyes; then
15594 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15596$as_echo_n "checking for /dev/ptmx... " >&6; }
15597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15598$as_echo "not set" >&6; }
15599 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15600 fi
15601 if test "${ac_cv_file__dev_ptc+set}" != set; then
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15603$as_echo_n "checking for /dev/ptc... " >&6; }
15604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15605$as_echo "not set" >&6; }
15606 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15607 fi
15608fi
15609
Matthias Kloseb9621712010-04-24 17:59:49 +000015610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15611$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015612if ${ac_cv_file__dev_ptmx+:} false; then :
15613 $as_echo_n "(cached) " >&6
15614else
15615 test "$cross_compiling" = yes &&
15616 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15617if test -r "/dev/ptmx"; then
15618 ac_cv_file__dev_ptmx=yes
15619else
15620 ac_cv_file__dev_ptmx=no
15621fi
15622fi
15623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15624$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15625if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015626
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015627fi
15628
15629if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015630
Matthias Kloseb9621712010-04-24 17:59:49 +000015631$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015632
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15635$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015636if ${ac_cv_file__dev_ptc+:} false; then :
15637 $as_echo_n "(cached) " >&6
15638else
15639 test "$cross_compiling" = yes &&
15640 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15641if test -r "/dev/ptc"; then
15642 ac_cv_file__dev_ptc=yes
15643else
15644 ac_cv_file__dev_ptc=no
15645fi
15646fi
15647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15648$as_echo "$ac_cv_file__dev_ptc" >&6; }
15649if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015650
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015651fi
15652
15653if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015654
Matthias Kloseb9621712010-04-24 17:59:49 +000015655$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015656
Neal Norwitz865400f2003-03-21 01:42:58 +000015657fi
15658
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015659if test $ac_sys_system = Darwin
15660then
15661 LIBS="$LIBS -framework CoreFoundation"
15662fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15665$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015666if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015668else
Matthias Kloseb9621712010-04-24 17:59:49 +000015669 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015670 ac_cv_have_size_t_format="cross -- assuming yes"
15671
Thomas Wouters477c8d52006-05-27 19:21:47 +000015672else
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015674/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015675
Thomas Wouters477c8d52006-05-27 19:21:47 +000015676#include <stdio.h>
15677#include <stddef.h>
15678#include <string.h>
15679
Christian Heimes2c181612007-12-17 20:04:13 +000015680#ifdef HAVE_SYS_TYPES_H
15681#include <sys/types.h>
15682#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015683
15684#ifdef HAVE_SSIZE_T
15685typedef ssize_t Py_ssize_t;
15686#elif SIZEOF_VOID_P == SIZEOF_LONG
15687typedef long Py_ssize_t;
15688#else
15689typedef int Py_ssize_t;
15690#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015691
Christian Heimes2c181612007-12-17 20:04:13 +000015692int main()
15693{
15694 char buffer[256];
15695
Thomas Wouters477c8d52006-05-27 19:21:47 +000015696 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15697 return 1;
15698
Thomas Wouters89f507f2006-12-13 04:49:30 +000015699 if (strcmp(buffer, "123"))
15700 return 1;
15701
15702 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15703 return 1;
15704
15705 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015706 return 1;
15707
15708 return 0;
15709}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015710
Thomas Wouters477c8d52006-05-27 19:21:47 +000015711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015713 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015719fi
15720
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15723$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015724if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015727
15728fi
15729
Matthias Kloseb9621712010-04-24 17:59:49 +000015730ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015731#ifdef HAVE_SYS_TYPES_H
15732#include <sys/types.h>
15733#endif
15734#ifdef HAVE_SYS_SOCKET_H
15735#include <sys/socket.h>
15736#endif
15737
Matthias Kloseb9621712010-04-24 17:59:49 +000015738"
Victor Stinnere0be4232011-10-25 13:06:09 +020015739if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015740
Martin v. Löwis11437992002-04-12 09:54:03 +000015741else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015742
Matthias Kloseb9621712010-04-24 17:59:49 +000015743$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015744
15745fi
15746
Michael W. Hudson54241132001-12-07 15:38:26 +000015747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15749$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015750if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015752else
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015754 ac_cv_broken_mbstowcs=no
15755else
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015757/* end confdefs.h. */
15758
Stefan Krah19c21392012-11-22 23:47:32 +010015759#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015760#include<stdlib.h>
15761int main() {
15762 size_t len = -1;
15763 const char *str = "text";
15764 len = mbstowcs(NULL, str, 0);
15765 return (len != 4);
15766}
15767
15768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015769if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015770 ac_cv_broken_mbstowcs=no
15771else
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15775 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015776fi
15777
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015778fi
15779
Matthias Kloseb9621712010-04-24 17:59:49 +000015780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15781$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015782if test "$ac_cv_broken_mbstowcs" = yes
15783then
15784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015786
15787fi
15788
Antoine Pitroub52ec782009-01-25 16:34:23 +000015789# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15791$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015792
15793# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015794if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015795 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015796if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015797then
15798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15802$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015803fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015804if test "$withval" = no
15805then
15806
15807$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15808
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15810$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015811fi
15812
Antoine Pitrou042b1282010-08-13 21:15:58 +000015813else
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15815$as_echo "no value specified" >&6; }
15816fi
15817
Antoine Pitroub52ec782009-01-25 16:34:23 +000015818
Matthias Kloseb17289e2012-03-15 19:51:34 +010015819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15820$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15821if ${ac_cv_computed_gotos+:} false; then :
15822 $as_echo_n "(cached) " >&6
15823else
15824 if test "$cross_compiling" = yes; then :
15825 if test "${with_computed_gotos+set}" = set; then
15826 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15827 else
15828 ac_cv_computed_gotos=no
15829 fi
15830else
15831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15832/* end confdefs.h. */
15833
15834int main(int argc, char **argv)
15835{
15836 static void *targets[1] = { &&LABEL1 };
15837 goto LABEL2;
15838LABEL1:
15839 return 0;
15840LABEL2:
15841 goto *targets[0];
15842 return 1;
15843}
15844
15845_ACEOF
15846if ac_fn_c_try_run "$LINENO"; then :
15847 ac_cv_computed_gotos=yes
15848else
15849 ac_cv_computed_gotos=no
15850fi
15851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15852 conftest.$ac_objext conftest.beam conftest.$ac_ext
15853fi
15854
15855fi
15856
15857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15858$as_echo "$ac_cv_computed_gotos" >&6; }
15859case "$ac_cv_computed_gotos" in yes*)
15860
15861$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15862
15863esac
15864
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015865case $ac_sys_system in
15866AIX*)
15867
15868$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15869 ;;
15870esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015871
Michael W. Hudson54241132001-12-07 15:38:26 +000015872
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015873
15874
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015875for h in `(cd $srcdir;echo Python/thread_*.h)`
15876do
15877 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15878done
15879
Michael W. Hudson54241132001-12-07 15:38:26 +000015880
Ned Deily0db50cf2014-07-25 12:41:31 -070015881SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15883$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015884for dir in $SRCDIRS; do
15885 if test ! -d $dir; then
15886 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015887 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015888done
Matthias Kloseb9621712010-04-24 17:59:49 +000015889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15890$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015891
Stefan Krah1919b7e2012-03-21 18:25:23 +010015892# Availability of -O2:
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15894$as_echo_n "checking for -O2... " >&6; }
15895saved_cflags="$CFLAGS"
15896CFLAGS="-O2"
15897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15898/* end confdefs.h. */
15899
15900int
15901main ()
15902{
15903
15904
15905 ;
15906 return 0;
15907}
15908_ACEOF
15909if ac_fn_c_try_compile "$LINENO"; then :
15910 have_O2=yes
15911else
15912 have_O2=no
15913fi
15914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15916$as_echo "$have_O2" >&6; }
15917CFLAGS="$saved_cflags"
15918
15919# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15920# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15922$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15923saved_cflags="$CFLAGS"
15924CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15925if test "$have_O2" = no; then
15926 CFLAGS=""
15927fi
15928if test "$cross_compiling" = yes; then :
15929 have_glibc_memmove_bug=undefined
15930else
15931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15932/* end confdefs.h. */
15933
15934#include <stdio.h>
15935#include <stdlib.h>
15936#include <string.h>
15937void foo(void *p, void *q) { memmove(p, q, 19); }
15938int main() {
15939 char a[32] = "123456789000000000";
15940 foo(&a[9], a);
15941 if (strcmp(a, "123456789123456789000000000") != 0)
15942 return 1;
15943 foo(a, &a[9]);
15944 if (strcmp(a, "123456789000000000") != 0)
15945 return 1;
15946 return 0;
15947}
15948
15949_ACEOF
15950if ac_fn_c_try_run "$LINENO"; then :
15951 have_glibc_memmove_bug=no
15952else
15953 have_glibc_memmove_bug=yes
15954fi
15955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15956 conftest.$ac_objext conftest.beam conftest.$ac_ext
15957fi
15958
15959CFLAGS="$saved_cflags"
15960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15961$as_echo "$have_glibc_memmove_bug" >&6; }
15962if test "$have_glibc_memmove_bug" = yes; then
15963
15964$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15965
15966fi
15967
15968if test "$have_gcc_asm_for_x87" = yes; then
15969 # Some versions of gcc miscompile inline asm:
15970 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15971 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15972 case $CC in
15973 *gcc*)
15974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15975$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15976 saved_cflags="$CFLAGS"
15977 CFLAGS="-O2"
15978 if test "$cross_compiling" = yes; then :
15979 have_ipa_pure_const_bug=undefined
15980else
15981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982/* end confdefs.h. */
15983
15984 __attribute__((noinline)) int
15985 foo(int *p) {
15986 int r;
15987 asm ( "movl \$6, (%1)\n\t"
15988 "xorl %0, %0\n\t"
15989 : "=r" (r) : "r" (p) : "memory"
15990 );
15991 return r;
15992 }
15993 int main() {
15994 int p = 8;
15995 if ((foo(&p) ? : p) != 6)
15996 return 1;
15997 return 0;
15998 }
15999
16000_ACEOF
16001if ac_fn_c_try_run "$LINENO"; then :
16002 have_ipa_pure_const_bug=no
16003else
16004 have_ipa_pure_const_bug=yes
16005fi
16006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16007 conftest.$ac_objext conftest.beam conftest.$ac_ext
16008fi
16009
16010 CFLAGS="$saved_cflags"
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16012$as_echo "$have_ipa_pure_const_bug" >&6; }
16013 if test "$have_ipa_pure_const_bug" = yes; then
16014
16015$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16016
16017 fi
16018 ;;
16019 esac
16020fi
16021
Victor Stinner4f5366e2015-01-09 02:13:19 +010016022# Check for stdatomic.h
16023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16024$as_echo_n "checking for stdatomic.h... " >&6; }
16025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16026/* end confdefs.h. */
16027
16028
16029 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016030 atomic_int value = ATOMIC_VAR_INIT(1);
16031 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016032 int main() {
16033 int loaded_value = atomic_load(&value);
16034 return 0;
16035 }
16036
16037
16038_ACEOF
16039if ac_fn_c_try_link "$LINENO"; then :
16040 have_stdatomic_h=yes
16041else
16042 have_stdatomic_h=no
16043fi
16044rm -f core conftest.err conftest.$ac_objext \
16045 conftest$ac_exeext conftest.$ac_ext
16046
16047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16048$as_echo "$have_stdatomic_h" >&6; }
16049
16050if test "$have_stdatomic_h" = yes; then
16051
16052$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16053
16054fi
16055
16056# Check for GCC >= 4.7 __atomic builtins
16057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16058$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16060/* end confdefs.h. */
16061
16062
16063 volatile int val = 1;
16064 int main() {
16065 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16066 return 0;
16067 }
16068
16069
16070_ACEOF
16071if ac_fn_c_try_link "$LINENO"; then :
16072 have_builtin_atomic=yes
16073else
16074 have_builtin_atomic=no
16075fi
16076rm -f core conftest.err conftest.$ac_objext \
16077 conftest$ac_exeext conftest.$ac_ext
16078
16079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16080$as_echo "$have_builtin_atomic" >&6; }
16081
16082if test "$have_builtin_atomic" = yes; then
16083
16084$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16085
16086fi
16087
Ned Deily322f5ba2013-11-21 23:01:59 -080016088# ensurepip option
16089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16090$as_echo_n "checking for ensurepip... " >&6; }
16091
16092# Check whether --with-ensurepip was given.
16093if test "${with_ensurepip+set}" = set; then :
16094 withval=$with_ensurepip;
16095else
16096 with_ensurepip=upgrade
16097fi
16098
16099case $with_ensurepip in #(
16100 yes|upgrade) :
16101 ENSUREPIP=upgrade ;; #(
16102 install) :
16103 ENSUREPIP=install ;; #(
16104 no) :
16105 ENSUREPIP=no ;; #(
16106 *) :
16107 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16108esac
16109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16110$as_echo "$ENSUREPIP" >&6; }
16111
16112
Victor Stinner35a97c02015-03-08 02:59:09 +010016113# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16115$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16117/* end confdefs.h. */
16118
16119
16120 #include <dirent.h>
16121
16122 int main() {
16123 struct dirent entry;
16124 return entry.d_type == DT_UNKNOWN;
16125 }
16126
16127
16128_ACEOF
16129if ac_fn_c_try_link "$LINENO"; then :
16130 have_dirent_d_type=yes
16131else
16132 have_dirent_d_type=no
16133fi
16134rm -f core conftest.err conftest.$ac_objext \
16135 conftest$ac_exeext conftest.$ac_ext
16136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16137$as_echo "$have_dirent_d_type" >&6; }
16138
16139if test "$have_dirent_d_type" = yes; then
16140
16141$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16142
16143fi
16144
Victor Stinner9eb57c52015-03-19 22:21:49 +010016145# check if the Linux getrandom() syscall is available
16146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16147$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16149/* end confdefs.h. */
16150
16151
Victor Stinner1b80b242016-04-12 22:34:58 +020016152 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016153 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016154 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016155
16156 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016157 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016158 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016159 const int flags = GRND_NONBLOCK;
16160 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016161 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016162 return 0;
16163 }
16164
16165
16166_ACEOF
16167if ac_fn_c_try_link "$LINENO"; then :
16168 have_getrandom_syscall=yes
16169else
16170 have_getrandom_syscall=no
16171fi
16172rm -f core conftest.err conftest.$ac_objext \
16173 conftest$ac_exeext conftest.$ac_ext
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16175$as_echo "$have_getrandom_syscall" >&6; }
16176
16177if test "$have_getrandom_syscall" = yes; then
16178
16179$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16180
16181fi
16182
Victor Stinner3abf44e2015-09-18 15:38:37 +020016183# check if the getrandom() function is available
16184# the test was written for the Solaris function of <sys/random.h>
16185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16186$as_echo_n "checking for the getrandom() function... " >&6; }
16187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16188/* end confdefs.h. */
16189
16190
16191 #include <sys/random.h>
16192
16193 int main() {
16194 char buffer[1];
16195 const size_t buflen = sizeof(buffer);
16196 const int flags = 0;
16197 /* ignore the result, Python checks for ENOSYS at runtime */
16198 (void)getrandom(buffer, buflen, flags);
16199 return 0;
16200 }
16201
16202
16203_ACEOF
16204if ac_fn_c_try_link "$LINENO"; then :
16205 have_getrandom=yes
16206else
16207 have_getrandom=no
16208fi
16209rm -f core conftest.err conftest.$ac_objext \
16210 conftest$ac_exeext conftest.$ac_ext
16211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16212$as_echo "$have_getrandom" >&6; }
16213
16214if test "$have_getrandom" = yes; then
16215
16216$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16217
16218fi
16219
Guido van Rossum627b2d71993-12-24 10:39:16 +000016220# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016221ac_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 +000016222
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016223ac_config_files="$ac_config_files Modules/ld_so_aix"
16224
Martin v. Löwis11437992002-04-12 09:54:03 +000016225cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016226# This file is a shell script that caches the results of configure
16227# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016228# scripts and configure runs, see configure's option --config-cache.
16229# It is not useful on other systems. If it contains results you don't
16230# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016231#
Martin v. Löwis11437992002-04-12 09:54:03 +000016232# config.status only pays attention to the cache file if you give it
16233# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016234#
Skip Montanaro6dead952003-09-25 14:50:04 +000016235# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016236# loading this file, other *unset* `ac_cv_foo' will be assigned the
16237# following values.
16238
16239_ACEOF
16240
Guido van Rossumf78abae1997-01-21 22:02:36 +000016241# The following way of writing the cache mishandles newlines in values,
16242# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016244# Ultrix sh set writes to stderr and can't be redirected directly,
16245# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246(
16247 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16248 eval ac_val=\$$ac_var
16249 case $ac_val in #(
16250 *${as_nl}*)
16251 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016252 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16253$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 esac
16255 case $ac_var in #(
16256 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016257 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16258 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259 esac ;;
16260 esac
16261 done
16262
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16265 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016266 # `set' does not quote correctly, so add quotes: double-quote
16267 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016269 "s/'/'\\\\''/g;
16270 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 *)
16273 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276 esac |
16277 sort
16278) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16284 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16286 :end' >>confcache
16287if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16288 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016289 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016290 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16291$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016292 if test ! -f "$cache_file" || test -h "$cache_file"; then
16293 cat confcache >"$cache_file"
16294 else
16295 case $cache_file in #(
16296 */* | ?:*)
16297 mv -f confcache "$cache_file"$$ &&
16298 mv -f "$cache_file"$$ "$cache_file" ;; #(
16299 *)
16300 mv -f confcache "$cache_file" ;;
16301 esac
16302 fi
16303 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016304 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016305 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16306$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016307 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016308fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016309rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016310
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016311test "x$prefix" = xNONE && prefix=$ac_default_prefix
16312# Let make expand exec_prefix.
16313test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016314
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016315DEFS=-DHAVE_CONFIG_H
16316
Skip Montanaro6dead952003-09-25 14:50:04 +000016317ac_libobjs=
16318ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016319U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016320for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16321 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16325 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16327 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016328done
16329LIBOBJS=$ac_libobjs
16330
16331LTLIBOBJS=$ac_ltlibobjs
16332
16333
Martin v. Löwis11437992002-04-12 09:54:03 +000016334
Matthias Kloseb9621712010-04-24 17:59:49 +000016335
Victor Stinnere0be4232011-10-25 13:06:09 +020016336: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016337ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016338ac_clean_files_save=$ac_clean_files
16339ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016340{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16341$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16342as_write_fail=0
16343cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016344#! $SHELL
16345# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016346# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016347# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016348# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016351ac_cs_recheck=false
16352ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016353
Matthias Kloseb9621712010-04-24 17:59:49 +000016354SHELL=\${CONFIG_SHELL-$SHELL}
16355export SHELL
16356_ASEOF
16357cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16358## -------------------- ##
16359## M4sh Initialization. ##
16360## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362# Be more Bourne compatible
16363DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016364if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016365 emulate sh
16366 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016367 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016368 # is contrary to our usage. Disable this feature.
16369 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016370 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016371else
Matthias Kloseb9621712010-04-24 17:59:49 +000016372 case `(set -o) 2>/dev/null` in #(
16373 *posix*) :
16374 set -o posix ;; #(
16375 *) :
16376 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016378fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016379
16380
Matthias Kloseb9621712010-04-24 17:59:49 +000016381as_nl='
16382'
16383export as_nl
16384# Printing a long string crashes Solaris 7 /usr/bin/printf.
16385as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16386as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16387as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16388# Prefer a ksh shell builtin over an external printf program on Solaris,
16389# but without wasting forks for bash or zsh.
16390if test -z "$BASH_VERSION$ZSH_VERSION" \
16391 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16392 as_echo='print -r --'
16393 as_echo_n='print -rn --'
16394elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16395 as_echo='printf %s\n'
16396 as_echo_n='printf %s'
16397else
16398 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16399 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16400 as_echo_n='/usr/ucb/echo -n'
16401 else
16402 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16403 as_echo_n_body='eval
16404 arg=$1;
16405 case $arg in #(
16406 *"$as_nl"*)
16407 expr "X$arg" : "X\\(.*\\)$as_nl";
16408 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16409 esac;
16410 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16411 '
16412 export as_echo_n_body
16413 as_echo_n='sh -c $as_echo_n_body as_echo'
16414 fi
16415 export as_echo_body
16416 as_echo='sh -c $as_echo_body as_echo'
16417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016418
16419# The user is always right.
16420if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016421 PATH_SEPARATOR=:
16422 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16423 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16424 PATH_SEPARATOR=';'
16425 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428
16429# IFS
16430# We need space, tab and new line, in precisely that order. Quoting is
16431# there to prevent editors from complaining about space-tab.
16432# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16433# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434IFS=" "" $as_nl"
16435
16436# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016437as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016438case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016439 *[\\/]* ) as_myself=$0 ;;
16440 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016441for as_dir in $PATH
16442do
16443 IFS=$as_save_IFS
16444 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016445 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449 ;;
16450esac
16451# We did not find ourselves, most probably we were run as `sh COMMAND'
16452# in which case we are not to be found in the path.
16453if test "x$as_myself" = x; then
16454 as_myself=$0
16455fi
16456if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016457 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16458 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016459fi
16460
Matthias Kloseb9621712010-04-24 17:59:49 +000016461# Unset variables that we do not need and which cause bugs (e.g. in
16462# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16463# suppresses any "Segmentation fault" message there. '((' could
16464# trigger a bug in pdksh 5.2.14.
16465for as_var in BASH_ENV ENV MAIL MAILPATH
16466do eval test x\${$as_var+set} = xset \
16467 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016468done
16469PS1='$ '
16470PS2='> '
16471PS4='+ '
16472
16473# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016474LC_ALL=C
16475export LC_ALL
16476LANGUAGE=C
16477export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479# CDPATH.
16480(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16481
16482
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016483# as_fn_error STATUS ERROR [LINENO LOG_FD]
16484# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016485# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16486# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016487# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016488as_fn_error ()
16489{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016490 as_status=$1; test $as_status -eq 0 && as_status=1
16491 if test "$4"; then
16492 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16493 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016494 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016495 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016496 as_fn_exit $as_status
16497} # as_fn_error
16498
16499
16500# as_fn_set_status STATUS
16501# -----------------------
16502# Set $? to STATUS, without forking.
16503as_fn_set_status ()
16504{
16505 return $1
16506} # as_fn_set_status
16507
16508# as_fn_exit STATUS
16509# -----------------
16510# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16511as_fn_exit ()
16512{
16513 set +e
16514 as_fn_set_status $1
16515 exit $1
16516} # as_fn_exit
16517
16518# as_fn_unset VAR
16519# ---------------
16520# Portably unset VAR.
16521as_fn_unset ()
16522{
16523 { eval $1=; unset $1;}
16524}
16525as_unset=as_fn_unset
16526# as_fn_append VAR VALUE
16527# ----------------------
16528# Append the text in VALUE to the end of the definition contained in VAR. Take
16529# advantage of any shell optimizations that allow amortized linear growth over
16530# repeated appends, instead of the typical quadratic growth present in naive
16531# implementations.
16532if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16533 eval 'as_fn_append ()
16534 {
16535 eval $1+=\$2
16536 }'
16537else
16538 as_fn_append ()
16539 {
16540 eval $1=\$$1\$2
16541 }
16542fi # as_fn_append
16543
16544# as_fn_arith ARG...
16545# ------------------
16546# Perform arithmetic evaluation on the ARGs, and store the result in the
16547# global $as_val. Take advantage of shells that can avoid forks. The arguments
16548# must be portable across $(()) and expr.
16549if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16550 eval 'as_fn_arith ()
16551 {
16552 as_val=$(( $* ))
16553 }'
16554else
16555 as_fn_arith ()
16556 {
16557 as_val=`expr "$@" || test $? -eq 1`
16558 }
16559fi # as_fn_arith
16560
16561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562if expr a : '\(a\)' >/dev/null 2>&1 &&
16563 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16564 as_expr=expr
16565else
16566 as_expr=false
16567fi
16568
16569if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16570 as_basename=basename
16571else
16572 as_basename=false
16573fi
16574
Matthias Kloseb9621712010-04-24 17:59:49 +000016575if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16576 as_dirname=dirname
16577else
16578 as_dirname=false
16579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581as_me=`$as_basename -- "$0" ||
16582$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16583 X"$0" : 'X\(//\)$' \| \
16584 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016585$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016586 sed '/^.*\/\([^/][^/]*\)\/*$/{
16587 s//\1/
16588 q
16589 }
16590 /^X\/\(\/\/\)$/{
16591 s//\1/
16592 q
16593 }
16594 /^X\/\(\/\).*/{
16595 s//\1/
16596 q
16597 }
16598 s/.*/./; q'`
16599
Matthias Kloseb9621712010-04-24 17:59:49 +000016600# Avoid depending upon Character Ranges.
16601as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16602as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16603as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16604as_cr_digits='0123456789'
16605as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606
16607ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016608case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016610 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016612 xy) ECHO_C='\c';;
16613 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16614 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615 esac;;
16616*)
16617 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016619
Martin v. Löwis11437992002-04-12 09:54:03 +000016620rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621if test -d conf$$.dir; then
16622 rm -f conf$$.dir/conf$$.file
16623else
16624 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016625 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016627if (echo >conf$$.file) 2>/dev/null; then
16628 if ln -s conf$$.file conf$$ 2>/dev/null; then
16629 as_ln_s='ln -s'
16630 # ... but there are two gotchas:
16631 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16632 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016633 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016634 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016635 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016636 elif ln conf$$.file conf$$ 2>/dev/null; then
16637 as_ln_s=ln
16638 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016639 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016641else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016642 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16645rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016646
Matthias Kloseb9621712010-04-24 17:59:49 +000016647
16648# as_fn_mkdir_p
16649# -------------
16650# Create "$as_dir" as a directory, including parents if necessary.
16651as_fn_mkdir_p ()
16652{
16653
16654 case $as_dir in #(
16655 -*) as_dir=./$as_dir;;
16656 esac
16657 test -d "$as_dir" || eval $as_mkdir_p || {
16658 as_dirs=
16659 while :; do
16660 case $as_dir in #(
16661 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16662 *) as_qdir=$as_dir;;
16663 esac
16664 as_dirs="'$as_qdir' $as_dirs"
16665 as_dir=`$as_dirname -- "$as_dir" ||
16666$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16667 X"$as_dir" : 'X\(//\)[^/]' \| \
16668 X"$as_dir" : 'X\(//\)$' \| \
16669 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16670$as_echo X"$as_dir" |
16671 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16672 s//\1/
16673 q
16674 }
16675 /^X\(\/\/\)[^/].*/{
16676 s//\1/
16677 q
16678 }
16679 /^X\(\/\/\)$/{
16680 s//\1/
16681 q
16682 }
16683 /^X\(\/\).*/{
16684 s//\1/
16685 q
16686 }
16687 s/.*/./; q'`
16688 test -d "$as_dir" && break
16689 done
16690 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016691 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016692
16693
16694} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016695if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016696 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016697else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016698 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016699 as_mkdir_p=false
16700fi
16701
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016702
16703# as_fn_executable_p FILE
16704# -----------------------
16705# Test if FILE is an executable regular file.
16706as_fn_executable_p ()
16707{
16708 test -f "$1" && test -x "$1"
16709} # as_fn_executable_p
16710as_test_x='test -x'
16711as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
16713# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016714as_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 +000016715
16716# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016717as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016718
16719
Martin v. Löwis11437992002-04-12 09:54:03 +000016720exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016721## ----------------------------------- ##
16722## Main body of $CONFIG_STATUS script. ##
16723## ----------------------------------- ##
16724_ASEOF
16725test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016726
Matthias Kloseb9621712010-04-24 17:59:49 +000016727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16728# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016729# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016730# values after options handling.
16731ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016732This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016733generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016734
16735 CONFIG_FILES = $CONFIG_FILES
16736 CONFIG_HEADERS = $CONFIG_HEADERS
16737 CONFIG_LINKS = $CONFIG_LINKS
16738 CONFIG_COMMANDS = $CONFIG_COMMANDS
16739 $ $0 $@
16740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741on `(hostname || uname -n) 2>/dev/null | sed 1q`
16742"
16743
Martin v. Löwis11437992002-04-12 09:54:03 +000016744_ACEOF
16745
Matthias Kloseb9621712010-04-24 17:59:49 +000016746case $ac_config_files in *"
16747"*) set x $ac_config_files; shift; ac_config_files=$*;;
16748esac
16749
16750case $ac_config_headers in *"
16751"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16752esac
16753
16754
16755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016756# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016757config_files="$ac_config_files"
16758config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016761
Matthias Kloseb9621712010-04-24 17:59:49 +000016762cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016763ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016764\`$as_me' instantiates files and other configuration actions
16765from templates according to the current configuration. Unless the files
16766and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016767
Matthias Kloseb9621712010-04-24 17:59:49 +000016768Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016769
16770 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016772 --config print configuration, then exit
16773 -q, --quiet, --silent
16774 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016775 -d, --debug don't remove temporary files
16776 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016777 --file=FILE[:TEMPLATE]
16778 instantiate the configuration file FILE
16779 --header=FILE[:TEMPLATE]
16780 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016781
16782Configuration files:
16783$config_files
16784
16785Configuration headers:
16786$config_headers
16787
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016788Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016791cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16792ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016793ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016794python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016795configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016796 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016798Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016799This config.status script is free software; the Free Software Foundation
16800gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801
16802ac_pwd='$ac_pwd'
16803srcdir='$srcdir'
16804INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016805MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016806test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016807_ACEOF
16808
Matthias Kloseb9621712010-04-24 17:59:49 +000016809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16810# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016811ac_need_defaults=:
16812while test $# != 0
16813do
16814 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016815 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16817 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016818 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016820 --*=)
16821 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16822 ac_optarg=
16823 ac_shift=:
16824 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016825 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016826 ac_option=$1
16827 ac_optarg=$2
16828 ac_shift=shift
16829 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016830 esac
16831
Skip Montanaro6dead952003-09-25 14:50:04 +000016832 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016833 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016834 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16835 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016836 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016837 $as_echo "$ac_cs_version"; exit ;;
16838 --config | --confi | --conf | --con | --co | --c )
16839 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 debug=: ;;
16842 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016843 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016844 case $ac_optarg in
16845 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016846 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016847 esac
16848 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016849 ac_need_defaults=false;;
16850 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016851 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016852 case $ac_optarg in
16853 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16854 esac
16855 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016857 --he | --h)
16858 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016859 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016860Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016862 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016863 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16864 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16865 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016866
16867 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016868 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016869Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016870
Matthias Kloseb9621712010-04-24 17:59:49 +000016871 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016873
16874 esac
16875 shift
16876done
16877
Skip Montanaro6dead952003-09-25 14:50:04 +000016878ac_configure_extra_args=
16879
16880if $ac_cs_silent; then
16881 exec 6>/dev/null
16882 ac_configure_extra_args="$ac_configure_extra_args --silent"
16883fi
16884
16885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016886cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016887if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016888 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016889 shift
16890 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16891 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016892 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016893 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016894fi
16895
Martin v. Löwis11437992002-04-12 09:54:03 +000016896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016897cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898exec 5>>config.log
16899{
16900 echo
16901 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16902## Running $as_me. ##
16903_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016910
Matthias Kloseb9621712010-04-24 17:59:49 +000016911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912
16913# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016914for ac_config_target in $ac_config_targets
16915do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916 case $ac_config_target in
16917 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16918 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16919 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016920 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16921 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16923 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016924 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016925 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016926 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927
Victor Stinnere0be4232011-10-25 13:06:09 +020016928 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016929 esac
16930done
16931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932
Martin v. Löwis11437992002-04-12 09:54:03 +000016933# If the user did not use the arguments to specify the items to instantiate,
16934# then the envvar interface is used. Set only those that are not.
16935# We use the long form for the default assignment because of an extremely
16936# bizarre bug on SunOS 4.1.3.
16937if $ac_need_defaults; then
16938 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16939 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16940fi
16941
Skip Montanaro6dead952003-09-25 14:50:04 +000016942# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016944# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945# Hook for its removal unless debugging.
16946# Note that there is a small window in which the directory will not be cleaned:
16947# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016948$debug ||
16949{
Victor Stinnere0be4232011-10-25 13:06:09 +020016950 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016952 : "${ac_tmp:=$tmp}"
16953 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016954' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016955 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016956}
Martin v. Löwis11437992002-04-12 09:54:03 +000016957# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016958
Martin v. Löwis11437992002-04-12 09:54:03 +000016959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016961 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016962} ||
16963{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016964 tmp=./conf$$-$RANDOM
16965 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016966} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016967ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016968
Matthias Kloseb9621712010-04-24 17:59:49 +000016969# Set up the scripts for CONFIG_FILES section.
16970# No need to generate them if there are no CONFIG_FILES.
16971# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016973
Matthias Kloseb9621712010-04-24 17:59:49 +000016974
16975ac_cr=`echo X | tr X '\015'`
16976# On cygwin, bash can eat \r inside `` if the user requested igncr.
16977# But we know of no other shell where ac_cr would be empty at this
16978# point, so we can use a bashism as a fallback.
16979if test "x$ac_cr" = x; then
16980 eval ac_cr=\$\'\\r\'
16981fi
16982ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16983if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016984 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016985else
16986 ac_cs_awk_cr=$ac_cr
16987fi
16988
Victor Stinnere0be4232011-10-25 13:06:09 +020016989echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016990_ACEOF
16991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992
Matthias Kloseb9621712010-04-24 17:59:49 +000016993{
16994 echo "cat >conf$$subs.awk <<_ACEOF" &&
16995 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16996 echo "_ACEOF"
16997} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016998 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16999ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000ac_delim='%!_!# '
17001for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017002 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017003 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004
Matthias Kloseb9621712010-04-24 17:59:49 +000017005 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17006 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007 break
17008 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017009 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010 else
17011 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013done
Matthias Kloseb9621712010-04-24 17:59:49 +000017014rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017017cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017019sed -n '
17020h
17021s/^/S["/; s/!.*/"]=/
17022p
17023g
17024s/^[^!]*!//
17025:repl
17026t repl
17027s/'"$ac_delim"'$//
17028t delim
17029:nl
17030h
17031s/\(.\{148\}\)..*/\1/
17032t more1
17033s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17034p
17035n
17036b repl
17037:more1
17038s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17039p
17040g
17041s/.\{148\}//
17042t nl
17043:delim
17044h
17045s/\(.\{148\}\)..*/\1/
17046t more2
17047s/["\\]/\\&/g; s/^/"/; s/$/"/
17048p
17049b
17050:more2
17051s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17052p
17053g
17054s/.\{148\}//
17055t delim
17056' <conf$$subs.awk | sed '
17057/^[^""]/{
17058 N
17059 s/\n//
17060}
17061' >>$CONFIG_STATUS || ac_write_fail=1
17062rm -f conf$$subs.awk
17063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17064_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017065cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017066 for (key in S) S_is_set[key] = 1
17067 FS = ""
17068
17069}
17070{
17071 line = $ 0
17072 nfields = split(line, field, "@")
17073 substed = 0
17074 len = length(field[1])
17075 for (i = 2; i < nfields; i++) {
17076 key = field[i]
17077 keylen = length(key)
17078 if (S_is_set[key]) {
17079 value = S[key]
17080 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17081 len += length(value) + length(field[++i])
17082 substed = 1
17083 } else
17084 len += 1 + keylen
17085 }
17086
17087 print line
17088}
17089
17090_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17093if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17094 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17095else
17096 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017097fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017098 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017099_ACEOF
17100
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017101# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17102# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103# trailing colons and then remove the whole line if VPATH becomes empty
17104# (actually we leave an empty line to preserve line numbers).
17105if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017106 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17107h
17108s///
17109s/^/:/
17110s/[ ]*$/:/
17111s/:\$(srcdir):/:/g
17112s/:\${srcdir}:/:/g
17113s/:@srcdir@:/:/g
17114s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017116x
17117s/\(=[ ]*\).*/\1/
17118G
17119s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120s/^[^=]*=[ ]*$//
17121}'
17122fi
17123
Matthias Kloseb9621712010-04-24 17:59:49 +000017124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017125fi # test -n "$CONFIG_FILES"
17126
Matthias Kloseb9621712010-04-24 17:59:49 +000017127# Set up the scripts for CONFIG_HEADERS section.
17128# No need to generate them if there are no CONFIG_HEADERS.
17129# This happens for instance with `./config.status Makefile'.
17130if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017131cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017132BEGIN {
17133_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135# Transform confdefs.h into an awk script `defines.awk', embedded as
17136# here-document in config.status, that substitutes the proper values into
17137# config.h.in to produce config.h.
17138
17139# Create a delimiter string that does not exist in confdefs.h, to ease
17140# handling of long lines.
17141ac_delim='%!_!# '
17142for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017143 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17144 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017145 break
17146 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017147 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017148 else
17149 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17150 fi
17151done
17152
17153# For the awk script, D is an array of macro values keyed by name,
17154# likewise P contains macro parameters if any. Preserve backslash
17155# newline sequences.
17156
17157ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17158sed -n '
17159s/.\{148\}/&'"$ac_delim"'/g
17160t rset
17161:rset
17162s/^[ ]*#[ ]*define[ ][ ]*/ /
17163t def
17164d
17165:def
17166s/\\$//
17167t bsnl
17168s/["\\]/\\&/g
17169s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17170D["\1"]=" \3"/p
17171s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17172d
17173:bsnl
17174s/["\\]/\\&/g
17175s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17176D["\1"]=" \3\\\\\\n"\\/p
17177t cont
17178s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17179t cont
17180d
17181:cont
17182n
17183s/.\{148\}/&'"$ac_delim"'/g
17184t clear
17185:clear
17186s/\\$//
17187t bsnlc
17188s/["\\]/\\&/g; s/^/"/; s/$/"/p
17189d
17190:bsnlc
17191s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17192b cont
17193' <confdefs.h | sed '
17194s/'"$ac_delim"'/"\\\
17195"/g' >>$CONFIG_STATUS || ac_write_fail=1
17196
17197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17198 for (key in D) D_is_set[key] = 1
17199 FS = ""
17200}
17201/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17202 line = \$ 0
17203 split(line, arg, " ")
17204 if (arg[1] == "#") {
17205 defundef = arg[2]
17206 mac1 = arg[3]
17207 } else {
17208 defundef = substr(arg[1], 2)
17209 mac1 = arg[2]
17210 }
17211 split(mac1, mac2, "(") #)
17212 macro = mac2[1]
17213 prefix = substr(line, 1, index(line, defundef) - 1)
17214 if (D_is_set[macro]) {
17215 # Preserve the white space surrounding the "#".
17216 print prefix "define", macro P[macro] D[macro]
17217 next
17218 } else {
17219 # Replace #undef with comments. This is necessary, for example,
17220 # in the case of _POSIX_SOURCE, which is predefined and required
17221 # on some systems where configure will not decide to define it.
17222 if (defundef == "undef") {
17223 print "/*", prefix defundef, macro, "*/"
17224 next
17225 }
17226 }
17227}
17228{ print }
17229_ACAWK
17230_ACEOF
17231cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017232 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017233fi # test -n "$CONFIG_HEADERS"
17234
17235
17236eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17237shift
17238for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239do
17240 case $ac_tag in
17241 :[FHLC]) ac_mode=$ac_tag; continue;;
17242 esac
17243 case $ac_mode$ac_tag in
17244 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017245 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246 :[FH]-) ac_tag=-:-;;
17247 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17248 esac
17249 ac_save_IFS=$IFS
17250 IFS=:
17251 set x $ac_tag
17252 IFS=$ac_save_IFS
17253 shift
17254 ac_file=$1
17255 shift
17256
17257 case $ac_mode in
17258 :L) ac_source=$1;;
17259 :[FH])
17260 ac_file_inputs=
17261 for ac_f
17262 do
17263 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017264 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265 *) # Look for the file first in the build tree, then in the source tree
17266 # (if the path is not absolute). The absolute path cannot be DOS-style,
17267 # because $ac_f cannot contain `:'.
17268 test -f "$ac_f" ||
17269 case $ac_f in
17270 [\\/$]*) false;;
17271 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17272 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017273 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017275 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17276 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 done
17278
17279 # Let's still pretend it is `configure' which instantiates (i.e., don't
17280 # use $as_me), people would be surprised to read:
17281 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017282 configure_input='Generated from '`
17283 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17284 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285 if test x"$ac_file" != x-; then
17286 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017287 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17288$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017290 # Neutralize special characters interpreted by sed in replacement strings.
17291 case $configure_input in #(
17292 *\&* | *\|* | *\\* )
17293 ac_sed_conf_input=`$as_echo "$configure_input" |
17294 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17295 *) ac_sed_conf_input=$configure_input;;
17296 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297
17298 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017299 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17300 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 esac
17302 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017303 esac
17304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017306$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017307 X"$ac_file" : 'X\(//\)[^/]' \| \
17308 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017310$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17312 s//\1/
17313 q
17314 }
17315 /^X\(\/\/\)[^/].*/{
17316 s//\1/
17317 q
17318 }
17319 /^X\(\/\/\)$/{
17320 s//\1/
17321 q
17322 }
17323 /^X\(\/\).*/{
17324 s//\1/
17325 q
17326 }
17327 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017328 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 ac_builddir=.
17330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331case "$ac_dir" in
17332.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17333*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017336 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017337 case $ac_top_builddir_sub in
17338 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17339 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17340 esac ;;
17341esac
17342ac_abs_top_builddir=$ac_pwd
17343ac_abs_builddir=$ac_pwd$ac_dir_suffix
17344# for backward compatibility:
17345ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017346
17347case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350 ac_top_srcdir=$ac_top_builddir_sub
17351 ac_abs_top_srcdir=$ac_pwd ;;
17352 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017353 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354 ac_top_srcdir=$srcdir
17355 ac_abs_top_srcdir=$srcdir ;;
17356 *) # Relative name.
17357 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17358 ac_top_srcdir=$ac_top_build_prefix$srcdir
17359 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017360esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017362
Martin v. Löwis11437992002-04-12 09:54:03 +000017363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364 case $ac_mode in
17365 :F)
17366 #
17367 # CONFIG_FILE
17368 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017369
17370 case $INSTALL in
17371 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017373 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017374 ac_MKDIR_P=$MKDIR_P
17375 case $MKDIR_P in
17376 [\\/$]* | ?:[\\/]* ) ;;
17377 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17378 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017379_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380
Matthias Kloseb9621712010-04-24 17:59:49 +000017381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382# If the template does not know about datarootdir, expand it.
17383# FIXME: This hack should be removed a few years after 2.60.
17384ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017385ac_sed_dataroot='
17386/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 p
17388 q
17389}
17390/@datadir@/p
17391/@docdir@/p
17392/@infodir@/p
17393/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017394/@mandir@/p'
17395case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396*datarootdir*) ac_datarootdir_seen=yes;;
17397*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017398 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17399$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017401cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402 ac_datarootdir_hack='
17403 s&@datadir@&$datadir&g
17404 s&@docdir@&$docdir&g
17405 s&@infodir@&$infodir&g
17406 s&@localedir@&$localedir&g
17407 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017408 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409esac
17410_ACEOF
17411
17412# Neutralize VPATH when `$srcdir' = `.'.
17413# Shell code in configure.ac might set extrasub.
17414# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017415cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17416ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017417$extrasub
17418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017420:t
17421/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017422s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017424s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425s&@srcdir@&$ac_srcdir&;t t
17426s&@abs_srcdir@&$ac_abs_srcdir&;t t
17427s&@top_srcdir@&$ac_top_srcdir&;t t
17428s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17429s&@builddir@&$ac_builddir&;t t
17430s&@abs_builddir@&$ac_abs_builddir&;t t
17431s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17432s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017433s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017435"
Victor Stinnere0be4232011-10-25 13:06:09 +020017436eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17437 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017440 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17441 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17442 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017444which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017445$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017446which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017447
Victor Stinnere0be4232011-10-25 13:06:09 +020017448 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017450 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17451 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017452 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017453 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454 ;;
17455 :H)
17456 #
17457 # CONFIG_HEADER
17458 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017460 {
17461 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017462 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17463 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017464 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017465 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017466 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17467$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017469 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017470 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017471 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017472 fi
17473 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017474 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017475 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017476 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480
17481 esac
17482
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017483
17484 case $ac_file$ac_mode in
17485 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17486
17487 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017488done # for ac_tag
17489
Guido van Rossum627b2d71993-12-24 10:39:16 +000017490
Matthias Kloseb9621712010-04-24 17:59:49 +000017491as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017492_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017493ac_clean_files=$ac_clean_files_save
17494
Matthias Kloseb9621712010-04-24 17:59:49 +000017495test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017496 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017497
Martin v. Löwis11437992002-04-12 09:54:03 +000017498
17499# configure is writing to config.log, and then calls config.status.
17500# config.status does its own redirection, appending to config.log.
17501# Unfortunately, on DOS this fails, as config.log is still kept open
17502# by configure, so config.status won't be able to write to it; its
17503# output is simply discarded. So we exec the FD to /dev/null,
17504# effectively closing config.log, so it can be properly (re)opened and
17505# appended to by config.status. When coming back to configure, we
17506# need to make the FD available again.
17507if test "$no_create" != yes; then
17508 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017509 ac_config_status_args=
17510 test "$silent" = yes &&
17511 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017513 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017514 exec 5>>config.log
17515 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17516 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017517 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017518fi
17519if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17521$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017522fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017523
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017524
Christian Heimes75ed8902013-11-20 01:11:18 +010017525echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017526if test ! -f Modules/Setup
17527then
17528 cp $srcdir/Modules/Setup.dist Modules/Setup
17529fi
17530
Christian Heimes75ed8902013-11-20 01:11:18 +010017531echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017532if test ! -f Modules/Setup.local
17533then
17534 echo "# Edit this file for local setup changes" >Modules/Setup.local
17535fi
17536
Christian Heimes75ed8902013-11-20 01:11:18 +010017537echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017538$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17539 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017540 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017541mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017542
17543if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17544 echo "" >&6
17545 echo "" >&6
17546 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17547 echo "please run ./configure --with-optimizations" >&6
17548 echo "" >&6
17549 echo "" >&6
17550fi
17551