blob: e10510df28cf48be89a05ad31829d2e75f226c44 [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
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000698USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000752GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200754PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500763HAS_HG
764HGBRANCH
765HGTAG
766HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_fpectl
840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150 ac_prev=sbindir ;;
1151 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
1155 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157 | --sharedst | --shareds | --shared | --share | --shar \
1158 | --sha | --sh)
1159 ac_prev=sharedstatedir ;;
1160 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 -site | --site | --sit)
1167 ac_prev=site ;;
1168 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172 ac_prev=srcdir ;;
1173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177 | --syscon | --sysco | --sysc | --sys | --sy)
1178 ac_prev=sysconfdir ;;
1179 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189 verbose=yes ;;
1190
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 -version | --version | --versio | --versi | --vers | -V)
1192 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001198 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 --x)
1227 # Obsolete; use --with-x.
1228 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231 | --x-incl | --x-inc | --x-in | --x-i)
1232 ac_prev=x_includes ;;
1233 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239 ac_prev=x_libraries ;;
1240 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 *=*)
1249 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 case $ac_envvar in #(
1252 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 export $ac_envvar ;;
1257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001263 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ;;
1265
1266 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267done
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273
Matthias Kloseb9621712010-04-24 17:59:49 +00001274if test -n "$ac_unrecognized_opts"; then
1275 case $enable_option_checking in
1276 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279 esac
1280fi
1281
1282# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284 datadir sysconfdir sharedstatedir localstatedir includedir \
1285 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Ned Deily8bb38a72016-12-06 17:31:32 -05001286 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 # Remove trailing slashes.
1290 case $ac_val in
1291 */ )
1292 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293 eval $ac_var=\$ac_val;;
1294 esac
1295 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 [\\/$]* | ?:[\\/]* ) continue;;
1298 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001301done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# There might be people who depend on the old broken behavior: `$host'
1304# used to hold the argument of --host etc.
1305# FIXME: To remove some day.
1306build=$build_alias
1307host=$host_alias
1308target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# FIXME: To remove some day.
1311if test "x$host_alias" != x; then
1312 if test "x$build_alias" = x; then
1313 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 elif test "x$build_alias" != "x$host_alias"; then
1315 cross_compiling=yes
1316 fi
1317fi
1318
1319ac_tool_prefix=
1320test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322test "$silent" = yes && exec 6>/dev/null
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326ac_ls_di=`ls -di .` &&
1327ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333# Find the source files, if location was not specified.
1334if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 ac_confdir=`$as_dirname -- "$as_myself" ||
1338$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339 X"$as_myself" : 'X\(//\)[^/]' \| \
1340 X"$as_myself" : 'X\(//\)$' \| \
1341 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)[^/].*/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\).*/{
1356 s//\1/
1357 q
1358 }
1359 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362 srcdir=..
1363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367if test ! -r "$srcdir/$ac_unique_file"; then
1368 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 pwd)`
1375# When building in place, set srcdir=.
1376if test "$ac_abs_confdir" = "$ac_pwd"; then
1377 srcdir=.
1378fi
1379# Remove unnecessary trailing slashes from srcdir.
1380# Double slashes in file names in object file debugging info
1381# mess up M-x gdb in Emacs.
1382case $srcdir in
1383*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384esac
1385for ac_var in $ac_precious_vars; do
1386 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_env_${ac_var}_value=\$${ac_var}
1388 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392#
1393# Report the --help message.
1394#
1395if test "$ac_init_help" = "long"; then
1396 # Omit some internal or obsolete options to make the list less imposing.
1397 # This message is too long to be a string in the A/UX 3.1 sh.
1398 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001399\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404VAR=VALUE. See below for descriptions of some of the useful variables.
1405
1406Defaults for the options are specified in brackets.
1407
1408Configuration:
1409 -h, --help display this help and exit
1410 --help=short display options specific to this package
1411 --help=recursive display the short help of all the included packages
1412 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001413 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --cache-file=FILE cache test results in FILE [disabled]
1415 -C, --config-cache alias for \`--cache-file=config.cache'
1416 -n, --no-create do not create output files
1417 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1418
Martin v. Löwis11437992002-04-12 09:54:03 +00001419Installation directories:
1420 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425By default, \`make install' will install all the files in
1426\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1427an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428for instance \`--prefix=\$HOME'.
1429
1430For better control, use the options below.
1431
1432Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --bindir=DIR user executables [EPREFIX/bin]
1434 --sbindir=DIR system admin executables [EPREFIX/sbin]
1435 --libexecdir=DIR program executables [EPREFIX/libexec]
1436 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1437 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1438 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001465 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001479 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1480 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with(out)-threads[=DIRECTORY]
1525 disable/enable thread support
1526 --with(out)-thread[=DIRECTORY]
1527 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-doc-strings disable/enable documentation strings
1529 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001530 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001531 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with-fpectl enable SIGFPE catching
1533 --with-libm=STRING math library
1534 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001535 --with(out)-computed-gotos
1536 Use computed gotos in evaluation loop (enabled by
1537 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001538 --with(out)-ensurepip=[=upgrade]
1539 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001542 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 CC C compiler command
1544 CFLAGS C compiler flags
1545 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1546 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001548 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001551 PKG_CONFIG path to pkg-config utility
1552 PKG_CONFIG_PATH
1553 directories to add to pkg-config's search path
1554 PKG_CONFIG_LIBDIR
1555 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
1557Use these variables to override the choices made by `configure' or to help
1558it to find libraries and programs with nonstandard names/locations.
1559
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001560Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001563fi
1564
1565if test "$ac_init_help" = "recursive"; then
1566 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 test -d "$ac_dir" ||
1569 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1570 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_builddir=.
1572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573case "$ac_dir" in
1574.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 case $ac_top_builddir_sub in
1580 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1582 esac ;;
1583esac
1584ac_abs_top_builddir=$ac_pwd
1585ac_abs_builddir=$ac_pwd$ac_dir_suffix
1586# for backward compatibility:
1587ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
1589case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 ac_top_srcdir=$ac_top_builddir_sub
1593 ac_abs_top_srcdir=$ac_pwd ;;
1594 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 ac_top_srcdir=$srcdir
1597 ac_abs_top_srcdir=$srcdir ;;
1598 *) # Relative name.
1599 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1600 ac_top_srcdir=$ac_top_build_prefix$srcdir
1601 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001602esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 cd "$ac_dir" || { ac_status=$?; continue; }
1606 # Check for guested configure.
1607 if test -f "$ac_srcdir/configure.gnu"; then
1608 echo &&
1609 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1610 elif test -f "$ac_srcdir/configure"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001614 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 fi || ac_status=$?
1616 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 done
1618fi
1619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001621if $ac_init_version; then
1622 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001623python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001624generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001625
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001626Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001627This configure script is free software; the Free Software Foundation
1628gives unlimited permission to copy, distribute and modify it.
1629_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001632
1633## ------------------------ ##
1634## Autoconf initialization. ##
1635## ------------------------ ##
1636
1637# ac_fn_c_try_compile LINENO
1638# --------------------------
1639# Try to compile conftest.$ac_ext, and return whether this succeeded.
1640ac_fn_c_try_compile ()
1641{
1642 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1643 rm -f conftest.$ac_objext
1644 if { { ac_try="$ac_compile"
1645case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648esac
1649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650$as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_compile") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1659 test $ac_status = 0; } && {
1660 test -z "$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 } && test -s conftest.$ac_objext; then :
1663 ac_retval=0
1664else
1665 $as_echo "$as_me: failed program was:" >&5
1666sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 as_fn_set_status $ac_retval
1672
1673} # ac_fn_c_try_compile
1674
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001675# ac_fn_c_try_cpp LINENO
1676# ----------------------
1677# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1678ac_fn_c_try_cpp ()
1679{
1680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681 if { { ac_try="$ac_cpp conftest.$ac_ext"
1682case "(($ac_try" in
1683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1684 *) ac_try_echo=$ac_try;;
1685esac
1686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1687$as_echo "$ac_try_echo"; } >&5
1688 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1689 ac_status=$?
1690 if test -s conftest.err; then
1691 grep -v '^ *+' conftest.err >conftest.er1
1692 cat conftest.er1 >&5
1693 mv -f conftest.er1 conftest.err
1694 fi
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } > conftest.i && {
1697 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1698 test ! -s conftest.err
1699 }; then :
1700 ac_retval=0
1701else
1702 $as_echo "$as_me: failed program was:" >&5
1703sed 's/^/| /' conftest.$ac_ext >&5
1704
1705 ac_retval=1
1706fi
1707 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1708 as_fn_set_status $ac_retval
1709
1710} # ac_fn_c_try_cpp
1711
Matthias Kloseb9621712010-04-24 17:59:49 +00001712# ac_fn_c_try_link LINENO
1713# -----------------------
1714# Try to link conftest.$ac_ext, and return whether this succeeded.
1715ac_fn_c_try_link ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 rm -f conftest.$ac_objext conftest$ac_exeext
1719 if { { ac_try="$ac_link"
1720case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_link") 2>conftest.err
1727 ac_status=$?
1728 if test -s conftest.err; then
1729 grep -v '^ *+' conftest.err >conftest.er1
1730 cat conftest.er1 >&5
1731 mv -f conftest.er1 conftest.err
1732 fi
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; } && {
1735 test -z "$ac_c_werror_flag" ||
1736 test ! -s conftest.err
1737 } && test -s conftest$ac_exeext && {
1738 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001739 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 }; then :
1741 ac_retval=0
1742else
1743 $as_echo "$as_me: failed program was:" >&5
1744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746 ac_retval=1
1747fi
1748 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1749 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1750 # interfere with the next link command; also delete a directory that is
1751 # left behind by Apple's compiler. We do this before executing the actions.
1752 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_link
1757
Matthias Kloseb9621712010-04-24 17:59:49 +00001758# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1759# -------------------------------------------------------
1760# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1761# the include files in INCLUDES and setting the cache variable VAR
1762# accordingly.
1763ac_fn_c_check_header_mongrel ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1768$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001769if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 $as_echo_n "(cached) " >&6
1771fi
1772eval ac_res=\$$3
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775else
1776 # Is the header compilable?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1778$as_echo_n "checking $2 usability... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h. */
1781$4
1782#include <$2>
1783_ACEOF
1784if ac_fn_c_try_compile "$LINENO"; then :
1785 ac_header_compiler=yes
1786else
1787 ac_header_compiler=no
1788fi
1789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1791$as_echo "$ac_header_compiler" >&6; }
1792
1793# Is the header present?
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1795$as_echo_n "checking $2 presence... " >&6; }
1796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_cpp "$LINENO"; then :
1801 ac_header_preproc=yes
1802else
1803 ac_header_preproc=no
1804fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1807$as_echo "$ac_header_preproc" >&6; }
1808
1809# So? What about this header?
1810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1811 yes:no: )
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1813$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1815$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1816 ;;
1817 no:yes:* )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1819$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1821$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1823$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1825$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001828( $as_echo "## --------------------------------------- ##
1829## Report this to https://bugs.python.org/ ##
1830## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 ) | sed "s/^/$as_me: WARNING: /" >&2
1832 ;;
1833esac
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001836if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 $as_echo_n "(cached) " >&6
1838else
1839 eval "$3=\$ac_header_compiler"
1840fi
1841eval ac_res=\$$3
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1843$as_echo "$ac_res" >&6; }
1844fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001846
1847} # ac_fn_c_check_header_mongrel
1848
1849# ac_fn_c_try_run LINENO
1850# ----------------------
1851# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1852# that executables *can* be run.
1853ac_fn_c_try_run ()
1854{
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_link"
1857case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_link") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1867 { { case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_try") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; }; }; then :
1877 ac_retval=0
1878else
1879 $as_echo "$as_me: program exited with status $ac_status" >&5
1880 $as_echo "$as_me: failed program was:" >&5
1881sed 's/^/| /' conftest.$ac_ext >&5
1882
1883 ac_retval=$ac_status
1884fi
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_run
1890
1891# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1892# -------------------------------------------------------
1893# Tests whether HEADER exists and can be compiled using the include files in
1894# INCLUDES, setting the cache variable VAR accordingly.
1895ac_fn_c_check_header_compile ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$4
1906#include <$2>
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1914fi
1915eval ac_res=\$$3
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1917$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920} # ac_fn_c_check_header_compile
1921
Matthias Kloseb9621712010-04-24 17:59:49 +00001922# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1923# -------------------------------------------
1924# Tests whether TYPE exists after having included INCLUDES, setting cache
1925# variable VAR accordingly.
1926ac_fn_c_check_type ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001931if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001932 $as_echo_n "(cached) " >&6
1933else
1934 eval "$3=no"
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$4
1938int
1939main ()
1940{
1941if (sizeof ($2))
1942 return 0;
1943 ;
1944 return 0;
1945}
1946_ACEOF
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954if (sizeof (($2)))
1955 return 0;
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 eval "$3=yes"
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968fi
1969eval ac_res=\$$3
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974} # ac_fn_c_check_type
1975
Matthias Kloseb9621712010-04-24 17:59:49 +00001976# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1977# --------------------------------------------
1978# Tries to find the compile-time value of EXPR in a program that includes
1979# INCLUDES, setting VAR accordingly. Returns whether the value could be
1980# computed
1981ac_fn_c_compute_int ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 if test "$cross_compiling" = yes; then
1985 # Depending upon the size, compute the lo and hi bounds.
1986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$4
1989int
1990main ()
1991{
1992static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 ac_lo=0 ac_mid=0
2002 while :; do
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_hi=$ac_mid; break
2019else
2020 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2021 if test $ac_lo -le $ac_mid; then
2022 ac_lo= ac_hi=
2023 break
2024 fi
2025 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028 done
2029else
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_hi=-1 ac_mid=-1
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_lo=$ac_mid; break
2063else
2064 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2065 if test $ac_mid -le $ac_hi; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 ac_lo= ac_hi=
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079# Binary search between lo and hi bounds.
2080while test "x$ac_lo" != "x$ac_hi"; do
2081 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002089test_array [0] = 0;
2090return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=$ac_mid
2098else
2099 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102done
2103case $ac_lo in #((
2104?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2105'') ac_retval=1 ;;
2106esac
2107 else
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111static long int longval () { return $2; }
2112static unsigned long int ulongval () { return $2; }
2113#include <stdio.h>
2114#include <stdlib.h>
2115int
2116main ()
2117{
2118
2119 FILE *f = fopen ("conftest.val", "w");
2120 if (! f)
2121 return 1;
2122 if (($2) < 0)
2123 {
2124 long int i = longval ();
2125 if (i != ($2))
2126 return 1;
2127 fprintf (f, "%ld", i);
2128 }
2129 else
2130 {
2131 unsigned long int i = ulongval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%lu", i);
2135 }
2136 /* Do not output a trailing newline, as this causes \r\n confusion
2137 on some platforms. */
2138 return ferror (f) || fclose (f) != 0;
2139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_run "$LINENO"; then :
2145 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2146else
2147 ac_retval=1
2148fi
2149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2150 conftest.$ac_objext conftest.beam conftest.$ac_ext
2151rm -f conftest.val
2152
2153 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002154 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002155 as_fn_set_status $ac_retval
2156
2157} # ac_fn_c_compute_int
2158
2159# ac_fn_c_check_func LINENO FUNC VAR
2160# ----------------------------------
2161# Tests whether FUNC exists, setting the cache variable VAR accordingly
2162ac_fn_c_check_func ()
2163{
2164 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2166$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002167if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 $as_echo_n "(cached) " >&6
2169else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2174#define $2 innocuous_$2
2175
2176/* System header to define __stub macros and hopefully few prototypes,
2177 which can conflict with char $2 (); below.
2178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2179 <limits.h> exists even on freestanding compilers. */
2180
2181#ifdef __STDC__
2182# include <limits.h>
2183#else
2184# include <assert.h>
2185#endif
2186
2187#undef $2
2188
2189/* Override any GCC internal prototype to avoid an error.
2190 Use char because int might match the return type of a GCC
2191 builtin and then its argument prototype would still apply. */
2192#ifdef __cplusplus
2193extern "C"
2194#endif
2195char $2 ();
2196/* The GNU C library defines this for functions which it implements
2197 to always fail with ENOSYS. Some functions are actually named
2198 something starting with __ and the normal name is an alias. */
2199#if defined __stub_$2 || defined __stub___$2
2200choke me
2201#endif
2202
2203int
2204main ()
2205{
2206return $2 ();
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_link "$LINENO"; then :
2212 eval "$3=yes"
2213else
2214 eval "$3=no"
2215fi
2216rm -f core conftest.err conftest.$ac_objext \
2217 conftest$ac_exeext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223
2224} # ac_fn_c_check_func
2225
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002226# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2227# ---------------------------------------------
2228# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2229# accordingly.
2230ac_fn_c_check_decl ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 as_decl_name=`echo $2|sed 's/ *(.*//'`
2234 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2236$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2237if eval \${$3+:} false; then :
2238 $as_echo_n "(cached) " >&6
2239else
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$4
2243int
2244main ()
2245{
2246#ifndef $as_decl_name
2247#ifdef __cplusplus
2248 (void) $as_decl_use;
2249#else
2250 (void) $as_decl_name;
2251#endif
2252#endif
2253
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$3=yes"
2260else
2261 eval "$3=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265eval ac_res=\$$3
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2267$as_echo "$ac_res" >&6; }
2268 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2269
2270} # ac_fn_c_check_decl
2271
Matthias Kloseb9621712010-04-24 17:59:49 +00002272# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2273# ----------------------------------------------------
2274# Tries to find if the field MEMBER exists in type AGGR, after including
2275# INCLUDES, setting cache variable VAR accordingly.
2276ac_fn_c_check_member ()
2277{
2278 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2280$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002281if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002282 $as_echo_n "(cached) " >&6
2283else
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h. */
2286$5
2287int
2288main ()
2289{
2290static $2 ac_aggr;
2291if (ac_aggr.$3)
2292return 0;
2293 ;
2294 return 0;
2295}
2296_ACEOF
2297if ac_fn_c_try_compile "$LINENO"; then :
2298 eval "$4=yes"
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$5
2303int
2304main ()
2305{
2306static $2 ac_aggr;
2307if (sizeof ac_aggr.$3)
2308return 0;
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$4=yes"
2315else
2316 eval "$4=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$4
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002325 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002326
2327} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002332It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002333generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002443 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002444## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002445## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 echo
2447 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448(
2449 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2450 eval ac_val=\$$ac_var
2451 case $ac_val in #(
2452 *${as_nl}*)
2453 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2455$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac
2457 case $ac_var in #(
2458 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2460 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 esac ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2466 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 "s/'\''/'\''\\\\'\'''\''/g;
2469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2470 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac |
2475 sort
2476)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002478
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002479 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002480## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002481## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 echo
2483 for ac_var in $ac_subst_vars
2484 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 eval ac_val=\$$ac_var
2486 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 done | sort
2491 echo
2492
2493 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002496## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 echo
2498 for ac_var in $ac_subst_files
2499 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 eval ac_val=\$$ac_var
2501 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 done | sort
2506 echo
2507 fi
2508
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002511## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo
2516 fi
2517 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 $as_echo "$as_me: caught signal $ac_signal"
2519 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 rm -f core *.core core.conftest.* &&
2522 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002525for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002527done
2528ac_signal=0
2529
2530# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002532
Matthias Kloseb9621712010-04-24 17:59:49 +00002533$as_echo "/* confdefs.h */" > confdefs.h
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535# Predefined preprocessor variables.
2536
2537cat >>confdefs.h <<_ACEOF
2538#define PACKAGE_NAME "$PACKAGE_NAME"
2539_ACEOF
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2543_ACEOF
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_VERSION "$PACKAGE_VERSION"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_STRING "$PACKAGE_STRING"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2555_ACEOF
2556
Matthias Kloseb9621712010-04-24 17:59:49 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_URL "$PACKAGE_URL"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561
2562# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002563# Prefer an explicitly selected file to automatically selected ones.
2564ac_site_file1=NONE
2565ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567 # We do not want a PATH search for config.site.
2568 case $CONFIG_SITE in #((
2569 -*) ac_site_file1=./$CONFIG_SITE;;
2570 */*) ac_site_file1=$CONFIG_SITE;;
2571 *) ac_site_file1=./$CONFIG_SITE;;
2572 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$prefix/share/config.site
2575 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576else
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$ac_default_prefix/share/config.site
2578 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002580for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581do
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 test "x$ac_site_file" = xNONE && continue
2583 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2585$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 . "$ac_site_file" \
2588 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2590as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002591See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592 fi
2593done
2594
2595if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 # Some versions of bash will fail to source /dev/null (special files
2597 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2598 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2600$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2603 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 esac
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606else
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2608$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 >$cache_file
2610fi
2611
2612# Check that the precious variables saved in the cache have kept the same
2613# value.
2614ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2617 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2619 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $ac_old_set,$ac_new_set in
2621 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2623$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 ac_cache_corrupted=: ;;
2625 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2627$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 ac_cache_corrupted=: ;;
2629 ,);;
2630 *)
2631 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 # differences in whitespace do not lead to failure.
2633 ac_old_val_w=`echo x $ac_old_val`
2634 ac_new_val_w=`echo x $ac_new_val`
2635 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2637$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2638 ac_cache_corrupted=:
2639 else
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2641$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2642 eval $ac_var=\$ac_old_val
2643 fi
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2645$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2647$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 fi;;
2649 esac
2650 # Pass precious variables to config.status.
2651 if test "$ac_new_set" = set; then
2652 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 *) ac_arg=$ac_var=$ac_new_val ;;
2655 esac
2656 case " $ac_configure_args " in
2657 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 esac
2660 fi
2661done
2662if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2666$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002667 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002669## -------------------- ##
2670## Main body of script. ##
2671## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672
Guido van Rossum7f43da71994-08-01 12:15:30 +00002673ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2677ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678
Guido van Rossum627b2d71993-12-24 10:39:16 +00002679
Michael W. Hudson54241132001-12-07 15:38:26 +00002680
Trent Nelson4d4ec652012-10-16 08:51:24 -04002681
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002682if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002683 # If we're building out-of-tree, we need to make sure the following
2684 # resources get picked up before their $srcdir counterparts.
2685 # Objects/ -> typeslots.inc
2686 # Include/ -> Python-ast.h, graminit.h
2687 # Python/ -> importlib.h
2688 # (A side effect of this is that these resources will automatically be
2689 # regenerated when building out-of-tree, regardless of whether or not
2690 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2691 # off.)
2692 BASECPPFLAGS="-IObjects -IInclude -IPython"
2693else
2694 BASECPPFLAGS=""
2695fi
2696
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002697
2698
2699
2700
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002701if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702then
2703# Extract the first word of "hg", so it can be a program name with args.
2704set dummy hg; ac_word=$2
2705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002707if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708 $as_echo_n "(cached) " >&6
2709else
2710 if test -n "$HAS_HG"; then
2711 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2712else
2713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2714for as_dir in $PATH
2715do
2716 IFS=$as_save_IFS
2717 test -z "$as_dir" && as_dir=.
2718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 ac_cv_prog_HAS_HG="found"
2721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2722 break 2
2723 fi
2724done
2725 done
2726IFS=$as_save_IFS
2727
2728 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2729fi
2730fi
2731HAS_HG=$ac_cv_prog_HAS_HG
2732if test -n "$HAS_HG"; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2734$as_echo "$HAS_HG" >&6; }
2735else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2737$as_echo "no" >&6; }
2738fi
2739
2740
2741else
2742HAS_HG=no-repository
2743fi
2744if test $HAS_HG = found
2745then
2746 HGVERSION="hg id -i \$(srcdir)"
2747 HGTAG="hg id -t \$(srcdir)"
2748 HGBRANCH="hg id -b \$(srcdir)"
2749else
2750 HGVERSION=""
2751 HGTAG=""
2752 HGBRANCH=""
2753fi
2754
2755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
2758
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002759ac_aux_dir=
2760for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2761 if test -f "$ac_dir/install-sh"; then
2762 ac_aux_dir=$ac_dir
2763 ac_install_sh="$ac_aux_dir/install-sh -c"
2764 break
2765 elif test -f "$ac_dir/install.sh"; then
2766 ac_aux_dir=$ac_dir
2767 ac_install_sh="$ac_aux_dir/install.sh -c"
2768 break
2769 elif test -f "$ac_dir/shtool"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/shtool install -c"
2772 break
2773 fi
2774done
2775if test -z "$ac_aux_dir"; then
2776 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2777fi
2778
2779# These three variables are undocumented and unsupported,
2780# and are intended to be withdrawn in a future Autoconf release.
2781# They can cause serious problems if a builder's source tree is in a directory
2782# whose full name contains unusual characters.
2783ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2784ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2785ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2786
2787
2788# Make sure we can run config.sub.
2789$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2790 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2791
2792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2793$as_echo_n "checking build system type... " >&6; }
2794if ${ac_cv_build+:} false; then :
2795 $as_echo_n "(cached) " >&6
2796else
2797 ac_build_alias=$build_alias
2798test "x$ac_build_alias" = x &&
2799 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2800test "x$ac_build_alias" = x &&
2801 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2802ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2803 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2804
2805fi
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2807$as_echo "$ac_cv_build" >&6; }
2808case $ac_cv_build in
2809*-*-*) ;;
2810*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2811esac
2812build=$ac_cv_build
2813ac_save_IFS=$IFS; IFS='-'
2814set x $ac_cv_build
2815shift
2816build_cpu=$1
2817build_vendor=$2
2818shift; shift
2819# Remember, the first character of IFS is used to create $*,
2820# except with old shells:
2821build_os=$*
2822IFS=$ac_save_IFS
2823case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2824
2825
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2827$as_echo_n "checking host system type... " >&6; }
2828if ${ac_cv_host+:} false; then :
2829 $as_echo_n "(cached) " >&6
2830else
2831 if test "x$host_alias" = x; then
2832 ac_cv_host=$ac_cv_build
2833else
2834 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2835 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2836fi
2837
2838fi
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2840$as_echo "$ac_cv_host" >&6; }
2841case $ac_cv_host in
2842*-*-*) ;;
2843*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2844esac
2845host=$ac_cv_host
2846ac_save_IFS=$IFS; IFS='-'
2847set x $ac_cv_host
2848shift
2849host_cpu=$1
2850host_vendor=$2
2851shift; shift
2852# Remember, the first character of IFS is used to create $*,
2853# except with old shells:
2854host_os=$*
2855IFS=$ac_save_IFS
2856case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2857
2858
2859
doko@python.orga10e4a92013-01-25 18:45:12 +01002860
2861
Ned Deilyfcbc2462014-08-22 13:32:49 -07002862# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2863rm -f pybuilddir.txt
2864
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002865for ac_prog in python$PACKAGE_VERSION python3 python
2866do
2867 # Extract the first word of "$ac_prog", so it can be a program name with args.
2868set dummy $ac_prog; ac_word=$2
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2870$as_echo_n "checking for $ac_word... " >&6; }
2871if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2872 $as_echo_n "(cached) " >&6
2873else
2874 if test -n "$PYTHON_FOR_GEN"; then
2875 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2876else
2877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2878for as_dir in $PATH
2879do
2880 IFS=$as_save_IFS
2881 test -z "$as_dir" && as_dir=.
2882 for ac_exec_ext in '' $ac_executable_extensions; do
2883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2884 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2886 break 2
2887 fi
2888done
2889 done
2890IFS=$as_save_IFS
2891
2892fi
2893fi
2894PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2895if test -n "$PYTHON_FOR_GEN"; then
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2897$as_echo "$PYTHON_FOR_GEN" >&6; }
2898else
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2900$as_echo "no" >&6; }
2901fi
2902
2903
2904 test -n "$PYTHON_FOR_GEN" && break
2905done
2906test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2907
2908if test "$PYTHON_FOR_GEN" = not-found; then
2909 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2910 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2911 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2912fi
2913
2914
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002915if test "$cross_compiling" = yes; then
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2917$as_echo_n "checking for python interpreter for cross build... " >&6; }
2918 if test -z "$PYTHON_FOR_BUILD"; then
2919 for interp in python$PACKAGE_VERSION python3 python; do
2920 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002921 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002922 break
2923 fi
2924 interp=
2925 done
2926 if test x$interp = x; then
2927 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2928 fi
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2930$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002931 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002932 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002933 # Used to comment out stuff for rebuilding generated files
2934 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002935elif test "$cross_compiling" = maybe; then
2936 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002937else
2938 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002939 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Martin Pantereac67be2016-07-28 01:28:27 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002959VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989
2990
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2993# them.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002996
2997
2998
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002999define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003000
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003001# Arguments passed to configure.
3002
3003CONFIG_ARGS="$ac_configure_args"
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3006$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003008if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010 case $enableval in
3011 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 # Locate the best usable SDK, see Mac/README.txt for more
3013 # information
3014 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003015 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003017 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3018 if test ! -d "${enableval}"
3019 then
3020 enableval=/
3021 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023 ;;
3024 esac
3025 case $enableval in
3026 no)
3027 UNIVERSALSDK=
3028 enable_universalsdk=
3029 ;;
3030 *)
3031 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 if test ! -d "${UNIVERSALSDK}"
3033 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003034 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036 ;;
3037 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003038
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040else
3041
3042 UNIVERSALSDK=
3043 enable_universalsdk=
3044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047if test -n "${UNIVERSALSDK}"
3048then
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3050$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051else
Matthias Kloseb9621712010-04-24 17:59:49 +00003052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deily87adb6e2013-10-18 21:09:56 -07003058ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060# For backward compatibility reasons we prefer to select '32-bit' if available,
3061# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003062UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063if test "`uname -s`" = "Darwin"
3064then
3065 if test -n "${UNIVERSALSDK}"
3066 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003067 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 then
3069 UNIVERSAL_ARCHS="intel"
3070 fi
3071 fi
3072fi
3073
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3076$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077
3078# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003079if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 UNIVERSAL_ARCHS="$withval"
3082
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083fi
3084
Ned Deily87adb6e2013-10-18 21:09:56 -07003085if test -n "${UNIVERSALSDK}"
3086then
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3088$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3089else
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3091$as_echo "no" >&6; }
3092fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094
3095# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003096if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003097 withval=$with_framework_name;
3098 PYTHONFRAMEWORK=${withval}
3099 PYTHONFRAMEWORKDIR=${withval}.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3101
3102else
3103
3104 PYTHONFRAMEWORK=Python
3105 PYTHONFRAMEWORKDIR=Python.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3107
3108fi
3109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003113 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003114 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003115 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 esac
3117 case $enableval in
3118 no)
3119 PYTHONFRAMEWORK=
3120 PYTHONFRAMEWORKDIR=no-framework
3121 PYTHONFRAMEWORKPREFIX=
3122 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123 FRAMEWORKINSTALLFIRST=
3124 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 FRAMEWORKALTINSTALLFIRST=
3126 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003127 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003128 if test "x${prefix}" = "xNONE"; then
3129 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3130 else
3131 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3132 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003134 ;;
3135 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003137 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003139 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003140 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3141 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003142 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003148 else
3149 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3150 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151
3152 case "${enableval}" in
3153 /System*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 if test "${prefix}" = "NONE" ; then
3156 # See below
3157 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3158 fi
3159 ;;
3160
3161 /Library*)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 ;;
3164
3165 */Library/Frameworks)
3166 MDIR="`dirname "${enableval}"`"
3167 MDIR="`dirname "${MDIR}"`"
3168 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3169
3170 if test "${prefix}" = "NONE"; then
3171 # User hasn't specified the
3172 # --prefix option, but wants to install
3173 # the framework in a non-default location,
3174 # ensure that the compatibility links get
3175 # installed relative to that prefix as well
3176 # instead of in /usr/local.
3177 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3178 fi
3179 ;;
3180
3181 *)
3182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3183 ;;
3184 esac
3185
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3195
3196 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3197
Jack Jansene578a632001-08-15 01:27:14 +00003198 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Guido van Rossum563e7081996-09-10 18:20:48 +00003200else
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORKPREFIX=
3205 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206 FRAMEWORKINSTALLFIRST=
3207 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 FRAMEWORKALTINSTALLFIRST=
3209 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003210 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211 if test "x${prefix}" = "xNONE" ; then
3212 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3213 else
3214 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3215 fi
Jack Jansene578a632001-08-15 01:27:14 +00003216 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219fi
3220
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
3222
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
3224
3225
3226
Jack Jansene578a632001-08-15 01:27:14 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228
3229
3230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003232
Ned Deilyb8f944f2013-11-21 22:42:25 -08003233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
3250 *-*-linux*)
3251 ac_sys_system=Linux
3252 ;;
3253 *-*-cygwin*)
3254 ac_sys_system=Cygwin
3255 ;;
3256 *)
3257 # for now, limit cross builds to known configurations
3258 MACHDEP="unknown"
3259 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3260 esac
3261 ac_sys_release=
3262 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003263 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003264 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003265 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 fi
3271 ac_md_system=`echo $ac_sys_system |
3272 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3273 ac_md_release=`echo $ac_sys_release |
3274 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3275 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003276
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003278 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003279 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003280 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003281 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003282 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284fi
Guido van Rossum91922671997-10-09 20:24:13 +00003285
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003286
3287if test "$cross_compiling" = yes; then
3288 case "$host" in
3289 *-*-linux*)
3290 case "$host_cpu" in
3291 arm*)
3292 _host_cpu=arm
3293 ;;
3294 *)
3295 _host_cpu=$host_cpu
3296 esac
3297 ;;
3298 *-*-cygwin*)
3299 _host_cpu=
3300 ;;
3301 *)
3302 # for now, limit cross builds to known configurations
3303 MACHDEP="unknown"
3304 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3305 esac
3306 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3307fi
3308
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003309# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3310# disable features if it is defined, without any means to access these
3311# features as extensions. For these systems, we skip the definition of
3312# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3313# some feature, make sure there is no alternative way to access this
3314# feature. Also, when using wildcards, make sure you have verified the
3315# need for not defining _XOPEN_SOURCE on all systems matching the
3316# wildcard, and that the wildcard does not include future systems
3317# (which may remove their limitations).
3318case $ac_sys_system/$ac_sys_release in
3319 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3320 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003321 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003322 # In addition, Stefan Krah confirms that issue #1244610 exists through
3323 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003324 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003325 define_xopen_source=no
3326 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3327 # also defined. This can be overridden by defining _BSD_SOURCE
3328 # As this has a different meaning on Linux, only define it on OpenBSD
3329
Matthias Kloseb9621712010-04-24 17:59:49 +00003330$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331
3332 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003333 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003334 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3335 # also defined. This can be overridden by defining _BSD_SOURCE
3336 # As this has a different meaning on Linux, only define it on OpenBSD
3337
Matthias Kloseb9621712010-04-24 17:59:49 +00003338$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003339
3340 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003341 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3342 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3343 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003344 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 +00003345 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003346 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3347 # request to enable features supported by the standard as a request
3348 # to disable features not supported by the standard. The best way
3349 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3350 # entirely and define __EXTENSIONS__ instead.
3351 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003352 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003353 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3354 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003355 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003356 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003357 define_xopen_source=no;;
3358 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003359 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003361 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003362 # On FreeBSD 4, the math functions C89 does not cover are never defined
3363 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3364 FreeBSD/4.*)
3365 define_xopen_source=no;;
3366 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3367 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3368 # identifies itself as Darwin/7.*
3369 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3370 # disables platform specific features beyond repair.
3371 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3372 # has no effect, don't bother defining them
3373 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003374 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003375 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003376 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003377 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3378 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3379 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003380 AIX/4)
3381 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003382 AIX/5)
3383 if test `uname -r` -eq 1; then
3384 define_xopen_source=no
3385 fi
3386 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003387 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3388 # defining NI_NUMERICHOST.
3389 QNX/6.3.2)
3390 define_xopen_source=no
3391 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003392
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393esac
3394
3395if test $define_xopen_source = yes
3396then
Victor Stinner14d098d2011-09-07 22:29:43 +02003397 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003398
Victor Stinner14d098d2011-09-07 22:29:43 +02003399$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003400
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
3402 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3403 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3404 # several APIs are not declared. Since this is also needed in some
3405 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003406
Matthias Kloseb9621712010-04-24 17:59:49 +00003407$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
3409
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003410
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003411$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003413fi
3414
Christian Heimes647cd872013-12-07 23:39:33 +01003415# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3416case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003417 hp*|HP*)
3418 define_stdc_a1=yes;;
3419 *)
3420 define_stdc_a1=no;;
3421esac
3422
3423if test $define_stdc_a1 = yes
3424then
Christian Heimes647cd872013-12-07 23:39:33 +01003425
3426$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3427
Christian Heimesb02bcae2013-12-08 15:21:08 +01003428fi
Christian Heimes647cd872013-12-07 23:39:33 +01003429
Guido van Rossum91922671997-10-09 20:24:13 +00003430#
3431# SGI compilers allow the specification of the both the ABI and the
3432# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003433# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003434#
3435# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3436# thus supply support for various ABI/ISA combinations. The MACHDEP
3437# variable is also adjusted.
3438#
3439
3440if test ! -z "$SGI_ABI"
3441then
3442 CC="cc $SGI_ABI"
3443 LDFLAGS="$SGI_ABI $LDFLAGS"
3444 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3447$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003448
Jack Jansen6b08a402004-06-03 12:41:45 +00003449# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3450# it may influence the way we can build extensions, so distutils
3451# needs to check it
3452
Thomas Wouters477c8d52006-05-27 19:21:47 +00003453
Jack Jansen6b08a402004-06-03 12:41:45 +00003454CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003455EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003456
Guido van Rossum627b2d71993-12-24 10:39:16 +00003457# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003458
3459# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3460# for debug/optimization stuff. BASECFLAGS is for flags that are required
3461# just to get things to compile and link. Users are free to override OPT
3462# when running configure or make. The build should not break if they do.
3463# BASECFLAGS should generally not be messed with, however.
3464
3465# XXX shouldn't some/most/all of this code be merged with the stuff later
3466# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3468$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003471if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003473 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003474 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003475 without_gcc=yes;;
3476 yes) CC=gcc
3477 without_gcc=no;;
3478 *) CC=$withval
3479 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003480 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481else
Martin v. Löwis11437992002-04-12 09:54:03 +00003482
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003483 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003484 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003485 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003486 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003487 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488fi
3489
Matthias Kloseb9621712010-04-24 17:59:49 +00003490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3491$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003492
Zachary Ware5af85642015-12-21 12:09:17 -06003493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3494$as_echo_n "checking for --with-icc... " >&6; }
3495
3496# Check whether --with-icc was given.
3497if test "${with_icc+set}" = set; then :
3498 withval=$with_icc;
3499 case $withval in
3500 no) CC=${CC:-cc}
3501 with_icc=no;;
3502 yes) CC=icc
3503 CXX=icpc
3504 with_icc=yes;;
3505 *) CC=$withval
3506 with_icc=$withval;;
3507 esac
3508else
3509
3510 with_icc=no
3511fi
3512
3513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3514$as_echo "$with_icc" >&6; }
3515
Guido van Rossum8b131c51995-03-09 14:10:13 +00003516# If the user switches compilers, we can't believe the cache
3517if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3518then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003519 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003520(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003521fi
3522
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003523# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3524# when the compiler supports them, but we don't always want -O2, and
3525# we set -g later.
3526if test -z "$CFLAGS"; then
3527 CFLAGS=
3528fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529
3530if test "$ac_sys_system" = "Darwin"
3531then
3532 # Compiler selection on MacOSX is more complicated than
3533 # AC_PROG_CC can handle, see Mac/README.txt for more
3534 # information
3535 if test -z "${CC}"
3536 then
3537 found_gcc=
3538 found_clang=
3539 as_save_IFS=$IFS; IFS=:
3540 for as_dir in $PATH
3541 do
3542 IFS=$as_save_IFS
3543 if test -x $as_dir/gcc; then
3544 if test -z "${found_gcc}"; then
3545 found_gcc=$as_dir/gcc
3546 fi
3547 fi
3548 if test -x $as_dir/clang; then
3549 if test -z "${found_clang}"; then
3550 found_clang=$as_dir/clang
3551 fi
3552 fi
3553 done
3554 IFS=$as_save_IFS
3555
3556 if test -n "$found_gcc" -a -n "$found_clang"
3557 then
3558 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3559 then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3561$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3562 CC="$found_clang"
3563 CXX="$found_clang++"
3564 fi
3565
3566
3567 elif test -z "$found_gcc" -a -n "$found_clang"
3568 then
3569 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3570$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3571 CC="$found_clang"
3572 CXX="$found_clang++"
3573
3574 elif test -z "$found_gcc" -a -z "$found_clang"
3575 then
3576 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3577 if test -n "${found_clang}"
3578 then
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3580$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3581 CC="${found_clang}"
3582 CXX="`/usr/bin/xcrun -find clang++`"
3583
3584 # else: use default behaviour
3585 fi
3586 fi
3587 fi
3588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003589ac_ext=c
3590ac_cpp='$CPP $CPPFLAGS'
3591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3593ac_compiler_gnu=$ac_cv_c_compiler_gnu
3594if test -n "$ac_tool_prefix"; then
3595 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3596set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3598$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003599if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003601else
3602 if test -n "$CC"; then
3603 ac_cv_prog_CC="$CC" # Let the user override the test.
3604else
Martin v. Löwis11437992002-04-12 09:54:03 +00003605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3606for as_dir in $PATH
3607do
3608 IFS=$as_save_IFS
3609 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003611 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 $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 +00003614 break 2
3615 fi
3616done
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003619
Jack Jansendd19cf82001-12-06 22:36:17 +00003620fi
3621fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003622CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003623if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3625$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003626else
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3628$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003629fi
3630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631
Martin v. Löwis11437992002-04-12 09:54:03 +00003632fi
3633if test -z "$ac_cv_prog_CC"; then
3634 ac_ct_CC=$CC
3635 # Extract the first word of "gcc", so it can be a program name with args.
3636set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3638$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003639if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003641else
3642 if test -n "$ac_ct_CC"; then
3643 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3644else
3645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3646for as_dir in $PATH
3647do
3648 IFS=$as_save_IFS
3649 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003651 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003652 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 $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 +00003654 break 2
3655 fi
3656done
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003659
3660fi
3661fi
3662ac_ct_CC=$ac_cv_prog_ac_ct_CC
3663if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3665$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003666else
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3668$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669fi
3670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671 if test "x$ac_ct_CC" = x; then
3672 CC=""
3673 else
3674 case $cross_compiling:$ac_tool_warned in
3675yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678ac_tool_warned=yes ;;
3679esac
3680 CC=$ac_ct_CC
3681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003682else
3683 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003684fi
3685
Jack Jansendd19cf82001-12-06 22:36:17 +00003686if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687 if test -n "$ac_tool_prefix"; then
3688 # 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 +00003689set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3691$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003692if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003694else
3695 if test -n "$CC"; then
3696 ac_cv_prog_CC="$CC" # Let the user override the test.
3697else
Martin v. Löwis11437992002-04-12 09:54:03 +00003698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3699for as_dir in $PATH
3700do
3701 IFS=$as_save_IFS
3702 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $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 +00003707 break 2
3708 fi
3709done
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003712
3713fi
3714fi
3715CC=$ac_cv_prog_CC
3716if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3718$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003719else
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3721$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003722fi
3723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003726fi
3727if test -z "$CC"; then
3728 # Extract the first word of "cc", so it can be a program name with args.
3729set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3731$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003732if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
3735 if test -n "$CC"; then
3736 ac_cv_prog_CC="$CC" # Let the user override the test.
3737else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3740for as_dir in $PATH
3741do
3742 IFS=$as_save_IFS
3743 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3747 ac_prog_rejected=yes
3748 continue
3749 fi
3750 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $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 +00003752 break 2
3753 fi
3754done
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003757
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758if test $ac_prog_rejected = yes; then
3759 # We found a bogon in the path, so make sure we never use it.
3760 set dummy $ac_cv_prog_CC
3761 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003762 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763 # We chose a different compiler from the bogus one.
3764 # However, it has the same basename, so the bogon will be chosen
3765 # first if we set CC to just the basename; use the full file name.
3766 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003767 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 fi
3769fi
3770fi
3771fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003772CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3775$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776else
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3778$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779fi
3780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781
Martin v. Löwis11437992002-04-12 09:54:03 +00003782fi
3783if test -z "$CC"; then
3784 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 do
3787 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3788set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3790$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003791if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003793else
3794 if test -n "$CC"; then
3795 ac_cv_prog_CC="$CC" # Let the user override the test.
3796else
Martin v. Löwis11437992002-04-12 09:54:03 +00003797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3798for as_dir in $PATH
3799do
3800 IFS=$as_save_IFS
3801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 $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 +00003806 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003808done
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003811
3812fi
3813fi
3814CC=$ac_cv_prog_CC
3815if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3817$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003818else
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3820$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003821fi
3822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 test -n "$CC" && break
3825 done
3826fi
3827if test -z "$CC"; then
3828 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003830do
3831 # Extract the first word of "$ac_prog", so it can be a program name with args.
3832set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003835if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003837else
3838 if test -n "$ac_ct_CC"; then
3839 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3840else
3841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842for as_dir in $PATH
3843do
3844 IFS=$as_save_IFS
3845 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 $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 +00003850 break 2
3851 fi
3852done
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856fi
3857fi
3858ac_ct_CC=$ac_cv_prog_ac_ct_CC
3859if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3861$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003862else
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003865fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868 test -n "$ac_ct_CC" && break
3869done
Michael W. Hudson54241132001-12-07 15:38:26 +00003870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871 if test "x$ac_ct_CC" = x; then
3872 CC=""
3873 else
3874 case $cross_compiling:$ac_tool_warned in
3875yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878ac_tool_warned=yes ;;
3879esac
3880 CC=$ac_ct_CC
3881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003882fi
3883
3884fi
3885
3886
Matthias Kloseb9621712010-04-24 17:59:49 +00003887test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003889as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003890See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003891
3892# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003893$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3894set X $ac_compile
3895ac_compiler=$2
3896for ac_option in --version -v -V -qversion; do
3897 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898case "(($ac_try" in
3899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3900 *) ac_try_echo=$ac_try;;
3901esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3903$as_echo "$ac_try_echo"; } >&5
3904 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003905 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003906 if test -s conftest.err; then
3907 sed '10a\
3908... rest of stderr output deleted ...
3909 10q' conftest.err >conftest.er1
3910 cat conftest.er1 >&5
3911 fi
3912 rm -f conftest.er1 conftest.err
3913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3914 test $ac_status = 0; }
3915done
Martin v. Löwis11437992002-04-12 09:54:03 +00003916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003918/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003919
Martin v. Löwis11437992002-04-12 09:54:03 +00003920int
3921main ()
3922{
3923
3924 ;
3925 return 0;
3926}
3927_ACEOF
3928ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003929ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003930# Try to create an executable without -o first, disregard a.out.
3931# It will help us diagnose broken compilers, and finding out an intuition
3932# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3934$as_echo_n "checking whether the C compiler works... " >&6; }
3935ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3936
3937# The possible output files:
3938ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940ac_rmfiles=
3941for ac_file in $ac_files
3942do
3943 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3946 esac
3947done
3948rm -f $ac_rmfiles
3949
Matthias Kloseb9621712010-04-24 17:59:49 +00003950if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951case "(($ac_try" in
3952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3953 *) ac_try_echo=$ac_try;;
3954esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3956$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3960 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3962# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3963# in a Makefile. We should not override ac_cv_exeext if it was cached,
3964# so that the user can short-circuit this test for compilers unknown to
3965# Autoconf.
3966for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003967do
3968 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 ;;
3972 [ab].out )
3973 # We found the default executable, but exeext='' is most
3974 # certainly right.
3975 break;;
3976 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 then :; else
3979 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3980 fi
3981 # We set ac_cv_exeext here because the later test for it is not
3982 # safe: cross compilers may not add the suffix if given an `-o'
3983 # argument, so we may need to know it at that point already.
3984 # Even if this section looks crufty: it has the advantage of
3985 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986 break;;
3987 * )
3988 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003989 esac
3990done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991test "$ac_cv_exeext" = no && ac_cv_exeext=
3992
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003993else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 ac_file=''
3995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003996if test -z "$ac_file"; then :
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3998$as_echo "no" >&6; }
3999$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004000sed 's/^/| /' conftest.$ac_ext >&5
4001
Matthias Kloseb9621712010-04-24 17:59:49 +00004002{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004004as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004005See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004006else
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4008$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4011$as_echo_n "checking for C compiler default output file name... " >&6; }
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4013$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004017ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4019$as_echo_n "checking for suffix of executables... " >&6; }
4020if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004028 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4032# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4033# work properly (i.e., refer to `conftest.exe'), while it won't with
4034# `rm'.
4035for ac_file in conftest.exe conftest conftest.*; do
4036 test -f "$ac_file" || continue
4037 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004039 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4040 break;;
4041 * ) break;;
4042 esac
4043done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004044else
Matthias Kloseb9621712010-04-24 17:59:49 +00004045 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004047as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004048See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004050rm -f conftest conftest$ac_cv_exeext
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4052$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053
4054rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004055EXEEXT=$ac_cv_exeext
4056ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4058/* end confdefs.h. */
4059#include <stdio.h>
4060int
4061main ()
4062{
4063FILE *f = fopen ("conftest.out", "w");
4064 return ferror (f) || fclose (f) != 0;
4065
4066 ;
4067 return 0;
4068}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004070ac_clean_files="$ac_clean_files conftest.out"
4071# Check that the compiler produces executables we can run. If not, either
4072# the compiler is broken, or we cross compile.
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4074$as_echo_n "checking whether we are cross compiling... " >&6; }
4075if test "$cross_compiling" != yes; then
4076 { { ac_try="$ac_link"
4077case "(($ac_try" in
4078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079 *) ac_try_echo=$ac_try;;
4080esac
4081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082$as_echo "$ac_try_echo"; } >&5
4083 (eval "$ac_link") 2>&5
4084 ac_status=$?
4085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086 test $ac_status = 0; }
4087 if { ac_try='./conftest$ac_cv_exeext'
4088 { { case "(($ac_try" in
4089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090 *) ac_try_echo=$ac_try;;
4091esac
4092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4093$as_echo "$ac_try_echo"; } >&5
4094 (eval "$ac_try") 2>&5
4095 ac_status=$?
4096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4097 test $ac_status = 0; }; }; then
4098 cross_compiling=no
4099 else
4100 if test "$cross_compiling" = maybe; then
4101 cross_compiling=yes
4102 else
4103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004105as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004106If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004107See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 fi
4109 fi
4110fi
4111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4112$as_echo "$cross_compiling" >&6; }
4113
4114rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4115ac_clean_files=$ac_clean_files_save
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4117$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004118if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 $as_echo_n "(cached) " >&6
4120else
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004122/* end confdefs.h. */
4123
4124int
4125main ()
4126{
4127
4128 ;
4129 return 0;
4130}
4131_ACEOF
4132rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004133if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134case "(($ac_try" in
4135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4136 *) ac_try_echo=$ac_try;;
4137esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4139$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4143 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144 for ac_file in conftest.o conftest.obj conftest.*; do
4145 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004146 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4149 break;;
4150 esac
4151done
4152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004154sed 's/^/| /' conftest.$ac_ext >&5
4155
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004158as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004159See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004160fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004161rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4164$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004165OBJEXT=$ac_cv_objext
4166ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4168$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004169if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004171else
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004174
Martin v. Löwis11437992002-04-12 09:54:03 +00004175int
4176main ()
4177{
4178#ifndef __GNUC__
4179 choke me
4180#endif
4181
4182 ;
4183 return 0;
4184}
4185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004187 ac_compiler_gnu=yes
4188else
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004192ac_cv_c_compiler_gnu=$ac_compiler_gnu
4193
4194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4196$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4197if test $ac_compiler_gnu = yes; then
4198 GCC=yes
4199else
4200 GCC=
4201fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004202ac_test_CFLAGS=${CFLAGS+set}
4203ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4205$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004206if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004208else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209 ac_save_c_werror_flag=$ac_c_werror_flag
4210 ac_c_werror_flag=yes
4211 ac_cv_prog_cc_g=no
4212 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004215
Martin v. Löwis11437992002-04-12 09:54:03 +00004216int
4217main ()
4218{
4219
4220 ;
4221 return 0;
4222}
4223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004224if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004225 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226else
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 CFLAGS=""
4228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229/* end confdefs.h. */
4230
4231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240
Matthias Kloseb9621712010-04-24 17:59:49 +00004241else
4242 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245/* end confdefs.h. */
4246
4247int
4248main ()
4249{
4250
4251 ;
4252 return 0;
4253}
4254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004255if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4263 ac_c_werror_flag=$ac_save_c_werror_flag
4264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4266$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004269elif test $ac_cv_prog_cc_g = yes; then
4270 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004271 CFLAGS="-g -O2"
4272 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274 fi
4275else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004276 if test "$GCC" = yes; then
4277 CFLAGS="-O2"
4278 else
4279 CFLAGS=
4280 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4283$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004284if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004286else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004288ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004290/* end confdefs.h. */
4291#include <stdarg.h>
4292#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004293struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4295struct buf { int x; };
4296FILE * (*rcsopen) (struct buf *, struct stat *, int);
4297static char *e (p, i)
4298 char **p;
4299 int i;
4300{
4301 return p[i];
4302}
4303static char *f (char * (*g) (char **, int), char **p, ...)
4304{
4305 char *s;
4306 va_list v;
4307 va_start (v,p);
4308 s = g (p, va_arg (v,int));
4309 va_end (v);
4310 return s;
4311}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312
4313/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4314 function prototypes and stuff, but not '\xHH' hex character constants.
4315 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004317 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4318 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004320int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4323 inside strings and character constants. */
4324#define FOO(x) 'x'
4325int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4326
Skip Montanaro6dead952003-09-25 14:50:04 +00004327int test (int i, double x);
4328struct s1 {int (*f) (int a);};
4329struct s2 {int (*f) (double a);};
4330int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4331int argc;
4332char **argv;
4333int
4334main ()
4335{
4336return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4337 ;
4338 return 0;
4339}
4340_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4342 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004343do
4344 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348rm -f core conftest.err conftest.$ac_objext
4349 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004350done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004352CC=$ac_save_CC
4353
4354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355# AC_CACHE_VAL
4356case "x$ac_cv_prog_cc_c89" in
4357 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4359$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4362$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004363 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4366$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004367esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004368if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004369
Matthias Kloseb9621712010-04-24 17:59:49 +00004370fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004371
Martin v. Löwis11437992002-04-12 09:54:03 +00004372ac_ext=c
4373ac_cpp='$CPP $CPPFLAGS'
4374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4376ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004378ac_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
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4384$as_echo_n "checking how to run the C preprocessor... " >&6; }
4385# On Suns, sometimes $CPP names a directory.
4386if test -n "$CPP" && test -d "$CPP"; then
4387 CPP=
4388fi
4389if test -z "$CPP"; then
4390 if ${ac_cv_prog_CPP+:} false; then :
4391 $as_echo_n "(cached) " >&6
4392else
4393 # Double quotes because CPP needs to be expanded
4394 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4395 do
4396 ac_preproc_ok=false
4397for ac_c_preproc_warn_flag in '' yes
4398do
4399 # Use a header file that comes with gcc, so configuring glibc
4400 # with a fresh cross-compiler works.
4401 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4402 # <limits.h> exists even on freestanding compilers.
4403 # On the NeXT, cc -E runs the code through the compiler's parser,
4404 # not just through cpp. "Syntax error" is here to catch this case.
4405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4406/* end confdefs.h. */
4407#ifdef __STDC__
4408# include <limits.h>
4409#else
4410# include <assert.h>
4411#endif
4412 Syntax error
4413_ACEOF
4414if ac_fn_c_try_cpp "$LINENO"; then :
4415
4416else
4417 # Broken: fails on valid input.
4418continue
4419fi
4420rm -f conftest.err conftest.i conftest.$ac_ext
4421
4422 # OK, works on sane cases. Now check whether nonexistent headers
4423 # can be detected and how.
4424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4425/* end confdefs.h. */
4426#include <ac_nonexistent.h>
4427_ACEOF
4428if ac_fn_c_try_cpp "$LINENO"; then :
4429 # Broken: success on invalid input.
4430continue
4431else
4432 # Passes both tests.
4433ac_preproc_ok=:
4434break
4435fi
4436rm -f conftest.err conftest.i conftest.$ac_ext
4437
4438done
4439# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4440rm -f conftest.i conftest.err conftest.$ac_ext
4441if $ac_preproc_ok; then :
4442 break
4443fi
4444
4445 done
4446 ac_cv_prog_CPP=$CPP
4447
4448fi
4449 CPP=$ac_cv_prog_CPP
4450else
4451 ac_cv_prog_CPP=$CPP
4452fi
4453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4454$as_echo "$CPP" >&6; }
4455ac_preproc_ok=false
4456for ac_c_preproc_warn_flag in '' yes
4457do
4458 # Use a header file that comes with gcc, so configuring glibc
4459 # with a fresh cross-compiler works.
4460 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4461 # <limits.h> exists even on freestanding compilers.
4462 # On the NeXT, cc -E runs the code through the compiler's parser,
4463 # not just through cpp. "Syntax error" is here to catch this case.
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466#ifdef __STDC__
4467# include <limits.h>
4468#else
4469# include <assert.h>
4470#endif
4471 Syntax error
4472_ACEOF
4473if ac_fn_c_try_cpp "$LINENO"; then :
4474
4475else
4476 # Broken: fails on valid input.
4477continue
4478fi
4479rm -f conftest.err conftest.i conftest.$ac_ext
4480
4481 # OK, works on sane cases. Now check whether nonexistent headers
4482 # can be detected and how.
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4484/* end confdefs.h. */
4485#include <ac_nonexistent.h>
4486_ACEOF
4487if ac_fn_c_try_cpp "$LINENO"; then :
4488 # Broken: success on invalid input.
4489continue
4490else
4491 # Passes both tests.
4492ac_preproc_ok=:
4493break
4494fi
4495rm -f conftest.err conftest.i conftest.$ac_ext
4496
4497done
4498# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4499rm -f conftest.i conftest.err conftest.$ac_ext
4500if $ac_preproc_ok; then :
4501
4502else
4503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4505as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4506See \`config.log' for more details" "$LINENO" 5; }
4507fi
4508
4509ac_ext=c
4510ac_cpp='$CPP $CPPFLAGS'
4511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4513ac_compiler_gnu=$ac_cv_c_compiler_gnu
4514
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4516$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4517if ${ac_cv_path_GREP+:} false; then :
4518 $as_echo_n "(cached) " >&6
4519else
4520 if test -z "$GREP"; then
4521 ac_path_GREP_found=false
4522 # Loop through the user's path and test for each of PROGNAME-LIST
4523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4524for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4525do
4526 IFS=$as_save_IFS
4527 test -z "$as_dir" && as_dir=.
4528 for ac_prog in grep ggrep; do
4529 for ac_exec_ext in '' $ac_executable_extensions; do
4530 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4531 as_fn_executable_p "$ac_path_GREP" || continue
4532# Check for GNU ac_path_GREP and select it if it is found.
4533 # Check for GNU $ac_path_GREP
4534case `"$ac_path_GREP" --version 2>&1` in
4535*GNU*)
4536 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4537*)
4538 ac_count=0
4539 $as_echo_n 0123456789 >"conftest.in"
4540 while :
4541 do
4542 cat "conftest.in" "conftest.in" >"conftest.tmp"
4543 mv "conftest.tmp" "conftest.in"
4544 cp "conftest.in" "conftest.nl"
4545 $as_echo 'GREP' >> "conftest.nl"
4546 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4547 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4548 as_fn_arith $ac_count + 1 && ac_count=$as_val
4549 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4550 # Best one so far, save it but keep looking for a better one
4551 ac_cv_path_GREP="$ac_path_GREP"
4552 ac_path_GREP_max=$ac_count
4553 fi
4554 # 10*(2^10) chars as input seems more than enough
4555 test $ac_count -gt 10 && break
4556 done
4557 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4558esac
4559
4560 $ac_path_GREP_found && break 3
4561 done
4562 done
4563 done
4564IFS=$as_save_IFS
4565 if test -z "$ac_cv_path_GREP"; then
4566 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4567 fi
4568else
4569 ac_cv_path_GREP=$GREP
4570fi
4571
4572fi
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4574$as_echo "$ac_cv_path_GREP" >&6; }
4575 GREP="$ac_cv_path_GREP"
4576
4577
Łukasz Langaa785c872016-09-09 17:37:37 -07004578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4579$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4580if ${ac_cv_path_SED+:} false; then :
4581 $as_echo_n "(cached) " >&6
4582else
4583 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4584 for ac_i in 1 2 3 4 5 6 7; do
4585 ac_script="$ac_script$as_nl$ac_script"
4586 done
4587 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4588 { ac_script=; unset ac_script;}
4589 if test -z "$SED"; then
4590 ac_path_SED_found=false
4591 # Loop through the user's path and test for each of PROGNAME-LIST
4592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593for as_dir in $PATH
4594do
4595 IFS=$as_save_IFS
4596 test -z "$as_dir" && as_dir=.
4597 for ac_prog in sed gsed; do
4598 for ac_exec_ext in '' $ac_executable_extensions; do
4599 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4600 as_fn_executable_p "$ac_path_SED" || continue
4601# Check for GNU ac_path_SED and select it if it is found.
4602 # Check for GNU $ac_path_SED
4603case `"$ac_path_SED" --version 2>&1` in
4604*GNU*)
4605 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4606*)
4607 ac_count=0
4608 $as_echo_n 0123456789 >"conftest.in"
4609 while :
4610 do
4611 cat "conftest.in" "conftest.in" >"conftest.tmp"
4612 mv "conftest.tmp" "conftest.in"
4613 cp "conftest.in" "conftest.nl"
4614 $as_echo '' >> "conftest.nl"
4615 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4616 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4617 as_fn_arith $ac_count + 1 && ac_count=$as_val
4618 if test $ac_count -gt ${ac_path_SED_max-0}; then
4619 # Best one so far, save it but keep looking for a better one
4620 ac_cv_path_SED="$ac_path_SED"
4621 ac_path_SED_max=$ac_count
4622 fi
4623 # 10*(2^10) chars as input seems more than enough
4624 test $ac_count -gt 10 && break
4625 done
4626 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4627esac
4628
4629 $ac_path_SED_found && break 3
4630 done
4631 done
4632 done
4633IFS=$as_save_IFS
4634 if test -z "$ac_cv_path_SED"; then
4635 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4636 fi
4637else
4638 ac_cv_path_SED=$SED
4639fi
4640
4641fi
4642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4643$as_echo "$ac_cv_path_SED" >&6; }
4644 SED="$ac_cv_path_SED"
4645 rm -f conftest.sed
4646
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004647
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648
4649
Matthias Kloseb9621712010-04-24 17:59:49 +00004650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4651$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004653# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004654if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004655 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004656
4657 case $withval in
4658 no) with_cxx_main=no
4659 MAINCC='$(CC)';;
4660 yes) with_cxx_main=yes
4661 MAINCC='$(CXX)';;
4662 *) with_cxx_main=yes
4663 MAINCC=$withval
4664 if test -z "$CXX"
4665 then
4666 CXX=$withval
4667 fi;;
4668 esac
4669else
4670
4671 with_cxx_main=no
4672 MAINCC='$(CC)'
4673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004674fi
4675
Matthias Kloseb9621712010-04-24 17:59:49 +00004676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4677$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004678
4679preset_cxx="$CXX"
4680if test -z "$CXX"
4681then
4682 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 gcc) if test -n "$ac_tool_prefix"; then
4684 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4685set dummy ${ac_tool_prefix}g++; ac_word=$2
4686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
4688if ${ac_cv_path_CXX+:} false; then :
4689 $as_echo_n "(cached) " >&6
4690else
4691 case $CXX in
4692 [\\/]* | ?:[\\/]*)
4693 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4694 ;;
4695 *)
4696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in notfound
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705 break 2
4706 fi
4707done
4708 done
4709IFS=$as_save_IFS
4710
4711 ;;
4712esac
4713fi
4714CXX=$ac_cv_path_CXX
4715if test -n "$CXX"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4717$as_echo "$CXX" >&6; }
4718else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723
4724fi
4725if test -z "$ac_cv_path_CXX"; then
4726 ac_pt_CXX=$CXX
4727 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4730$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004731if ${ac_cv_path_ac_pt_CXX+:} false; then :
4732 $as_echo_n "(cached) " >&6
4733else
4734 case $ac_pt_CXX in
4735 [\\/]* | ?:[\\/]*)
4736 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4737 ;;
4738 *)
4739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740for as_dir in notfound
4741do
4742 IFS=$as_save_IFS
4743 test -z "$as_dir" && as_dir=.
4744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004746 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4748 break 2
4749 fi
4750done
4751 done
4752IFS=$as_save_IFS
4753
4754 ;;
4755esac
4756fi
4757ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4758if test -n "$ac_pt_CXX"; then
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4760$as_echo "$ac_pt_CXX" >&6; }
4761else
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
4764fi
4765
4766 if test "x$ac_pt_CXX" = x; then
4767 CXX="g++"
4768 else
4769 case $cross_compiling:$ac_tool_warned in
4770yes:)
4771{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4772$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4773ac_tool_warned=yes ;;
4774esac
4775 CXX=$ac_pt_CXX
4776 fi
4777else
4778 CXX="$ac_cv_path_CXX"
4779fi
4780 ;;
4781 cc) if test -n "$ac_tool_prefix"; then
4782 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4783set dummy ${ac_tool_prefix}c++; ac_word=$2
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004786if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788else
4789 case $CXX in
4790 [\\/]* | ?:[\\/]*)
4791 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4792 ;;
4793 *)
4794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in notfound
4796do
4797 IFS=$as_save_IFS
4798 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 break 2
4804 fi
4805done
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809 ;;
4810esac
4811fi
4812CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004813if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4815$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816else
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004820
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821
4822fi
4823if test -z "$ac_cv_path_CXX"; then
4824 ac_pt_CXX=$CXX
4825 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4828$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004834 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 +00004835 ;;
4836 *)
4837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in notfound
4839do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846 break 2
4847 fi
4848done
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004850IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852 ;;
4853esac
4854fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4856if test -n "$ac_pt_CXX"; then
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4858$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004859else
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4861$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004863
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004864 if test "x$ac_pt_CXX" = x; then
4865 CXX="c++"
4866 else
4867 case $cross_compiling:$ac_tool_warned in
4868yes:)
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4871ac_tool_warned=yes ;;
4872esac
4873 CXX=$ac_pt_CXX
4874 fi
4875else
4876 CXX="$ac_cv_path_CXX"
4877fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004878 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 clang|*/clang) if test -n "$ac_tool_prefix"; then
4880 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4881set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4883$as_echo_n "checking for $ac_word... " >&6; }
4884if ${ac_cv_path_CXX+:} false; then :
4885 $as_echo_n "(cached) " >&6
4886else
4887 case $CXX in
4888 [\\/]* | ?:[\\/]*)
4889 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4890 ;;
4891 *)
4892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4893for as_dir in notfound
4894do
4895 IFS=$as_save_IFS
4896 test -z "$as_dir" && as_dir=.
4897 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004899 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4901 break 2
4902 fi
4903done
4904 done
4905IFS=$as_save_IFS
4906
Ned Deilycbfb9a52012-06-23 16:02:19 -07004907 ;;
4908esac
4909fi
4910CXX=$ac_cv_path_CXX
4911if test -n "$CXX"; then
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4913$as_echo "$CXX" >&6; }
4914else
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4916$as_echo "no" >&6; }
4917fi
4918
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004919
4920fi
4921if test -z "$ac_cv_path_CXX"; then
4922 ac_pt_CXX=$CXX
4923 # Extract the first word of "clang++", so it can be a program name with args.
4924set dummy clang++; ac_word=$2
4925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4926$as_echo_n "checking for $ac_word... " >&6; }
4927if ${ac_cv_path_ac_pt_CXX+:} false; then :
4928 $as_echo_n "(cached) " >&6
4929else
4930 case $ac_pt_CXX in
4931 [\\/]* | ?:[\\/]*)
4932 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4933 ;;
4934 *)
4935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4936for as_dir in notfound
4937do
4938 IFS=$as_save_IFS
4939 test -z "$as_dir" && as_dir=.
4940 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004942 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4944 break 2
4945 fi
4946done
4947 done
4948IFS=$as_save_IFS
4949
4950 ;;
4951esac
4952fi
4953ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4954if test -n "$ac_pt_CXX"; then
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4956$as_echo "$ac_pt_CXX" >&6; }
4957else
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4959$as_echo "no" >&6; }
4960fi
4961
4962 if test "x$ac_pt_CXX" = x; then
4963 CXX="clang++"
4964 else
4965 case $cross_compiling:$ac_tool_warned in
4966yes:)
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4968$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4969ac_tool_warned=yes ;;
4970esac
4971 CXX=$ac_pt_CXX
4972 fi
4973else
4974 CXX="$ac_cv_path_CXX"
4975fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004976 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004977 icc|*/icc) if test -n "$ac_tool_prefix"; then
4978 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4979set dummy ${ac_tool_prefix}icpc; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_CXX+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984else
4985 case $CXX in
4986 [\\/]* | ?:[\\/]*)
4987 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4988 ;;
4989 *)
4990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in notfound
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
4995 for ac_exec_ext in '' $ac_executable_extensions; do
4996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999 break 2
5000 fi
5001done
5002 done
5003IFS=$as_save_IFS
5004
5005 ;;
5006esac
5007fi
5008CXX=$ac_cv_path_CXX
5009if test -n "$CXX"; then
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5011$as_echo "$CXX" >&6; }
5012else
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017
5018fi
5019if test -z "$ac_cv_path_CXX"; then
5020 ac_pt_CXX=$CXX
5021 # Extract the first word of "icpc", so it can be a program name with args.
5022set dummy icpc; ac_word=$2
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5024$as_echo_n "checking for $ac_word... " >&6; }
5025if ${ac_cv_path_ac_pt_CXX+:} false; then :
5026 $as_echo_n "(cached) " >&6
5027else
5028 case $ac_pt_CXX in
5029 [\\/]* | ?:[\\/]*)
5030 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5031 ;;
5032 *)
5033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in notfound
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
5038 for ac_exec_ext in '' $ac_executable_extensions; do
5039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5040 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5042 break 2
5043 fi
5044done
5045 done
5046IFS=$as_save_IFS
5047
5048 ;;
5049esac
5050fi
5051ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5052if test -n "$ac_pt_CXX"; then
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5054$as_echo "$ac_pt_CXX" >&6; }
5055else
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057$as_echo "no" >&6; }
5058fi
5059
5060 if test "x$ac_pt_CXX" = x; then
5061 CXX="icpc"
5062 else
5063 case $cross_compiling:$ac_tool_warned in
5064yes:)
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5067ac_tool_warned=yes ;;
5068esac
5069 CXX=$ac_pt_CXX
5070 fi
5071else
5072 CXX="$ac_cv_path_CXX"
5073fi
5074 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005075 esac
5076 if test "$CXX" = "notfound"
5077 then
5078 CXX=""
5079 fi
5080fi
5081if test -z "$CXX"
5082then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005083 if test -n "$ac_tool_prefix"; then
5084 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5085 do
5086 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5087set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005090if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005092else
5093 if test -n "$CXX"; then
5094 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5095else
5096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5097for as_dir in $PATH
5098do
5099 IFS=$as_save_IFS
5100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005103 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105 break 2
5106 fi
5107done
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005109IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005110
5111fi
5112fi
5113CXX=$ac_cv_prog_CXX
5114if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5116$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117else
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120fi
5121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005122
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005123 test -n "$CXX" && break
5124 done
5125fi
5126if test -z "$CXX"; then
5127 ac_ct_CXX=$CXX
5128 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5129do
5130 # Extract the first word of "$ac_prog", so it can be a program name with args.
5131set dummy $ac_prog; ac_word=$2
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5133$as_echo_n "checking for $ac_word... " >&6; }
5134if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5135 $as_echo_n "(cached) " >&6
5136else
5137 if test -n "$ac_ct_CXX"; then
5138 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5139else
5140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5141for as_dir in $PATH
5142do
5143 IFS=$as_save_IFS
5144 test -z "$as_dir" && as_dir=.
5145 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005147 ac_cv_prog_ac_ct_CXX="$ac_prog"
5148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5149 break 2
5150 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005151done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005152 done
5153IFS=$as_save_IFS
5154
5155fi
5156fi
5157ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5158if test -n "$ac_ct_CXX"; then
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5160$as_echo "$ac_ct_CXX" >&6; }
5161else
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167 test -n "$ac_ct_CXX" && break
5168done
5169
5170 if test "x$ac_ct_CXX" = x; then
5171 CXX="notfound"
5172 else
5173 case $cross_compiling:$ac_tool_warned in
5174yes:)
5175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5177ac_tool_warned=yes ;;
5178esac
5179 CXX=$ac_ct_CXX
5180 fi
5181fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182
5183 if test "$CXX" = "notfound"
5184 then
5185 CXX=""
5186 fi
5187fi
5188if test "$preset_cxx" != "$CXX"
5189then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005190 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005191
5192 By default, distutils will build C++ extension modules with \"$CXX\".
5193 If this is not intended, then set CXX on the configure command line.
5194 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005195$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196
5197 By default, distutils will build C++ extension modules with \"$CXX\".
5198 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005199 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005200fi
5201
5202
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5204
5205
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5207$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5208cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005209#undef bfin
5210#undef cris
5211#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef hppa
5214#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005217#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005218#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005219#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005220#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005221 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005222#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005223# if defined(__x86_64__) && defined(__LP64__)
5224 x86_64-linux-gnu
5225# elif defined(__x86_64__) && defined(__ILP32__)
5226 x86_64-linux-gnux32
5227# elif defined(__i386__)
5228 i386-linux-gnu
5229# elif defined(__aarch64__) && defined(__AARCH64EL__)
5230# if defined(__ILP32__)
5231 aarch64_ilp32-linux-gnu
5232# else
5233 aarch64-linux-gnu
5234# endif
5235# elif defined(__aarch64__) && defined(__AARCH64EB__)
5236# if defined(__ILP32__)
5237 aarch64_be_ilp32-linux-gnu
5238# else
5239 aarch64_be-linux-gnu
5240# endif
5241# elif defined(__alpha__)
5242 alpha-linux-gnu
5243# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5244# if defined(__ARMEL__)
5245 arm-linux-gnueabihf
5246# else
5247 armeb-linux-gnueabihf
5248# endif
5249# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5250# if defined(__ARMEL__)
5251 arm-linux-gnueabi
5252# else
5253 armeb-linux-gnueabi
5254# endif
5255# elif defined(__hppa__)
5256 hppa-linux-gnu
5257# elif defined(__ia64__)
5258 ia64-linux-gnu
5259# elif defined(__m68k__) && !defined(__mcoldfire__)
5260 m68k-linux-gnu
5261# elif defined(__mips_hard_float) && defined(_MIPSEL)
5262# if _MIPS_SIM == _ABIO32
5263 mipsel-linux-gnu
5264# elif _MIPS_SIM == _ABIN32
5265 mips64el-linux-gnuabin32
5266# elif _MIPS_SIM == _ABI64
5267 mips64el-linux-gnuabi64
5268# else
5269# error unknown platform triplet
5270# endif
5271# elif defined(__mips_hard_float)
5272# if _MIPS_SIM == _ABIO32
5273 mips-linux-gnu
5274# elif _MIPS_SIM == _ABIN32
5275 mips64-linux-gnuabin32
5276# elif _MIPS_SIM == _ABI64
5277 mips64-linux-gnuabi64
5278# else
5279# error unknown platform triplet
5280# endif
5281# elif defined(__or1k__)
5282 or1k-linux-gnu
5283# elif defined(__powerpc__) && defined(__SPE__)
5284 powerpc-linux-gnuspe
5285# elif defined(__powerpc64__)
5286# if defined(__LITTLE_ENDIAN__)
5287 powerpc64le-linux-gnu
5288# else
5289 powerpc64-linux-gnu
5290# endif
5291# elif defined(__powerpc__)
5292 powerpc-linux-gnu
5293# elif defined(__s390x__)
5294 s390x-linux-gnu
5295# elif defined(__s390__)
5296 s390-linux-gnu
5297# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5298 sh4-linux-gnu
5299# elif defined(__sparc__) && defined(__arch64__)
5300 sparc64-linux-gnu
5301# elif defined(__sparc__)
5302 sparc-linux-gnu
5303# else
5304# error unknown platform triplet
5305# endif
5306#elif defined(__FreeBSD_kernel__)
5307# if defined(__LP64__)
5308 x86_64-kfreebsd-gnu
5309# elif defined(__i386__)
5310 i386-kfreebsd-gnu
5311# else
5312# error unknown platform triplet
5313# endif
5314#elif defined(__gnu_hurd__)
5315 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005316#elif defined(__APPLE__)
5317 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005318#else
5319# error unknown platform triplet
5320#endif
5321
5322EOF
5323
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005324if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5327$as_echo "$PLATFORM_TRIPLET" >&6; }
5328else
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5330$as_echo "none" >&6; }
5331fi
5332rm -f conftest.c conftest.out
5333
5334if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5335 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5336 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5337 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005338elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5339 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005340fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005341
doko@ubuntu.com55532312016-06-14 08:55:19 +02005342if test x$MULTIARCH != x; then
5343 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5344fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345
5346
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5348$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5349save_LDFLAGS="$LDFLAGS"
5350LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005351
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5353/* end confdefs.h. */
5354
5355int
5356main ()
5357{
5358
5359 ;
5360 return 0;
5361}
5362_ACEOF
5363if ac_fn_c_try_link "$LINENO"; then :
5364 NO_AS_NEEDED="-Wl,--no-as-needed"
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5366$as_echo "yes" >&6; }
5367else
5368 NO_AS_NEEDED=""
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370$as_echo "no" >&6; }
5371fi
5372rm -f core conftest.err conftest.$ac_objext \
5373 conftest$ac_exeext conftest.$ac_ext
5374LDFLAGS="$save_LDFLAGS"
5375
5376
5377
5378# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379
Matthias Kloseb9621712010-04-24 17:59:49 +00005380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5381$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005382if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384else
5385 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5386 then ac_cv_path_EGREP="$GREP -E"
5387 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005390 # Loop through the user's path and test for each of PROGNAME-LIST
5391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5393do
5394 IFS=$as_save_IFS
5395 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 for ac_prog in egrep; do
5397 for ac_exec_ext in '' $ac_executable_extensions; do
5398 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005399 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005400# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 # Check for GNU $ac_path_EGREP
5402case `"$ac_path_EGREP" --version 2>&1` in
5403*GNU*)
5404 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5405*)
5406 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408 while :
5409 do
5410 cat "conftest.in" "conftest.in" >"conftest.tmp"
5411 mv "conftest.tmp" "conftest.in"
5412 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5415 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5418 # Best one so far, save it but keep looking for a better one
5419 ac_cv_path_EGREP="$ac_path_EGREP"
5420 ac_path_EGREP_max=$ac_count
5421 fi
5422 # 10*(2^10) chars as input seems more than enough
5423 test $ac_count -gt 10 && break
5424 done
5425 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5426esac
5427
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $ac_path_EGREP_found && break 3
5429 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005434 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 +00005435 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436else
5437 ac_cv_path_EGREP=$EGREP
5438fi
5439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005440 fi
5441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5443$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005445
5446
Matthias Kloseb9621712010-04-24 17:59:49 +00005447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5448$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005449if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 $as_echo_n "(cached) " >&6
5451else
5452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005453/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005454#include <stdlib.h>
5455#include <stdarg.h>
5456#include <string.h>
5457#include <float.h>
5458
5459int
5460main ()
5461{
5462
5463 ;
5464 return 0;
5465}
5466_ACEOF
5467if ac_fn_c_try_compile "$LINENO"; then :
5468 ac_cv_header_stdc=yes
5469else
5470 ac_cv_header_stdc=no
5471fi
5472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5473
5474if test $ac_cv_header_stdc = yes; then
5475 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5477/* end confdefs.h. */
5478#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005479
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005480_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005483
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005484else
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005486fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005487rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488
Matthias Kloseb9621712010-04-24 17:59:49 +00005489fi
5490
5491if test $ac_cv_header_stdc = yes; then
5492 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h. */
5495#include <stdlib.h>
5496
5497_ACEOF
5498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5499 $EGREP "free" >/dev/null 2>&1; then :
5500
5501else
5502 ac_cv_header_stdc=no
5503fi
5504rm -f conftest*
5505
5506fi
5507
5508if test $ac_cv_header_stdc = yes; then
5509 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5510 if test "$cross_compiling" = yes; then :
5511 :
5512else
5513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5514/* end confdefs.h. */
5515#include <ctype.h>
5516#include <stdlib.h>
5517#if ((' ' & 0x0FF) == 0x020)
5518# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5519# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5520#else
5521# define ISLOWER(c) \
5522 (('a' <= (c) && (c) <= 'i') \
5523 || ('j' <= (c) && (c) <= 'r') \
5524 || ('s' <= (c) && (c) <= 'z'))
5525# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5526#endif
5527
5528#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5529int
5530main ()
5531{
5532 int i;
5533 for (i = 0; i < 256; i++)
5534 if (XOR (islower (i), ISLOWER (i))
5535 || toupper (i) != TOUPPER (i))
5536 return 2;
5537 return 0;
5538}
5539_ACEOF
5540if ac_fn_c_try_run "$LINENO"; then :
5541
5542else
5543 ac_cv_header_stdc=no
5544fi
5545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5546 conftest.$ac_objext conftest.beam conftest.$ac_ext
5547fi
5548
5549fi
5550fi
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5552$as_echo "$ac_cv_header_stdc" >&6; }
5553if test $ac_cv_header_stdc = yes; then
5554
5555$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5556
5557fi
5558
5559# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5560for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5561 inttypes.h stdint.h unistd.h
5562do :
5563 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5564ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5565"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005566if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005567 cat >>confdefs.h <<_ACEOF
5568#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5569_ACEOF
5570
5571fi
5572
5573done
5574
5575
5576
5577 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 +02005578if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005579 MINIX=yes
5580else
5581 MINIX=
5582fi
5583
5584
5585 if test "$MINIX" = yes; then
5586
5587$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5588
5589
5590$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5591
5592
5593$as_echo "#define _MINIX 1" >>confdefs.h
5594
5595 fi
5596
5597
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5599$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005600if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005601 $as_echo_n "(cached) " >&6
5602else
5603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5604/* end confdefs.h. */
5605
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005606# define __EXTENSIONS__ 1
5607 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005608int
5609main ()
5610{
5611
5612 ;
5613 return 0;
5614}
5615_ACEOF
5616if ac_fn_c_try_compile "$LINENO"; then :
5617 ac_cv_safe_to_define___extensions__=yes
5618else
5619 ac_cv_safe_to_define___extensions__=no
5620fi
5621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5622fi
5623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5624$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5625 test $ac_cv_safe_to_define___extensions__ = yes &&
5626 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5627
5628 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5629
5630 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5631
5632 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5633
5634 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5635
5636
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637
Xavier de Gaye95750b12016-07-09 11:05:42 +02005638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5639$as_echo_n "checking for the Android API level... " >&6; }
5640cat >> conftest.c <<EOF
5641#ifdef __ANDROID__
5642#include <android/api-level.h>
5643__ANDROID_API__
5644#else
5645#error not Android
5646#endif
5647EOF
5648
5649if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5650 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5652$as_echo "$ANDROID_API_LEVEL" >&6; }
5653
5654cat >>confdefs.h <<_ACEOF
5655#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5656_ACEOF
5657
5658else
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5660$as_echo "not Android" >&6; }
5661fi
5662rm -f conftest.c conftest.out
5663
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664# Check for unsupported systems
5665case $ac_sys_system/$ac_sys_release in
5666atheos*|Linux*/1*)
5667 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5668 echo See README for details.
5669 exit 1;;
5670esac
5671
5672
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5674$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005677if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678 withval=$with_suffix;
5679 case $withval in
5680 no) EXEEXT=;;
5681 yes) EXEEXT=.exe;;
5682 *) EXEEXT=$withval;;
5683 esac
5684fi
5685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5687$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689# Test whether we're running on a non-case-sensitive system, in which
5690# case we give a warning if no ext is given
5691
Matthias Kloseb9621712010-04-24 17:59:49 +00005692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5693$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694if test ! -d CaseSensitiveTestDir; then
5695mkdir CaseSensitiveTestDir
5696fi
5697
5698if test -d casesensitivetestdir
5699then
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5701$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 BUILDEXEEXT=.exe
5703else
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5705$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706 BUILDEXEEXT=$EXEEXT
5707fi
5708rmdir CaseSensitiveTestDir
5709
5710case $MACHDEP in
5711bsdos*)
5712 case $CC in
5713 gcc) CC="$CC -D_HAVE_BSDI";;
5714 esac;;
5715esac
5716
5717case $ac_sys_system in
5718hp*|HP*)
5719 case $CC in
5720 cc|*/cc) CC="$CC -Ae";;
5721 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722esac
5723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5726$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727if test -z "$LIBRARY"
5728then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005729 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5732$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734# LDLIBRARY is the name of the library to link against (as opposed to the
5735# name of the library into which to insert object files). BLDLIBRARY is also
5736# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5737# is blank as the main program is not linked directly against LDLIBRARY.
5738# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5739# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5740# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5741# DLLLIBRARY is the shared (i.e., DLL) library.
5742#
5743# RUNSHARED is used to run shared python without installed libraries
5744#
5745# INSTSONAME is the name of the shared library that will be use to install
5746# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005747#
5748# LDVERSION is the shared library version number, normally the Python version
5749# with the ABI build flags appended.
5750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
5752
5753
5754
5755
5756
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758LDLIBRARY="$LIBRARY"
5759BLDLIBRARY='$(LDLIBRARY)'
5760INSTSONAME='$(LDLIBRARY)'
5761DLLLIBRARY=''
5762LDLIBRARYDIR=''
5763RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005764LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766# LINKCC is the command that links the python executable -- default is $(CC).
5767# If CXX is set, and if it is needed to link a main function that was
5768# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5769# python might then depend on the C++ runtime
5770# This is altered for AIX in order to build the export list before
5771# linking.
5772
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5774$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775if test -z "$LINKCC"
5776then
5777 LINKCC='$(PURIFY) $(MAINCC)'
5778 case $ac_sys_system in
5779 AIX*)
5780 exp_extra="\"\""
5781 if test $ac_sys_release -ge 5 -o \
5782 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5783 exp_extra="."
5784 fi
5785 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786 QNX*)
5787 # qcc must be used because the other compilers do not
5788 # support -N.
5789 LINKCC=qcc;;
5790 esac
5791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5793$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794
5795# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5796# make sure we default having it set to "no": this is used by
5797# distutils.unixccompiler to know if it should add --enable-new-dtags
5798# to linker command lines, and failing to detect GNU ld simply results
5799# in the same bahaviour as before.
5800
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5802$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803ac_prog=ld
5804if test "$GCC" = yes; then
5805 ac_prog=`$CC -print-prog-name=ld`
5806fi
5807case `"$ac_prog" -V 2>&1 < /dev/null` in
5808 *GNU*)
5809 GNULD=yes;;
5810 *)
5811 GNULD=no;;
5812esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5814$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5817$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005818if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005819 $as_echo_n "(cached) " >&6
5820else
5821 ac_cv_c_inline=no
5822for ac_kw in inline __inline__ __inline; do
5823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5824/* end confdefs.h. */
5825#ifndef __cplusplus
5826typedef int foo_t;
5827static $ac_kw foo_t static_foo () {return 0; }
5828$ac_kw foo_t foo () {return 0; }
5829#endif
5830
5831_ACEOF
5832if ac_fn_c_try_compile "$LINENO"; then :
5833 ac_cv_c_inline=$ac_kw
5834fi
5835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5836 test "$ac_cv_c_inline" != no && break
5837done
5838
5839fi
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5841$as_echo "$ac_cv_c_inline" >&6; }
5842
5843case $ac_cv_c_inline in
5844 inline | yes) ;;
5845 *)
5846 case $ac_cv_c_inline in
5847 no) ac_val=;;
5848 *) ac_val=$ac_cv_c_inline;;
5849 esac
5850 cat >>confdefs.h <<_ACEOF
5851#ifndef __cplusplus
5852#define inline $ac_val
5853#endif
5854_ACEOF
5855 ;;
5856esac
5857
5858if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005859
5860$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005861
5862
5863fi
5864
5865
Matthias Kloseb9621712010-04-24 17:59:49 +00005866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5867$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005869if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870 enableval=$enable_shared;
5871fi
5872
5873
5874if test -z "$enable_shared"
5875then
5876 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005877 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 enable_shared="yes";;
5879 *)
5880 enable_shared="no";;
5881 esac
5882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5884$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
Matthias Kloseb9621712010-04-24 17:59:49 +00005886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5887$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005889if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890 enableval=$enable_profiling;
5891fi
5892
5893if test "x$enable_profiling" = xyes; then
5894 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005895 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897/* end confdefs.h. */
5898int main() { return 0; }
5899_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005900if ac_fn_c_try_link "$LINENO"; then :
5901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005903 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005905rm -f core conftest.err conftest.$ac_objext \
5906 conftest$ac_exeext conftest.$ac_ext
5907 CC="$ac_save_cc"
5908else
5909 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5912$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913
doko@ubuntu.comba015832012-06-30 16:52:05 +02005914if test "x$enable_profiling" = xyes; then
5915 BASECFLAGS="-pg $BASECFLAGS"
5916 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917fi
5918
Matthias Kloseb9621712010-04-24 17:59:49 +00005919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5920$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921
5922# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5923# library that we build, but we do not want to link against it (we
5924# will find it with a -framework option). For this reason there is an
5925# extra variable BLDLIBRARY against which Python and the extension
5926# modules are linked, BLDLIBRARY. This is normally the same as
5927# LDLIBRARY, but empty for MacOSX framework builds.
5928if test "$enable_framework"
5929then
5930 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005931 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 BLDLIBRARY=''
5933else
5934 BLDLIBRARY='$(LDLIBRARY)'
5935fi
5936
5937# Other platforms follow
5938if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005939 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
Matthias Kloseb9621712010-04-24 17:59:49 +00005941$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942
5943 case $ac_sys_system in
5944 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945 LDLIBRARY='libpython$(LDVERSION).dll.a'
5946 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
5948 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).so'
5950 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005951 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005953 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005954 then
5955 PY3LIBRARY=libpython3.so
5956 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005958 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).so'
5960 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005961 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005963 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005964 then
5965 PY3LIBRARY=libpython3.so
5966 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 ;;
5968 hp*|HP*)
5969 case `uname -m` in
5970 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005971 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ;;
5973 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005974 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 ;;
5976 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005977 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005978 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005981 LDLIBRARY='libpython$(LDVERSION).dylib'
5982 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005983 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005985 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005986 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005987 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005988 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989
5990 esac
5991else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005992 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 case $ac_sys_system in
5994 CYGWIN*)
5995 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005996 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997 ;;
5998 esac
5999fi
6000
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006001if test "$cross_compiling" = yes; then
6002 RUNSHARED=
6003fi
6004
Matthias Kloseb9621712010-04-24 17:59:49 +00006005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6006$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007
6008if test -n "$ac_tool_prefix"; then
6009 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6010set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6012$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006013if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
6016 if test -n "$RANLIB"; then
6017 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6018else
6019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020for as_dir in $PATH
6021do
6022 IFS=$as_save_IFS
6023 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006025 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 break 2
6029 fi
6030done
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032IFS=$as_save_IFS
6033
6034fi
6035fi
6036RANLIB=$ac_cv_prog_RANLIB
6037if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6039$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040else
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6042$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043fi
6044
6045
6046fi
6047if test -z "$ac_cv_prog_RANLIB"; then
6048 ac_ct_RANLIB=$RANLIB
6049 # Extract the first word of "ranlib", so it can be a program name with args.
6050set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6052$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006053if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055else
6056 if test -n "$ac_ct_RANLIB"; then
6057 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6058else
6059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060for as_dir in $PATH
6061do
6062 IFS=$as_save_IFS
6063 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068 break 2
6069 fi
6070done
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072IFS=$as_save_IFS
6073
6074fi
6075fi
6076ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6077if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6079$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080else
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083fi
6084
6085 if test "x$ac_ct_RANLIB" = x; then
6086 RANLIB=":"
6087 else
6088 case $cross_compiling:$ac_tool_warned in
6089yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092ac_tool_warned=yes ;;
6093esac
6094 RANLIB=$ac_ct_RANLIB
6095 fi
6096else
6097 RANLIB="$ac_cv_prog_RANLIB"
6098fi
6099
6100
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006101if test -n "$ac_tool_prefix"; then
6102 for ac_prog in ar aal
6103 do
6104 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6105set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006108if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006109 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110else
6111 if test -n "$AR"; then
6112 ac_cv_prog_AR="$AR" # Let the user override the test.
6113else
6114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115for as_dir in $PATH
6116do
6117 IFS=$as_save_IFS
6118 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006119 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006120 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006121 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006123 break 2
6124 fi
6125done
Matthias Kloseb9621712010-04-24 17:59:49 +00006126 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127IFS=$as_save_IFS
6128
6129fi
6130fi
6131AR=$ac_cv_prog_AR
6132if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6134$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135else
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6137$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138fi
6139
6140
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006141 test -n "$AR" && break
6142 done
6143fi
6144if test -z "$AR"; then
6145 ac_ct_AR=$AR
6146 for ac_prog in ar aal
6147do
6148 # Extract the first word of "$ac_prog", so it can be a program name with args.
6149set dummy $ac_prog; ac_word=$2
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6151$as_echo_n "checking for $ac_word... " >&6; }
6152if ${ac_cv_prog_ac_ct_AR+:} false; then :
6153 $as_echo_n "(cached) " >&6
6154else
6155 if test -n "$ac_ct_AR"; then
6156 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6157else
6158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159for as_dir in $PATH
6160do
6161 IFS=$as_save_IFS
6162 test -z "$as_dir" && as_dir=.
6163 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006165 ac_cv_prog_ac_ct_AR="$ac_prog"
6166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6167 break 2
6168 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006170 done
6171IFS=$as_save_IFS
6172
6173fi
6174fi
6175ac_ct_AR=$ac_cv_prog_ac_ct_AR
6176if test -n "$ac_ct_AR"; then
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6178$as_echo "$ac_ct_AR" >&6; }
6179else
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
6182fi
6183
6184
6185 test -n "$ac_ct_AR" && break
6186done
6187
6188 if test "x$ac_ct_AR" = x; then
6189 AR="ar"
6190 else
6191 case $cross_compiling:$ac_tool_warned in
6192yes:)
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6194$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6195ac_tool_warned=yes ;;
6196esac
6197 AR=$ac_ct_AR
6198 fi
6199fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200
6201
6202# tweak ARFLAGS only if the user didn't set it on the command line
6203
6204if test -z "$ARFLAGS"
6205then
6206 ARFLAGS="rc"
6207fi
6208
doko@ubuntu.com58844492012-06-30 18:25:32 +02006209if test -n "$ac_tool_prefix"; then
6210 for ac_prog in readelf
6211 do
6212 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6213set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if ${ac_cv_prog_READELF+:} false; then :
6217 $as_echo_n "(cached) " >&6
6218else
6219 if test -n "$READELF"; then
6220 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6221else
6222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6223for as_dir in $PATH
6224do
6225 IFS=$as_save_IFS
6226 test -z "$as_dir" && as_dir=.
6227 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006229 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6231 break 2
6232 fi
6233done
6234 done
6235IFS=$as_save_IFS
6236
6237fi
6238fi
6239READELF=$ac_cv_prog_READELF
6240if test -n "$READELF"; then
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6242$as_echo "$READELF" >&6; }
6243else
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6245$as_echo "no" >&6; }
6246fi
6247
6248
6249 test -n "$READELF" && break
6250 done
6251fi
6252if test -z "$READELF"; then
6253 ac_ct_READELF=$READELF
6254 for ac_prog in readelf
6255do
6256 # Extract the first word of "$ac_prog", so it can be a program name with args.
6257set dummy $ac_prog; ac_word=$2
6258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6259$as_echo_n "checking for $ac_word... " >&6; }
6260if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6261 $as_echo_n "(cached) " >&6
6262else
6263 if test -n "$ac_ct_READELF"; then
6264 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6265else
6266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267for as_dir in $PATH
6268do
6269 IFS=$as_save_IFS
6270 test -z "$as_dir" && as_dir=.
6271 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006273 ac_cv_prog_ac_ct_READELF="$ac_prog"
6274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6275 break 2
6276 fi
6277done
6278 done
6279IFS=$as_save_IFS
6280
6281fi
6282fi
6283ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6284if test -n "$ac_ct_READELF"; then
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6286$as_echo "$ac_ct_READELF" >&6; }
6287else
6288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6289$as_echo "no" >&6; }
6290fi
6291
6292
6293 test -n "$ac_ct_READELF" && break
6294done
6295
6296 if test "x$ac_ct_READELF" = x; then
6297 READELF=":"
6298 else
6299 case $cross_compiling:$ac_tool_warned in
6300yes:)
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6303ac_tool_warned=yes ;;
6304esac
6305 READELF=$ac_ct_READELF
6306 fi
6307fi
6308
6309if test "$cross_compiling" = yes; then
6310 case "$READELF" in
6311 readelf|:)
6312 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6313 ;;
6314 esac
6315fi
6316
6317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319case $MACHDEP in
6320bsdos*|hp*|HP*)
6321 # install -d does not work on BSDI or HP-UX
6322 if test -z "$INSTALL"
6323 then
6324 INSTALL="${srcdir}/install-sh -c"
6325 fi
6326esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327# Find a good install program. We prefer a C program (faster),
6328# so one script is as good as another. But avoid the broken or
6329# incompatible versions:
6330# SysV /etc/install, /usr/sbin/install
6331# SunOS /usr/etc/install
6332# IRIX /sbin/install
6333# AIX /bin/install
6334# AmigaOS /C/install, which installs bootblocks on floppy discs
6335# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6336# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6337# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6338# OS/2's system install, which has a completely different semantic
6339# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006340# Reject install programs that cannot install multiple files.
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6342$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006344if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006345 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346else
6347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350 IFS=$as_save_IFS
6351 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006352 # Account for people who put trailing slashes in PATH elements.
6353case $as_dir/ in #((
6354 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006356 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357 /usr/ucb/* ) ;;
6358 *)
6359 # OSF1 and SCO ODT 3.0 have their own names for install.
6360 # Don't use installbsd from OSF since it installs stuff as root
6361 # by default.
6362 for ac_prog in ginstall scoinst install; do
6363 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006364 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365 if test $ac_prog = install &&
6366 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6367 # AIX install. It has an incompatible calling convention.
6368 :
6369 elif test $ac_prog = install &&
6370 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6371 # program-specific install script used by HP pwplus--don't use.
6372 :
6373 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 rm -rf conftest.one conftest.two conftest.dir
6375 echo one > conftest.one
6376 echo two > conftest.two
6377 mkdir conftest.dir
6378 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6379 test -s conftest.one && test -s conftest.two &&
6380 test -s conftest.dir/conftest.one &&
6381 test -s conftest.dir/conftest.two
6382 then
6383 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6384 break 3
6385 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386 fi
6387 fi
6388 done
6389 done
6390 ;;
6391esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006392
6393 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006394IFS=$as_save_IFS
6395
Matthias Kloseb9621712010-04-24 17:59:49 +00006396rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006397
6398fi
6399 if test "${ac_cv_path_install+set}" = set; then
6400 INSTALL=$ac_cv_path_install
6401 else
6402 # As a last resort, use the slow shell script. Don't cache a
6403 # value for INSTALL within a source directory, because that will
6404 # break other packages using the cache if that directory is
6405 # removed, or if the value is a relative name.
6406 INSTALL=$ac_install_sh
6407 fi
6408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6410$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411
6412# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6413# It thinks the first close brace ends the variable substitution.
6414test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6415
6416test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6417
6418test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6419
Matthias Klose93a0ef12012-03-15 18:08:34 +01006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6421$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6422if test -z "$MKDIR_P"; then
6423 if ${ac_cv_path_mkdir+:} false; then :
6424 $as_echo_n "(cached) " >&6
6425else
6426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6428do
6429 IFS=$as_save_IFS
6430 test -z "$as_dir" && as_dir=.
6431 for ac_prog in mkdir gmkdir; do
6432 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006433 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006434 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6435 'mkdir (GNU coreutils) '* | \
6436 'mkdir (coreutils) '* | \
6437 'mkdir (fileutils) '4.1*)
6438 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6439 break 3;;
6440 esac
6441 done
6442 done
6443 done
6444IFS=$as_save_IFS
6445
6446fi
6447
6448 test -d ./--version && rmdir ./--version
6449 if test "${ac_cv_path_mkdir+set}" = set; then
6450 MKDIR_P="$ac_cv_path_mkdir -p"
6451 else
6452 # As a last resort, use the slow shell script. Don't cache a
6453 # value for MKDIR_P within a source directory, because that will
6454 # break other packages using the cache if that directory is
6455 # removed, or if the value is a relative name.
6456 MKDIR_P="$ac_install_sh -d"
6457 fi
6458fi
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6460$as_echo "$MKDIR_P" >&6; }
6461
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462
6463# Not every filesystem supports hard links
6464
6465if test -z "$LN" ; then
6466 case $ac_sys_system in
6467 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006468 *) LN=ln;;
6469 esac
6470fi
6471
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006472# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006473
6474ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006475
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6478$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006479
6480# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006481if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006482 withval=$with_pydebug;
6483if test "$withval" != no
6484then
6485
Matthias Kloseb9621712010-04-24 17:59:49 +00006486$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487
Matthias Kloseb9621712010-04-24 17:59:49 +00006488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6489$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006490 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006491 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006492else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494fi
6495else
Matthias Kloseb9621712010-04-24 17:59:49 +00006496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006498fi
6499
6500
Brett Cannon63d98bc2016-09-06 17:12:40 -07006501# Enable optimization flags
6502
6503
6504Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6506$as_echo_n "checking for --enable-optimizations... " >&6; }
6507# Check whether --enable-optimizations was given.
6508if test "${enable_optimizations+set}" = set; then :
6509 enableval=$enable_optimizations;
Brett Cannon63d98bc2016-09-06 17:12:40 -07006510if test "$withval" != no
6511then
6512 Py_OPT='true'
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6514$as_echo "yes" >&6; };
6515else
6516 Py_OPT='false'
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6518$as_echo "no" >&6; };
6519fi
6520else
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; }
6523fi
6524
6525if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006526 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6527 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006528 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006529 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006530 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006531 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006532 DEF_MAKE_RULE="build_all"
6533else
6534 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006535 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006536 DEF_MAKE_RULE="all"
6537fi
6538
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006539# Enable LTO flags
6540
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6542$as_echo_n "checking for --with-lto... " >&6; }
6543
6544# Check whether --with-lto was given.
6545if test "${with_lto+set}" = set; then :
6546 withval=$with_lto;
6547if test "$withval" != no
6548then
6549 Py_LTO='true'
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6551$as_echo "yes" >&6; };
6552else
6553 Py_LTO='false'
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555$as_echo "no" >&6; };
6556fi
6557else
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562if test "$Py_LTO" = 'true' ; then
6563 case $CC in
6564 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006565 case $ac_sys_system in
6566 Darwin*)
6567 # Any changes made here should be reflected in the GCC+Darwin case below
6568 LTOFLAGS="-flto -Wl,-export_dynamic"
6569 ;;
6570 *)
6571 LTOFLAGS="-flto"
6572 ;;
6573 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006574 ;;
6575 *gcc*)
6576 case $ac_sys_system in
6577 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006578 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006579 ;;
6580 *)
6581 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6582 ;;
6583 esac
6584 ;;
6585 esac
6586fi
6587
Brett Cannon7188a3e2015-09-18 15:13:44 -07006588# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006589
6590
6591
6592
6593
Gregory P. Smith799520c2016-09-07 16:10:00 -07006594# Make this work on systems where llvm tools are not installed with their
6595# normal names in the default $PATH (ie: Ubuntu). They exist under the
6596# non-suffixed name in their versioned llvm directory.
6597llvm_bin_dir=''
6598llvm_path="${PATH}"
6599if test "${CC}" = "clang"
6600then
6601 clang_bin=`which clang`
6602 # Some systems install clang elsewhere as a symlink to the real path
6603 # which is where the related llvm tools are located.
6604 if test -L "${clang_bin}"
6605 then
6606 clang_dir=`dirname "${clang_bin}"`
6607 clang_bin=`readlink "${clang_bin}"`
6608 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6609 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6610 fi
6611fi
Zachary Ware5af85642015-12-21 12:09:17 -06006612
Gregory P. Smith799520c2016-09-07 16:10:00 -07006613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6614$as_echo_n "checking target system type... " >&6; }
6615if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006616 $as_echo_n "(cached) " >&6
6617else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006618 if test "x$target_alias" = x; then
6619 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006620else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006621 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6622 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6623fi
6624
6625fi
6626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6627$as_echo "$ac_cv_target" >&6; }
6628case $ac_cv_target in
6629*-*-*) ;;
6630*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6631esac
6632target=$ac_cv_target
6633ac_save_IFS=$IFS; IFS='-'
6634set x $ac_cv_target
6635shift
6636target_cpu=$1
6637target_vendor=$2
6638shift; shift
6639# Remember, the first character of IFS is used to create $*,
6640# except with old shells:
6641target_os=$*
6642IFS=$ac_save_IFS
6643case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6644
6645
6646# The aliases save the names the user supplied, while $host etc.
6647# will get canonicalized.
6648test -n "$target_alias" &&
6649 test "$program_prefix$program_suffix$program_transform_name" = \
6650 NONENONEs,x,x, &&
6651 program_prefix=${target_alias}-
6652# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6653set dummy $target_alias-llvm-profdata; ac_word=$2
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6655$as_echo_n "checking for $ac_word... " >&6; }
6656if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6657 $as_echo_n "(cached) " >&6
6658else
6659 case $LLVM_PROFDATA in
6660 [\\/]* | ?:[\\/]*)
6661 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6662 ;;
6663 *)
6664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6665for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006666do
6667 IFS=$as_save_IFS
6668 test -z "$as_dir" && as_dir=.
6669 for ac_exec_ext in '' $ac_executable_extensions; do
6670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006671 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6673 break 2
6674 fi
6675done
6676 done
6677IFS=$as_save_IFS
6678
Gregory P. Smith799520c2016-09-07 16:10:00 -07006679 ;;
6680esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006682LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6683if test -n "$LLVM_PROFDATA"; then
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6685$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006686else
6687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6688$as_echo "no" >&6; }
6689fi
6690
6691
Gregory P. Smith799520c2016-09-07 16:10:00 -07006692if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6693 if test "$build" = "$target"; then
6694 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6695 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6696set dummy llvm-profdata; ac_word=$2
6697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6698$as_echo_n "checking for $ac_word... " >&6; }
6699if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6700 $as_echo_n "(cached) " >&6
6701else
6702 case $ac_pt_LLVM_PROFDATA in
6703 [\\/]* | ?:[\\/]*)
6704 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6705 ;;
6706 *)
6707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6708for as_dir in ${llvm_path}
6709do
6710 IFS=$as_save_IFS
6711 test -z "$as_dir" && as_dir=.
6712 for ac_exec_ext in '' $ac_executable_extensions; do
6713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6714 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6716 break 2
6717 fi
6718done
6719 done
6720IFS=$as_save_IFS
6721
6722 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6723 ;;
6724esac
6725fi
6726ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6727if test -n "$ac_pt_LLVM_PROFDATA"; then
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6729$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6730else
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732$as_echo "no" >&6; }
6733fi
6734
6735 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6736 else
6737 LLVM_PROFDATA="''"
6738 fi
6739else
6740 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6741fi
6742
6743
6744if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6745then
6746 LLVM_PROF_FOUND="found"
6747else
6748 LLVM_PROF_FOUND="not-found"
6749fi
6750if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6751then
6752 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6753 if test -n "${found_llvm_profdata}"
6754 then
6755 # llvm-profdata isn't directly in $PATH in some cases.
6756 # https://apple.stackexchange.com/questions/197053/
6757 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6758 LLVM_PROF_FOUND=found
6759 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6760$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6761 fi
6762fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006763LLVM_PROF_ERR=no
6764case $CC in
6765 *clang*)
6766 # Any changes made here should be reflected in the GCC+Darwin case below
6767 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6768 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006769 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006770 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6771 if test $LLVM_PROF_FOUND = not-found
6772 then
6773 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006774 if test "${REQUIRE_PGO}" = "yes"
6775 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006776 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006777 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006778 fi
6779 ;;
6780 *gcc*)
6781 case $ac_sys_system in
6782 Darwin*)
6783 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6784 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006785 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006786 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006787 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006788 then
6789 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006790 if test "${REQUIRE_PGO}" = "yes"
6791 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006792 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006793 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006794 fi
6795 ;;
6796 *)
6797 PGO_PROF_GEN_FLAG="-fprofile-generate"
6798 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6799 LLVM_PROF_MERGER="true"
6800 LLVM_PROF_FILE=""
6801 ;;
6802 esac
6803 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006804 *icc*)
6805 PGO_PROF_GEN_FLAG="-prof-gen"
6806 PGO_PROF_USE_FLAG="-prof-use"
6807 LLVM_PROF_MERGER="true"
6808 LLVM_PROF_FILE=""
6809 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006810esac
6811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6813# merged with this chunk of code?
6814
6815# Optimizer/debugger flags
6816# ------------------------
6817# (The following bit of code is complicated enough - please keep things
6818# indented properly. Just pretend you're editing Python code. ;-)
6819
6820# There are two parallel sets of case statements below, one that checks to
6821# see if OPT was set and one that does BASECFLAGS setting based upon
6822# compiler and platform. BASECFLAGS tweaks need to be made even if the
6823# user set OPT.
6824
6825# tweak OPT based on compiler and platform, only if the user didn't set
6826# it on the command line
6827
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006828if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829then
6830 case $GCC in
6831 yes)
6832 if test "$CC" != 'g++' ; then
6833 STRICT_PROTO="-Wstrict-prototypes"
6834 fi
6835 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6836 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6837 WRAP="-fwrapv"
6838 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006839
6840 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006841 case $CC in
6842 *clang*) WRAP="-fwrapv"
6843 ;;
6844 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846 case $ac_cv_prog_cc_g in
6847 yes)
6848 if test "$Py_DEBUG" = 'true' ; then
6849 # Optimization messes up debuggers, so turn it off for
6850 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006851 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6852 OPT="-g -Og -Wall $STRICT_PROTO"
6853 else
6854 OPT="-g -O0 -Wall $STRICT_PROTO"
6855 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856 else
6857 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6858 fi
6859 ;;
6860 *)
6861 OPT="-O3 -Wall $STRICT_PROTO"
6862 ;;
6863 esac
6864 case $ac_sys_system in
6865 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6866 ;;
6867 esac
6868 ;;
6869
6870 *)
6871 OPT="-O"
6872 ;;
6873 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874fi
6875
6876
6877
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879# The -arch flags for universal builds on OSX
6880UNIVERSAL_ARCH_FLAGS=
6881
6882
6883# tweak BASECFLAGS based on compiler and platform
6884case $GCC in
6885yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006886 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006887
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6889$as_echo_n "checking for -Wextra... " >&6; }
6890 ac_save_cc="$CC"
6891 CC="$CC -Wextra -Werror"
6892 if ${ac_cv_extra_warnings+:} false; then :
6893 $as_echo_n "(cached) " >&6
6894else
6895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6896/* end confdefs.h. */
6897
6898
6899int
6900main ()
6901{
6902
6903 ;
6904 return 0;
6905}
6906
6907_ACEOF
6908if ac_fn_c_try_compile "$LINENO"; then :
6909
6910 ac_cv_extra_warnings=yes
6911
6912else
6913
6914 ac_cv_extra_warnings=no
6915
6916fi
6917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6918fi
6919
6920 CC="$ac_save_cc"
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6922$as_echo "$ac_cv_extra_warnings" >&6; }
6923
6924 if test $ac_cv_extra_warnings = yes
6925 then
6926 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6927 fi
6928
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006929 # Python doesn't violate C99 aliasing rules, but older versions of
6930 # GCC produce warnings for legal Python code. Enable
6931 # -fno-strict-aliasing on versions of GCC that support but produce
6932 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6934$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935 ac_save_cc="$CC"
6936 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006937 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006938 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006939 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006940else
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006943
Matthias Kloseb159a552010-04-25 21:00:44 +00006944
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006945int
6946main ()
6947{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006948
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006949 ;
6950 return 0;
6951}
Matthias Kloseb159a552010-04-25 21:00:44 +00006952
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006954if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006955
6956 CC="$ac_save_cc -fstrict-aliasing"
6957 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006959/* end confdefs.h. */
6960
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006961 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006962int
6963main ()
6964{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006965double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006966 ;
6967 return 0;
6968}
Matthias Kloseb159a552010-04-25 21:00:44 +00006969
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006971if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006972
6973 ac_cv_no_strict_aliasing=no
6974
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975else
Matthias Kloseb159a552010-04-25 21:00:44 +00006976
6977 ac_cv_no_strict_aliasing=yes
6978
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006979fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982else
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
6984 ac_cv_no_strict_aliasing=no
6985
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006988fi
6989
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6993$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006994 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995 then
6996 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6997 fi
6998
Zachary Ware5af85642015-12-21 12:09:17 -06006999 # ICC doesn't recognize the option, but only emits a warning
7000 ## XXX does it emit an unused result warning and can it be disabled?
7001 case "$CC" in
7002 *icc*)
7003 ac_cv_disable_unused_result_warning=no
7004 ;;
7005 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7007$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7008 ac_save_cc="$CC"
7009 CC="$CC -Wunused-result -Werror"
7010 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007011 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007012 $as_echo_n "(cached) " >&6
7013else
7014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7015/* end confdefs.h. */
7016
7017
7018int
7019main ()
7020{
7021
7022 ;
7023 return 0;
7024}
7025
7026_ACEOF
7027if ac_fn_c_try_compile "$LINENO"; then :
7028
7029 ac_cv_disable_unused_result_warning=yes
7030
7031else
7032
7033 ac_cv_disable_unused_result_warning=no
7034
7035fi
7036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7037fi
7038
7039 CFLAGS="$save_CFLAGS"
7040 CC="$ac_save_cc"
7041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7042$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007043 ;;
7044 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007045
7046 if test $ac_cv_disable_unused_result_warning = yes
7047 then
7048 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007049 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7050 fi
7051
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7053$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7054 ac_save_cc="$CC"
7055 CC="$CC -Wunused-parameter -Werror"
7056 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7057 $as_echo_n "(cached) " >&6
7058else
7059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7060/* end confdefs.h. */
7061
7062
7063int
7064main ()
7065{
7066
7067 ;
7068 return 0;
7069}
7070
7071_ACEOF
7072if ac_fn_c_try_compile "$LINENO"; then :
7073
7074 ac_cv_disable_unused_parameter_warning=yes
7075
7076else
7077
7078 ac_cv_disable_unused_parameter_warning=no
7079
7080fi
7081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7082fi
7083
7084 CC="$ac_save_cc"
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7086$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7087
7088 if test $ac_cv_disable_unused_parameter_warning = yes
7089 then
7090 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7091 fi
7092
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7094$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7095 ac_save_cc="$CC"
7096 CC="$CC -Wmissing-field-initializers -Werror"
7097 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7098 $as_echo_n "(cached) " >&6
7099else
7100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7101/* end confdefs.h. */
7102
7103
7104int
7105main ()
7106{
7107
7108 ;
7109 return 0;
7110}
7111
7112_ACEOF
7113if ac_fn_c_try_compile "$LINENO"; then :
7114
7115 ac_cv_disable_missing_field_initializers=yes
7116
7117else
7118
7119 ac_cv_disable_missing_field_initializers=no
7120
7121fi
7122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7123fi
7124
7125 CC="$ac_save_cc"
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7127$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7128
7129 if test $ac_cv_disable_missing_field_initializers = yes
7130 then
7131 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007132 fi
7133
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7135$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7136 ac_save_cc="$CC"
7137 CC="$CC -Wsign-compare"
7138 save_CFLAGS="$CFLAGS"
7139 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7140 $as_echo_n "(cached) " >&6
7141else
7142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7143/* end confdefs.h. */
7144
7145
7146int
7147main ()
7148{
7149
7150 ;
7151 return 0;
7152}
7153
7154_ACEOF
7155if ac_fn_c_try_compile "$LINENO"; then :
7156
7157 ac_cv_enable_sign_compare_warning=yes
7158
7159else
7160
7161 ac_cv_enable_sign_compare_warning=no
7162
7163fi
7164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7165fi
7166
7167 CFLAGS="$save_CFLAGS"
7168 CC="$ac_save_cc"
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7170$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7171
7172 if test $ac_cv_enable_sign_compare_warning = yes
7173 then
7174 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7175 fi
7176
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7178$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7179 ac_save_cc="$CC"
7180 CC="$CC -Wunreachable-code"
7181 save_CFLAGS="$CFLAGS"
7182 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7183 $as_echo_n "(cached) " >&6
7184else
7185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7186/* end confdefs.h. */
7187
7188
7189int
7190main ()
7191{
7192
7193 ;
7194 return 0;
7195}
7196
7197_ACEOF
7198if ac_fn_c_try_compile "$LINENO"; then :
7199
7200 ac_cv_enable_unreachable_code_warning=yes
7201
7202else
7203
7204 ac_cv_enable_unreachable_code_warning=no
7205
7206fi
7207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7208fi
7209
7210 CFLAGS="$save_CFLAGS"
7211 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007212
7213 # Don't enable unreachable code warning in debug mode, since it usually
7214 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007215 # Issue #24324: Unfortunately, the unreachable code warning does not work
7216 # correctly on gcc and has been silently removed from the compiler.
7217 # It is supported on clang but on OS X systems gcc may be an alias
7218 # for clang. Try to determine if the compiler is not really gcc and,
7219 # if so, only then enable the warning.
7220 if test $ac_cv_enable_unreachable_code_warning = yes && \
7221 test "$Py_DEBUG" != "true" && \
7222 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007223 then
7224 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007225 else
7226 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007227 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7229$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007230
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007231 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7232 # support. Without this, treatment of subnormals doesn't follow
7233 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007234 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007235 alpha*)
7236 BASECFLAGS="$BASECFLAGS -mieee"
7237 ;;
7238 esac
7239
7240 case $ac_sys_system in
7241 SCO_SV*)
7242 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7243 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007244
7245 # is there any other compiler on Darwin besides gcc?
7246 Darwin*)
7247 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7248 # used to be here, but non-Apple gcc doesn't accept them.
7249 if test "${CC}" = gcc
7250 then
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007252$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007253 case "${UNIVERSALSDK}" in
7254 */MacOSX10.4u.sdk)
7255 # Build using 10.4 SDK, force usage of gcc when the
7256 # compiler is gcc, otherwise the user will get very
7257 # confusing error messages when building on OSX 10.6
7258 CC=gcc-4.0
7259 CPP=cpp-4.0
7260 ;;
7261 esac
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007263$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007264 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265
Ned Deily87adb6e2013-10-18 21:09:56 -07007266 if test "${enable_universalsdk}"
7267 then
7268 case "$UNIVERSAL_ARCHS" in
7269 32-bit)
7270 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7271 LIPO_32BIT_FLAGS=""
7272 ARCH_RUN_32BIT=""
7273 ;;
7274 64-bit)
7275 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7276 LIPO_32BIT_FLAGS=""
7277 ARCH_RUN_32BIT="true"
7278 ;;
7279 all)
7280 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7281 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7282 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7283 ;;
7284 intel)
7285 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7286 LIPO_32BIT_FLAGS="-extract i386"
7287 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7288 ;;
7289 intel-32)
7290 UNIVERSAL_ARCH_FLAGS="-arch i386"
7291 LIPO_32BIT_FLAGS=""
7292 ARCH_RUN_32BIT=""
7293 ;;
7294 3-way)
7295 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7296 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7297 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7298 ;;
7299 *)
7300 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7301 ;;
7302 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007303
Ned Deily87adb6e2013-10-18 21:09:56 -07007304 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7305 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7306 if test "${UNIVERSALSDK}" != "/"
7307 then
7308 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7309 fi
7310 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007311
Ned Deily87adb6e2013-10-18 21:09:56 -07007312 # Calculate an appropriate deployment target for this build:
7313 # The deployment target value is used explicitly to enable certain
7314 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007315 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007316 # component of the string returned by distutils.get_platform().
7317 #
7318 # Use the value from:
7319 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7320 # 2. the operating system version of the build machine if >= 10.6
7321 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7322 # below to pick either 10.3, 10.4, or 10.5 as the target.
7323 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324
Ned Deily87adb6e2013-10-18 21:09:56 -07007325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7326$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007327 cur_target_major=`sw_vers -productVersion | \
7328 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7329 cur_target_minor=`sw_vers -productVersion | \
7330 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7331 cur_target="${cur_target_major}.${cur_target_minor}"
7332 if test ${cur_target_major} -eq 10 && \
7333 test ${cur_target_minor} -ge 3 && \
7334 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007335 then
Ned Deily36820b62014-06-25 13:44:22 -07007336 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007337 cur_target=10.3
7338 if test ${enable_universalsdk}
7339 then
7340 case "$UNIVERSAL_ARCHS" in
7341 all|3-way|intel|64-bit)
7342 # These configurations were first supported in 10.5
7343 cur_target='10.5'
7344 ;;
7345 esac
7346 else
7347 if test `/usr/bin/arch` = "i386"
7348 then
7349 # 10.4 was the first release to support Intel archs
7350 cur_target="10.4"
7351 fi
7352 fi
7353 fi
7354 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007355
Ned Deily87adb6e2013-10-18 21:09:56 -07007356 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7357 # environment with a value that is the same as what we'll use
7358 # in the Makefile to ensure that we'll get the same compiler
7359 # environment during configure and build time.
7360 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7361 export MACOSX_DEPLOYMENT_TARGET
7362 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7364$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007365
Ned Deily87adb6e2013-10-18 21:09:56 -07007366 # end of Darwin* tests
7367 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368 esac
7369 ;;
7370
7371*)
7372 case $ac_sys_system in
7373 OpenUNIX*|UnixWare*)
7374 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7375 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376 SCO_SV*)
7377 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7378 ;;
7379 esac
7380 ;;
7381esac
7382
Zachary Ware5af85642015-12-21 12:09:17 -06007383# ICC needs -fp-model strict or floats behave badly
7384case "$CC" in
7385*icc*)
7386 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7387 ;;
7388esac
7389
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390if test "$Py_DEBUG" = 'true'; then
7391 :
7392else
7393 OPT="-DNDEBUG $OPT"
7394fi
7395
7396if test "$ac_arch_flags"
7397then
7398 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7399fi
7400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401# On some compilers, pthreads are available without further options
7402# (e.g. MacOS X). On some of these systems, the compiler will not
7403# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7404# So we have to see first whether pthreads are available without
7405# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7407$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007408if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410else
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412 ac_cv_pthread_is_default=no
7413else
Matthias Kloseb9621712010-04-24 17:59:49 +00007414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415/* end confdefs.h. */
7416
Stefan Krah7dba5942012-11-22 22:49:11 +01007417#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418#include <pthread.h>
7419
7420void* routine(void* p){return NULL;}
7421
7422int main(){
7423 pthread_t p;
7424 if(pthread_create(&p,NULL,routine,NULL)!=0)
7425 return 1;
7426 (void)pthread_detach(p);
7427 return 0;
7428}
7429
7430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007431if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432
7433 ac_cv_pthread_is_default=yes
7434 ac_cv_kthread=no
7435 ac_cv_pthread=no
7436
7437else
Matthias Kloseb9621712010-04-24 17:59:49 +00007438 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7441 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442fi
7443
7444
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445fi
7446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7448$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449
7450
7451if test $ac_cv_pthread_is_default = yes
7452then
7453 ac_cv_kpthread=no
7454else
7455# -Kpthread, if available, provides the right #defines
7456# and linker options to make pthread_create available
7457# Some compilers won't report that they do not support -Kpthread,
7458# so we need to run a program to see whether it really made the
7459# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7461$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007462if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464else
7465 ac_save_cc="$CC"
7466CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007467if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468 ac_cv_kpthread=no
7469else
Matthias Kloseb9621712010-04-24 17:59:49 +00007470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471/* end confdefs.h. */
7472
Stefan Krah7dba5942012-11-22 22:49:11 +01007473#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474#include <pthread.h>
7475
7476void* routine(void* p){return NULL;}
7477
7478int main(){
7479 pthread_t p;
7480 if(pthread_create(&p,NULL,routine,NULL)!=0)
7481 return 1;
7482 (void)pthread_detach(p);
7483 return 0;
7484}
7485
7486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007487if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488 ac_cv_kpthread=yes
7489else
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7493 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494fi
7495
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496CC="$ac_save_cc"
7497fi
7498
Matthias Kloseb9621712010-04-24 17:59:49 +00007499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7500$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501fi
7502
7503if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7504then
7505# -Kthread, if available, provides the right #defines
7506# and linker options to make pthread_create available
7507# Some compilers won't report that they do not support -Kthread,
7508# so we need to run a program to see whether it really made the
7509# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7511$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007512if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007513 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514else
7515 ac_save_cc="$CC"
7516CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007517if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518 ac_cv_kthread=no
7519else
Matthias Kloseb9621712010-04-24 17:59:49 +00007520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521/* end confdefs.h. */
7522
Stefan Krah7dba5942012-11-22 22:49:11 +01007523#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524#include <pthread.h>
7525
7526void* routine(void* p){return NULL;}
7527
7528int main(){
7529 pthread_t p;
7530 if(pthread_create(&p,NULL,routine,NULL)!=0)
7531 return 1;
7532 (void)pthread_detach(p);
7533 return 0;
7534}
7535
7536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007537if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538 ac_cv_kthread=yes
7539else
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7543 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544fi
7545
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546CC="$ac_save_cc"
7547fi
7548
Matthias Kloseb9621712010-04-24 17:59:49 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7550$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551fi
7552
7553if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7554then
7555# -pthread, if available, provides the right #defines
7556# and linker options to make pthread_create available
7557# Some compilers won't report that they do not support -pthread,
7558# so we need to run a program to see whether it really made the
7559# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7561$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007562if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564else
7565 ac_save_cc="$CC"
7566CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007567if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568 ac_cv_pthread=no
7569else
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571/* end confdefs.h. */
7572
Stefan Krah7dba5942012-11-22 22:49:11 +01007573#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574#include <pthread.h>
7575
7576void* routine(void* p){return NULL;}
7577
7578int main(){
7579 pthread_t p;
7580 if(pthread_create(&p,NULL,routine,NULL)!=0)
7581 return 1;
7582 (void)pthread_detach(p);
7583 return 0;
7584}
7585
7586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007587if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588 ac_cv_pthread=yes
7589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7593 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594fi
7595
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596CC="$ac_save_cc"
7597fi
7598
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7600$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601fi
7602
7603# If we have set a CC compiler flag for thread support then
7604# check if it works for CXX, too.
7605ac_cv_cxx_thread=no
7606if test ! -z "$CXX"
7607then
Matthias Kloseb9621712010-04-24 17:59:49 +00007608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7609$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610ac_save_cxx="$CXX"
7611
7612if test "$ac_cv_kpthread" = "yes"
7613then
7614 CXX="$CXX -Kpthread"
7615 ac_cv_cxx_thread=yes
7616elif test "$ac_cv_kthread" = "yes"
7617then
7618 CXX="$CXX -Kthread"
7619 ac_cv_cxx_thread=yes
7620elif test "$ac_cv_pthread" = "yes"
7621then
7622 CXX="$CXX -pthread"
7623 ac_cv_cxx_thread=yes
7624fi
7625
7626if test $ac_cv_cxx_thread = yes
7627then
7628 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7629 $CXX -c conftest.$ac_ext 2>&5
7630 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7631 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7632 then
7633 ac_cv_cxx_thread=yes
7634 else
7635 ac_cv_cxx_thread=no
7636 fi
7637 rm -fr conftest*
7638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7640$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641fi
7642CXX="$ac_save_cxx"
7643
7644
7645# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7647$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007648if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652/* end confdefs.h. */
7653#include <stdlib.h>
7654#include <stdarg.h>
7655#include <string.h>
7656#include <float.h>
7657
7658int
7659main ()
7660{
7661
7662 ;
7663 return 0;
7664}
7665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007666if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667 ac_cv_header_stdc=yes
7668else
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7672
7673if test $ac_cv_header_stdc = yes; then
7674 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676/* end confdefs.h. */
7677#include <string.h>
7678
7679_ACEOF
7680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 $EGREP "memchr" >/dev/null 2>&1; then :
7682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683else
7684 ac_cv_header_stdc=no
7685fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007686rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687
7688fi
7689
7690if test $ac_cv_header_stdc = yes; then
7691 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693/* end confdefs.h. */
7694#include <stdlib.h>
7695
7696_ACEOF
7697if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 $EGREP "free" >/dev/null 2>&1; then :
7699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700else
7701 ac_cv_header_stdc=no
7702fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007703rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704
7705fi
7706
7707if test $ac_cv_header_stdc = yes; then
7708 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710 :
7711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713/* end confdefs.h. */
7714#include <ctype.h>
7715#include <stdlib.h>
7716#if ((' ' & 0x0FF) == 0x020)
7717# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7718# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7719#else
7720# define ISLOWER(c) \
7721 (('a' <= (c) && (c) <= 'i') \
7722 || ('j' <= (c) && (c) <= 'r') \
7723 || ('s' <= (c) && (c) <= 'z'))
7724# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7725#endif
7726
7727#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7728int
7729main ()
7730{
7731 int i;
7732 for (i = 0; i < 256; i++)
7733 if (XOR (islower (i), ISLOWER (i))
7734 || toupper (i) != TOUPPER (i))
7735 return 2;
7736 return 0;
7737}
7738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007739if ac_fn_c_try_run "$LINENO"; then :
7740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741else
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746fi
7747
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748fi
7749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7751$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752if test $ac_cv_header_stdc = yes; then
7753
Matthias Kloseb9621712010-04-24 17:59:49 +00007754$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755
7756fi
7757
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007758for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007759fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007760ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007761sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007762unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007763poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007764sys/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 +01007765sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007766sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007767sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007768sys/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 -07007769libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007770linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007771sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007772do :
7773 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7774ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007775if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007776 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007777#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007778_ACEOF
7779
7780fi
7781
Guido van Rossum627b2d71993-12-24 10:39:16 +00007782done
7783
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007784ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007785for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7788$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007789if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007794#include <sys/types.h>
7795#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007796
Martin v. Löwis11437992002-04-12 09:54:03 +00007797int
7798main ()
7799{
7800if ((DIR *) 0)
7801return 0;
7802 ;
7803 return 0;
7804}
7805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007808else
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007813eval ac_res=\$$as_ac_Header
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7815$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007816if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007818#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007819_ACEOF
7820
7821ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007822fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007824done
7825# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7826if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7828$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007829if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007831else
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836/* Override any GCC internal prototype to avoid an error.
7837 Use char because int might match the return type of a GCC
7838 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007839#ifdef __cplusplus
7840extern "C"
7841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007842char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007843int
7844main ()
7845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 ;
7848 return 0;
7849}
7850_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851for ac_lib in '' dir; do
7852 if test -z "$ac_lib"; then
7853 ac_res="none required"
7854 else
7855 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007856 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007861rm -f core conftest.err conftest.$ac_objext \
7862 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007863 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866done
Victor Stinnere0be4232011-10-25 13:06:09 +02007867if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869else
7870 ac_cv_search_opendir=no
7871fi
7872rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007873LIBS=$ac_func_search_save_LIBS
7874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7876$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007878if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007880
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007882
Michael W. Hudson54241132001-12-07 15:38:26 +00007883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7885$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007886if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007888else
7889 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893/* Override any GCC internal prototype to avoid an error.
7894 Use char because int might match the return type of a GCC
7895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007896#ifdef __cplusplus
7897extern "C"
7898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007899char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007900int
7901main ()
7902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ;
7905 return 0;
7906}
7907_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908for ac_lib in '' x; do
7909 if test -z "$ac_lib"; then
7910 ac_res="none required"
7911 else
7912 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007913 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007918rm -f core conftest.err conftest.$ac_objext \
7919 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007920 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923done
Victor Stinnere0be4232011-10-25 13:06:09 +02007924if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007926else
7927 ac_cv_search_opendir=no
7928fi
7929rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007930LIBS=$ac_func_search_save_LIBS
7931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7933$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007935if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007938fi
7939
7940fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007941
Matthias Kloseb9621712010-04-24 17:59:49 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7943$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007944if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007945 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007946else
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007948/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007949#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007950int
7951main ()
7952{
7953return makedev(0, 0);
7954 ;
7955 return 0;
7956}
7957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007958if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007959 ac_cv_header_sys_types_h_makedev=yes
7960else
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963rm -f core conftest.err conftest.$ac_objext \
7964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007965
7966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7968$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007969
7970if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007971ac_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 +02007972if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007973
Matthias Kloseb9621712010-04-24 17:59:49 +00007974$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007975
7976fi
7977
7978
7979
7980 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 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 +02007982if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007983
Matthias Kloseb9621712010-04-24 17:59:49 +00007984$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007985
7986fi
7987
7988
7989 fi
7990fi
7991
Michael W. Hudson54241132001-12-07 15:38:26 +00007992
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007993# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7994# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7995SAVE_CFLAGS=$CFLAGS
7996CFLAGS="-std=c99 $CFLAGS"
7997for ac_header in bluetooth/bluetooth.h
7998do :
7999 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8000if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8001 cat >>confdefs.h <<_ACEOF
8002#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8003_ACEOF
8004
8005fi
8006
8007done
8008
8009CFLAGS=$SAVE_CFLAGS
8010
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008011# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8012for ac_header in net/if.h
8013do :
8014 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8015#ifdef STDC_HEADERS
8016# include <stdlib.h>
8017# include <stddef.h>
8018#else
8019# ifdef HAVE_STDLIB_H
8020# include <stdlib.h>
8021# endif
8022#endif
8023#ifdef HAVE_SYS_SOCKET_H
8024# include <sys/socket.h>
8025#endif
8026
8027"
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008029 cat >>confdefs.h <<_ACEOF
8030#define HAVE_NET_IF_H 1
8031_ACEOF
8032
8033fi
8034
8035done
8036
8037
Martin v. Löwis11017b12006-01-14 18:12:57 +00008038# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008039for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008040do :
8041 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 +00008042#ifdef HAVE_ASM_TYPES_H
8043#include <asm/types.h>
8044#endif
8045#ifdef HAVE_SYS_SOCKET_H
8046#include <sys/socket.h>
8047#endif
8048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049"
Victor Stinnere0be4232011-10-25 13:06:09 +02008050if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008051 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008052#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008053_ACEOF
8054
8055fi
8056
8057done
8058
8059
Charles-François Natali47413c12011-10-06 19:47:44 +02008060# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008061for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008062do :
8063 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8064ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8065#ifdef HAVE_SYS_SOCKET_H
8066#include <sys/socket.h>
8067#endif
8068
8069"
8070if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8071 cat >>confdefs.h <<_ACEOF
8072#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8073_ACEOF
8074
8075fi
8076
8077done
8078
8079
Guido van Rossum627b2d71993-12-24 10:39:16 +00008080# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008081was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8083$as_echo_n "checking for clock_t in time.h... " >&6; }
8084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008085/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008086#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008087
8088_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008091 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008092else
Martin v. Löwis11437992002-04-12 09:54:03 +00008093
8094
Matthias Kloseb9621712010-04-24 17:59:49 +00008095$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008096
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008097
Guido van Rossum627b2d71993-12-24 10:39:16 +00008098fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008099rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008100
Matthias Kloseb9621712010-04-24 17:59:49 +00008101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8102$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8105$as_echo_n "checking for makedev... " >&6; }
8106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008107/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008108
Jesus Cea740f53a2010-04-28 11:35:30 +00008109#if defined(MAJOR_IN_MKDEV)
8110#include <sys/mkdev.h>
8111#elif defined(MAJOR_IN_SYSMACROS)
8112#include <sys/sysmacros.h>
8113#else
8114#include <sys/types.h>
8115#endif
8116
Neal Norwitz11690112002-07-30 01:08:28 +00008117int
8118main ()
8119{
Jesus Cea740f53a2010-04-28 11:35:30 +00008120
8121 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008122 ;
8123 return 0;
8124}
Matthias Kloseb159a552010-04-25 21:00:44 +00008125
Neal Norwitz11690112002-07-30 01:08:28 +00008126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008127if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008128 ac_cv_has_makedev=yes
8129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008132rm -f core conftest.err conftest.$ac_objext \
8133 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8135$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008136if test "$ac_cv_has_makedev" = "yes"; then
8137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008139
8140fi
8141
Christian Heimes985ecdc2013-11-20 11:46:18 +01008142# byte swapping
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8144$as_echo_n "checking for le64toh... " >&6; }
8145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8146/* end confdefs.h. */
8147
8148#ifdef HAVE_ENDIAN_H
8149#include <endian.h>
8150#elif defined(HAVE_SYS_ENDIAN_H)
8151#include <sys/endian.h>
8152#endif
8153
8154int
8155main ()
8156{
8157
8158 le64toh(1)
8159 ;
8160 return 0;
8161}
8162
8163_ACEOF
8164if ac_fn_c_try_link "$LINENO"; then :
8165 ac_cv_has_le64toh=yes
8166else
8167 ac_cv_has_le64toh=no
8168fi
8169rm -f core conftest.err conftest.$ac_objext \
8170 conftest$ac_exeext conftest.$ac_ext
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8172$as_echo "$ac_cv_has_le64toh" >&6; }
8173if test "$ac_cv_has_le64toh" = "yes"; then
8174
8175$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8176
8177fi
8178
Martin v. Löwis399a6892002-10-04 10:22:02 +00008179# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8180# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8181# defined, but the compiler does not support pragma redefine_extname,
8182# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8183# structures (such as rlimit64) without declaring them. As a
8184# work-around, disable LFS on such configurations
8185
8186use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8188$as_echo_n "checking Solaris LFS bug... " >&6; }
8189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008191
8192#define _LARGEFILE_SOURCE 1
8193#define _FILE_OFFSET_BITS 64
8194#include <sys/resource.h>
8195
Martin v. Löwis399a6892002-10-04 10:22:02 +00008196int
8197main ()
8198{
8199struct rlimit foo;
8200 ;
8201 return 0;
8202}
8203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008205 sol_lfs_bug=no
8206else
Matthias Kloseb9621712010-04-24 17:59:49 +00008207 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8211$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008212if test "$sol_lfs_bug" = "yes"; then
8213 use_lfs=no
8214fi
8215
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008216# Don't use largefile support for GNU/Hurd
8217case $ac_sys_system in GNU*)
8218 use_lfs=no
8219esac
8220
Martin v. Löwis399a6892002-10-04 10:22:02 +00008221if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008222# Two defines needed to enable largefile support on various platforms
8223# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008224case $ac_sys_system/$ac_sys_release in
8225AIX*)
8226
8227$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8228
8229 ;;
8230esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008233
8234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008236
Martin v. Löwis399a6892002-10-04 10:22:02 +00008237fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008238
Guido van Rossum84e7b241996-08-19 21:59:00 +00008239# Add some code to confdefs.h so that the test for off_t works on SCO
8240cat >> confdefs.h <<\EOF
8241#if defined(SCO_DS)
8242#undef _OFF_T
8243#endif
8244EOF
8245
Guido van Rossumef2255b2000-03-10 22:30:29 +00008246# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008247ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008248if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008249
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008250else
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
8252cat >>confdefs.h <<_ACEOF
8253#define mode_t int
8254_ACEOF
8255
8256fi
8257
Matthias Kloseb9621712010-04-24 17:59:49 +00008258ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008259if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008260
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008261else
Martin v. Löwis11437992002-04-12 09:54:03 +00008262
8263cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008265_ACEOF
8266
8267fi
8268
Matthias Kloseb9621712010-04-24 17:59:49 +00008269ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008270if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008271
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008272else
Martin v. Löwis11437992002-04-12 09:54:03 +00008273
8274cat >>confdefs.h <<_ACEOF
8275#define pid_t int
8276_ACEOF
8277
8278fi
8279
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008280
Martin v. Löwis11437992002-04-12 09:54:03 +00008281cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008282#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008283_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008284
Matthias Kloseb9621712010-04-24 17:59:49 +00008285ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008286if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008287
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008288else
Martin v. Löwis11437992002-04-12 09:54:03 +00008289
8290cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008292_ACEOF
8293
8294fi
8295
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8297$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008298if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008300else
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008302/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008303#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008304
8305_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008308 ac_cv_type_uid_t=yes
8309else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008310 ac_cv_type_uid_t=no
8311fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008312rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008313
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8316$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008317if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008318
Matthias Kloseb9621712010-04-24 17:59:49 +00008319$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
8321
Matthias Kloseb9621712010-04-24 17:59:49 +00008322$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008323
8324fi
8325
Mark Dickinson983bc162012-12-02 12:11:38 +00008326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008328if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008331
8332fi
8333
Stefan Krah1919b7e2012-03-21 18:25:23 +01008334ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8335if test "x$ac_cv_type___uint128_t" = xyes; then :
8336
8337$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8338
8339fi
8340
Jack Jansendd19cf82001-12-06 22:36:17 +00008341
Michael W. Hudson54241132001-12-07 15:38:26 +00008342# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008343# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008344# The cast to long int works around a bug in the HP C Compiler
8345# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8346# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8347# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8349$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008350if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008352else
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 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 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355else
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 if test "$ac_cv_type_int" = yes; then
8357 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8358$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008359as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008360See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361 else
8362 ac_cv_sizeof_int=0
8363 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008365
Martin v. Löwis11437992002-04-12 09:54:03 +00008366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8368$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369
8370
8371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008373#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008374_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008375
8376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377# The cast to long int works around a bug in the HP C Compiler
8378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8380# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8382$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008383if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008385else
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 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 +00008387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388else
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 if test "$ac_cv_type_long" = yes; then
8390 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008392as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008393See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394 else
8395 ac_cv_sizeof_long=0
8396 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8401$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402
8403
8404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008406#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008408
8409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410# The cast to long int works around a bug in the HP C Compiler
8411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8413# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8415$as_echo_n "checking size of long long... " >&6; }
8416if ${ac_cv_sizeof_long_long+:} false; then :
8417 $as_echo_n "(cached) " >&6
8418else
8419 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8420
8421else
8422 if test "$ac_cv_type_long_long" = yes; then
8423 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8425as_fn_error 77 "cannot compute sizeof (long long)
8426See \`config.log' for more details" "$LINENO" 5; }
8427 else
8428 ac_cv_sizeof_long_long=0
8429 fi
8430fi
8431
8432fi
8433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8434$as_echo "$ac_cv_sizeof_long_long" >&6; }
8435
8436
8437
8438cat >>confdefs.h <<_ACEOF
8439#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8440_ACEOF
8441
8442
8443# The cast to long int works around a bug in the HP C Compiler
8444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8446# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8448$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008449if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 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 +00008453
Martin v. Löwis11437992002-04-12 09:54:03 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 if test "$ac_cv_type_void_p" = yes; then
8456 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008458as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008459See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460 else
8461 ac_cv_sizeof_void_p=0
8462 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008464
Martin v. Löwis11437992002-04-12 09:54:03 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8467$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468
8469
8470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008472#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008473_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008474
8475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476# The cast to long int works around a bug in the HP C Compiler
8477# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8478# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8479# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8481$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008484else
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 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 +00008486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 if test "$ac_cv_type_short" = yes; then
8489 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008491as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008492See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493 else
8494 ac_cv_sizeof_short=0
8495 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8500$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501
8502
8503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008505#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008506_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008507
8508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509# The cast to long int works around a bug in the HP C Compiler
8510# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8511# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8512# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8514$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008515if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008517else
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 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 +00008519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 if test "$ac_cv_type_float" = yes; then
8522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008524as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008525See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526 else
8527 ac_cv_sizeof_float=0
8528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8533$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534
8535
8536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008538#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008539_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008540
8541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542# The cast to long int works around a bug in the HP C Compiler
8543# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8544# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8545# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8547$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008548if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 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 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553else
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 if test "$ac_cv_type_double" = yes; then
8555 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8556$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008557as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008558See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 else
8560 ac_cv_sizeof_double=0
8561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8566$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567
8568
8569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008571#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008572_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008573
8574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575# The cast to long int works around a bug in the HP C Compiler
8576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8578# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8580$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008581if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008583else
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 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 +00008585
Martin v. Löwis11437992002-04-12 09:54:03 +00008586else
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 if test "$ac_cv_type_fpos_t" = yes; then
8588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008590as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008591See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592 else
8593 ac_cv_sizeof_fpos_t=0
8594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596
Martin v. Löwis11437992002-04-12 09:54:03 +00008597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8599$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600
8601
8602
Martin v. Löwis11437992002-04-12 09:54:03 +00008603cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008604#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008605_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008606
Michael W. Hudson54241132001-12-07 15:38:26 +00008607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608# The cast to long int works around a bug in the HP C Compiler
8609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8611# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8613$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008614if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 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 +00008618
Martin v. Löwis18e16552006-02-15 17:27:45 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 if test "$ac_cv_type_size_t" = yes; then
8621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008623as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008624See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625 else
8626 ac_cv_sizeof_size_t=0
8627 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629
Martin v. Löwis18e16552006-02-15 17:27:45 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8632$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633
8634
8635
Martin v. Löwis18e16552006-02-15 17:27:45 +00008636cat >>confdefs.h <<_ACEOF
8637#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8638_ACEOF
8639
8640
Christian Heimes400adb02008-02-01 08:12:03 +00008641# The cast to long int works around a bug in the HP C Compiler
8642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8644# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8646$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008647if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008649else
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 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 +00008651
Christian Heimes400adb02008-02-01 08:12:03 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 if test "$ac_cv_type_pid_t" = yes; then
8654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008656as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008657See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008658 else
8659 ac_cv_sizeof_pid_t=0
8660 fi
8661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008662
Christian Heimes400adb02008-02-01 08:12:03 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8665$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008666
8667
8668
8669cat >>confdefs.h <<_ACEOF
8670#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8671_ACEOF
8672
8673
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008674# The cast to long int works around a bug in the HP C Compiler
8675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8677# This bug is HP SR number 8606223364.
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8679$as_echo_n "checking size of uintptr_t... " >&6; }
8680if ${ac_cv_sizeof_uintptr_t+:} false; then :
8681 $as_echo_n "(cached) " >&6
8682else
8683 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8684
8685else
8686 if test "$ac_cv_type_uintptr_t" = yes; then
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8689as_fn_error 77 "cannot compute sizeof (uintptr_t)
8690See \`config.log' for more details" "$LINENO" 5; }
8691 else
8692 ac_cv_sizeof_uintptr_t=0
8693 fi
8694fi
8695
8696fi
8697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8698$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8699
8700
8701
8702cat >>confdefs.h <<_ACEOF
8703#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8704_ACEOF
8705
8706
Michael W. Hudson54241132001-12-07 15:38:26 +00008707
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8709$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008710have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008712/* end confdefs.h. */
8713
8714int
8715main ()
8716{
8717long double x; x = (long double)0;
8718 ;
8719 return 0;
8720}
8721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008722if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008723
8724
Matthias Kloseb9621712010-04-24 17:59:49 +00008725$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008726
8727 have_long_double=yes
8728
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008729fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8732$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008733if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008734# The cast to long int works around a bug in the HP C Compiler
8735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8739$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008740if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008742else
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 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 +00008744
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008745else
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 if test "$ac_cv_type_long_double" = yes; then
8747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008749as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008750See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008751 else
8752 ac_cv_sizeof_long_double=0
8753 fi
8754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8758$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008759
8760
8761
8762cat >>confdefs.h <<_ACEOF
8763#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8764_ACEOF
8765
8766
8767fi
8768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769# The cast to long int works around a bug in the HP C Compiler
8770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8772# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8774$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008775if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008777else
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 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 +00008779
Thomas Woutersb2137042007-02-01 18:02:27 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 if test "$ac_cv_type__Bool" = yes; then
8782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008784as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008785See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786 else
8787 ac_cv_sizeof__Bool=0
8788 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790
Thomas Woutersb2137042007-02-01 18:02:27 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8793$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794
8795
8796
Thomas Woutersb2137042007-02-01 18:02:27 +00008797cat >>confdefs.h <<_ACEOF
8798#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8799_ACEOF
8800
8801
Thomas Woutersb2137042007-02-01 18:02:27 +00008802
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008803# The cast to long int works around a bug in the HP C Compiler
8804# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8805# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8806# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8808$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008809if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008811else
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008813#ifdef HAVE_SYS_TYPES_H
8814#include <sys/types.h>
8815#endif
8816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 if test "$ac_cv_type_off_t" = yes; then
8821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008823as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008824See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825 else
8826 ac_cv_sizeof_off_t=0
8827 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8832$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008833
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008834
8835
Martin v. Löwis11437992002-04-12 09:54:03 +00008836cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008837#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008838_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008839
Michael W. Hudson54241132001-12-07 15:38:26 +00008840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008841
Matthias Kloseb9621712010-04-24 17:59:49 +00008842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8843$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008844if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008845 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8850$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008851else
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8853$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008854fi
8855
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856# The cast to long int works around a bug in the HP C Compiler
8857# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8858# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8859# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8861$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008862if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008864else
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008866#ifdef HAVE_SYS_TYPES_H
8867#include <sys/types.h>
8868#endif
8869#ifdef HAVE_TIME_H
8870#include <time.h>
8871#endif
8872
Matthias Kloseb9621712010-04-24 17:59:49 +00008873"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008874
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008875else
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 if test "$ac_cv_type_time_t" = yes; then
8877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008879as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008880See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008881 else
8882 ac_cv_sizeof_time_t=0
8883 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008885
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8888$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008889
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890
8891
Martin v. Löwis11437992002-04-12 09:54:03 +00008892cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008893#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008894_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008895
Michael W. Hudson54241132001-12-07 15:38:26 +00008896
8897
Trent Mick635f6fb2000-08-23 21:33:05 +00008898# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008899ac_save_cc="$CC"
8900if test "$ac_cv_kpthread" = "yes"
8901then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008902elif test "$ac_cv_kthread" = "yes"
8903then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008904elif test "$ac_cv_pthread" = "yes"
8905then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008906fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008907
Matthias Kloseb9621712010-04-24 17:59:49 +00008908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8909$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008910have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008912/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008913
8914 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Guido van Rossum12580492000-09-24 16:47:19 +00008918pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ;
8920 return 0;
8921}
Matthias Kloseb159a552010-04-25 21:00:44 +00008922
Martin v. Löwis11437992002-04-12 09:54:03 +00008923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008924if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008925 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8929$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008930if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8934# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8936$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008937if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008939else
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008941#ifdef HAVE_PTHREAD_H
8942#include <pthread.h>
8943#endif
8944
Matthias Kloseb9621712010-04-24 17:59:49 +00008945"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008947else
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 if test "$ac_cv_type_pthread_t" = yes; then
8949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008951as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008952See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008953 else
8954 ac_cv_sizeof_pthread_t=0
8955 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008957
Trent Mick635f6fb2000-08-23 21:33:05 +00008958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8960$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008961
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962
8963
Martin v. Löwis11437992002-04-12 09:54:03 +00008964cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008965#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008966_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008967
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968
Trent Mick635f6fb2000-08-23 21:33:05 +00008969fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008970CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008971
Michael W. Hudson54241132001-12-07 15:38:26 +00008972
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008973case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008974 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008975 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8976 ;;
8977 Darwin/*)
8978 OTHER_LIBTOOL_OPT=""
8979 ;;
8980esac
8981
8982
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008983
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008984case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008985 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008986 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8987 if test "${enable_universalsdk}"; then
8988 :
8989 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008990 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008991 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008992 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008993 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008994 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008995 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008996 if test ${gcc_version} '<' 4.0
8997 then
8998 LIBTOOL_CRUFT="-lcc_dynamic"
8999 else
9000 LIBTOOL_CRUFT=""
9001 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009003 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009004else
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009006/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009007
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009008 #include <unistd.h>
9009 int main(int argc, char*argv[])
9010 {
9011 if (sizeof(long) == 4) {
9012 return 0;
9013 } else {
9014 return 1;
9015 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009016 }
9017
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009019if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020 ac_osx_32bit=yes
9021else
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009026fi
9027
9028
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009029 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009030 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009031 i386)
9032 MACOSX_DEFAULT_ARCH="i386"
9033 ;;
9034 ppc)
9035 MACOSX_DEFAULT_ARCH="ppc"
9036 ;;
9037 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009038 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009039 ;;
9040 esac
9041 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009042 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043 i386)
9044 MACOSX_DEFAULT_ARCH="x86_64"
9045 ;;
9046 ppc)
9047 MACOSX_DEFAULT_ARCH="ppc64"
9048 ;;
9049 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009050 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009051 ;;
9052 esac
9053
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009054 fi
9055
9056 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009057 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009058 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009059esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9061$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009062if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009063then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009064 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009066 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009067
Matthias Kloseb9621712010-04-24 17:59:49 +00009068$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9071$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009072 if test $enable_shared = "yes"
9073 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009074 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 +00009075 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009076else
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9078$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009079fi
9080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9082$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009083case $ac_sys_system/$ac_sys_release in
9084 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009085
Matthias Kloseb9621712010-04-24 17:59:49 +00009086$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9089$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009090 ;;
9091 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9093$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009094 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009095esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009096
Guido van Rossum0a516c91994-09-12 10:58:40 +00009097# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009098
Michael W. Hudson54241132001-12-07 15:38:26 +00009099
9100
9101
9102
Benjamin Peterson99f03762010-04-11 22:15:28 +00009103
Thomas Wouters477c8d52006-05-27 19:21:47 +00009104
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009105# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9106# -- usually .so, .sl on HP-UX, .dll on Cygwin
9107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9108$as_echo_n "checking the extension of shared libraries... " >&6; }
9109if test -z "$SHLIB_SUFFIX"; then
9110 case $ac_sys_system in
9111 hp*|HP*)
9112 case `uname -m` in
9113 ia64) SHLIB_SUFFIX=.so;;
9114 *) SHLIB_SUFFIX=.sl;;
9115 esac
9116 ;;
9117 CYGWIN*) SHLIB_SUFFIX=.dll;;
9118 *) SHLIB_SUFFIX=.so;;
9119 esac
9120fi
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9122$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009123
Guido van Rossum0a516c91994-09-12 10:58:40 +00009124# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009125# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009126# (Shared libraries in this instance are shared modules to be loaded into
9127# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9129$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009130if test -z "$LDSHARED"
9131then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009132 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009133 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009134 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009135 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009136 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009137 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009138 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140 if test "$GCC" = "yes" ; then
9141 LDSHARED='$(CC) -shared'
9142 LDCXXSHARED='$(CXX) -shared'
9143 else
9144 LDSHARED='$(CC) -G'
9145 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009146 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009147 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009148 if test "$GCC" = "yes" ; then
9149 LDSHARED='$(CC) -shared'
9150 LDCXXSHARED='$(CXX) -shared'
9151 else
9152 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009153 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009154 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009155 LDSHARED='$(CC) -bundle'
9156 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009157 if test "$enable_framework" ; then
9158 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009159 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9160 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009161 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009162 else
9163 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009164 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009165 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009166 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009167 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009168 LDSHARED='$(CC) -bundle'
9169 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009170 if test "$enable_framework" ; then
9171 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009172 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9173 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009174 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009175 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009176 # No framework, use the Python app as bundle-loader
9177 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009178 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009180 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009181 Darwin/*)
9182 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9183 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009184
Ned Deily36820b62014-06-25 13:44:22 -07009185 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9186 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9187 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9188 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9189 if test ${dep_target_major} -eq 10 && \
9190 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009191 then
Ned Deily36820b62014-06-25 13:44:22 -07009192 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009193 LDSHARED='$(CC) -bundle'
9194 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009195 if test "$enable_framework" ; then
9196 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009197 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9198 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009199 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009200 else
9201 # No framework, use the Python app as bundle-loader
9202 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9203 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009204 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009205 fi
Ned Deily36820b62014-06-25 13:44:22 -07009206 else
9207 # building for OS X 10.3 and later
9208 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9209 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9210 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009211 fi
9212 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009213 Linux*|GNU*|QNX*)
9214 LDSHARED='$(CC) -shared'
9215 LDCXXSHARED='$(CXX) -shared';;
9216 BSD/OS*/4*)
9217 LDSHARED="gcc -shared"
9218 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009219 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009220 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009221 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009222 LDSHARED='$(CC) -shared'
9223 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009224 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009225 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009226 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009227 OpenBSD*)
9228 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9229 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009230 LDSHARED='$(CC) -shared $(CCSHARED)'
9231 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009232 else
9233 case `uname -r` in
9234 [01].* | 2.[0-7] | 2.[0-7].*)
9235 LDSHARED="ld -Bshareable ${LDFLAGS}"
9236 ;;
9237 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009238 LDSHARED='$(CC) -shared $(CCSHARED)'
9239 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009240 ;;
9241 esac
9242 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009243 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009244 LDSHARED='$(CC) -shared'
9245 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009246 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009247 if test "$GCC" = "yes" ; then
9248 LDSHARED='$(CC) -shared'
9249 LDCXXSHARED='$(CXX) -shared'
9250 else
9251 LDSHARED='$(CC) -G'
9252 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009253 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009254 SCO_SV*)
9255 LDSHARED='$(CC) -Wl,-G,-Bexport'
9256 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9257 CYGWIN*)
9258 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9259 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009260 *) LDSHARED="ld";;
9261 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9264$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009265LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009266BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009267# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009268# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9270$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009271if test -z "$CCSHARED"
9272then
Guido van Rossum07397971997-04-29 21:49:50 +00009273 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009274 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009275 then CCSHARED="-fPIC";
9276 elif test `uname -p` = sparc;
9277 then CCSHARED="-xcode=pic32";
9278 else CCSHARED="-Kpic";
9279 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009280 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009281 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009282 else CCSHARED="+z";
9283 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009284 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009285 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009286 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009287 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009288 if test "$GCC" = "yes"
9289 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009290 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009291 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009292 SCO_SV*)
9293 if test "$GCC" = "yes"
9294 then CCSHARED="-fPIC"
9295 else CCSHARED="-Kpic -belf"
9296 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009297 IRIX*/6*) case $CC in
9298 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009299 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009300 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009301 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9304$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009305# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009306# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9308$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009309if test -z "$LINKFORSHARED"
9310then
Guido van Rossum07397971997-04-29 21:49:50 +00009311 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009312 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009313 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009314 LINKFORSHARED="-Wl,-E -Wl,+s";;
9315# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009316 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009317 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009318 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009320 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009321
9322 # Issue #18075: the default maximum stack size (8MBytes) is too
9323 # small for the default recursion limit. Increase the stack size
9324 # to ensure that tests don't crash
9325 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9326
Jack Jansene578a632001-08-15 01:27:14 +00009327 if test "$enable_framework"
9328 then
Jack Jansenda49e192005-01-07 13:08:22 +00009329 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009330 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009331 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009332 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009333 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009334 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009335 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009336 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9337 then
9338 LINKFORSHARED="-Wl,--export-dynamic"
9339 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009340 SunOS/5*) case $CC in
9341 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009342 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009343 then
9344 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009345 fi;;
9346 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009347 CYGWIN*)
9348 if test $enable_shared = "no"
9349 then
9350 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9351 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009352 QNX*)
9353 # -Wl,-E causes the symbols to be added to the dynamic
9354 # symbol table so that they can be found when a module
9355 # is loaded. -N 2048K causes the stack size to be set
9356 # to 2048 kilobytes so that the stack doesn't overflow
9357 # when running test_compile.py.
9358 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009359 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9362$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009363
Michael W. Hudson54241132001-12-07 15:38:26 +00009364
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009365
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9367$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009368if test ! "$LIBRARY" = "$LDLIBRARY"
9369then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009370 case $ac_sys_system in
9371 CYGWIN*)
9372 # Cygwin needs CCSHARED when building extension DLLs
9373 # but not when building the interpreter DLL.
9374 CFLAGSFORSHARED='';;
9375 *)
9376 CFLAGSFORSHARED='$(CCSHARED)'
9377 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9380$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009381
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009382# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9383# library (with --enable-shared).
9384# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009385# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9386# if it is not required, since it creates a dependency of the shared library
9387# to LIBS. This, in turn, means that applications linking the shared libpython
9388# don't need to link LIBS explicitly. The default should be only changed
9389# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9392$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009393case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009394 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009395 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009396esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9398$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009399
9400
Guido van Rossum627b2d71993-12-24 10:39:16 +00009401# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9403$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009404if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009405 $as_echo_n "(cached) " >&6
9406else
9407 ac_check_lib_save_LIBS=$LIBS
9408LIBS="-lsendfile $LIBS"
9409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9410/* end confdefs.h. */
9411
9412/* Override any GCC internal prototype to avoid an error.
9413 Use char because int might match the return type of a GCC
9414 builtin and then its argument prototype would still apply. */
9415#ifdef __cplusplus
9416extern "C"
9417#endif
9418char sendfile ();
9419int
9420main ()
9421{
9422return sendfile ();
9423 ;
9424 return 0;
9425}
9426_ACEOF
9427if ac_fn_c_try_link "$LINENO"; then :
9428 ac_cv_lib_sendfile_sendfile=yes
9429else
9430 ac_cv_lib_sendfile_sendfile=no
9431fi
9432rm -f core conftest.err conftest.$ac_objext \
9433 conftest$ac_exeext conftest.$ac_ext
9434LIBS=$ac_check_lib_save_LIBS
9435fi
9436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9437$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009438if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009439 cat >>confdefs.h <<_ACEOF
9440#define HAVE_LIBSENDFILE 1
9441_ACEOF
9442
9443 LIBS="-lsendfile $LIBS"
9444
9445fi
9446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9448$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009449if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009450 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009451else
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009453LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457/* Override any GCC internal prototype to avoid an error.
9458 Use char because int might match the return type of a GCC
9459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460#ifdef __cplusplus
9461extern "C"
9462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009463char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009474else
Matthias Kloseb9621712010-04-24 17:59:49 +00009475 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477rm -f core conftest.err conftest.$ac_objext \
9478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009479LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9482$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009483if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 cat >>confdefs.h <<_ACEOF
9485#define HAVE_LIBDL 1
9486_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009487
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009488 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009490fi
9491 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9493$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009494if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009495 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009496else
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009498LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502/* Override any GCC internal prototype to avoid an error.
9503 Use char because int might match the return type of a GCC
9504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505#ifdef __cplusplus
9506extern "C"
9507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009508char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009509int
9510main ()
9511{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ;
9514 return 0;
9515}
9516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009519else
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009522rm -f core conftest.err conftest.$ac_objext \
9523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009524LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9527$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009528if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 cat >>confdefs.h <<_ACEOF
9530#define HAVE_LIBDLD 1
9531_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009532
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009533 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009534
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535fi
9536 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009537
Georg Brandlb1441c72009-01-03 22:33:39 +00009538# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009539if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9541$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009542if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009544else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009545 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549/* Override any GCC internal prototype to avoid an error.
9550 Use char because int might match the return type of a GCC
9551 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552#ifdef __cplusplus
9553extern "C"
9554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009555char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009556int
9557main ()
9558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009560 ;
9561 return 0;
9562}
9563_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564for ac_lib in '' pthread rt posix4; do
9565 if test -z "$ac_lib"; then
9566 ac_res="none required"
9567 else
9568 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009569 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574rm -f core conftest.err conftest.$ac_objext \
9575 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009576 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579done
Victor Stinnere0be4232011-10-25 13:06:09 +02009580if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582else
9583 ac_cv_search_sem_init=no
9584fi
9585rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009586LIBS=$ac_func_search_save_LIBS
9587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9589$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009591if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009593
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009594fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009595 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009596 # posix4 on Solaris 2.6
9597 # pthread (first!) on Linux
9598fi
9599
Martin v. Löwis19d17342003-06-14 21:03:05 +00009600# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9602$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009603if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009604 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009605else
9606 ac_check_lib_save_LIBS=$LIBS
9607LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009609/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611/* Override any GCC internal prototype to avoid an error.
9612 Use char because int might match the return type of a GCC
9613 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009614#ifdef __cplusplus
9615extern "C"
9616#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009617char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009618int
9619main ()
9620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009622 ;
9623 return 0;
9624}
9625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009626if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009627 ac_cv_lib_intl_textdomain=yes
9628else
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009631rm -f core conftest.err conftest.$ac_objext \
9632 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633LIBS=$ac_check_lib_save_LIBS
9634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9636$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009637if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009638
Matthias Kloseb9621712010-04-24 17:59:49 +00009639$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009640
Brett Cannonc6d936e2009-06-07 20:09:53 +00009641 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009642fi
9643
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009644
9645# checks for system dependent C++ extensions support
9646case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009647 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9648$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009651
Georg Brandl59e87bd2011-02-15 19:48:59 +00009652 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009653int
9654main ()
9655{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009656loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ;
9658 return 0;
9659}
Matthias Kloseb159a552010-04-25 21:00:44 +00009660
Martin v. Löwis11437992002-04-12 09:54:03 +00009661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009662if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009663
Matthias Kloseb159a552010-04-25 21:00:44 +00009664
Matthias Kloseb9621712010-04-24 17:59:49 +00009665$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009666
Matthias Kloseb159a552010-04-25 21:00:44 +00009667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009668$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009669
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009670else
Matthias Kloseb159a552010-04-25 21:00:44 +00009671
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009673$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009674
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009676rm -f core conftest.err conftest.$ac_objext \
9677 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009678 *) ;;
9679esac
9680
Christian Heimes985ecdc2013-11-20 11:46:18 +01009681# check for systems that require aligned memory access
9682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9683$as_echo_n "checking aligned memory access is required... " >&6; }
9684if test "$cross_compiling" = yes; then :
9685 aligned_required=yes
9686else
9687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9688/* end confdefs.h. */
9689
9690int main()
9691{
9692 char s[16];
9693 int i, *p1, *p2;
9694 for (i=0; i < 16; i++)
9695 s[i] = i;
9696 p1 = (int*)(s+1);
9697 p2 = (int*)(s+2);
9698 if (*p1 == *p2)
9699 return 1;
9700 return 0;
9701}
9702
9703_ACEOF
9704if ac_fn_c_try_run "$LINENO"; then :
9705 aligned_required=no
9706else
9707 aligned_required=yes
9708fi
9709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9710 conftest.$ac_objext conftest.beam conftest.$ac_ext
9711fi
9712
9713
9714if test "$aligned_required" = yes ; then
9715
9716$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9717
9718fi
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9720$as_echo "$aligned_required" >&6; }
9721
9722
9723# str, bytes and memoryview hash algorithm
9724
9725
9726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9727$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9728
9729# Check whether --with-hash_algorithm was given.
9730if test "${with_hash_algorithm+set}" = set; then :
9731 withval=$with_hash_algorithm;
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9733$as_echo "$withval" >&6; }
9734case "$withval" in
9735 siphash24)
9736 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9737
9738 ;;
9739 fnv)
9740 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9741
9742 ;;
9743 *)
9744 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9745 ;;
9746esac
9747
9748else
9749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9750$as_echo "default" >&6; }
9751fi
9752
9753
Charles-François Natalid30b0222014-05-08 23:08:51 +01009754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9755$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9756
9757# Check whether --with-address_sanitizer was given.
9758if test "${with_address_sanitizer+set}" = set; then :
9759 withval=$with_address_sanitizer;
9760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9761$as_echo "$withval" >&6; }
9762BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9763LDFLAGS="-fsanitize=address $LDFLAGS"
9764
9765else
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9767$as_echo "no" >&6; }
9768fi
9769
9770
Guido van Rossum70c7f481998-03-26 18:44:10 +00009771# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9773$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009774if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009776else
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009778LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782/* Override any GCC internal prototype to avoid an error.
9783 Use char because int might match the return type of a GCC
9784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009785#ifdef __cplusplus
9786extern "C"
9787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009788char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009789int
9790main ()
9791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ;
9794 return 0;
9795}
9796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009799else
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009802rm -f core conftest.err conftest.$ac_objext \
9803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009804LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9807$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009808if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009809 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009810fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009811 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9813$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009814if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009816else
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009818LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822/* Override any GCC internal prototype to avoid an error.
9823 Use char because int might match the return type of a GCC
9824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825#ifdef __cplusplus
9826extern "C"
9827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009828char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009829int
9830main ()
9831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ;
9834 return 0;
9835}
9836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009837if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009839else
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009842rm -f core conftest.err conftest.$ac_objext \
9843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009844LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9847$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009848if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009849 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009850fi
9851 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009852
Matthias Kloseb9621712010-04-24 17:59:49 +00009853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9854$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009857if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9860$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009861LIBS="$withval $LIBS"
9862
9863else
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866fi
9867
Guido van Rossum7f43da71994-08-01 12:15:30 +00009868
Victor Stinner8291b5e2015-03-20 16:03:14 +01009869
9870
9871
9872
9873
9874
9875
9876if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9877 if test -n "$ac_tool_prefix"; then
9878 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9879set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9881$as_echo_n "checking for $ac_word... " >&6; }
9882if ${ac_cv_path_PKG_CONFIG+:} false; then :
9883 $as_echo_n "(cached) " >&6
9884else
9885 case $PKG_CONFIG in
9886 [\\/]* | ?:[\\/]*)
9887 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9888 ;;
9889 *)
9890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9891for as_dir in $PATH
9892do
9893 IFS=$as_save_IFS
9894 test -z "$as_dir" && as_dir=.
9895 for ac_exec_ext in '' $ac_executable_extensions; do
9896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9897 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9899 break 2
9900 fi
9901done
9902 done
9903IFS=$as_save_IFS
9904
9905 ;;
9906esac
9907fi
9908PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9909if test -n "$PKG_CONFIG"; then
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9911$as_echo "$PKG_CONFIG" >&6; }
9912else
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9914$as_echo "no" >&6; }
9915fi
9916
9917
9918fi
9919if test -z "$ac_cv_path_PKG_CONFIG"; then
9920 ac_pt_PKG_CONFIG=$PKG_CONFIG
9921 # Extract the first word of "pkg-config", so it can be a program name with args.
9922set dummy pkg-config; ac_word=$2
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9924$as_echo_n "checking for $ac_word... " >&6; }
9925if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9926 $as_echo_n "(cached) " >&6
9927else
9928 case $ac_pt_PKG_CONFIG in
9929 [\\/]* | ?:[\\/]*)
9930 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9931 ;;
9932 *)
9933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9934for as_dir in $PATH
9935do
9936 IFS=$as_save_IFS
9937 test -z "$as_dir" && as_dir=.
9938 for ac_exec_ext in '' $ac_executable_extensions; do
9939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9940 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9942 break 2
9943 fi
9944done
9945 done
9946IFS=$as_save_IFS
9947
9948 ;;
9949esac
9950fi
9951ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9952if test -n "$ac_pt_PKG_CONFIG"; then
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9954$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9955else
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
9958fi
9959
9960 if test "x$ac_pt_PKG_CONFIG" = x; then
9961 PKG_CONFIG=""
9962 else
9963 case $cross_compiling:$ac_tool_warned in
9964yes:)
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9966$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9967ac_tool_warned=yes ;;
9968esac
9969 PKG_CONFIG=$ac_pt_PKG_CONFIG
9970 fi
9971else
9972 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9973fi
9974
9975fi
9976if test -n "$PKG_CONFIG"; then
9977 _pkg_min_version=0.9.0
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9979$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9980 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9982$as_echo "yes" >&6; }
9983 else
9984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985$as_echo "no" >&6; }
9986 PKG_CONFIG=""
9987 fi
9988fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009989
9990# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9992$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009993
9994# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009995if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009996 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009997else
9998 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009999fi
10000
10001
Matthias Kloseb9621712010-04-24 17:59:49 +000010002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10003$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010004
10005# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10007$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010008
10009# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010010if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010011 withval=$with_system_ffi;
10012fi
10013
10014
Zachary Ware935043d2016-09-09 17:01:21 -070010015case "$with_system_ffi" in
10016 "")
10017 case $ac_sys_system in
10018 Darwin)
10019 with_system_ffi="no"
10020 ;;
10021 *)
10022 with_system_ffi="yes"
10023 ;;
10024 esac
10025 ;;
10026 yes|no)
10027 ;;
10028 *)
10029 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10030 ;;
10031esac
10032
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010033if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010034 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10035else
10036 LIBFFI_INCLUDEDIR=""
10037fi
10038
10039
Matthias Kloseb9621712010-04-24 17:59:49 +000010040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10041$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010042
Stefan Krah60187b52012-03-23 19:06:27 +010010043# Check for use of the system libmpdec library
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10045$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10046
10047# Check whether --with-system_libmpdec was given.
10048if test "${with_system_libmpdec+set}" = set; then :
10049 withval=$with_system_libmpdec;
10050else
10051 with_system_libmpdec="no"
10052fi
10053
10054
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10056$as_echo "$with_system_libmpdec" >&6; }
10057
Benjamin Peterson076ed002010-10-31 17:11:02 +000010058# Check for support for loadable sqlite extensions
10059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10060$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10061# Check whether --enable-loadable-sqlite-extensions was given.
10062if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10063 enableval=$enable_loadable_sqlite_extensions;
10064else
10065 enable_loadable_sqlite_extensions="no"
10066fi
10067
10068
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10070$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10071
Ned Deilyd819b932013-09-06 01:07:05 -070010072# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10073
10074
10075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10076$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10077
10078# Check whether --with-tcltk-includes was given.
10079if test "${with_tcltk_includes+set}" = set; then :
10080 withval=$with_tcltk_includes;
10081else
10082 with_tcltk_includes="default"
10083fi
10084
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10086$as_echo "$with_tcltk_includes" >&6; }
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10088$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10089
10090# Check whether --with-tcltk-libs was given.
10091if test "${with_tcltk_libs+set}" = set; then :
10092 withval=$with_tcltk_libs;
10093else
10094 with_tcltk_libs="default"
10095fi
10096
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10098$as_echo "$with_tcltk_libs" >&6; }
10099if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10100then
10101 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10102 then
10103 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10104 fi
10105 TCLTK_INCLUDES=""
10106 TCLTK_LIBS=""
10107else
10108 TCLTK_INCLUDES="$with_tcltk_includes"
10109 TCLTK_LIBS="$with_tcltk_libs"
10110fi
10111
Matthias Klose55708cc2009-04-30 08:06:49 +000010112# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10114$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010115
10116# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010118 withval=$with_dbmliborder;
10119if test x$with_dbmliborder = xyes
10120then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010121as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010122else
10123 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10124 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10125 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010126 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010127 fi
10128 done
10129fi
10130fi
10131
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10133$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010134
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010135# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010136
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010137USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
10141# Templates for things AC_DEFINEd more than once.
10142# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010143
10144
Martin v. Löwis11437992002-04-12 09:54:03 +000010145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10147$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010150if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151 withval=$with_threads;
10152fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010153
10154
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010155# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010158if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159 withval=$with_thread; with_threads=$with_thread
10160fi
10161
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010162
10163if test -z "$with_threads"
10164then with_threads="yes"
10165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10167$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010168
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010169
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010170if test "$with_threads" = "no"
10171then
10172 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010173elif test "$ac_cv_pthread_is_default" = yes
10174then
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010176
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010177 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010179
10180 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010182elif test "$ac_cv_kpthread" = "yes"
10183then
10184 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010185 if test "$ac_cv_cxx_thread" = "yes"; then
10186 CXX="$CXX -Kpthread"
10187 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010189
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010190 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010191 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010192elif test "$ac_cv_kthread" = "yes"
10193then
10194 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010195 if test "$ac_cv_cxx_thread" = "yes"; then
10196 CXX="$CXX -Kthread"
10197 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010199
10200 posix_threads=yes
10201 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010202elif test "$ac_cv_pthread" = "yes"
10203then
10204 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010205 if test "$ac_cv_cxx_thread" = "yes"; then
10206 CXX="$CXX -pthread"
10207 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010209
10210 posix_threads=yes
10211 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010212else
10213 if test ! -z "$with_threads" -a -d "$with_threads"
10214 then LDFLAGS="$LDFLAGS -L$with_threads"
10215 fi
10216 if test ! -z "$withval" -a -d "$withval"
10217 then LDFLAGS="$LDFLAGS -L$withval"
10218 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010219
10220 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010221 # define _POSIX_THREADS in unistd.h. Some apparently don't
10222 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10224$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010226/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010227
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010228#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010229#ifdef _POSIX_THREADS
10230yes
10231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010232
10233_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010236 unistd_defines_pthreads=yes
10237else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010238 unistd_defines_pthreads=no
10239fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010240rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10243$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010244
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010246
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010247 # Just looking for pthread_create in libpthread is not enough:
10248 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10249 # So we really have to include pthread.h, and then link.
10250 _libs=$LIBS
10251 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10253$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010255/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010256
10257#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010258#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010259
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010260void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010261int
10262main ()
10263{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010264
10265pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ;
10267 return 0;
10268}
10269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010271
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10273$as_echo "yes" >&6; }
10274 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010275
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010276 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010277 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010278else
Martin v. Löwis11437992002-04-12 09:54:03 +000010279
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010280 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010282if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010284
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010285 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010286 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010287else
Guido van Rossumad678af1998-10-02 14:42:15 +000010288
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10290$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010291if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010292 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010293else
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010295LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299/* Override any GCC internal prototype to avoid an error.
10300 Use char because int might match the return type of a GCC
10301 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010302#ifdef __cplusplus
10303extern "C"
10304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010305char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010306int
10307main ()
10308{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ;
10311 return 0;
10312}
10313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010314if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010315 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010316else
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010319rm -f core conftest.err conftest.$ac_objext \
10320 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010321LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10324$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010325if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010327
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010328 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010329 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010330 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010331else
Greg Steinadf63d62000-07-05 10:38:09 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10334$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010335if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010337else
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010339LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343/* Override any GCC internal prototype to avoid an error.
10344 Use char because int might match the return type of a GCC
10345 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010346#ifdef __cplusplus
10347extern "C"
10348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010349char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010350int
10351main ()
10352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ;
10355 return 0;
10356}
10357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010358if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010359 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010360else
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010363rm -f core conftest.err conftest.$ac_objext \
10364 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010365LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10368$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010369if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010371
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010372 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010373 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010374 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010375else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10378$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010379if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381else
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010383LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387/* Override any GCC internal prototype to avoid an error.
10388 Use char because int might match the return type of a GCC
10389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390#ifdef __cplusplus
10391extern "C"
10392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010393char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010394int
10395main ()
10396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ;
10399 return 0;
10400}
10401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010404else
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010407rm -f core conftest.err conftest.$ac_objext \
10408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010409LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10412$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010413if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010415
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010416 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010417 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010418 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010419else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10422$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010423if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010425else
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010427LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010431/* Override any GCC internal prototype to avoid an error.
10432 Use char because int might match the return type of a GCC
10433 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010434#ifdef __cplusplus
10435extern "C"
10436#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010437char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010438int
10439main ()
10440{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 ;
10443 return 0;
10444}
10445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010448else
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010451rm -f core conftest.err conftest.$ac_objext \
10452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010453LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10456$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010457if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010459
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010460 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010461 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010462 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010463else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010464
Martin v. Löwis130fb172001-07-19 11:00:41 +000010465 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010466fi
10467
Guido van Rossum627b2d71993-12-24 10:39:16 +000010468
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010469fi
10470
Guido van Rossum0be3e491997-05-22 20:33:33 +000010471fi
10472
Guido van Rossum49545951997-12-02 19:28:29 +000010473fi
10474
Guido van Rossumb93a8621998-05-07 13:27:32 +000010475fi
10476
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010478rm -f core conftest.err conftest.$ac_objext \
10479 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010480
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10482$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010483if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010485else
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010487LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010491/* Override any GCC internal prototype to avoid an error.
10492 Use char because int might match the return type of a GCC
10493 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010494#ifdef __cplusplus
10495extern "C"
10496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010497char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010498int
10499main ()
10500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 ;
10503 return 0;
10504}
10505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010506if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010508else
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010511rm -f core conftest.err conftest.$ac_objext \
10512 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010513LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10516$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010517if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010519
Martin v. Löwis130fb172001-07-19 11:00:41 +000010520 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010521 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010522 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010523fi
10524
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010525
Neal Norwitza978ab02002-11-02 16:58:05 +000010526 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10528$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010529if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010531else
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010533LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537/* Override any GCC internal prototype to avoid an error.
10538 Use char because int might match the return type of a GCC
10539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010540#ifdef __cplusplus
10541extern "C"
10542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010543char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010544int
10545main ()
10546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ;
10549 return 0;
10550}
10551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010554else
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010557rm -f core conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010559LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10562$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010563if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010565
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010566 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010567 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010568 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010569fi
10570
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010571 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010573
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010574if test "$posix_threads" = "yes"; then
10575 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010576
Matthias Kloseb9621712010-04-24 17:59:49 +000010577$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010578
10579 fi
10580
10581 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10582 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010583 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010584$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010585
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010586 ;;
10587 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010588$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010589
10590 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010591 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010592$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010593
10594 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595 esac
10596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10598$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010599 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601else
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010603 ac_cv_pthread_system_supported=no
10604else
Matthias Kloseb9621712010-04-24 17:59:49 +000010605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010606/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010607
10608 #include <stdio.h>
10609 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610 void *foo(void *parm) {
10611 return NULL;
10612 }
10613 main() {
10614 pthread_attr_t attr;
10615 pthread_t id;
10616 if (pthread_attr_init(&attr)) exit(-1);
10617 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10618 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10619 exit(0);
10620 }
10621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010622if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010623 ac_cv_pthread_system_supported=yes
10624else
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010629fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631
Guido van Rossum627b2d71993-12-24 10:39:16 +000010632fi
10633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10635$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010636 if test "$ac_cv_pthread_system_supported" = "yes"; then
10637
Matthias Kloseb9621712010-04-24 17:59:49 +000010638$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639
10640 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 for ac_func in pthread_sigmask
10642do :
10643 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010644if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010646#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010647_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010648 case $ac_sys_system in
10649 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010650
Matthias Kloseb9621712010-04-24 17:59:49 +000010651$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010652
10653 ;;
10654 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010655fi
10656done
10657
Christian Heimesf77b4b22013-08-21 13:26:05 +020010658 for ac_func in pthread_atfork
10659do :
10660 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10661if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10662 cat >>confdefs.h <<_ACEOF
10663#define HAVE_PTHREAD_ATFORK 1
10664_ACEOF
10665
10666fi
10667done
10668
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010669fi
10670
10671
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010672# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10675$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010677if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10681$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010682 ipv6=no
10683 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10685$as_echo "yes" >&6; }
10686 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687
10688 ipv6=yes
10689 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691else
Martin v. Löwis11437992002-04-12 09:54:03 +000010692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695 /* AF_INET6 available check */
10696#include <sys/types.h>
10697#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010698int
10699main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010700{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010701int domain = AF_INET6;
10702 ;
10703 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010704}
Martin v. Löwis11437992002-04-12 09:54:03 +000010705_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010706if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10709$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010711
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010712else
Matthias Kloseb159a552010-04-25 21:00:44 +000010713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010721if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10723$as_echo_n "checking if RFC2553 API is available... " >&6; }
10724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010726
10727 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010728#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010729int
10730main ()
10731{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010732struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010733 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 ;
10735 return 0;
10736}
Matthias Kloseb159a552010-04-25 21:00:44 +000010737
Martin v. Löwis11437992002-04-12 09:54:03 +000010738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010739if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010740
10741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010742$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010743 ipv6=yes
10744
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010745else
Matthias Kloseb159a552010-04-25 21:00:44 +000010746
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010748$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010749 ipv6=no
10750
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010753fi
10754
10755if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010757
10758fi
10759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760fi
10761
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762
10763ipv6type=unknown
10764ipv6lib=none
10765ipv6trylibc=no
10766
10767if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10769$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010770 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10771 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772 case $i in
10773 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010775/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777#include <netinet/in.h>
10778#ifdef IPV6_INRIA_VERSION
10779yes
10780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010781_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010784 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010786rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787
10788 ;;
10789 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010791/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010792
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793#include <netinet/in.h>
10794#ifdef __KAME__
10795yes
10796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010797_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800 ipv6type=$i;
10801 ipv6lib=inet6
10802 ipv6libdir=/usr/local/v6/lib
10803 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010805rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806
10807 ;;
10808 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010810/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812#include <features.h>
10813#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10814yes
10815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010816_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819 ipv6type=$i;
10820 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010822rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823
10824 ;;
10825 linux-inet6)
10826 if test -d /usr/inet6; then
10827 ipv6type=$i
10828 ipv6lib=inet6
10829 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010830 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831 fi
10832 ;;
10833 solaris)
10834 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010835 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836 ipv6type=$i
10837 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838 fi
10839 fi
10840 ;;
10841 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010843/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010844
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845#include <sys/param.h>
10846#ifdef _TOSHIBA_INET6
10847yes
10848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010849_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852 ipv6type=$i;
10853 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010854 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010856rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857
10858 ;;
10859 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010861/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010862
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863#include </usr/local/v6/include/sys/v6config.h>
10864#ifdef __V6D__
10865yes
10866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010867_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870 ipv6type=$i;
10871 ipv6lib=v6;
10872 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010873 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010875rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010876
10877 ;;
10878 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010881
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882#include <sys/param.h>
10883#ifdef _ZETA_MINAMI_INET6
10884yes
10885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010886_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889 ipv6type=$i;
10890 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010891 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010893rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894
10895 ;;
10896 esac
10897 if test "$ipv6type" != "unknown"; then
10898 break
10899 fi
10900 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10902$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903fi
10904
10905if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10906 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10907 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10908 echo "using lib$ipv6lib"
10909 else
10910 if test $ipv6trylibc = "yes"; then
10911 echo "using libc"
10912 else
10913 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10914 echo "You need to fetch lib$ipv6lib.a from appropriate"
10915 echo 'ipv6 kit and compile beforehand.'
10916 exit 1
10917 fi
10918 fi
10919fi
10920
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10922$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10924/* end confdefs.h. */
10925 /* CAN_RAW_FD_FRAMES available check */
10926#include <linux/can/raw.h>
10927int
10928main ()
10929{
10930int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10931 ;
10932 return 0;
10933}
10934_ACEOF
10935if ac_fn_c_try_compile "$LINENO"; then :
10936
10937
10938$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10939
10940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10941$as_echo "yes" >&6; }
10942
10943else
10944
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10946$as_echo "no" >&6; }
10947
10948fi
10949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10950
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010951# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10953$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010956if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957 withval=$with_doc_strings;
10958fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010959
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010960
10961if test -z "$with_doc_strings"
10962then with_doc_strings="yes"
10963fi
10964if test "$with_doc_strings" != "no"
10965then
10966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010968
10969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10971$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010972
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010973# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10975$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010978if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010979 withval=$with_pymalloc;
10980fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010981
Neil Schemenauera35c6882001-02-27 04:45:05 +000010982
Neil Schemenauer16c22972002-03-22 15:34:49 +000010983if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010984then
10985 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010986fi
10987if test "$with_pymalloc" != "no"
10988then
Martin v. Löwis11437992002-04-12 09:54:03 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010991
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010992 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10995$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010996
Benjamin Peterson05159c42009-12-03 03:01:27 +000010997# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10999$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011000
11001# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011002if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011003 withval=$with_valgrind;
11004else
11005 with_valgrind=no
11006fi
11007
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11009$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011010if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 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 +020011012if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011015
11016else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011017 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011018
11019fi
11020
11021
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011022 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011023fi
11024
Łukasz Langaa785c872016-09-09 17:37:37 -070011025# Check for DTrace support
11026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11027$as_echo_n "checking for --with-dtrace... " >&6; }
11028
11029# Check whether --with-dtrace was given.
11030if test "${with_dtrace+set}" = set; then :
11031 withval=$with_dtrace;
11032else
11033 with_dtrace=no
11034fi
11035
11036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11037$as_echo "$with_dtrace" >&6; }
11038
11039
11040
11041
11042
11043DTRACE=
11044DFLAGS=
11045DTRACE_HEADERS=
11046DTRACE_OBJS=
11047
11048if test "$with_dtrace" = "yes"
11049then
11050 # Extract the first word of "dtrace", so it can be a program name with args.
11051set dummy dtrace; ac_word=$2
11052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11053$as_echo_n "checking for $ac_word... " >&6; }
11054if ${ac_cv_path_DTRACE+:} false; then :
11055 $as_echo_n "(cached) " >&6
11056else
11057 case $DTRACE in
11058 [\\/]* | ?:[\\/]*)
11059 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11060 ;;
11061 *)
11062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11063for as_dir in $PATH
11064do
11065 IFS=$as_save_IFS
11066 test -z "$as_dir" && as_dir=.
11067 for ac_exec_ext in '' $ac_executable_extensions; do
11068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11069 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11071 break 2
11072 fi
11073done
11074 done
11075IFS=$as_save_IFS
11076
11077 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11078 ;;
11079esac
11080fi
11081DTRACE=$ac_cv_path_DTRACE
11082if test -n "$DTRACE"; then
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11084$as_echo "$DTRACE" >&6; }
11085else
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11087$as_echo "no" >&6; }
11088fi
11089
11090
11091 if test "$DTRACE" = "not found"; then
11092 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11093 fi
11094
11095$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11096
11097 DTRACE_HEADERS="Include/pydtrace_probes.h"
11098
11099 # On OS X, DTrace providers do not need to be explicitly compiled and
11100 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11101 # generation flag '-G'. We check for presence of this flag, rather than
11102 # hardcoding support by OS, in the interest of robustness.
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11104$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11105if ${ac_cv_dtrace_link+:} false; then :
11106 $as_echo_n "(cached) " >&6
11107else
11108 ac_cv_dtrace_link=no
11109 echo 'BEGIN' > conftest.d
11110 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11111 ac_cv_dtrace_link=yes
11112
11113fi
11114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11115$as_echo "$ac_cv_dtrace_link" >&6; }
11116 if test "$ac_cv_dtrace_link" = "yes"; then
11117 DTRACE_OBJS="Python/pydtrace.o"
11118 fi
11119fi
11120
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011121# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011122
Guido van Rossum98935bf2001-09-05 19:13:16 +000011123DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011124
Guido van Rossume97ee181999-12-20 21:27:22 +000011125# the dlopen() function means we might want to use dynload_shlib.o. some
11126# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011127for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011128do :
11129 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011130if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011131 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011132#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011133_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011134
Guido van Rossume97ee181999-12-20 21:27:22 +000011135fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011136done
Guido van Rossume97ee181999-12-20 21:27:22 +000011137
Michael W. Hudson54241132001-12-07 15:38:26 +000011138
Guido van Rossume97ee181999-12-20 21:27:22 +000011139# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11140# loading of modules.
11141
Matthias Kloseb9621712010-04-24 17:59:49 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11143$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011144if test -z "$DYNLOADFILE"
11145then
11146 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011147 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11148 if test "$ac_cv_func_dlopen" = yes
11149 then DYNLOADFILE="dynload_shlib.o"
11150 else DYNLOADFILE="dynload_aix.o"
11151 fi
11152 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011153 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011154 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11155 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011156 *)
11157 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11158 # out any dynamic loading
11159 if test "$ac_cv_func_dlopen" = yes
11160 then DYNLOADFILE="dynload_shlib.o"
11161 else DYNLOADFILE="dynload_stub.o"
11162 fi
11163 ;;
11164 esac
11165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11167$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011168if test "$DYNLOADFILE" != "dynload_stub.o"
11169then
Martin v. Löwis11437992002-04-12 09:54:03 +000011170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011172
11173fi
11174
Neil Schemenauer4e425612001-06-19 15:44:15 +000011175# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11176
Michael W. Hudson54241132001-12-07 15:38:26 +000011177
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11179$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011180if test -z "$MACHDEP_OBJS"
11181then
Jack Jansene578a632001-08-15 01:27:14 +000011182 MACHDEP_OBJS=$extra_machdep_objs
11183else
11184 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011185fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011186if test -z "$MACHDEP_OBJS"; then
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11188$as_echo "none" >&6; }
11189else
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11191$as_echo "$MACHDEP_OBJS" >&6; }
11192fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011193
Guido van Rossum627b2d71993-12-24 10:39:16 +000011194# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011195for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011196 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011197 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011198 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011199 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011200 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011201 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011202 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011203 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011204 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011205 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011206 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011207 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011208 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011209 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11210 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011211 sigaction sigaltstack siginterrupt sigpending sigrelse \
11212 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011213 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011214 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011215 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011216do :
11217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11218ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011219if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011220 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011222_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011223
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011224fi
11225done
11226
Michael W. Hudson54241132001-12-07 15:38:26 +000011227
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011228ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11229 #include <dirent.h>
11230"
11231if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11232
11233$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11234
11235fi
11236
11237
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011238# For some functions, having a definition is not sufficient, since
11239# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11241$as_echo_n "checking for chroot... " >&6; }
11242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011243/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011244#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011245int
11246main ()
11247{
11248void *x=chroot
11249 ;
11250 return 0;
11251}
11252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011253if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011256
Matthias Kloseb159a552010-04-25 21:00:44 +000011257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011259else
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262
11263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11266$as_echo_n "checking for link... " >&6; }
11267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011269#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011270int
11271main ()
11272{
11273void *x=link
11274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011281
Matthias Kloseb159a552010-04-25 21:00:44 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011284else
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011287
11288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11291$as_echo_n "checking for symlink... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011294#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011295int
11296main ()
11297{
11298void *x=symlink
11299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306
Matthias Kloseb159a552010-04-25 21:00:44 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309else
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312
11313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11316$as_echo_n "checking for fchdir... " >&6; }
11317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011319#include <unistd.h>
11320int
11321main ()
11322{
11323void *x=fchdir
11324 ;
11325 return 0;
11326}
11327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011331
Matthias Kloseb159a552010-04-25 21:00:44 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011334else
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011337
11338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11341$as_echo_n "checking for fsync... " >&6; }
11342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011344#include <unistd.h>
11345int
11346main ()
11347{
11348void *x=fsync
11349 ;
11350 return 0;
11351}
11352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011354
Matthias Kloseb9621712010-04-24 17:59:49 +000011355$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011356
Matthias Kloseb159a552010-04-25 21:00:44 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011359else
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011362
11363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11366$as_echo_n "checking for fdatasync... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011369#include <unistd.h>
11370int
11371main ()
11372{
11373void *x=fdatasync
11374 ;
11375 return 0;
11376}
11377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011381
Matthias Kloseb159a552010-04-25 21:00:44 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384else
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011387
11388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11391$as_echo_n "checking for epoll... " >&6; }
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011393/* end confdefs.h. */
11394#include <sys/epoll.h>
11395int
11396main ()
11397{
11398void *x=epoll_create
11399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011406
Matthias Kloseb159a552010-04-25 21:00:44 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011409else
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011412
11413fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11416$as_echo_n "checking for epoll_create1... " >&6; }
11417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418/* end confdefs.h. */
11419#include <sys/epoll.h>
11420int
11421main ()
11422{
11423void *x=epoll_create1
11424 ;
11425 return 0;
11426}
11427_ACEOF
11428if ac_fn_c_try_compile "$LINENO"; then :
11429
11430$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11431
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11433$as_echo "yes" >&6; }
11434else
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
11437
11438fi
11439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11441$as_echo_n "checking for kqueue... " >&6; }
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011443/* end confdefs.h. */
11444
11445#include <sys/types.h>
11446#include <sys/event.h>
11447
11448int
11449main ()
11450{
11451int x=kqueue()
11452 ;
11453 return 0;
11454}
11455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011459
Matthias Kloseb159a552010-04-25 21:00:44 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011462else
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011465
11466fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11469$as_echo_n "checking for prlimit... " >&6; }
11470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471/* end confdefs.h. */
11472
11473#include <sys/time.h>
11474#include <sys/resource.h>
11475
11476int
11477main ()
11478{
11479void *x=prlimit
11480 ;
11481 return 0;
11482}
11483_ACEOF
11484if ac_fn_c_try_compile "$LINENO"; then :
11485
11486$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11487
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11489$as_echo "yes" >&6; }
11490else
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
11493
11494fi
11495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11496
Martin v. Löwisd5843682002-11-21 20:41:28 +000011497# On some systems (eg. FreeBSD 5), we would find a definition of the
11498# functions ctermid_r, setgroups in the library, but no prototype
11499# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11500# address to avoid compiler warnings and potential miscompilations
11501# because of the missing prototypes.
11502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11504$as_echo_n "checking for ctermid_r... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011507
Martin v. Löwisd5843682002-11-21 20:41:28 +000011508#include <stdio.h>
11509
Martin v. Löwisd5843682002-11-21 20:41:28 +000011510int
11511main ()
11512{
11513void* p = ctermid_r
11514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011521
Matthias Kloseb159a552010-04-25 21:00:44 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011527
11528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11530
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11532$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011533if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011534 $as_echo_n "(cached) " >&6
11535else
11536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011537/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011538#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011539int
11540main ()
11541{
11542void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011543
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011544 ;
11545 return 0;
11546}
11547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011548if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011549 ac_cv_flock_decl=yes
11550else
11551 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011552
11553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011555
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011556fi
11557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11558$as_echo "$ac_cv_flock_decl" >&6; }
11559if test "x${ac_cv_flock_decl}" = xyes; then
11560 for ac_func in flock
11561do :
11562 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011563if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011564 cat >>confdefs.h <<_ACEOF
11565#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011566_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011567
Antoine Pitroua3000072010-09-07 14:52:42 +000011568else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011570$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011571if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011572 $as_echo_n "(cached) " >&6
11573else
11574 ac_check_lib_save_LIBS=$LIBS
11575LIBS="-lbsd $LIBS"
11576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11577/* end confdefs.h. */
11578
11579/* Override any GCC internal prototype to avoid an error.
11580 Use char because int might match the return type of a GCC
11581 builtin and then its argument prototype would still apply. */
11582#ifdef __cplusplus
11583extern "C"
11584#endif
11585char flock ();
11586int
11587main ()
11588{
11589return flock ();
11590 ;
11591 return 0;
11592}
11593_ACEOF
11594if ac_fn_c_try_link "$LINENO"; then :
11595 ac_cv_lib_bsd_flock=yes
11596else
11597 ac_cv_lib_bsd_flock=no
11598fi
11599rm -f core conftest.err conftest.$ac_objext \
11600 conftest$ac_exeext conftest.$ac_ext
11601LIBS=$ac_check_lib_save_LIBS
11602fi
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11604$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011605if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011606 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011607
11608
11609$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11610
11611
11612fi
11613
11614
11615fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011616done
11617
Antoine Pitroua3000072010-09-07 14:52:42 +000011618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11621$as_echo_n "checking for getpagesize... " >&6; }
11622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011623/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011624
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011625#include <unistd.h>
11626
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011627int
11628main ()
11629{
11630void* p = getpagesize
11631 ;
11632 return 0;
11633}
11634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011636
Matthias Kloseb9621712010-04-24 17:59:49 +000011637$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011638
Matthias Kloseb159a552010-04-25 21:00:44 +000011639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011641else
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11643$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011644
11645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011647
Victor Stinner984890f2011-11-24 13:53:38 +010011648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11649$as_echo_n "checking for broken unsetenv... " >&6; }
11650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11651/* end confdefs.h. */
11652
11653#include <stdlib.h>
11654
11655int
11656main ()
11657{
11658int res = unsetenv("DUMMY")
11659 ;
11660 return 0;
11661}
11662_ACEOF
11663if ac_fn_c_try_compile "$LINENO"; then :
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11665$as_echo "no" >&6; }
11666else
11667
11668$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11669
11670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11671$as_echo "yes" >&6; }
11672
11673fi
11674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11675
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011676for ac_prog in true
11677do
11678 # Extract the first word of "$ac_prog", so it can be a program name with args.
11679set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11681$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011682if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011683 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011684else
11685 if test -n "$TRUE"; then
11686 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11687else
11688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11689for as_dir in $PATH
11690do
11691 IFS=$as_save_IFS
11692 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011695 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 $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 +000011697 break 2
11698 fi
11699done
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011701IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011702
11703fi
11704fi
11705TRUE=$ac_cv_prog_TRUE
11706if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11708$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011709else
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011712fi
11713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011715 test -n "$TRUE" && break
11716done
11717test -n "$TRUE" || TRUE="/bin/true"
11718
11719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11721$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011722if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011724else
11725 ac_check_lib_save_LIBS=$LIBS
11726LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011728/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011730/* Override any GCC internal prototype to avoid an error.
11731 Use char because int might match the return type of a GCC
11732 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011733#ifdef __cplusplus
11734extern "C"
11735#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011736char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011737int
11738main ()
11739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011740return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +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öwis95c419b2003-05-03 12:10:48 +000011746 ac_cv_lib_c_inet_aton=yes
11747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750rm -f core conftest.err conftest.$ac_objext \
11751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011752LIBS=$ac_check_lib_save_LIBS
11753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11755$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011756if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011757 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11760$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011763else
11764 ac_check_lib_save_LIBS=$LIBS
11765LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011767/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011769/* Override any GCC internal prototype to avoid an error.
11770 Use char because int might match the return type of a GCC
11771 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772#ifdef __cplusplus
11773extern "C"
11774#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011775char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776int
11777main ()
11778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780 ;
11781 return 0;
11782}
11783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011784if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011785 ac_cv_lib_resolv_inet_aton=yes
11786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011789rm -f core conftest.err conftest.$ac_objext \
11790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011791LIBS=$ac_check_lib_save_LIBS
11792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11794$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011795if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796 cat >>confdefs.h <<_ACEOF
11797#define HAVE_LIBRESOLV 1
11798_ACEOF
11799
11800 LIBS="-lresolv $LIBS"
11801
11802fi
11803
11804
11805fi
11806
11807
Christian Heimesd0764e22007-12-04 15:00:33 +000011808# On Tru64, chflags seems to be present, but calling it will
11809# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11811$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011812if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011816 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011819/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011820
Christian Heimesd0764e22007-12-04 15:00:33 +000011821#include <sys/stat.h>
11822#include <unistd.h>
11823int main(int argc, char*argv[])
11824{
11825 if(chflags(argv[0], 0) != 0)
11826 return 1;
11827 return 0;
11828}
Ned Deily3eb67d52011-06-28 00:00:28 -070011829
Christian Heimesd0764e22007-12-04 15:00:33 +000011830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011832 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011838fi
11839
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11843$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011844if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011846if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011847 ac_cv_have_chflags="yes"
11848else
11849 ac_cv_have_chflags="no"
11850fi
11851
11852fi
11853if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011856
11857fi
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11860$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011861if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011865 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011868/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011869
Christian Heimesd0764e22007-12-04 15:00:33 +000011870#include <sys/stat.h>
11871#include <unistd.h>
11872int main(int argc, char*argv[])
11873{
11874 if(lchflags(argv[0], 0) != 0)
11875 return 1;
11876 return 0;
11877}
Ned Deily3eb67d52011-06-28 00:00:28 -070011878
Christian Heimesd0764e22007-12-04 15:00:33 +000011879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011881 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011887fi
11888
11889
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11892$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011893if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011896 ac_cv_have_lchflags="yes"
11897else
11898 ac_cv_have_lchflags="no"
11899fi
11900
11901fi
11902if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011905
11906fi
11907
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011908case $ac_sys_system/$ac_sys_release in
11909Darwin/*)
11910 _CUR_CFLAGS="${CFLAGS}"
11911 _CUR_LDFLAGS="${LDFLAGS}"
11912 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11913 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11914 ;;
11915esac
11916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11918$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011919if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011921else
11922 ac_check_lib_save_LIBS=$LIBS
11923LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011925/* end confdefs.h. */
11926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927/* Override any GCC internal prototype to avoid an error.
11928 Use char because int might match the return type of a GCC
11929 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011930#ifdef __cplusplus
11931extern "C"
11932#endif
11933char inflateCopy ();
11934int
11935main ()
11936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011937return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011938 ;
11939 return 0;
11940}
11941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011942if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011943 ac_cv_lib_z_inflateCopy=yes
11944else
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011947rm -f core conftest.err conftest.$ac_objext \
11948 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011949LIBS=$ac_check_lib_save_LIBS
11950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11952$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011953if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011956
11957fi
11958
11959
11960case $ac_sys_system/$ac_sys_release in
11961Darwin/*)
11962 CFLAGS="${_CUR_CFLAGS}"
11963 LDFLAGS="${_CUR_LDFLAGS}"
11964 ;;
11965esac
11966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11968$as_echo_n "checking for hstrerror... " >&6; }
11969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011970/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011971
Martin v. Löwise9416172003-05-03 10:12:45 +000011972#include <netdb.h>
11973
Martin v. Löwise9416172003-05-03 10:12:45 +000011974int
11975main ()
11976{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011977void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011978 ;
11979 return 0;
11980}
11981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011985
Matthias Kloseb159a552010-04-25 21:00:44 +000011986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011987$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011991
11992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011993rm -f core conftest.err conftest.$ac_objext \
11994 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11997$as_echo_n "checking for inet_aton... " >&6; }
11998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011999/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012000
Martin v. Löwis86d66262006-02-17 08:40:11 +000012001#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012002#include <sys/socket.h>
12003#include <netinet/in.h>
12004#include <arpa/inet.h>
12005
Martin v. Löwise9416172003-05-03 10:12:45 +000012006int
12007main ()
12008{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012009void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012010 ;
12011 return 0;
12012}
12013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012017
Matthias Kloseb159a552010-04-25 21:00:44 +000012018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012019$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012020else
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12022$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012023
12024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012025rm -f core conftest.err conftest.$ac_objext \
12026 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12029$as_echo_n "checking for inet_pton... " >&6; }
12030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012032
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012033#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012034#include <sys/socket.h>
12035#include <netinet/in.h>
12036#include <arpa/inet.h>
12037
Martin v. Löwise9416172003-05-03 10:12:45 +000012038int
12039main ()
12040{
12041void* p = inet_pton
12042 ;
12043 return 0;
12044}
12045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012049
Matthias Kloseb159a552010-04-25 21:00:44 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012052else
Matthias Kloseb9621712010-04-24 17:59:49 +000012053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012055
12056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012058
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012059# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12061$as_echo_n "checking for setgroups... " >&6; }
12062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012064
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012065#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012066#ifdef HAVE_GRP_H
12067#include <grp.h>
12068#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012069
Martin v. Löwisd5843682002-11-21 20:41:28 +000012070int
12071main ()
12072{
12073void* p = setgroups
12074 ;
12075 return 0;
12076}
12077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012081
Matthias Kloseb159a552010-04-25 21:00:44 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12086$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012087
12088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012091# check for openpty and forkpty
12092
12093for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012094do :
12095 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012099_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012100
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12103$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012106else
Martin v. Löwis11437992002-04-12 09:54:03 +000012107 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012108LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112/* Override any GCC internal prototype to avoid an error.
12113 Use char because int might match the return type of a GCC
12114 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012115#ifdef __cplusplus
12116extern "C"
12117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012118char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012119int
12120main ()
12121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012123 ;
12124 return 0;
12125}
12126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012134LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12137$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012138if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012140 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12143$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012146else
12147 ac_check_lib_save_LIBS=$LIBS
12148LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012150/* end confdefs.h. */
12151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152/* Override any GCC internal prototype to avoid an error.
12153 Use char because int might match the return type of a GCC
12154 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012155#ifdef __cplusplus
12156extern "C"
12157#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012158char openpty ();
12159int
12160main ()
12161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012163 ;
12164 return 0;
12165}
12166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012168 ac_cv_lib_bsd_openpty=yes
12169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172rm -f core conftest.err conftest.$ac_objext \
12173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012174LIBS=$ac_check_lib_save_LIBS
12175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12177$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012178if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012180 LIBS="$LIBS -lbsd"
12181fi
12182
12183
12184fi
12185
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186
12187fi
12188done
12189
12190for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012191do :
12192 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012195#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012196_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012197
Fred Drake8cef4cf2000-06-28 16:40:38 +000012198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12200$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012201if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203else
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209/* Override any GCC internal prototype to avoid an error.
12210 Use char because int might match the return type of a GCC
12211 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012212#ifdef __cplusplus
12213extern "C"
12214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012215char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012216int
12217main ()
12218{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 ;
12221 return 0;
12222}
12223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012229rm -f core conftest.err conftest.$ac_objext \
12230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012231LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12234$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012235if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012237 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012238else
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12240$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012243else
12244 ac_check_lib_save_LIBS=$LIBS
12245LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012247/* end confdefs.h. */
12248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249/* Override any GCC internal prototype to avoid an error.
12250 Use char because int might match the return type of a GCC
12251 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012252#ifdef __cplusplus
12253extern "C"
12254#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012255char forkpty ();
12256int
12257main ()
12258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012260 ;
12261 return 0;
12262}
12263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012265 ac_cv_lib_bsd_forkpty=yes
12266else
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012269rm -f core conftest.err conftest.$ac_objext \
12270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012271LIBS=$ac_check_lib_save_LIBS
12272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12274$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012275if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012277 LIBS="$LIBS -lbsd"
12278fi
12279
12280
12281fi
12282
Fred Drake8cef4cf2000-06-28 16:40:38 +000012283
12284fi
12285done
12286
Jack Jansendd19cf82001-12-06 22:36:17 +000012287
Christian Heimesb186d002008-03-18 15:15:01 +000012288# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012289for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012290do :
12291 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012292if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012293 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012294#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012295_ACEOF
12296
12297fi
12298done
12299
12300
Michael W. Hudson54241132001-12-07 15:38:26 +000012301# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012302for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012303do :
12304 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12305ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012306if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012309_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012310
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012311fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012312done
12313
Michael W. Hudson54241132001-12-07 15:38:26 +000012314
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012315ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012316if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012317 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012318
Martin v. Löwis1142de32002-03-29 16:28:31 +000012319else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012321 *" dup2.$ac_objext "* ) ;;
12322 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012324esac
12325
Martin v. Löwis1142de32002-03-29 16:28:31 +000012326fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012327
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012328ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012329if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012330 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12331
12332else
12333 case " $LIBOBJS " in
12334 *" strdup.$ac_objext "* ) ;;
12335 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12336 ;;
12337esac
12338
12339fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012340
12341
12342for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012343do :
12344 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012345if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012346 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012350/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012351#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012352int
12353main ()
12354{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 ;
12357 return 0;
12358}
12359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012363
Guido van Rossum627b2d71993-12-24 10:39:16 +000012364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012366
Guido van Rossum627b2d71993-12-24 10:39:16 +000012367fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012368done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012369
Jack Jansen150753c2003-03-29 22:07:47 +000012370for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012371do :
12372 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012373if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012374 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012375#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012379#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012380int
12381main ()
12382{
12383setpgrp(0,0);
12384 ;
12385 return 0;
12386}
12387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
Matthias Kloseb9621712010-04-24 17:59:49 +000012390$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012391
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012394
12395fi
12396done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012397
Thomas Wouters3a584202000-08-05 23:28:51 +000012398for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012399do :
12400 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012401if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012406/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012408int
12409main ()
12410{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 ;
12413 return 0;
12414}
12415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012416if ac_fn_c_try_compile "$LINENO"; then :
12417
Guido van Rossum627b2d71993-12-24 10:39:16 +000012418else
Skip Montanaro6dead952003-09-25 14:50:04 +000012419
Matthias Kloseb9621712010-04-24 17:59:49 +000012420$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012421
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Guido van Rossum627b2d71993-12-24 10:39:16 +000012423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012425
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012426fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012427done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012428
Michael W. Hudson54241132001-12-07 15:38:26 +000012429
Victor Stinnere0be4232011-10-25 13:06:09 +020012430for ac_func in clock_gettime
12431do :
12432 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12433if test "x$ac_cv_func_clock_gettime" = xyes; then :
12434 cat >>confdefs.h <<_ACEOF
12435#define HAVE_CLOCK_GETTIME 1
12436_ACEOF
12437
12438else
12439
12440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12441$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12442if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12443 $as_echo_n "(cached) " >&6
12444else
12445 ac_check_lib_save_LIBS=$LIBS
12446LIBS="-lrt $LIBS"
12447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12448/* end confdefs.h. */
12449
12450/* Override any GCC internal prototype to avoid an error.
12451 Use char because int might match the return type of a GCC
12452 builtin and then its argument prototype would still apply. */
12453#ifdef __cplusplus
12454extern "C"
12455#endif
12456char clock_gettime ();
12457int
12458main ()
12459{
12460return clock_gettime ();
12461 ;
12462 return 0;
12463}
12464_ACEOF
12465if ac_fn_c_try_link "$LINENO"; then :
12466 ac_cv_lib_rt_clock_gettime=yes
12467else
12468 ac_cv_lib_rt_clock_gettime=no
12469fi
12470rm -f core conftest.err conftest.$ac_objext \
12471 conftest$ac_exeext conftest.$ac_ext
12472LIBS=$ac_check_lib_save_LIBS
12473fi
12474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12475$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12476if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12477
Victor Stinner7efb8332014-08-29 15:41:08 +020012478 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012479 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12480
12481
12482$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12483
12484
12485fi
12486
12487
12488fi
12489done
12490
12491
12492for ac_func in clock_getres
12493do :
12494 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12495if test "x$ac_cv_func_clock_getres" = xyes; then :
12496 cat >>confdefs.h <<_ACEOF
12497#define HAVE_CLOCK_GETRES 1
12498_ACEOF
12499
12500else
12501
12502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12503$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12504if ${ac_cv_lib_rt_clock_getres+:} false; then :
12505 $as_echo_n "(cached) " >&6
12506else
12507 ac_check_lib_save_LIBS=$LIBS
12508LIBS="-lrt $LIBS"
12509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12510/* end confdefs.h. */
12511
12512/* Override any GCC internal prototype to avoid an error.
12513 Use char because int might match the return type of a GCC
12514 builtin and then its argument prototype would still apply. */
12515#ifdef __cplusplus
12516extern "C"
12517#endif
12518char clock_getres ();
12519int
12520main ()
12521{
12522return clock_getres ();
12523 ;
12524 return 0;
12525}
12526_ACEOF
12527if ac_fn_c_try_link "$LINENO"; then :
12528 ac_cv_lib_rt_clock_getres=yes
12529else
12530 ac_cv_lib_rt_clock_getres=no
12531fi
12532rm -f core conftest.err conftest.$ac_objext \
12533 conftest$ac_exeext conftest.$ac_ext
12534LIBS=$ac_check_lib_save_LIBS
12535fi
12536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12537$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12538if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12539
12540 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12541
12542
12543fi
12544
12545
12546fi
12547done
12548
12549
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012550for ac_func in clock_settime
12551do :
12552 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12553if test "x$ac_cv_func_clock_settime" = xyes; then :
12554 cat >>confdefs.h <<_ACEOF
12555#define HAVE_CLOCK_SETTIME 1
12556_ACEOF
12557
12558else
12559
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12561$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12562if ${ac_cv_lib_rt_clock_settime+:} false; then :
12563 $as_echo_n "(cached) " >&6
12564else
12565 ac_check_lib_save_LIBS=$LIBS
12566LIBS="-lrt $LIBS"
12567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12568/* end confdefs.h. */
12569
12570/* Override any GCC internal prototype to avoid an error.
12571 Use char because int might match the return type of a GCC
12572 builtin and then its argument prototype would still apply. */
12573#ifdef __cplusplus
12574extern "C"
12575#endif
12576char clock_settime ();
12577int
12578main ()
12579{
12580return clock_settime ();
12581 ;
12582 return 0;
12583}
12584_ACEOF
12585if ac_fn_c_try_link "$LINENO"; then :
12586 ac_cv_lib_rt_clock_settime=yes
12587else
12588 ac_cv_lib_rt_clock_settime=no
12589fi
12590rm -f core conftest.err conftest.$ac_objext \
12591 conftest$ac_exeext conftest.$ac_ext
12592LIBS=$ac_check_lib_save_LIBS
12593fi
12594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12595$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12596if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12597
12598 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12599
12600
12601fi
12602
12603
12604fi
12605done
12606
12607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12609$as_echo_n "checking for major... " >&6; }
12610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012612
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012613#if defined(MAJOR_IN_MKDEV)
12614#include <sys/mkdev.h>
12615#elif defined(MAJOR_IN_SYSMACROS)
12616#include <sys/sysmacros.h>
12617#else
12618#include <sys/types.h>
12619#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012620
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012621int
12622main ()
12623{
12624
12625 makedev(major(0),minor(0));
12626
12627 ;
12628 return 0;
12629}
12630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012632
12633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012635
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12637$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012638
12639else
Skip Montanaro6dead952003-09-25 14:50:04 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12642$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012643
12644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012645rm -f core conftest.err conftest.$ac_objext \
12646 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012647
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012648# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12649# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12651$as_echo_n "checking for if_nameindex... " >&6; }
12652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12653/* end confdefs.h. */
12654
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012655#include <stdio.h>
12656#ifdef STDC_HEADERS
12657# include <stdlib.h>
12658# include <stddef.h>
12659#else
12660# ifdef HAVE_STDLIB_H
12661# include <stdlib.h>
12662# endif
12663#endif
12664#ifdef HAVE_SYS_SOCKET_H
12665# include <sys/socket.h>
12666#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012667#ifdef HAVE_NET_IF_H
12668# include <net/if.h>
12669#endif
12670
12671int
12672main ()
12673{
12674struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12675 ;
12676 return 0;
12677}
12678_ACEOF
12679if ac_fn_c_try_link "$LINENO"; then :
12680
12681$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12682
12683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12684$as_echo "yes" >&6; }
12685else
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12687$as_echo "no" >&6; }
12688
12689fi
12690rm -f core conftest.err conftest.$ac_objext \
12691 conftest$ac_exeext conftest.$ac_ext
12692
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012693# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12694# macro is not defined in android-ndk-r13.
12695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12696$as_echo_n "checking for lockf... " >&6; }
12697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698/* end confdefs.h. */
12699#include <unistd.h>
12700int
12701main ()
12702{
12703lockf(0, F_LOCK, 0);
12704 ;
12705 return 0;
12706}
12707_ACEOF
12708if ac_fn_c_try_link "$LINENO"; then :
12709
12710$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12711
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12713$as_echo "yes" >&6; }
12714else
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12716$as_echo "no" >&6; }
12717
12718fi
12719rm -f core conftest.err conftest.$ac_objext \
12720 conftest$ac_exeext conftest.$ac_ext
12721
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012722# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012723# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12725$as_echo_n "checking for getaddrinfo... " >&6; }
12726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012728
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012729#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012730#include <sys/socket.h>
12731#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012732#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012733
Martin v. Löwis11437992002-04-12 09:54:03 +000012734int
12735main ()
12736{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012737getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ;
12739 return 0;
12740}
12741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012743 have_getaddrinfo=yes
12744else
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012747rm -f core conftest.err conftest.$ac_objext \
12748 conftest$ac_exeext conftest.$ac_ext
12749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12750$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012751if test $have_getaddrinfo = yes
12752then
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12754$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012755 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012757else
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012759
12760if test "${enable_ipv6+set}" = set; then
12761 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12762else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012763 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012764fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012765else
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012767/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012768
Stefan Krah19c21392012-11-22 23:47:32 +010012769#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012770#include <sys/types.h>
12771#include <netdb.h>
12772#include <string.h>
12773#include <sys/socket.h>
12774#include <netinet/in.h>
12775
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012776int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012777{
12778 int passive, gaierr, inet4 = 0, inet6 = 0;
12779 struct addrinfo hints, *ai, *aitop;
12780 char straddr[INET6_ADDRSTRLEN], strport[16];
12781
12782 for (passive = 0; passive <= 1; passive++) {
12783 memset(&hints, 0, sizeof(hints));
12784 hints.ai_family = AF_UNSPEC;
12785 hints.ai_flags = passive ? AI_PASSIVE : 0;
12786 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012787 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12789 (void)gai_strerror(gaierr);
12790 goto bad;
12791 }
12792 for (ai = aitop; ai; ai = ai->ai_next) {
12793 if (ai->ai_addr == NULL ||
12794 ai->ai_addrlen == 0 ||
12795 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12796 straddr, sizeof(straddr), strport, sizeof(strport),
12797 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12798 goto bad;
12799 }
12800 switch (ai->ai_family) {
12801 case AF_INET:
12802 if (strcmp(strport, "54321") != 0) {
12803 goto bad;
12804 }
12805 if (passive) {
12806 if (strcmp(straddr, "0.0.0.0") != 0) {
12807 goto bad;
12808 }
12809 } else {
12810 if (strcmp(straddr, "127.0.0.1") != 0) {
12811 goto bad;
12812 }
12813 }
12814 inet4++;
12815 break;
12816 case AF_INET6:
12817 if (strcmp(strport, "54321") != 0) {
12818 goto bad;
12819 }
12820 if (passive) {
12821 if (strcmp(straddr, "::") != 0) {
12822 goto bad;
12823 }
12824 } else {
12825 if (strcmp(straddr, "::1") != 0) {
12826 goto bad;
12827 }
12828 }
12829 inet6++;
12830 break;
12831 case AF_UNSPEC:
12832 goto bad;
12833 break;
12834 default:
12835 /* another family support? */
12836 break;
12837 }
12838 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012839 freeaddrinfo(aitop);
12840 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841 }
12842
12843 if (!(inet4 == 0 || inet4 == 2))
12844 goto bad;
12845 if (!(inet6 == 0 || inet6 == 2))
12846 goto bad;
12847
12848 if (aitop)
12849 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012850 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012851
12852 bad:
12853 if (aitop)
12854 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012855 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012856}
12857
Martin v. Löwis11437992002-04-12 09:54:03 +000012858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012859if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012860 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012861else
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012868fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012869
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12873$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12874
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012875if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012876then
12877 if test $ipv6 = yes
12878 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012879 echo 'Fatal: You must get working getaddrinfo() function.'
12880 echo ' or you can specify "--disable-ipv6"'.
12881 exit 1
12882 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012883else
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012886
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012887fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012888
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012889for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012890do :
12891 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012892if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012894#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012895_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012896
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012897fi
12898done
12899
Michael W. Hudson54241132001-12-07 15:38:26 +000012900
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12903$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012904if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906else
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012908/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012909#include <sys/types.h>
12910#include <sys/time.h>
12911#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012912
Martin v. Löwis11437992002-04-12 09:54:03 +000012913int
12914main ()
12915{
12916if ((struct tm *) 0)
12917return 0;
12918 ;
12919 return 0;
12920}
12921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012922if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012924else
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12930$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012931if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934
12935fi
12936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12938$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012939if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012941else
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012943/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012944#include <sys/types.h>
12945#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Martin v. Löwis11437992002-04-12 09:54:03 +000012947int
12948main ()
12949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950struct tm tm;
12951 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 ;
12954 return 0;
12955}
12956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012958 ac_cv_struct_tm=time.h
12959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12965$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012966if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012969
12970fi
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972ac_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 +000012973#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975"
Victor Stinnere0be4232011-10-25 13:06:09 +020012976if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
12978cat >>confdefs.h <<_ACEOF
12979#define HAVE_STRUCT_TM_TM_ZONE 1
12980_ACEOF
12981
12982
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012984
Martin v. Löwis11437992002-04-12 09:54:03 +000012985if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012988
12989else
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12991"
Victor Stinnere0be4232011-10-25 13:06:09 +020012992if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996fi
12997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012999#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000_ACEOF
13001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13003$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013004if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013008/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013009#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010#if !HAVE_DECL_TZNAME
13011extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014int
13015main ()
13016{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013017return tzname[0][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_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013023 ac_cv_var_tzname=yes
13024else
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013027rm -f core conftest.err conftest.$ac_objext \
13028 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13031$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013032 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013035
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013036 fi
13037fi
13038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039ac_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 +020013040if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013041
13042cat >>confdefs.h <<_ACEOF
13043#define HAVE_STRUCT_STAT_ST_RDEV 1
13044_ACEOF
13045
13046
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013047fi
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049ac_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 +020013050if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013051
Martin v. Löwis11437992002-04-12 09:54:03 +000013052cat >>confdefs.h <<_ACEOF
13053#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13054_ACEOF
13055
13056
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013057fi
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059ac_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 +020013060if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013061
13062cat >>confdefs.h <<_ACEOF
13063#define HAVE_STRUCT_STAT_ST_FLAGS 1
13064_ACEOF
13065
13066
13067fi
13068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069ac_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 +020013070if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013071
13072cat >>confdefs.h <<_ACEOF
13073#define HAVE_STRUCT_STAT_ST_GEN 1
13074_ACEOF
13075
13076
13077fi
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079ac_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 +020013080if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013081
13082cat >>confdefs.h <<_ACEOF
13083#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13084_ACEOF
13085
13086
13087fi
13088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089ac_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 +020013090if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013091
Martin v. Löwis11437992002-04-12 09:54:03 +000013092cat >>confdefs.h <<_ACEOF
13093#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13094_ACEOF
13095
13096
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013097fi
13098
Stefan Krah267b6392016-04-26 01:09:18 +020013099ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13100 #include <sys/types.h>
13101 #include <pwd.h>
13102
13103"
13104if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13105
13106cat >>confdefs.h <<_ACEOF
13107#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13108_ACEOF
13109
13110
13111fi
13112ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13113 #include <sys/types.h>
13114 #include <pwd.h>
13115
13116"
13117if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13118
13119cat >>confdefs.h <<_ACEOF
13120#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13121_ACEOF
13122
13123
13124fi
13125
Michael W. Hudson54241132001-12-07 15:38:26 +000013126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13128$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013129if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131else
Matthias Kloseb159a552010-04-25 21:00:44 +000013132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013134/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013135#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013136int
13137main ()
13138{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013139return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 ;
13141 return 0;
13142}
13143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013144if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013145 ac_cv_header_time_altzone=yes
13146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151fi
13152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13154$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013155if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013158
13159fi
13160
Guido van Rossumda88dad1995-01-26 00:46:29 +000013161was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13163$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013165/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013166
13167#include <sys/types.h>
13168#include <sys/select.h>
13169#include <sys/time.h>
13170
Martin v. Löwis11437992002-04-12 09:54:03 +000013171int
13172main ()
13173{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013174;
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 ;
13176 return 0;
13177}
13178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013180
13181
Matthias Kloseb9621712010-04-24 17:59:49 +000013182$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013183
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013184 was_it_defined=yes
13185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13189$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13192$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013193if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195else
Matthias Kloseb9621712010-04-24 17:59:49 +000013196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013197/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013198#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013199int
13200main ()
13201{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013203 ;
13204 return 0;
13205}
13206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208 ac_cv_struct_addrinfo=yes
13209else
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13213fi
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13216$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013220
13221fi
13222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13224$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013225if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013229/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013230
13231# include <sys/types.h>
13232# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013233int
13234main ()
13235{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013237 ;
13238 return 0;
13239}
13240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242 ac_cv_struct_sockaddr_storage=yes
13243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13247fi
13248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13250$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254
13255fi
13256
Christian Heimesdffa3942016-09-05 23:54:41 +020013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13258$as_echo_n "checking for sockaddr_alg... " >&6; }
13259if ${ac_cv_struct_sockaddr_alg+:} false; then :
13260 $as_echo_n "(cached) " >&6
13261else
13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13263/* end confdefs.h. */
13264
13265# include <sys/types.h>
13266# include <sys/socket.h>
13267# include <linux/if_alg.h>
13268int
13269main ()
13270{
13271struct sockaddr_alg s
13272 ;
13273 return 0;
13274}
13275_ACEOF
13276if ac_fn_c_try_compile "$LINENO"; then :
13277 ac_cv_struct_sockaddr_alg=yes
13278else
13279 ac_cv_struct_sockaddr_alg=no
13280fi
13281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13282fi
13283
13284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13285$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13286if test $ac_cv_struct_sockaddr_alg = yes; then
13287
13288$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13289
13290fi
13291
Guido van Rossum627b2d71993-12-24 10:39:16 +000013292# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13295$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013296if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013298else
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013301$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013302int
13303main ()
13304{
13305static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013306test_array [0] = 0;
13307return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013308
13309 ;
13310 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013311}
Martin v. Löwis11437992002-04-12 09:54:03 +000013312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013313if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013314 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13321$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324
13325fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13328$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013329if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013330 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013333/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335int
13336main ()
13337{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013340 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013342 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344 char const *const *pcpcc;
13345 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 /* NEC SVR4.0.2 mips cc rejects this. */
13347 struct point {int x, y;};
13348 static struct point const zero = {0,0};
13349 /* AIX XL C 1.02.0.0 rejects this.
13350 It does not let you subtract one const X* pointer from another in
13351 an arm of an if-expression whose if-part is not a constant
13352 expression */
13353 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013355 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356 ++pcpcc;
13357 ppc = (char**) pcpcc;
13358 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013359 { /* SCO 3.2v4 cc rejects this sort of thing. */
13360 char tx;
13361 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013363
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 }
13367 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13368 int x[] = {25, 17};
13369 const int *foo = &x[0];
13370 ++foo;
13371 }
13372 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13373 typedef const int *iptr;
13374 iptr p = 0;
13375 ++p;
13376 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013377 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013379 struct s { int j; const int *ap[3]; } bx;
13380 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 }
13382 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13383 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013387#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013388
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 ;
13390 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013391}
Martin v. Löwis11437992002-04-12 09:54:03 +000013392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013393if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394 ac_cv_c_const=yes
13395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13401$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405
13406fi
13407
Michael W. Hudson54241132001-12-07 15:38:26 +000013408
Guido van Rossumda88dad1995-01-26 00:46:29 +000013409works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13411$as_echo_n "checking for working volatile... " >&6; }
13412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013413/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013414
Martin v. Löwis11437992002-04-12 09:54:03 +000013415int
13416main ()
13417{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 ;
13420 return 0;
13421}
13422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013424 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013425else
Skip Montanaro6dead952003-09-25 14:50:04 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013428
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013429
Guido van Rossum627b2d71993-12-24 10:39:16 +000013430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13433$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013434
Guido van Rossumda88dad1995-01-26 00:46:29 +000013435works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13437$as_echo_n "checking for working signed char... " >&6; }
13438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013439/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441int
13442main ()
13443{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 ;
13446 return 0;
13447}
13448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013450 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013451else
Skip Montanaro6dead952003-09-25 14:50:04 +000013452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013454
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013455
Guido van Rossum7f43da71994-08-01 12:15:30 +000013456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13459$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013460
Guido van Rossumda88dad1995-01-26 00:46:29 +000013461have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13463$as_echo_n "checking for prototypes... " >&6; }
13464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013465/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013466int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013467int
13468main ()
13469{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 ;
13472 return 0;
13473}
13474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013478
Matthias Kloseb159a552010-04-25 21:00:44 +000013479 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13483$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484
Guido van Rossumda88dad1995-01-26 00:46:29 +000013485works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13487$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013489/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013490
13491#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013492int foo(int x, ...) {
13493 va_list va;
13494 va_start(va, x);
13495 va_arg(va, int);
13496 va_arg(va, char *);
13497 va_arg(va, double);
13498 return 0;
13499}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501int
13502main ()
13503{
Guido van Rossum90eea071996-08-30 20:58:57 +000013504return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 ;
13506 return 0;
13507}
13508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013514 works=yes
13515
Guido van Rossum627b2d71993-12-24 10:39:16 +000013516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13519$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013520
Martin v. Löwisd6320502004-08-12 13:45:08 +000013521# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13523$as_echo_n "checking for socketpair... " >&6; }
13524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013525/* end confdefs.h. */
13526
13527#include <sys/types.h>
13528#include <sys/socket.h>
13529
13530int
13531main ()
13532{
13533void *x=socketpair
13534 ;
13535 return 0;
13536}
13537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013541
Matthias Kloseb159a552010-04-25 21:00:44 +000013542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013543$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13546$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013547
13548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013550
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013551# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13553$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013555/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013556#include <sys/types.h>
13557#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013558int
13559main ()
13560{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013561struct sockaddr x;
13562x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 ;
13564 return 0;
13565}
13566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013567if ac_fn_c_try_compile "$LINENO"; then :
13568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13569$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013572
13573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13575$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013576
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013579
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013580# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013584if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13589$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013590 OLD_CFLAGS=$CFLAGS
13591 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013593/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013594
13595# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013596
Martin v. Löwis11437992002-04-12 09:54:03 +000013597int
13598main ()
13599{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013600
13601 char *name;
13602 struct hostent *he, *res;
13603 char buffer[2048];
13604 int buflen = 2048;
13605 int h_errnop;
13606
13607 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013608
13609 ;
13610 return 0;
13611}
13612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13621$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013623else
Skip Montanaro6dead952003-09-25 14:50:04 +000013624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13626$as_echo "no" >&6; }
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13628$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013630/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013633
Martin v. Löwis11437992002-04-12 09:54:03 +000013634int
13635main ()
13636{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013637
13638 char *name;
13639 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013640 char buffer[2048];
13641 int buflen = 2048;
13642 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013643
Matthias Kloseb159a552010-04-25 21:00:44 +000013644 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
13646 ;
13647 return 0;
13648}
13649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Matthias Kloseb159a552010-04-25 21:00:44 +000013655$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13658$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013660else
Skip Montanaro6dead952003-09-25 14:50:04 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13663$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13665$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13667/* end confdefs.h. */
13668
13669# include <netdb.h>
13670
13671int
13672main ()
13673{
13674
13675 char *name;
13676 struct hostent *he;
13677 struct hostent_data data;
13678
13679 (void) gethostbyname_r(name, he, &data);
13680
13681 ;
13682 return 0;
13683}
13684_ACEOF
13685if ac_fn_c_try_compile "$LINENO"; then :
13686
13687 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13688
13689
13690$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13691
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13693$as_echo "yes" >&6; }
13694
13695else
13696
13697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13698$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013708 CFLAGS=$OLD_CFLAGS
13709
13710else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 for ac_func in gethostbyname
13713do :
13714 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013715if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013717#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013718_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013720fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013721done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013722
Michael W. Hudson54241132001-12-07 15:38:26 +000013723
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013724fi
13725
Michael W. Hudson54241132001-12-07 15:38:26 +000013726
13727
13728
13729
13730
13731
Guido van Rossum627b2d71993-12-24 10:39:16 +000013732# checks for system services
13733# (none yet)
13734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013736ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13741$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013742if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013744else
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013746LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750/* Override any GCC internal prototype to avoid an error.
13751 Use char because int might match the return type of a GCC
13752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013753#ifdef __cplusplus
13754extern "C"
13755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013756char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013757int
13758main ()
13759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ;
13762 return 0;
13763}
13764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013767else
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013770rm -f core conftest.err conftest.$ac_objext \
13771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13775$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 cat >>confdefs.h <<_ACEOF
13778#define HAVE_LIBIEEE 1
13779_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013781 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782
Guido van Rossum627b2d71993-12-24 10:39:16 +000013783fi
13784
Michael W. Hudson54241132001-12-07 15:38:26 +000013785
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013786fi
13787
Michael W. Hudson54241132001-12-07 15:38:26 +000013788
Guido van Rossum7f253911997-05-09 02:42:48 +000013789# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13791$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013796if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013797then
13798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13802$as_echo "yes" >&6; }
13803else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13804$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013805fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13808$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809fi
13810
Guido van Rossum7f253911997-05-09 02:42:48 +000013811
Guido van Rossum7f43da71994-08-01 12:15:30 +000013812# check for --with-libm=...
13813
Guido van Rossum563e7081996-09-10 18:20:48 +000013814case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013815Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013816*) LIBM=-lm
13817esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13819$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013824if test "$withval" = no
13825then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13827$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013828elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13831$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013832else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013833fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013834else
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13836$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837fi
13838
Guido van Rossum7f43da71994-08-01 12:15:30 +000013839
13840# check for --with-libc=...
13841
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13843$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013847 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013848if test "$withval" = no
13849then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13851$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013852elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013853then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13855$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013856else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013857fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13860$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861fi
13862
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863
Stefan Krah1919b7e2012-03-21 18:25:23 +010013864# **************************************
13865# * Check for gcc x64 inline assembler *
13866# **************************************
13867
13868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13869$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871/* end confdefs.h. */
13872
13873int
13874main ()
13875{
13876
13877 __asm__ __volatile__ ("movq %rcx, %rax");
13878
13879 ;
13880 return 0;
13881}
13882_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013883if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013884 have_gcc_asm_for_x64=yes
13885else
13886 have_gcc_asm_for_x64=no
13887fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013888rm -f core conftest.err conftest.$ac_objext \
13889 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13891$as_echo "$have_gcc_asm_for_x64" >&6; }
13892if test "$have_gcc_asm_for_x64" = yes
13893then
13894
13895$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13896
13897fi
13898
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899# **************************************************
13900# * Check for various properties of floating point *
13901# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13904$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013905if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907else
13908
Matthias Kloseb9621712010-04-24 17:59:49 +000013909if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013910 ac_cv_little_endian_double=no
13911else
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013913/* end confdefs.h. */
13914
13915#include <string.h>
13916int main() {
13917 double x = 9006104071832581.0;
13918 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13919 return 0;
13920 else
13921 return 1;
13922}
13923
13924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013925if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013926 ac_cv_little_endian_double=yes
13927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013932fi
13933
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013934fi
13935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13937$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013938if test "$ac_cv_little_endian_double" = yes
13939then
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942
13943fi
13944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13946$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013947if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949else
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013952 ac_cv_big_endian_double=no
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955/* end confdefs.h. */
13956
13957#include <string.h>
13958int main() {
13959 double x = 9006104071832581.0;
13960 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13961 return 0;
13962 else
13963 return 1;
13964}
13965
13966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968 ac_cv_big_endian_double=yes
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013974fi
13975
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976fi
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13979$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013980if test "$ac_cv_big_endian_double" = yes
13981then
13982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984
13985fi
13986
13987# Some ARM platforms use a mixed-endian representation for doubles.
13988# While Python doesn't currently have full support for these platforms
13989# (see e.g., issue 1762561), we can at least make sure that float <-> string
13990# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13992$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013993if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013995else
13996
Matthias Kloseb9621712010-04-24 17:59:49 +000013997if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013998 ac_cv_mixed_endian_double=no
13999else
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014001/* end confdefs.h. */
14002
14003#include <string.h>
14004int main() {
14005 double x = 9006104071832581.0;
14006 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14007 return 0;
14008 else
14009 return 1;
14010}
14011
14012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014 ac_cv_mixed_endian_double=yes
14015else
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14019 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014020fi
14021
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014022fi
14023
Matthias Kloseb9621712010-04-24 17:59:49 +000014024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14025$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026if test "$ac_cv_mixed_endian_double" = yes
14027then
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030
14031fi
14032
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014033# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014034# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014035# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014036# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014037# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014038# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014039
14040# This inline assembler syntax may also work for suncc and icc,
14041# so we try it on all platforms.
14042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14044$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014046/* end confdefs.h. */
14047
14048int
14049main ()
14050{
14051
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014052 unsigned short cw;
14053 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14054 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014055
14056 ;
14057 return 0;
14058}
14059_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014060if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014061 have_gcc_asm_for_x87=yes
14062else
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014064fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014065rm -f core conftest.err conftest.$ac_objext \
14066 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14068$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014069if test "$have_gcc_asm_for_x87" = yes
14070then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014073
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14077$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14079/* end confdefs.h. */
14080
14081int
14082main ()
14083{
14084
14085 unsigned int fpcr;
14086 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14087 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14088
14089 ;
14090 return 0;
14091}
14092_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014093if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014094 have_gcc_asm_for_mc68881=yes
14095else
14096 have_gcc_asm_for_mc68881=no
14097fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014098rm -f core conftest.err conftest.$ac_objext \
14099 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14101$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14102if test "$have_gcc_asm_for_mc68881" = yes
14103then
14104
14105$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14106
14107fi
14108
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014109# Detect whether system arithmetic is subject to x87-style double
14110# rounding issues. The result of this test has little meaning on non
14111# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14112# mode is round-to-nearest and double rounding issues are present, and
14113# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14115$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014116# $BASECFLAGS may affect the result
14117ac_save_cc="$CC"
14118CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014120 ac_cv_x87_double_rounding=no
14121else
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014123/* end confdefs.h. */
14124
14125#include <stdlib.h>
14126#include <math.h>
14127int main() {
14128 volatile double x, y, z;
14129 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14130 x = 0.99999999999999989; /* 1-2**-53 */
14131 y = 1./x;
14132 if (y != 1.)
14133 exit(0);
14134 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14135 x = 1e16;
14136 y = 2.99999;
14137 z = x + y;
14138 if (z != 1e16+4.)
14139 exit(0);
14140 /* both tests show evidence of double rounding */
14141 exit(1);
14142}
14143
14144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014145if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014146 ac_cv_x87_double_rounding=no
14147else
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14151 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014152fi
14153
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014154CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14156$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014157if test "$ac_cv_x87_double_rounding" = yes
14158then
14159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014161
14162fi
14163
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014164# ************************************
14165# * Check for mathematical functions *
14166# ************************************
14167
14168LIBS_SAVE=$LIBS
14169LIBS="$LIBS $LIBM"
14170
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014171for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14172do :
14173 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14174ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014175if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014176 cat >>confdefs.h <<_ACEOF
14177#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14178_ACEOF
14179
14180fi
14181done
14182
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014183for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014184do :
14185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14186ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014187if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014188 cat >>confdefs.h <<_ACEOF
14189#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14190_ACEOF
14191
14192fi
14193done
14194
14195ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14196"
Victor Stinnere0be4232011-10-25 13:06:09 +020014197if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014198 ac_have_decl=1
14199else
14200 ac_have_decl=0
14201fi
14202
14203cat >>confdefs.h <<_ACEOF
14204#define HAVE_DECL_ISINF $ac_have_decl
14205_ACEOF
14206ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14207"
Victor Stinnere0be4232011-10-25 13:06:09 +020014208if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014209 ac_have_decl=1
14210else
14211 ac_have_decl=0
14212fi
14213
14214cat >>confdefs.h <<_ACEOF
14215#define HAVE_DECL_ISNAN $ac_have_decl
14216_ACEOF
14217ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14218"
Victor Stinnere0be4232011-10-25 13:06:09 +020014219if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014220 ac_have_decl=1
14221else
14222 ac_have_decl=0
14223fi
14224
14225cat >>confdefs.h <<_ACEOF
14226#define HAVE_DECL_ISFINITE $ac_have_decl
14227_ACEOF
14228
14229
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014230# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14231# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14233$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014234if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014236else
14237
Matthias Kloseb9621712010-04-24 17:59:49 +000014238if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014239 ac_cv_tanh_preserves_zero_sign=no
14240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014242/* end confdefs.h. */
14243
14244#include <math.h>
14245#include <stdlib.h>
14246int main() {
14247 /* return 0 if either negative zeros don't exist
14248 on this platform or if negative zeros exist
14249 and tanh(-0.) == -0. */
14250 if (atan2(0., -1.) == atan2(-0., -1.) ||
14251 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14252 else exit(1);
14253}
14254
14255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014256if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014257 ac_cv_tanh_preserves_zero_sign=yes
14258else
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014263fi
14264
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014265fi
14266
Matthias Kloseb9621712010-04-24 17:59:49 +000014267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14268$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014269if test "$ac_cv_tanh_preserves_zero_sign" = yes
14270then
14271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014273
14274fi
14275
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014276if test "$ac_cv_func_log1p" = yes
14277then
14278 # On some versions of AIX, log1p(-0.) returns 0. instead of
14279 # -0. See issue #9920.
14280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14281$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014282 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014283 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014284else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014285
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014286 if test "$cross_compiling" = yes; then :
14287 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014288else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14290/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014291
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014292 #include <math.h>
14293 #include <stdlib.h>
14294 int main() {
14295 /* Fail if the signs of log1p(-0.) and -0. can be
14296 distinguished. */
14297 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14298 return 0;
14299 else
14300 return 1;
14301 }
14302
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014303_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014304if ac_fn_c_try_run "$LINENO"; then :
14305 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014306else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014307 ac_cv_log1p_drops_zero_sign=yes
14308fi
14309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014311fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014312
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014313fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014314
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14316$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14317fi
14318if test "$ac_cv_log1p_drops_zero_sign" = yes
14319then
14320
14321$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14322
14323fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014324
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014325LIBS=$LIBS_SAVE
14326
Mark Dickinsona614f042009-11-28 12:48:43 +000014327# For multiprocessing module, check that sem_open
14328# actually works. For FreeBSD versions <= 7.2,
14329# the kernel module that provides POSIX semaphores
14330# isn't loaded by default, so an attempt to call
14331# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14333$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014334if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014336else
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014338 ac_cv_posix_semaphores_enabled=yes
14339else
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014341/* end confdefs.h. */
14342
14343#include <unistd.h>
14344#include <fcntl.h>
14345#include <stdio.h>
14346#include <semaphore.h>
14347#include <sys/stat.h>
14348
14349int main(void) {
14350 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14351 if (a == SEM_FAILED) {
14352 perror("sem_open");
14353 return 1;
14354 }
14355 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014356 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014357 return 0;
14358}
14359
14360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014361if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014362 ac_cv_posix_semaphores_enabled=yes
14363else
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14367 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014368fi
14369
14370
Mark Dickinsona614f042009-11-28 12:48:43 +000014371fi
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14374$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014375if test $ac_cv_posix_semaphores_enabled = no
14376then
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014379
14380fi
14381
Mark Dickinson10683072009-04-18 21:18:19 +000014382# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14384$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014385if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014389 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014390else
Matthias Kloseb9621712010-04-24 17:59:49 +000014391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014392/* end confdefs.h. */
14393
14394#include <unistd.h>
14395#include <fcntl.h>
14396#include <stdio.h>
14397#include <semaphore.h>
14398#include <sys/stat.h>
14399
14400int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014401 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014402 int count;
14403 int res;
14404 if(a==SEM_FAILED){
14405 perror("sem_open");
14406 return 1;
14407
14408 }
14409 res = sem_getvalue(a, &count);
14410 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014411 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014412 return res==-1 ? 1 : 0;
14413}
14414
Mark Dickinson10683072009-04-18 21:18:19 +000014415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014416if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014417 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014418else
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14422 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014423fi
14424
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014425
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014426fi
14427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14429$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014430if test $ac_cv_broken_sem_getvalue = yes
14431then
14432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014434
14435fi
14436
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014437ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14438"
14439if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14440 ac_have_decl=1
14441else
14442 ac_have_decl=0
14443fi
14444
14445cat >>confdefs.h <<_ACEOF
14446#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14447_ACEOF
14448ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14449"
14450if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14451 ac_have_decl=1
14452else
14453 ac_have_decl=0
14454fi
14455
14456cat >>confdefs.h <<_ACEOF
14457#define HAVE_DECL_RTLD_NOW $ac_have_decl
14458_ACEOF
14459ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14460"
14461if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14462 ac_have_decl=1
14463else
14464 ac_have_decl=0
14465fi
14466
14467cat >>confdefs.h <<_ACEOF
14468#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14469_ACEOF
14470ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14471"
14472if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14473 ac_have_decl=1
14474else
14475 ac_have_decl=0
14476fi
14477
14478cat >>confdefs.h <<_ACEOF
14479#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14480_ACEOF
14481ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14482"
14483if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14484 ac_have_decl=1
14485else
14486 ac_have_decl=0
14487fi
14488
14489cat >>confdefs.h <<_ACEOF
14490#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14491_ACEOF
14492ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14493"
14494if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14495 ac_have_decl=1
14496else
14497 ac_have_decl=0
14498fi
14499
14500cat >>confdefs.h <<_ACEOF
14501#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14502_ACEOF
14503ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14504"
14505if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14506 ac_have_decl=1
14507else
14508 ac_have_decl=0
14509fi
14510
14511cat >>confdefs.h <<_ACEOF
14512#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14513_ACEOF
14514
14515
Mark Dickinsonbd792642009-03-18 20:06:12 +000014516# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14518$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014519# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014521 enableval=$enable_big_digits; case $enable_big_digits in
14522yes)
14523 enable_big_digits=30 ;;
14524no)
14525 enable_big_digits=15 ;;
1452615|30)
14527 ;;
14528*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014529 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 +000014530esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14532$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014533
14534cat >>confdefs.h <<_ACEOF
14535#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14536_ACEOF
14537
14538
14539else
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14541$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014542fi
14543
14544
Guido van Rossumef2255b2000-03-10 22:30:29 +000014545# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014546ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014547if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
14549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014551
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014552 wchar_h="yes"
14553
Guido van Rossumef2255b2000-03-10 22:30:29 +000014554else
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014556
14557fi
14558
Michael W. Hudson54241132001-12-07 15:38:26 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014561# determine wchar_t size
14562if test "$wchar_h" = yes
14563then
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14567# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14569$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014570if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14574"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576else
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 if test "$ac_cv_type_wchar_t" = yes; then
14578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014580as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014581See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014582 else
14583 ac_cv_sizeof_wchar_t=0
14584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14589$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590
14591
14592
Martin v. Löwis11437992002-04-12 09:54:03 +000014593cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014594#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014595_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014596
Michael W. Hudson54241132001-12-07 15:38:26 +000014597
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014598fi
14599
Matthias Kloseb9621712010-04-24 17:59:49 +000014600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14601$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014602have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014604/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014605
14606#include <tcl.h>
14607#if TCL_UTF_MAX != 6
14608# error "NOT UCS4_TCL"
14609#endif
14610int
14611main ()
14612{
14613
14614 ;
14615 return 0;
14616}
14617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014619
14620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014622
14623 have_ucs4_tcl=yes
14624
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14628$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014629
Skip Montanaro6dead952003-09-25 14:50:04 +000014630# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014631if test "$wchar_h" = yes
14632then
14633 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14635$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014636 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014638else
14639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014641 ac_cv_wchar_t_signed=yes
14642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014644/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014645
14646 #include <wchar.h>
14647 int main()
14648 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014649 /* Success: exit code 0 */
14650 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014651 }
14652
14653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014654if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014655 ac_cv_wchar_t_signed=yes
14656else
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14660 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014661fi
14662
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014663fi
14664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14666$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667fi
14668
Georg Brandl52d168a2008-01-07 18:10:24 +000014669# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014670if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014671 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014672then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014673 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014676
Georg Brandl52d168a2008-01-07 18:10:24 +000014677else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014678 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014679fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14681$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014682
14683# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14685$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014686if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 ac_cv_c_bigendian=unknown
14690 # See if we're dealing with a universal compiler.
14691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692/* end confdefs.h. */
14693#ifndef __APPLE_CC__
14694 not a universal capable compiler
14695 #endif
14696 typedef int dummy;
14697
Skip Montanaro6dead952003-09-25 14:50:04 +000014698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014699if ac_fn_c_try_compile "$LINENO"; then :
14700
14701 # Check for potential -arch flags. It is not universal unless
14702 # there are at least two -arch flags with different values.
14703 ac_arch=
14704 ac_prev=
14705 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14706 if test -n "$ac_prev"; then
14707 case $ac_word in
14708 i?86 | x86_64 | ppc | ppc64)
14709 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14710 ac_arch=$ac_word
14711 else
14712 ac_cv_c_bigendian=universal
14713 break
14714 fi
14715 ;;
14716 esac
14717 ac_prev=
14718 elif test "x$ac_word" = "x-arch"; then
14719 ac_prev=arch
14720 fi
14721 done
14722fi
14723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14724 if test $ac_cv_c_bigendian = unknown; then
14725 # See if sys/param.h defines the BYTE_ORDER macro.
14726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014727/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014728#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731int
14732main ()
14733{
Matthias Kloseb9621712010-04-24 17:59:49 +000014734#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14735 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14736 && LITTLE_ENDIAN)
14737 bogus endian macros
14738 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014739
14740 ;
14741 return 0;
14742}
14743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014744if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014745 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014747/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014748#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014750
Martin v. Löwis11437992002-04-12 09:54:03 +000014751int
14752main ()
14753{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014754#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 not big endian
14756 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014757
14758 ;
14759 return 0;
14760}
14761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014762if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014763 ac_cv_c_bigendian=yes
14764else
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014768fi
14769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14770 fi
14771 if test $ac_cv_c_bigendian = unknown; then
14772 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014774/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014775#include <limits.h>
14776
Martin v. Löwis11437992002-04-12 09:54:03 +000014777int
14778main ()
14779{
Matthias Kloseb9621712010-04-24 17:59:49 +000014780#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14781 bogus endian macros
14782 #endif
14783
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 ;
14785 return 0;
14786}
14787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014788if ac_fn_c_try_compile "$LINENO"; then :
14789 # It does; now see whether it defined to _BIG_ENDIAN or not.
14790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14791/* end confdefs.h. */
14792#include <limits.h>
14793
14794int
14795main ()
14796{
14797#ifndef _BIG_ENDIAN
14798 not big endian
14799 #endif
14800
14801 ;
14802 return 0;
14803}
14804_ACEOF
14805if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14811fi
14812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14813 fi
14814 if test $ac_cv_c_bigendian = unknown; then
14815 # Compile a test program.
14816 if test "$cross_compiling" = yes; then :
14817 # Try to guess by grepping values from an object file.
14818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14819/* end confdefs.h. */
14820short int ascii_mm[] =
14821 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14822 short int ascii_ii[] =
14823 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14824 int use_ascii (int i) {
14825 return ascii_mm[i] + ascii_ii[i];
14826 }
14827 short int ebcdic_ii[] =
14828 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14829 short int ebcdic_mm[] =
14830 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14831 int use_ebcdic (int i) {
14832 return ebcdic_mm[i] + ebcdic_ii[i];
14833 }
14834 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836int
14837main ()
14838{
14839return use_ascii (foo) == use_ebcdic (foo);
14840 ;
14841 return 0;
14842}
14843_ACEOF
14844if ac_fn_c_try_compile "$LINENO"; then :
14845 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14846 ac_cv_c_bigendian=yes
14847 fi
14848 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14849 if test "$ac_cv_c_bigendian" = unknown; then
14850 ac_cv_c_bigendian=no
14851 else
14852 # finding both strings is unlikely to happen, but who knows?
14853 ac_cv_c_bigendian=unknown
14854 fi
14855 fi
14856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014858else
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014860/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014862int
14863main ()
14864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 /* Are we little or big endian? From Harbison&Steele. */
14867 union
14868 {
14869 long int l;
14870 char c[sizeof (long int)];
14871 } u;
14872 u.l = 1;
14873 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874
14875 ;
14876 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014877}
Martin v. Löwis11437992002-04-12 09:54:03 +000014878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014879if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014880 ac_cv_c_bigendian=no
14881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14891$as_echo "$ac_cv_c_bigendian" >&6; }
14892 case $ac_cv_c_bigendian in #(
14893 yes)
14894 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14895;; #(
14896 no)
14897 ;; #(
14898 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014899
Matthias Kloseb9621712010-04-24 17:59:49 +000014900$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 ;; #(
14903 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014904 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014905 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014907
Michael W. Hudson54241132001-12-07 15:38:26 +000014908
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014909# ABI version string for Python extension modules. This appears between the
14910# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14911# from the following attributes which affect the ABI of this Python build (in
14912# this order):
14913#
14914# * The Python implementation (always 'cpython-' for us)
14915# * The major and minor version numbers
14916# * --with-pydebug (adds a 'd')
14917# * --with-pymalloc (adds a 'm')
14918# * --with-wide-unicode (adds a 'u')
14919#
14920# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014921# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14922# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014923
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14925$as_echo_n "checking ABIFLAGS... " >&6; }
14926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14927$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14929$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014930SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14932$as_echo "$SOABI" >&6; }
14933
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014934
14935case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014936 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014937 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14938 *)
14939 EXT_SUFFIX=${SHLIB_SUFFIX};;
14940esac
14941
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14943$as_echo_n "checking LDVERSION... " >&6; }
14944LDVERSION='$(VERSION)$(ABIFLAGS)'
14945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14946$as_echo "$LDVERSION" >&6; }
14947
doko@python.org87421192013-01-26 11:39:31 +010014948
doko@ubuntu.com55532312016-06-14 08:55:19 +020014949if test x$PLATFORM_TRIPLET = x; then
14950 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14951else
14952 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14953fi
doko@python.org87421192013-01-26 11:39:31 +010014954
14955
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014956# Check whether right shifting a negative integer extends the sign bit
14957# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14959$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014960if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014962else
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014965 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014966else
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014968/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014969
14970int main()
14971{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014972 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014973}
14974
Martin v. Löwis11437992002-04-12 09:54:03 +000014975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014977 ac_cv_rshift_extends_sign=yes
14978else
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014983fi
14984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985fi
14986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14988$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014989if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014990then
Martin v. Löwis11437992002-04-12 09:54:03 +000014991
Matthias Kloseb9621712010-04-24 17:59:49 +000014992$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014993
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014994fi
14995
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014996# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14998$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014999if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015001else
Martin v. Löwis11437992002-04-12 09:54:03 +000015002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015004/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015005#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015006int
15007main ()
15008{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015009
15010 FILE *f = fopen("/dev/null", "r");
15011 flockfile(f);
15012 getc_unlocked(f);
15013 funlockfile(f);
15014
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 ;
15016 return 0;
15017}
15018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015019if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015020 ac_cv_have_getc_unlocked=yes
15021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 ac_cv_have_getc_unlocked=no
15023fi
15024rm -f core conftest.err conftest.$ac_objext \
15025 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027
Matthias Kloseb9621712010-04-24 17:59:49 +000015028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15029$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015030if test "$ac_cv_have_getc_unlocked" = yes
15031then
Martin v. Löwis11437992002-04-12 09:54:03 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015034
15035fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015036
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015037# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015038# save the value of LIBS so we don't actually link Python with readline
15039LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015040
Gregory P. Smith18820942008-09-07 06:24:49 +000015041# On some systems we need to link readline to a termcap compatible
15042# library. NOTE: Keep the precedence of listed libraries synchronised
15043# with setup.py.
15044py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15046$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015047for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015048 if test -z "$py_libtermcap"; then
15049 READLINE_LIBS="-lreadline"
15050 else
15051 READLINE_LIBS="-lreadline -l$py_libtermcap"
15052 fi
15053 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015055/* end confdefs.h. */
15056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057/* Override any GCC internal prototype to avoid an error.
15058 Use char because int might match the return type of a GCC
15059 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015060#ifdef __cplusplus
15061extern "C"
15062#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015063char readline ();
15064int
15065main ()
15066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015068 ;
15069 return 0;
15070}
15071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015072if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015073 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015075rm -f core conftest.err conftest.$ac_objext \
15076 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015077 if test $py_cv_lib_readline = yes; then
15078 break
15079 fi
15080done
15081# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15082#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015083if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15085$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015086else
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15088$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015091
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015092fi
15093
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015094# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15096$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015097if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015099else
15100 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015101LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015103/* end confdefs.h. */
15104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105/* Override any GCC internal prototype to avoid an error.
15106 Use char because int might match the return type of a GCC
15107 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015108#ifdef __cplusplus
15109extern "C"
15110#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015111char rl_callback_handler_install ();
15112int
15113main ()
15114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015116 ;
15117 return 0;
15118}
15119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015120if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015121 ac_cv_lib_readline_rl_callback_handler_install=yes
15122else
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015125rm -f core conftest.err conftest.$ac_objext \
15126 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015127LIBS=$ac_check_lib_save_LIBS
15128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15130$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015131if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015132
Matthias Kloseb9621712010-04-24 17:59:49 +000015133$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015134
15135fi
15136
15137
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015138# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015140/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015141#include <readline/readline.h>
15142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015143if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015144 have_readline=yes
15145else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015146 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015147
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015148fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015149rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015150if test $have_readline = yes
15151then
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015153/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015154#include <readline/readline.h>
15155
15156_ACEOF
15157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015158 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015161
15162fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015163rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015166/* end confdefs.h. */
15167#include <readline/readline.h>
15168
15169_ACEOF
15170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015174
15175fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015176rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015177
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015178fi
15179
Martin v. Löwis0daad592001-09-30 21:09:59 +000015180# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15182$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015183if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015185else
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015187LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191/* Override any GCC internal prototype to avoid an error.
15192 Use char because int might match the return type of a GCC
15193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015194#ifdef __cplusplus
15195extern "C"
15196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015197char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015198int
15199main ()
15200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ;
15203 return 0;
15204}
15205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015208else
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015211rm -f core conftest.err conftest.$ac_objext \
15212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015213LIBS=$ac_check_lib_save_LIBS
15214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15216$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015217if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015220
Martin v. Löwis0daad592001-09-30 21:09:59 +000015221fi
15222
Michael W. Hudson54241132001-12-07 15:38:26 +000015223
Thomas Wouters89d996e2007-09-08 17:39:28 +000015224# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15226$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015227if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015229else
15230 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015231LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015233/* end confdefs.h. */
15234
15235/* Override any GCC internal prototype to avoid an error.
15236 Use char because int might match the return type of a GCC
15237 builtin and then its argument prototype would still apply. */
15238#ifdef __cplusplus
15239extern "C"
15240#endif
15241char rl_completion_display_matches_hook ();
15242int
15243main ()
15244{
15245return rl_completion_display_matches_hook ();
15246 ;
15247 return 0;
15248}
15249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015251 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015255rm -f core conftest.err conftest.$ac_objext \
15256 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015257LIBS=$ac_check_lib_save_LIBS
15258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15260$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015261if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015264
15265fi
15266
15267
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015268# also in 4.0, but not in editline
15269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15270$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15271if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15272 $as_echo_n "(cached) " >&6
15273else
15274 ac_check_lib_save_LIBS=$LIBS
15275LIBS="-lreadline $READLINE_LIBS $LIBS"
15276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15277/* end confdefs.h. */
15278
15279/* Override any GCC internal prototype to avoid an error.
15280 Use char because int might match the return type of a GCC
15281 builtin and then its argument prototype would still apply. */
15282#ifdef __cplusplus
15283extern "C"
15284#endif
15285char rl_resize_terminal ();
15286int
15287main ()
15288{
15289return rl_resize_terminal ();
15290 ;
15291 return 0;
15292}
15293_ACEOF
15294if ac_fn_c_try_link "$LINENO"; then :
15295 ac_cv_lib_readline_rl_resize_terminal=yes
15296else
15297 ac_cv_lib_readline_rl_resize_terminal=no
15298fi
15299rm -f core conftest.err conftest.$ac_objext \
15300 conftest$ac_exeext conftest.$ac_ext
15301LIBS=$ac_check_lib_save_LIBS
15302fi
15303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15304$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15305if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15306
15307$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15308
15309fi
15310
15311
Martin v. Löwis0daad592001-09-30 21:09:59 +000015312# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15314$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015315if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015317else
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015319LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323/* Override any GCC internal prototype to avoid an error.
15324 Use char because int might match the return type of a GCC
15325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015326#ifdef __cplusplus
15327extern "C"
15328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015329char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015330int
15331main ()
15332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 ;
15335 return 0;
15336}
15337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015338if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015340else
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015343rm -f core conftest.err conftest.$ac_objext \
15344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015345LIBS=$ac_check_lib_save_LIBS
15346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15348$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015349if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015352
Guido van Rossum353ae582001-07-10 16:45:32 +000015353fi
15354
Jack Jansendd19cf82001-12-06 22:36:17 +000015355
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015356# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015358/* end confdefs.h. */
15359#include <readline/readline.h>
15360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015361if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015362 have_readline=yes
15363else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015364 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015365
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015366fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015367rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015368if test $have_readline = yes
15369then
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015371/* end confdefs.h. */
15372#include <readline/readline.h>
15373
15374_ACEOF
15375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015377
Matthias Kloseb9621712010-04-24 17:59:49 +000015378$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015379
15380fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015381rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015382
15383fi
15384
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15386$as_echo_n "checking for append_history in -lreadline... " >&6; }
15387if ${ac_cv_lib_readline_append_history+:} false; then :
15388 $as_echo_n "(cached) " >&6
15389else
15390 ac_check_lib_save_LIBS=$LIBS
15391LIBS="-lreadline $READLINE_LIBS $LIBS"
15392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15393/* end confdefs.h. */
15394
15395/* Override any GCC internal prototype to avoid an error.
15396 Use char because int might match the return type of a GCC
15397 builtin and then its argument prototype would still apply. */
15398#ifdef __cplusplus
15399extern "C"
15400#endif
15401char append_history ();
15402int
15403main ()
15404{
15405return append_history ();
15406 ;
15407 return 0;
15408}
15409_ACEOF
15410if ac_fn_c_try_link "$LINENO"; then :
15411 ac_cv_lib_readline_append_history=yes
15412else
15413 ac_cv_lib_readline_append_history=no
15414fi
15415rm -f core conftest.err conftest.$ac_objext \
15416 conftest$ac_exeext conftest.$ac_ext
15417LIBS=$ac_check_lib_save_LIBS
15418fi
15419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15420$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15421if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15422
15423$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15424
15425fi
15426
15427
Martin v. Löwis82bca632006-02-10 20:49:30 +000015428# End of readline checks: restore LIBS
15429LIBS=$LIBS_no_readline
15430
Matthias Kloseb9621712010-04-24 17:59:49 +000015431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15432$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015433if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015434 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015435else
Martin v. Löwis11437992002-04-12 09:54:03 +000015436
Matthias Kloseb9621712010-04-24 17:59:49 +000015437if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015438 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +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. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015442
15443int main()
15444{
15445 int val1 = nice(1);
15446 if (val1 != -1 && val1 == nice(2))
15447 exit(0);
15448 exit(1);
15449}
15450
Martin v. Löwis11437992002-04-12 09:54:03 +000015451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015452if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015453 ac_cv_broken_nice=yes
15454else
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15458 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015459fi
15460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461fi
15462
Matthias Kloseb9621712010-04-24 17:59:49 +000015463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15464$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015465if test "$ac_cv_broken_nice" = yes
15466then
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015469
15470fi
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15473$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015474if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015476else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015478 ac_cv_broken_poll=no
15479else
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015481/* end confdefs.h. */
15482
15483#include <poll.h>
15484
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015485int main()
15486{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015487 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015488 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015489
15490 close (42);
15491
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015492 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015493 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015494 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015495 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015496 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015497 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015498 return 1;
15499}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015500
15501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015502if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015503 ac_cv_broken_poll=yes
15504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015510
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015511fi
15512
Matthias Kloseb9621712010-04-24 17:59:49 +000015513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15514$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015515if test "$ac_cv_broken_poll" = yes
15516then
15517
Matthias Kloseb9621712010-04-24 17:59:49 +000015518$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015519
15520fi
15521
Brett Cannon43802422005-02-10 20:48:03 +000015522# 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 +000015523# (which is not required by ISO C or UNIX spec) and/or if we support
15524# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015525ac_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 +000015526#include <$ac_cv_struct_tm>
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528"
Victor Stinnere0be4232011-10-25 13:06:09 +020015529if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015530
15531cat >>confdefs.h <<_ACEOF
15532#define HAVE_STRUCT_TM_TM_ZONE 1
15533_ACEOF
15534
15535
15536fi
15537
15538if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015541
15542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15544"
Victor Stinnere0be4232011-10-25 13:06:09 +020015545if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547else
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549fi
15550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015552#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015553_ACEOF
15554
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15556$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015557if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559else
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015561/* end confdefs.h. */
15562#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563#if !HAVE_DECL_TZNAME
15564extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015565#endif
15566
15567int
15568main ()
15569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015571 ;
15572 return 0;
15573}
15574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015575if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015576 ac_cv_var_tzname=yes
15577else
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015580rm -f core conftest.err conftest.$ac_objext \
15581 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15584$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015585 if test $ac_cv_var_tzname = yes; then
15586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015588
15589 fi
15590fi
15591
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015592
Martin v. Löwis1d459062005-03-14 21:23:33 +000015593# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15595$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015596if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015598else
15599
Matthias Kloseb9621712010-04-24 17:59:49 +000015600if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015601 ac_cv_working_tzset=no
15602else
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015604/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015605
15606#include <stdlib.h>
15607#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015608#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015609
15610#if HAVE_TZNAME
15611extern char *tzname[];
15612#endif
15613
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015614int main()
15615{
Brett Cannon18367812003-09-19 00:59:16 +000015616 /* Note that we need to ensure that not only does tzset(3)
15617 do 'something' with localtime, but it works as documented
15618 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015619 This includes making sure that tzname is set properly if
15620 tm->tm_zone does not exist since it is the alternative way
15621 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015622
15623 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015624 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015625 */
15626
Martin v. Löwis1d459062005-03-14 21:23:33 +000015627 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015628 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15629
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015630 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015631 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015632 if (localtime(&groundhogday)->tm_hour != 0)
15633 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015634#if HAVE_TZNAME
15635 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15636 if (strcmp(tzname[0], "UTC") ||
15637 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15638 exit(1);
15639#endif
Brett Cannon18367812003-09-19 00:59:16 +000015640
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015641 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015642 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015643 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015644 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015645#if HAVE_TZNAME
15646 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15647 exit(1);
15648#endif
Brett Cannon18367812003-09-19 00:59:16 +000015649
15650 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15651 tzset();
15652 if (localtime(&groundhogday)->tm_hour != 11)
15653 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015654#if HAVE_TZNAME
15655 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15656 exit(1);
15657#endif
15658
15659#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015660 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15661 exit(1);
15662 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15663 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015664#endif
Brett Cannon18367812003-09-19 00:59:16 +000015665
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015666 exit(0);
15667}
15668
15669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015670if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015671 ac_cv_working_tzset=yes
15672else
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015677fi
15678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679fi
15680
Matthias Kloseb9621712010-04-24 17:59:49 +000015681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15682$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015683if test "$ac_cv_working_tzset" = yes
15684then
15685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015687
15688fi
15689
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015690# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15692$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015693if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015695else
Matthias Kloseb9621712010-04-24 17:59:49 +000015696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015697/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015698#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015699int
15700main ()
15701{
15702
15703struct stat st;
15704st.st_mtim.tv_nsec = 1;
15705
15706 ;
15707 return 0;
15708}
15709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015711 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015712else
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15716fi
15717
Matthias Kloseb9621712010-04-24 17:59:49 +000015718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15719$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015720if test "$ac_cv_stat_tv_nsec" = yes
15721then
15722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015724
15725fi
15726
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015727# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15729$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015730if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015732else
Matthias Kloseb9621712010-04-24 17:59:49 +000015733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015734/* end confdefs.h. */
15735#include <sys/stat.h>
15736int
15737main ()
15738{
15739
15740struct stat st;
15741st.st_mtimespec.tv_nsec = 1;
15742
15743 ;
15744 return 0;
15745}
15746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015748 ac_cv_stat_tv_nsec2=yes
15749else
Matthias Kloseb9621712010-04-24 17:59:49 +000015750 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15753fi
15754
Matthias Kloseb9621712010-04-24 17:59:49 +000015755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15756$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015757if test "$ac_cv_stat_tv_nsec2" = yes
15758then
15759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015761
15762fi
15763
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015764# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015765ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015766if test "$cross_compiling" = no; then
15767 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15768fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015769
15770for ac_header in curses.h ncurses.h
15771do :
15772 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15773ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15774if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15775 cat >>confdefs.h <<_ACEOF
15776#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15777_ACEOF
15778
15779fi
15780
15781done
15782
15783
15784# On Solaris, term.h requires curses.h
15785for ac_header in term.h
15786do :
15787 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15788#ifdef HAVE_CURSES_H
15789#include <curses.h>
15790#endif
15791
15792"
15793if test "x$ac_cv_header_term_h" = xyes; then :
15794 cat >>confdefs.h <<_ACEOF
15795#define HAVE_TERM_H 1
15796_ACEOF
15797
15798fi
15799
15800done
15801
15802
Jack Jansen666b1e72001-10-31 12:11:48 +000015803# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15805$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015806if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015808else
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015810/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015811#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015812int
15813main ()
15814{
Jack Jansen666b1e72001-10-31 12:11:48 +000015815
15816 int rtn;
15817 rtn = mvwdelch(0,0,0);
15818
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 ;
15820 return 0;
15821}
15822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015823if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015824 ac_cv_mvwdelch_is_expression=yes
15825else
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15829fi
15830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15832$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015833
15834if test "$ac_cv_mvwdelch_is_expression" = yes
15835then
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015838
15839fi
15840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15842$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015843if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015844 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015845else
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015847/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015848#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015849int
15850main ()
15851{
Jack Jansen666b1e72001-10-31 12:11:48 +000015852
15853 WINDOW *w;
15854 w->_flags = 0;
15855
Martin v. Löwis11437992002-04-12 09:54:03 +000015856 ;
15857 return 0;
15858}
15859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015860if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015861 ac_cv_window_has_flags=yes
15862else
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15866fi
15867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15869$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015870
Jack Jansen666b1e72001-10-31 12:11:48 +000015871
15872if test "$ac_cv_window_has_flags" = yes
15873then
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015876
15877fi
15878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15880$as_echo_n "checking for is_term_resized... " >&6; }
15881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015882/* end confdefs.h. */
15883#include <curses.h>
15884int
15885main ()
15886{
15887void *x=is_term_resized
15888 ;
15889 return 0;
15890}
15891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015892if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015893
Matthias Kloseb9621712010-04-24 17:59:49 +000015894$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015895
Matthias Kloseb159a552010-04-25 21:00:44 +000015896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015897$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015898else
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15900$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015901
15902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15904
Matthias Kloseb9621712010-04-24 17:59:49 +000015905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15906$as_echo_n "checking for resize_term... " >&6; }
15907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015908/* end confdefs.h. */
15909#include <curses.h>
15910int
15911main ()
15912{
15913void *x=resize_term
15914 ;
15915 return 0;
15916}
15917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015918if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015919
Matthias Kloseb9621712010-04-24 17:59:49 +000015920$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015921
Matthias Kloseb159a552010-04-25 21:00:44 +000015922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015923$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015924else
Matthias Kloseb9621712010-04-24 17:59:49 +000015925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15926$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015927
15928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15932$as_echo_n "checking for resizeterm... " >&6; }
15933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015934/* end confdefs.h. */
15935#include <curses.h>
15936int
15937main ()
15938{
15939void *x=resizeterm
15940 ;
15941 return 0;
15942}
15943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015944if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015947
Matthias Kloseb159a552010-04-25 21:00:44 +000015948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015949$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015950else
Matthias Kloseb9621712010-04-24 17:59:49 +000015951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15952$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015953
15954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015956# last curses configure check
15957CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015958
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15960$as_echo "$as_me: checking for device files" >&6;}
15961
15962if test "x$cross_compiling" = xyes; then
15963 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15965$as_echo_n "checking for /dev/ptmx... " >&6; }
15966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15967$as_echo "not set" >&6; }
15968 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15969 fi
15970 if test "${ac_cv_file__dev_ptc+set}" != set; then
15971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15972$as_echo_n "checking for /dev/ptc... " >&6; }
15973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15974$as_echo "not set" >&6; }
15975 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15976 fi
15977fi
15978
Matthias Kloseb9621712010-04-24 17:59:49 +000015979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15980$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015981if ${ac_cv_file__dev_ptmx+:} false; then :
15982 $as_echo_n "(cached) " >&6
15983else
15984 test "$cross_compiling" = yes &&
15985 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15986if test -r "/dev/ptmx"; then
15987 ac_cv_file__dev_ptmx=yes
15988else
15989 ac_cv_file__dev_ptmx=no
15990fi
15991fi
15992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15993$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15994if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015995
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015996fi
15997
15998if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015999
Matthias Kloseb9621712010-04-24 17:59:49 +000016000$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016001
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16004$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016005if ${ac_cv_file__dev_ptc+:} false; then :
16006 $as_echo_n "(cached) " >&6
16007else
16008 test "$cross_compiling" = yes &&
16009 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16010if test -r "/dev/ptc"; then
16011 ac_cv_file__dev_ptc=yes
16012else
16013 ac_cv_file__dev_ptc=no
16014fi
16015fi
16016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16017$as_echo "$ac_cv_file__dev_ptc" >&6; }
16018if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016019
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016020fi
16021
16022if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016023
Matthias Kloseb9621712010-04-24 17:59:49 +000016024$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016025
Neal Norwitz865400f2003-03-21 01:42:58 +000016026fi
16027
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016028if test $ac_sys_system = Darwin
16029then
16030 LIBS="$LIBS -framework CoreFoundation"
16031fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016032
Matthias Kloseb9621712010-04-24 17:59:49 +000016033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16034$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016035if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016036 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016037else
Matthias Kloseb9621712010-04-24 17:59:49 +000016038 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016039 ac_cv_have_size_t_format="cross -- assuming yes"
16040
Thomas Wouters477c8d52006-05-27 19:21:47 +000016041else
Matthias Kloseb9621712010-04-24 17:59:49 +000016042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016043/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016044
Thomas Wouters477c8d52006-05-27 19:21:47 +000016045#include <stdio.h>
16046#include <stddef.h>
16047#include <string.h>
16048
Christian Heimes2c181612007-12-17 20:04:13 +000016049#ifdef HAVE_SYS_TYPES_H
16050#include <sys/types.h>
16051#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016052
16053#ifdef HAVE_SSIZE_T
16054typedef ssize_t Py_ssize_t;
16055#elif SIZEOF_VOID_P == SIZEOF_LONG
16056typedef long Py_ssize_t;
16057#else
16058typedef int Py_ssize_t;
16059#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016060
Christian Heimes2c181612007-12-17 20:04:13 +000016061int main()
16062{
16063 char buffer[256];
16064
Thomas Wouters477c8d52006-05-27 19:21:47 +000016065 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16066 return 1;
16067
Thomas Wouters89f507f2006-12-13 04:49:30 +000016068 if (strcmp(buffer, "123"))
16069 return 1;
16070
16071 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16072 return 1;
16073
16074 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016075 return 1;
16076
16077 return 0;
16078}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016079
Thomas Wouters477c8d52006-05-27 19:21:47 +000016080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016081if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016082 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016083else
Matthias Kloseb9621712010-04-24 17:59:49 +000016084 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016088fi
16089
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16092$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016093if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016094
Matthias Kloseb9621712010-04-24 17:59:49 +000016095$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016096
16097fi
16098
Matthias Kloseb9621712010-04-24 17:59:49 +000016099ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016100#ifdef HAVE_SYS_TYPES_H
16101#include <sys/types.h>
16102#endif
16103#ifdef HAVE_SYS_SOCKET_H
16104#include <sys/socket.h>
16105#endif
16106
Matthias Kloseb9621712010-04-24 17:59:49 +000016107"
Victor Stinnere0be4232011-10-25 13:06:09 +020016108if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016109
Martin v. Löwis11437992002-04-12 09:54:03 +000016110else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016111
Matthias Kloseb9621712010-04-24 17:59:49 +000016112$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016113
16114fi
16115
Michael W. Hudson54241132001-12-07 15:38:26 +000016116
Matthias Kloseb9621712010-04-24 17:59:49 +000016117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16118$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016119if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016120 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016121else
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016123 ac_cv_broken_mbstowcs=no
16124else
Matthias Kloseb9621712010-04-24 17:59:49 +000016125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016126/* end confdefs.h. */
16127
Stefan Krah19c21392012-11-22 23:47:32 +010016128#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016129#include<stdlib.h>
16130int main() {
16131 size_t len = -1;
16132 const char *str = "text";
16133 len = mbstowcs(NULL, str, 0);
16134 return (len != 4);
16135}
16136
16137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016138if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016139 ac_cv_broken_mbstowcs=no
16140else
Matthias Kloseb9621712010-04-24 17:59:49 +000016141 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016145fi
16146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016147fi
16148
Matthias Kloseb9621712010-04-24 17:59:49 +000016149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16150$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016151if test "$ac_cv_broken_mbstowcs" = yes
16152then
16153
Matthias Kloseb9621712010-04-24 17:59:49 +000016154$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016155
16156fi
16157
Antoine Pitroub52ec782009-01-25 16:34:23 +000016158# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16160$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016161
16162# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016163if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016164 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016165if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016166then
16167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016169
Matthias Kloseb9621712010-04-24 17:59:49 +000016170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16171$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016172fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016173if test "$withval" = no
16174then
16175
16176$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16177
Matthias Kloseb9621712010-04-24 17:59:49 +000016178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16179$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016180fi
16181
Antoine Pitrou042b1282010-08-13 21:15:58 +000016182else
16183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16184$as_echo "no value specified" >&6; }
16185fi
16186
Antoine Pitroub52ec782009-01-25 16:34:23 +000016187
Matthias Kloseb17289e2012-03-15 19:51:34 +010016188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16189$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16190if ${ac_cv_computed_gotos+:} false; then :
16191 $as_echo_n "(cached) " >&6
16192else
16193 if test "$cross_compiling" = yes; then :
16194 if test "${with_computed_gotos+set}" = set; then
16195 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16196 else
16197 ac_cv_computed_gotos=no
16198 fi
16199else
16200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201/* end confdefs.h. */
16202
16203int main(int argc, char **argv)
16204{
16205 static void *targets[1] = { &&LABEL1 };
16206 goto LABEL2;
16207LABEL1:
16208 return 0;
16209LABEL2:
16210 goto *targets[0];
16211 return 1;
16212}
16213
16214_ACEOF
16215if ac_fn_c_try_run "$LINENO"; then :
16216 ac_cv_computed_gotos=yes
16217else
16218 ac_cv_computed_gotos=no
16219fi
16220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16221 conftest.$ac_objext conftest.beam conftest.$ac_ext
16222fi
16223
16224fi
16225
16226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16227$as_echo "$ac_cv_computed_gotos" >&6; }
16228case "$ac_cv_computed_gotos" in yes*)
16229
16230$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16231
16232esac
16233
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016234case $ac_sys_system in
16235AIX*)
16236
16237$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16238 ;;
16239esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016240
Michael W. Hudson54241132001-12-07 15:38:26 +000016241
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016242
16243
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016244for h in `(cd $srcdir;echo Python/thread_*.h)`
16245do
16246 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16247done
16248
Michael W. Hudson54241132001-12-07 15:38:26 +000016249
Ned Deily0db50cf2014-07-25 12:41:31 -070016250SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16252$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016253for dir in $SRCDIRS; do
16254 if test ! -d $dir; then
16255 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016256 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016257done
Matthias Kloseb9621712010-04-24 17:59:49 +000016258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16259$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016260
Stefan Krah1919b7e2012-03-21 18:25:23 +010016261# Availability of -O2:
16262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16263$as_echo_n "checking for -O2... " >&6; }
16264saved_cflags="$CFLAGS"
16265CFLAGS="-O2"
16266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267/* end confdefs.h. */
16268
16269int
16270main ()
16271{
16272
16273
16274 ;
16275 return 0;
16276}
16277_ACEOF
16278if ac_fn_c_try_compile "$LINENO"; then :
16279 have_O2=yes
16280else
16281 have_O2=no
16282fi
16283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16285$as_echo "$have_O2" >&6; }
16286CFLAGS="$saved_cflags"
16287
16288# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16289# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16291$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16292saved_cflags="$CFLAGS"
16293CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16294if test "$have_O2" = no; then
16295 CFLAGS=""
16296fi
16297if test "$cross_compiling" = yes; then :
16298 have_glibc_memmove_bug=undefined
16299else
16300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16301/* end confdefs.h. */
16302
16303#include <stdio.h>
16304#include <stdlib.h>
16305#include <string.h>
16306void foo(void *p, void *q) { memmove(p, q, 19); }
16307int main() {
16308 char a[32] = "123456789000000000";
16309 foo(&a[9], a);
16310 if (strcmp(a, "123456789123456789000000000") != 0)
16311 return 1;
16312 foo(a, &a[9]);
16313 if (strcmp(a, "123456789000000000") != 0)
16314 return 1;
16315 return 0;
16316}
16317
16318_ACEOF
16319if ac_fn_c_try_run "$LINENO"; then :
16320 have_glibc_memmove_bug=no
16321else
16322 have_glibc_memmove_bug=yes
16323fi
16324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16325 conftest.$ac_objext conftest.beam conftest.$ac_ext
16326fi
16327
16328CFLAGS="$saved_cflags"
16329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16330$as_echo "$have_glibc_memmove_bug" >&6; }
16331if test "$have_glibc_memmove_bug" = yes; then
16332
16333$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16334
16335fi
16336
16337if test "$have_gcc_asm_for_x87" = yes; then
16338 # Some versions of gcc miscompile inline asm:
16339 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16340 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16341 case $CC in
16342 *gcc*)
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16344$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16345 saved_cflags="$CFLAGS"
16346 CFLAGS="-O2"
16347 if test "$cross_compiling" = yes; then :
16348 have_ipa_pure_const_bug=undefined
16349else
16350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351/* end confdefs.h. */
16352
16353 __attribute__((noinline)) int
16354 foo(int *p) {
16355 int r;
16356 asm ( "movl \$6, (%1)\n\t"
16357 "xorl %0, %0\n\t"
16358 : "=r" (r) : "r" (p) : "memory"
16359 );
16360 return r;
16361 }
16362 int main() {
16363 int p = 8;
16364 if ((foo(&p) ? : p) != 6)
16365 return 1;
16366 return 0;
16367 }
16368
16369_ACEOF
16370if ac_fn_c_try_run "$LINENO"; then :
16371 have_ipa_pure_const_bug=no
16372else
16373 have_ipa_pure_const_bug=yes
16374fi
16375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16376 conftest.$ac_objext conftest.beam conftest.$ac_ext
16377fi
16378
16379 CFLAGS="$saved_cflags"
16380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16381$as_echo "$have_ipa_pure_const_bug" >&6; }
16382 if test "$have_ipa_pure_const_bug" = yes; then
16383
16384$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16385
16386 fi
16387 ;;
16388 esac
16389fi
16390
Victor Stinner4f5366e2015-01-09 02:13:19 +010016391# Check for stdatomic.h
16392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16393$as_echo_n "checking for stdatomic.h... " >&6; }
16394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395/* end confdefs.h. */
16396
16397
16398 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016399 atomic_int value = ATOMIC_VAR_INIT(1);
16400 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016401 int main() {
16402 int loaded_value = atomic_load(&value);
16403 return 0;
16404 }
16405
16406
16407_ACEOF
16408if ac_fn_c_try_link "$LINENO"; then :
16409 have_stdatomic_h=yes
16410else
16411 have_stdatomic_h=no
16412fi
16413rm -f core conftest.err conftest.$ac_objext \
16414 conftest$ac_exeext conftest.$ac_ext
16415
16416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16417$as_echo "$have_stdatomic_h" >&6; }
16418
16419if test "$have_stdatomic_h" = yes; then
16420
16421$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16422
16423fi
16424
16425# Check for GCC >= 4.7 __atomic builtins
16426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16427$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16429/* end confdefs.h. */
16430
16431
16432 volatile int val = 1;
16433 int main() {
16434 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16435 return 0;
16436 }
16437
16438
16439_ACEOF
16440if ac_fn_c_try_link "$LINENO"; then :
16441 have_builtin_atomic=yes
16442else
16443 have_builtin_atomic=no
16444fi
16445rm -f core conftest.err conftest.$ac_objext \
16446 conftest$ac_exeext conftest.$ac_ext
16447
16448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16449$as_echo "$have_builtin_atomic" >&6; }
16450
16451if test "$have_builtin_atomic" = yes; then
16452
16453$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16454
16455fi
16456
Ned Deily322f5ba2013-11-21 23:01:59 -080016457# ensurepip option
16458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16459$as_echo_n "checking for ensurepip... " >&6; }
16460
16461# Check whether --with-ensurepip was given.
16462if test "${with_ensurepip+set}" = set; then :
16463 withval=$with_ensurepip;
16464else
16465 with_ensurepip=upgrade
16466fi
16467
16468case $with_ensurepip in #(
16469 yes|upgrade) :
16470 ENSUREPIP=upgrade ;; #(
16471 install) :
16472 ENSUREPIP=install ;; #(
16473 no) :
16474 ENSUREPIP=no ;; #(
16475 *) :
16476 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16477esac
16478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16479$as_echo "$ENSUREPIP" >&6; }
16480
16481
Victor Stinner35a97c02015-03-08 02:59:09 +010016482# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16484$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16486/* end confdefs.h. */
16487
16488
16489 #include <dirent.h>
16490
16491 int main() {
16492 struct dirent entry;
16493 return entry.d_type == DT_UNKNOWN;
16494 }
16495
16496
16497_ACEOF
16498if ac_fn_c_try_link "$LINENO"; then :
16499 have_dirent_d_type=yes
16500else
16501 have_dirent_d_type=no
16502fi
16503rm -f core conftest.err conftest.$ac_objext \
16504 conftest$ac_exeext conftest.$ac_ext
16505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16506$as_echo "$have_dirent_d_type" >&6; }
16507
16508if test "$have_dirent_d_type" = yes; then
16509
16510$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16511
16512fi
16513
Victor Stinner9eb57c52015-03-19 22:21:49 +010016514# check if the Linux getrandom() syscall is available
16515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16516$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16518/* end confdefs.h. */
16519
16520
Victor Stinner1b80b242016-04-12 22:34:58 +020016521 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016522 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016523 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016524
16525 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016526 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016527 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016528 const int flags = GRND_NONBLOCK;
16529 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016530 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016531 return 0;
16532 }
16533
16534
16535_ACEOF
16536if ac_fn_c_try_link "$LINENO"; then :
16537 have_getrandom_syscall=yes
16538else
16539 have_getrandom_syscall=no
16540fi
16541rm -f core conftest.err conftest.$ac_objext \
16542 conftest$ac_exeext conftest.$ac_ext
16543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16544$as_echo "$have_getrandom_syscall" >&6; }
16545
16546if test "$have_getrandom_syscall" = yes; then
16547
16548$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16549
16550fi
16551
Victor Stinner3abf44e2015-09-18 15:38:37 +020016552# check if the getrandom() function is available
16553# the test was written for the Solaris function of <sys/random.h>
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16555$as_echo_n "checking for the getrandom() function... " >&6; }
16556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16557/* end confdefs.h. */
16558
16559
16560 #include <sys/random.h>
16561
16562 int main() {
16563 char buffer[1];
16564 const size_t buflen = sizeof(buffer);
16565 const int flags = 0;
16566 /* ignore the result, Python checks for ENOSYS at runtime */
16567 (void)getrandom(buffer, buflen, flags);
16568 return 0;
16569 }
16570
16571
16572_ACEOF
16573if ac_fn_c_try_link "$LINENO"; then :
16574 have_getrandom=yes
16575else
16576 have_getrandom=no
16577fi
16578rm -f core conftest.err conftest.$ac_objext \
16579 conftest$ac_exeext conftest.$ac_ext
16580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16581$as_echo "$have_getrandom" >&6; }
16582
16583if test "$have_getrandom" = yes; then
16584
16585$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16586
16587fi
16588
Guido van Rossum627b2d71993-12-24 10:39:16 +000016589# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016590ac_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 +000016591
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016592ac_config_files="$ac_config_files Modules/ld_so_aix"
16593
Martin v. Löwis11437992002-04-12 09:54:03 +000016594cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016595# This file is a shell script that caches the results of configure
16596# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016597# scripts and configure runs, see configure's option --config-cache.
16598# It is not useful on other systems. If it contains results you don't
16599# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016600#
Martin v. Löwis11437992002-04-12 09:54:03 +000016601# config.status only pays attention to the cache file if you give it
16602# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016603#
Skip Montanaro6dead952003-09-25 14:50:04 +000016604# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016605# loading this file, other *unset* `ac_cv_foo' will be assigned the
16606# following values.
16607
16608_ACEOF
16609
Guido van Rossumf78abae1997-01-21 22:02:36 +000016610# The following way of writing the cache mishandles newlines in values,
16611# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016612# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016613# Ultrix sh set writes to stderr and can't be redirected directly,
16614# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615(
16616 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16617 eval ac_val=\$$ac_var
16618 case $ac_val in #(
16619 *${as_nl}*)
16620 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016621 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16622$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623 esac
16624 case $ac_var in #(
16625 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016626 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16627 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628 esac ;;
16629 esac
16630 done
16631
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16634 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016635 # `set' does not quote correctly, so add quotes: double-quote
16636 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016637 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016638 "s/'/'\\\\''/g;
16639 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 *)
16642 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645 esac |
16646 sort
16647) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16653 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16655 :end' >>confcache
16656if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16657 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016658 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016659 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16660$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016661 if test ! -f "$cache_file" || test -h "$cache_file"; then
16662 cat confcache >"$cache_file"
16663 else
16664 case $cache_file in #(
16665 */* | ?:*)
16666 mv -f confcache "$cache_file"$$ &&
16667 mv -f "$cache_file"$$ "$cache_file" ;; #(
16668 *)
16669 mv -f confcache "$cache_file" ;;
16670 esac
16671 fi
16672 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016673 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016674 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16675$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016676 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016677fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016678rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016679
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016680test "x$prefix" = xNONE && prefix=$ac_default_prefix
16681# Let make expand exec_prefix.
16682test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016684DEFS=-DHAVE_CONFIG_H
16685
Skip Montanaro6dead952003-09-25 14:50:04 +000016686ac_libobjs=
16687ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016688U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016689for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16690 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016692 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16694 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016695 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16696 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016697done
16698LIBOBJS=$ac_libobjs
16699
16700LTLIBOBJS=$ac_ltlibobjs
16701
16702
Martin v. Löwis11437992002-04-12 09:54:03 +000016703
Matthias Kloseb9621712010-04-24 17:59:49 +000016704
Victor Stinnere0be4232011-10-25 13:06:09 +020016705: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016706ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016707ac_clean_files_save=$ac_clean_files
16708ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016709{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16710$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16711as_write_fail=0
16712cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016713#! $SHELL
16714# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016715# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016716# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016717# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016718
Martin v. Löwis11437992002-04-12 09:54:03 +000016719debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016720ac_cs_recheck=false
16721ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016722
Matthias Kloseb9621712010-04-24 17:59:49 +000016723SHELL=\${CONFIG_SHELL-$SHELL}
16724export SHELL
16725_ASEOF
16726cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16727## -------------------- ##
16728## M4sh Initialization. ##
16729## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731# Be more Bourne compatible
16732DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016733if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016734 emulate sh
16735 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016736 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016737 # is contrary to our usage. Disable this feature.
16738 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016740else
Matthias Kloseb9621712010-04-24 17:59:49 +000016741 case `(set -o) 2>/dev/null` in #(
16742 *posix*) :
16743 set -o posix ;; #(
16744 *) :
16745 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016747fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016748
16749
Matthias Kloseb9621712010-04-24 17:59:49 +000016750as_nl='
16751'
16752export as_nl
16753# Printing a long string crashes Solaris 7 /usr/bin/printf.
16754as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16755as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16756as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16757# Prefer a ksh shell builtin over an external printf program on Solaris,
16758# but without wasting forks for bash or zsh.
16759if test -z "$BASH_VERSION$ZSH_VERSION" \
16760 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16761 as_echo='print -r --'
16762 as_echo_n='print -rn --'
16763elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16764 as_echo='printf %s\n'
16765 as_echo_n='printf %s'
16766else
16767 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16768 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16769 as_echo_n='/usr/ucb/echo -n'
16770 else
16771 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16772 as_echo_n_body='eval
16773 arg=$1;
16774 case $arg in #(
16775 *"$as_nl"*)
16776 expr "X$arg" : "X\\(.*\\)$as_nl";
16777 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16778 esac;
16779 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16780 '
16781 export as_echo_n_body
16782 as_echo_n='sh -c $as_echo_n_body as_echo'
16783 fi
16784 export as_echo_body
16785 as_echo='sh -c $as_echo_body as_echo'
16786fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016787
16788# The user is always right.
16789if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016790 PATH_SEPARATOR=:
16791 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16792 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16793 PATH_SEPARATOR=';'
16794 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016797
16798# IFS
16799# We need space, tab and new line, in precisely that order. Quoting is
16800# there to prevent editors from complaining about space-tab.
16801# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16802# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016803IFS=" "" $as_nl"
16804
16805# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016806as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016807case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808 *[\\/]* ) as_myself=$0 ;;
16809 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016810for as_dir in $PATH
16811do
16812 IFS=$as_save_IFS
16813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016814 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16815 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016818 ;;
16819esac
16820# We did not find ourselves, most probably we were run as `sh COMMAND'
16821# in which case we are not to be found in the path.
16822if test "x$as_myself" = x; then
16823 as_myself=$0
16824fi
16825if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016826 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16827 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016828fi
16829
Matthias Kloseb9621712010-04-24 17:59:49 +000016830# Unset variables that we do not need and which cause bugs (e.g. in
16831# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16832# suppresses any "Segmentation fault" message there. '((' could
16833# trigger a bug in pdksh 5.2.14.
16834for as_var in BASH_ENV ENV MAIL MAILPATH
16835do eval test x\${$as_var+set} = xset \
16836 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016837done
16838PS1='$ '
16839PS2='> '
16840PS4='+ '
16841
16842# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016843LC_ALL=C
16844export LC_ALL
16845LANGUAGE=C
16846export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847
Matthias Kloseb9621712010-04-24 17:59:49 +000016848# CDPATH.
16849(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16850
16851
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016852# as_fn_error STATUS ERROR [LINENO LOG_FD]
16853# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016854# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16855# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016856# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016857as_fn_error ()
16858{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016859 as_status=$1; test $as_status -eq 0 && as_status=1
16860 if test "$4"; then
16861 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16862 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016863 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016864 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016865 as_fn_exit $as_status
16866} # as_fn_error
16867
16868
16869# as_fn_set_status STATUS
16870# -----------------------
16871# Set $? to STATUS, without forking.
16872as_fn_set_status ()
16873{
16874 return $1
16875} # as_fn_set_status
16876
16877# as_fn_exit STATUS
16878# -----------------
16879# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16880as_fn_exit ()
16881{
16882 set +e
16883 as_fn_set_status $1
16884 exit $1
16885} # as_fn_exit
16886
16887# as_fn_unset VAR
16888# ---------------
16889# Portably unset VAR.
16890as_fn_unset ()
16891{
16892 { eval $1=; unset $1;}
16893}
16894as_unset=as_fn_unset
16895# as_fn_append VAR VALUE
16896# ----------------------
16897# Append the text in VALUE to the end of the definition contained in VAR. Take
16898# advantage of any shell optimizations that allow amortized linear growth over
16899# repeated appends, instead of the typical quadratic growth present in naive
16900# implementations.
16901if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16902 eval 'as_fn_append ()
16903 {
16904 eval $1+=\$2
16905 }'
16906else
16907 as_fn_append ()
16908 {
16909 eval $1=\$$1\$2
16910 }
16911fi # as_fn_append
16912
16913# as_fn_arith ARG...
16914# ------------------
16915# Perform arithmetic evaluation on the ARGs, and store the result in the
16916# global $as_val. Take advantage of shells that can avoid forks. The arguments
16917# must be portable across $(()) and expr.
16918if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16919 eval 'as_fn_arith ()
16920 {
16921 as_val=$(( $* ))
16922 }'
16923else
16924 as_fn_arith ()
16925 {
16926 as_val=`expr "$@" || test $? -eq 1`
16927 }
16928fi # as_fn_arith
16929
16930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931if expr a : '\(a\)' >/dev/null 2>&1 &&
16932 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16933 as_expr=expr
16934else
16935 as_expr=false
16936fi
16937
16938if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16939 as_basename=basename
16940else
16941 as_basename=false
16942fi
16943
Matthias Kloseb9621712010-04-24 17:59:49 +000016944if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16945 as_dirname=dirname
16946else
16947 as_dirname=false
16948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950as_me=`$as_basename -- "$0" ||
16951$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16952 X"$0" : 'X\(//\)$' \| \
16953 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016954$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955 sed '/^.*\/\([^/][^/]*\)\/*$/{
16956 s//\1/
16957 q
16958 }
16959 /^X\/\(\/\/\)$/{
16960 s//\1/
16961 q
16962 }
16963 /^X\/\(\/\).*/{
16964 s//\1/
16965 q
16966 }
16967 s/.*/./; q'`
16968
Matthias Kloseb9621712010-04-24 17:59:49 +000016969# Avoid depending upon Character Ranges.
16970as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16971as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16972as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16973as_cr_digits='0123456789'
16974as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016975
16976ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016977case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016979 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016980 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016981 xy) ECHO_C='\c';;
16982 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16983 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984 esac;;
16985*)
16986 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016988
Martin v. Löwis11437992002-04-12 09:54:03 +000016989rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016990if test -d conf$$.dir; then
16991 rm -f conf$$.dir/conf$$.file
16992else
16993 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016994 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016996if (echo >conf$$.file) 2>/dev/null; then
16997 if ln -s conf$$.file conf$$ 2>/dev/null; then
16998 as_ln_s='ln -s'
16999 # ... but there are two gotchas:
17000 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17001 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017002 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017003 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017004 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017005 elif ln conf$$.file conf$$ 2>/dev/null; then
17006 as_ln_s=ln
17007 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017008 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017009 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017010else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017011 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17014rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016
17017# as_fn_mkdir_p
17018# -------------
17019# Create "$as_dir" as a directory, including parents if necessary.
17020as_fn_mkdir_p ()
17021{
17022
17023 case $as_dir in #(
17024 -*) as_dir=./$as_dir;;
17025 esac
17026 test -d "$as_dir" || eval $as_mkdir_p || {
17027 as_dirs=
17028 while :; do
17029 case $as_dir in #(
17030 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17031 *) as_qdir=$as_dir;;
17032 esac
17033 as_dirs="'$as_qdir' $as_dirs"
17034 as_dir=`$as_dirname -- "$as_dir" ||
17035$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17036 X"$as_dir" : 'X\(//\)[^/]' \| \
17037 X"$as_dir" : 'X\(//\)$' \| \
17038 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17039$as_echo X"$as_dir" |
17040 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17041 s//\1/
17042 q
17043 }
17044 /^X\(\/\/\)[^/].*/{
17045 s//\1/
17046 q
17047 }
17048 /^X\(\/\/\)$/{
17049 s//\1/
17050 q
17051 }
17052 /^X\(\/\).*/{
17053 s//\1/
17054 q
17055 }
17056 s/.*/./; q'`
17057 test -d "$as_dir" && break
17058 done
17059 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017060 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017061
17062
17063} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017064if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017066else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017067 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017068 as_mkdir_p=false
17069fi
17070
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017071
17072# as_fn_executable_p FILE
17073# -----------------------
17074# Test if FILE is an executable regular file.
17075as_fn_executable_p ()
17076{
17077 test -f "$1" && test -x "$1"
17078} # as_fn_executable_p
17079as_test_x='test -x'
17080as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017081
17082# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017083as_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 +000017084
17085# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017086as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017087
17088
Martin v. Löwis11437992002-04-12 09:54:03 +000017089exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017090## ----------------------------------- ##
17091## Main body of $CONFIG_STATUS script. ##
17092## ----------------------------------- ##
17093_ASEOF
17094test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017095
Matthias Kloseb9621712010-04-24 17:59:49 +000017096cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17097# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017098# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099# values after options handling.
17100ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017101This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017102generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017103
17104 CONFIG_FILES = $CONFIG_FILES
17105 CONFIG_HEADERS = $CONFIG_HEADERS
17106 CONFIG_LINKS = $CONFIG_LINKS
17107 CONFIG_COMMANDS = $CONFIG_COMMANDS
17108 $ $0 $@
17109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110on `(hostname || uname -n) 2>/dev/null | sed 1q`
17111"
17112
Martin v. Löwis11437992002-04-12 09:54:03 +000017113_ACEOF
17114
Matthias Kloseb9621712010-04-24 17:59:49 +000017115case $ac_config_files in *"
17116"*) set x $ac_config_files; shift; ac_config_files=$*;;
17117esac
17118
17119case $ac_config_headers in *"
17120"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17121esac
17122
17123
17124cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017125# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017126config_files="$ac_config_files"
17127config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017129_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017130
Matthias Kloseb9621712010-04-24 17:59:49 +000017131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017132ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017133\`$as_me' instantiates files and other configuration actions
17134from templates according to the current configuration. Unless the files
17135and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
Matthias Kloseb9621712010-04-24 17:59:49 +000017137Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017138
17139 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017141 --config print configuration, then exit
17142 -q, --quiet, --silent
17143 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017144 -d, --debug don't remove temporary files
17145 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017146 --file=FILE[:TEMPLATE]
17147 instantiate the configuration file FILE
17148 --header=FILE[:TEMPLATE]
17149 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017150
17151Configuration files:
17152$config_files
17153
17154Configuration headers:
17155$config_headers
17156
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017157Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017160cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17161ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017162ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017163python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017164configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017165 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017166
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017167Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017168This config.status script is free software; the Free Software Foundation
17169gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170
17171ac_pwd='$ac_pwd'
17172srcdir='$srcdir'
17173INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017174MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017175test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017176_ACEOF
17177
Matthias Kloseb9621712010-04-24 17:59:49 +000017178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17179# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017180ac_need_defaults=:
17181while test $# != 0
17182do
17183 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017184 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17186 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017187 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017188 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017189 --*=)
17190 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17191 ac_optarg=
17192 ac_shift=:
17193 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017195 ac_option=$1
17196 ac_optarg=$2
17197 ac_shift=shift
17198 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 esac
17200
Skip Montanaro6dead952003-09-25 14:50:04 +000017201 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017202 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017203 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17204 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017206 $as_echo "$ac_cs_version"; exit ;;
17207 --config | --confi | --conf | --con | --co | --c )
17208 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017210 debug=: ;;
17211 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017212 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017213 case $ac_optarg in
17214 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017215 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017216 esac
17217 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017218 ac_need_defaults=false;;
17219 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017220 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017221 case $ac_optarg in
17222 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17223 esac
17224 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017225 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226 --he | --h)
17227 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017228 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017229Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017231 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017232 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17233 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17234 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017235
17236 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017237 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017238Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017239
Matthias Kloseb9621712010-04-24 17:59:49 +000017240 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017242
17243 esac
17244 shift
17245done
17246
Skip Montanaro6dead952003-09-25 14:50:04 +000017247ac_configure_extra_args=
17248
17249if $ac_cs_silent; then
17250 exec 6>/dev/null
17251 ac_configure_extra_args="$ac_configure_extra_args --silent"
17252fi
17253
17254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017256if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017257 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017258 shift
17259 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17260 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017261 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017262 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017263fi
17264
Martin v. Löwis11437992002-04-12 09:54:03 +000017265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017266cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267exec 5>>config.log
17268{
17269 echo
17270 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17271## Running $as_me. ##
17272_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017277cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017279
Matthias Kloseb9621712010-04-24 17:59:49 +000017280cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281
17282# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017283for ac_config_target in $ac_config_targets
17284do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285 case $ac_config_target in
17286 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17287 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17288 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017289 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17290 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17292 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017293 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017294 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017295 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296
Victor Stinnere0be4232011-10-25 13:06:09 +020017297 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017298 esac
17299done
17300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301
Martin v. Löwis11437992002-04-12 09:54:03 +000017302# If the user did not use the arguments to specify the items to instantiate,
17303# then the envvar interface is used. Set only those that are not.
17304# We use the long form for the default assignment because of an extremely
17305# bizarre bug on SunOS 4.1.3.
17306if $ac_need_defaults; then
17307 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17308 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17309fi
17310
Skip Montanaro6dead952003-09-25 14:50:04 +000017311# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017313# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017314# Hook for its removal unless debugging.
17315# Note that there is a small window in which the directory will not be cleaned:
17316# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017317$debug ||
17318{
Victor Stinnere0be4232011-10-25 13:06:09 +020017319 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017321 : "${ac_tmp:=$tmp}"
17322 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017324 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017325}
Martin v. Löwis11437992002-04-12 09:54:03 +000017326# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017327
Martin v. Löwis11437992002-04-12 09:54:03 +000017328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017330 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017331} ||
17332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333 tmp=./conf$$-$RANDOM
17334 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017335} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017336ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017337
Matthias Kloseb9621712010-04-24 17:59:49 +000017338# Set up the scripts for CONFIG_FILES section.
17339# No need to generate them if there are no CONFIG_FILES.
17340# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017342
Matthias Kloseb9621712010-04-24 17:59:49 +000017343
17344ac_cr=`echo X | tr X '\015'`
17345# On cygwin, bash can eat \r inside `` if the user requested igncr.
17346# But we know of no other shell where ac_cr would be empty at this
17347# point, so we can use a bashism as a fallback.
17348if test "x$ac_cr" = x; then
17349 eval ac_cr=\$\'\\r\'
17350fi
17351ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17352if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017353 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017354else
17355 ac_cs_awk_cr=$ac_cr
17356fi
17357
Victor Stinnere0be4232011-10-25 13:06:09 +020017358echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017359_ACEOF
17360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361
Matthias Kloseb9621712010-04-24 17:59:49 +000017362{
17363 echo "cat >conf$$subs.awk <<_ACEOF" &&
17364 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17365 echo "_ACEOF"
17366} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017367 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17368ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369ac_delim='%!_!# '
17370for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017371 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017372 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373
Matthias Kloseb9621712010-04-24 17:59:49 +000017374 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17375 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376 break
17377 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017378 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379 else
17380 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382done
Matthias Kloseb9621712010-04-24 17:59:49 +000017383rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384
Matthias Kloseb9621712010-04-24 17:59:49 +000017385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017386cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017388sed -n '
17389h
17390s/^/S["/; s/!.*/"]=/
17391p
17392g
17393s/^[^!]*!//
17394:repl
17395t repl
17396s/'"$ac_delim"'$//
17397t delim
17398:nl
17399h
17400s/\(.\{148\}\)..*/\1/
17401t more1
17402s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17403p
17404n
17405b repl
17406:more1
17407s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17408p
17409g
17410s/.\{148\}//
17411t nl
17412:delim
17413h
17414s/\(.\{148\}\)..*/\1/
17415t more2
17416s/["\\]/\\&/g; s/^/"/; s/$/"/
17417p
17418b
17419:more2
17420s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17421p
17422g
17423s/.\{148\}//
17424t delim
17425' <conf$$subs.awk | sed '
17426/^[^""]/{
17427 N
17428 s/\n//
17429}
17430' >>$CONFIG_STATUS || ac_write_fail=1
17431rm -f conf$$subs.awk
17432cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17433_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017434cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017435 for (key in S) S_is_set[key] = 1
17436 FS = ""
17437
17438}
17439{
17440 line = $ 0
17441 nfields = split(line, field, "@")
17442 substed = 0
17443 len = length(field[1])
17444 for (i = 2; i < nfields; i++) {
17445 key = field[i]
17446 keylen = length(key)
17447 if (S_is_set[key]) {
17448 value = S[key]
17449 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17450 len += length(value) + length(field[++i])
17451 substed = 1
17452 } else
17453 len += 1 + keylen
17454 }
17455
17456 print line
17457}
17458
17459_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17462if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17463 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17464else
17465 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017466fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017467 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017468_ACEOF
17469
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017470# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17471# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472# trailing colons and then remove the whole line if VPATH becomes empty
17473# (actually we leave an empty line to preserve line numbers).
17474if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017475 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17476h
17477s///
17478s/^/:/
17479s/[ ]*$/:/
17480s/:\$(srcdir):/:/g
17481s/:\${srcdir}:/:/g
17482s/:@srcdir@:/:/g
17483s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017485x
17486s/\(=[ ]*\).*/\1/
17487G
17488s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017489s/^[^=]*=[ ]*$//
17490}'
17491fi
17492
Matthias Kloseb9621712010-04-24 17:59:49 +000017493cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017494fi # test -n "$CONFIG_FILES"
17495
Matthias Kloseb9621712010-04-24 17:59:49 +000017496# Set up the scripts for CONFIG_HEADERS section.
17497# No need to generate them if there are no CONFIG_HEADERS.
17498# This happens for instance with `./config.status Makefile'.
17499if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017500cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017501BEGIN {
17502_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503
Matthias Kloseb9621712010-04-24 17:59:49 +000017504# Transform confdefs.h into an awk script `defines.awk', embedded as
17505# here-document in config.status, that substitutes the proper values into
17506# config.h.in to produce config.h.
17507
17508# Create a delimiter string that does not exist in confdefs.h, to ease
17509# handling of long lines.
17510ac_delim='%!_!# '
17511for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017512 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17513 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017514 break
17515 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017516 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017517 else
17518 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17519 fi
17520done
17521
17522# For the awk script, D is an array of macro values keyed by name,
17523# likewise P contains macro parameters if any. Preserve backslash
17524# newline sequences.
17525
17526ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17527sed -n '
17528s/.\{148\}/&'"$ac_delim"'/g
17529t rset
17530:rset
17531s/^[ ]*#[ ]*define[ ][ ]*/ /
17532t def
17533d
17534:def
17535s/\\$//
17536t bsnl
17537s/["\\]/\\&/g
17538s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17539D["\1"]=" \3"/p
17540s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17541d
17542:bsnl
17543s/["\\]/\\&/g
17544s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17545D["\1"]=" \3\\\\\\n"\\/p
17546t cont
17547s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17548t cont
17549d
17550:cont
17551n
17552s/.\{148\}/&'"$ac_delim"'/g
17553t clear
17554:clear
17555s/\\$//
17556t bsnlc
17557s/["\\]/\\&/g; s/^/"/; s/$/"/p
17558d
17559:bsnlc
17560s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17561b cont
17562' <confdefs.h | sed '
17563s/'"$ac_delim"'/"\\\
17564"/g' >>$CONFIG_STATUS || ac_write_fail=1
17565
17566cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17567 for (key in D) D_is_set[key] = 1
17568 FS = ""
17569}
17570/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17571 line = \$ 0
17572 split(line, arg, " ")
17573 if (arg[1] == "#") {
17574 defundef = arg[2]
17575 mac1 = arg[3]
17576 } else {
17577 defundef = substr(arg[1], 2)
17578 mac1 = arg[2]
17579 }
17580 split(mac1, mac2, "(") #)
17581 macro = mac2[1]
17582 prefix = substr(line, 1, index(line, defundef) - 1)
17583 if (D_is_set[macro]) {
17584 # Preserve the white space surrounding the "#".
17585 print prefix "define", macro P[macro] D[macro]
17586 next
17587 } else {
17588 # Replace #undef with comments. This is necessary, for example,
17589 # in the case of _POSIX_SOURCE, which is predefined and required
17590 # on some systems where configure will not decide to define it.
17591 if (defundef == "undef") {
17592 print "/*", prefix defundef, macro, "*/"
17593 next
17594 }
17595 }
17596}
17597{ print }
17598_ACAWK
17599_ACEOF
17600cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017601 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017602fi # test -n "$CONFIG_HEADERS"
17603
17604
17605eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17606shift
17607for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608do
17609 case $ac_tag in
17610 :[FHLC]) ac_mode=$ac_tag; continue;;
17611 esac
17612 case $ac_mode$ac_tag in
17613 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017614 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615 :[FH]-) ac_tag=-:-;;
17616 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17617 esac
17618 ac_save_IFS=$IFS
17619 IFS=:
17620 set x $ac_tag
17621 IFS=$ac_save_IFS
17622 shift
17623 ac_file=$1
17624 shift
17625
17626 case $ac_mode in
17627 :L) ac_source=$1;;
17628 :[FH])
17629 ac_file_inputs=
17630 for ac_f
17631 do
17632 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017633 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634 *) # Look for the file first in the build tree, then in the source tree
17635 # (if the path is not absolute). The absolute path cannot be DOS-style,
17636 # because $ac_f cannot contain `:'.
17637 test -f "$ac_f" ||
17638 case $ac_f in
17639 [\\/$]*) false;;
17640 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17641 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017642 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017644 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17645 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646 done
17647
17648 # Let's still pretend it is `configure' which instantiates (i.e., don't
17649 # use $as_me), people would be surprised to read:
17650 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017651 configure_input='Generated from '`
17652 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17653 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 if test x"$ac_file" != x-; then
17655 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017656 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17657$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017659 # Neutralize special characters interpreted by sed in replacement strings.
17660 case $configure_input in #(
17661 *\&* | *\|* | *\\* )
17662 ac_sed_conf_input=`$as_echo "$configure_input" |
17663 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17664 *) ac_sed_conf_input=$configure_input;;
17665 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666
17667 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017668 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17669 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670 esac
17671 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 esac
17673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017675$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017676 X"$ac_file" : 'X\(//\)[^/]' \| \
17677 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017679$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17681 s//\1/
17682 q
17683 }
17684 /^X\(\/\/\)[^/].*/{
17685 s//\1/
17686 q
17687 }
17688 /^X\(\/\/\)$/{
17689 s//\1/
17690 q
17691 }
17692 /^X\(\/\).*/{
17693 s//\1/
17694 q
17695 }
17696 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017697 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017698 ac_builddir=.
17699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017700case "$ac_dir" in
17701.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17702*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017703 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017705 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706 case $ac_top_builddir_sub in
17707 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17708 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17709 esac ;;
17710esac
17711ac_abs_top_builddir=$ac_pwd
17712ac_abs_builddir=$ac_pwd$ac_dir_suffix
17713# for backward compatibility:
17714ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017715
17716case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017718 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 ac_top_srcdir=$ac_top_builddir_sub
17720 ac_abs_top_srcdir=$ac_pwd ;;
17721 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017722 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723 ac_top_srcdir=$srcdir
17724 ac_abs_top_srcdir=$srcdir ;;
17725 *) # Relative name.
17726 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17727 ac_top_srcdir=$ac_top_build_prefix$srcdir
17728 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017729esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017731
Martin v. Löwis11437992002-04-12 09:54:03 +000017732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 case $ac_mode in
17734 :F)
17735 #
17736 # CONFIG_FILE
17737 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017738
17739 case $INSTALL in
17740 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017743 ac_MKDIR_P=$MKDIR_P
17744 case $MKDIR_P in
17745 [\\/$]* | ?:[\\/]* ) ;;
17746 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17747 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017748_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749
Matthias Kloseb9621712010-04-24 17:59:49 +000017750cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751# If the template does not know about datarootdir, expand it.
17752# FIXME: This hack should be removed a few years after 2.60.
17753ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017754ac_sed_dataroot='
17755/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756 p
17757 q
17758}
17759/@datadir@/p
17760/@docdir@/p
17761/@infodir@/p
17762/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017763/@mandir@/p'
17764case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765*datarootdir*) ac_datarootdir_seen=yes;;
17766*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17768$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017770cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 ac_datarootdir_hack='
17772 s&@datadir@&$datadir&g
17773 s&@docdir@&$docdir&g
17774 s&@infodir@&$infodir&g
17775 s&@localedir@&$localedir&g
17776 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017777 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778esac
17779_ACEOF
17780
17781# Neutralize VPATH when `$srcdir' = `.'.
17782# Shell code in configure.ac might set extrasub.
17783# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17785ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017786$extrasub
17787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017788cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017789:t
17790/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017791s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017793s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794s&@srcdir@&$ac_srcdir&;t t
17795s&@abs_srcdir@&$ac_abs_srcdir&;t t
17796s&@top_srcdir@&$ac_top_srcdir&;t t
17797s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17798s&@builddir@&$ac_builddir&;t t
17799s&@abs_builddir@&$ac_abs_builddir&;t t
17800s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17801s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017802s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017804"
Victor Stinnere0be4232011-10-25 13:06:09 +020017805eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17806 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017809 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17810 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17811 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017813which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017814$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017815which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017816
Victor Stinnere0be4232011-10-25 13:06:09 +020017817 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017818 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017819 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17820 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017821 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017822 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823 ;;
17824 :H)
17825 #
17826 # CONFIG_HEADER
17827 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017828 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017829 {
17830 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017831 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17832 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017833 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017834 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017835 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17836$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017837 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017838 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017839 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017840 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 fi
17842 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017843 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017844 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017845 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017846 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849
17850 esac
17851
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017852
17853 case $ac_file$ac_mode in
17854 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17855
17856 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857done # for ac_tag
17858
Guido van Rossum627b2d71993-12-24 10:39:16 +000017859
Matthias Kloseb9621712010-04-24 17:59:49 +000017860as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017861_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017862ac_clean_files=$ac_clean_files_save
17863
Matthias Kloseb9621712010-04-24 17:59:49 +000017864test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017865 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017866
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
17868# configure is writing to config.log, and then calls config.status.
17869# config.status does its own redirection, appending to config.log.
17870# Unfortunately, on DOS this fails, as config.log is still kept open
17871# by configure, so config.status won't be able to write to it; its
17872# output is simply discarded. So we exec the FD to /dev/null,
17873# effectively closing config.log, so it can be properly (re)opened and
17874# appended to by config.status. When coming back to configure, we
17875# need to make the FD available again.
17876if test "$no_create" != yes; then
17877 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017878 ac_config_status_args=
17879 test "$silent" = yes &&
17880 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017882 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 exec 5>>config.log
17884 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17885 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017886 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017887fi
17888if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17890$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017891fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017892
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017893
Christian Heimes75ed8902013-11-20 01:11:18 +010017894echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017895if test ! -f Modules/Setup
17896then
17897 cp $srcdir/Modules/Setup.dist Modules/Setup
17898fi
17899
Christian Heimes75ed8902013-11-20 01:11:18 +010017900echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017901if test ! -f Modules/Setup.local
17902then
17903 echo "# Edit this file for local setup changes" >Modules/Setup.local
17904fi
17905
Christian Heimes75ed8902013-11-20 01:11:18 +010017906echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017907$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17908 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017909 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017910mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017911
17912if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17913 echo "" >&6
17914 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017915 echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017916 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017917 echo "" >&6
17918 echo "" >&6
17919fi
17920