blob: abe1dc5abd4e1ccc06dbf496c72a4b7afb1bcde0 [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
Ned Deily95c50e52017-03-04 01:05:06 -0500763HAS_GIT
764GITBRANCH
765GITTAG
766GITVERSION
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
Ned Deily95c50e52017-03-04 01:05:06 -05002701if test -e $srcdir/.git/HEAD
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702then
Ned Deily95c50e52017-03-04 01:05:06 -05002703# Extract the first word of "git", so it can be a program name with args.
2704set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2706$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily95c50e52017-03-04 01:05:06 -05002707if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708 $as_echo_n "(cached) " >&6
2709else
Ned Deily95c50e52017-03-04 01:05:06 -05002710 if test -n "$HAS_GIT"; then
2711 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002712else
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
Ned Deily95c50e52017-03-04 01:05:06 -05002720 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 $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
Ned Deily95c50e52017-03-04 01:05:06 -05002728 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729fi
2730fi
Ned Deily95c50e52017-03-04 01:05:06 -05002731HAS_GIT=$ac_cv_prog_HAS_GIT
2732if test -n "$HAS_GIT"; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2734$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002735else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2737$as_echo "no" >&6; }
2738fi
2739
2740
2741else
Ned Deily95c50e52017-03-04 01:05:06 -05002742HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743fi
Ned Deily95c50e52017-03-04 01:05:06 -05002744if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745then
Ned Deily8c18fbe2017-03-21 00:35:08 -04002746 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2747 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily95c50e52017-03-04 01:05:06 -05002748 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749else
Ned Deily95c50e52017-03-04 01:05:06 -05002750 GITVERSION=""
2751 GITTAG=""
2752 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
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
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003250 *-*-linux-android*)
3251 ac_sys_system=Linux-android
3252 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
3259 *)
3260 # for now, limit cross builds to known configurations
3261 MACHDEP="unknown"
3262 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3263 esac
3264 ac_sys_release=
3265 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003267 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003268 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 fi
3274 ac_md_system=`echo $ac_sys_system |
3275 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3276 ac_md_release=`echo $ac_sys_release |
3277 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3278 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003279
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003281 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003282 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003283 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003284 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On FreeBSD 4, the math functions C89 does not cover are never defined
3366 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3367 FreeBSD/4.*)
3368 define_xopen_source=no;;
3369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Guido van Rossum91922671997-10-09 20:24:13 +00003433#
3434# SGI compilers allow the specification of the both the ABI and the
3435# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003436# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003437#
3438# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3439# thus supply support for various ABI/ISA combinations. The MACHDEP
3440# variable is also adjusted.
3441#
3442
3443if test ! -z "$SGI_ABI"
3444then
3445 CC="cc $SGI_ABI"
3446 LDFLAGS="$SGI_ABI $LDFLAGS"
3447 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3450$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003451
Jack Jansen6b08a402004-06-03 12:41:45 +00003452# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3453# it may influence the way we can build extensions, so distutils
3454# needs to check it
3455
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003458EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003459
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003461
3462# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3463# for debug/optimization stuff. BASECFLAGS is for flags that are required
3464# just to get things to compile and link. Users are free to override OPT
3465# when running configure or make. The build should not break if they do.
3466# BASECFLAGS should generally not be messed with, however.
3467
3468# XXX shouldn't some/most/all of this code be merged with the stuff later
3469# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3471$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003474if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003477 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478 without_gcc=yes;;
3479 yes) CC=gcc
3480 without_gcc=no;;
3481 *) CC=$withval
3482 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003483 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003484else
Martin v. Löwis11437992002-04-12 09:54:03 +00003485
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003486 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003487 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003488 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003489 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003490 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491fi
3492
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3494$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003495
Zachary Ware5af85642015-12-21 12:09:17 -06003496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3497$as_echo_n "checking for --with-icc... " >&6; }
3498
3499# Check whether --with-icc was given.
3500if test "${with_icc+set}" = set; then :
3501 withval=$with_icc;
3502 case $withval in
3503 no) CC=${CC:-cc}
3504 with_icc=no;;
3505 yes) CC=icc
3506 CXX=icpc
3507 with_icc=yes;;
3508 *) CC=$withval
3509 with_icc=$withval;;
3510 esac
3511else
3512
3513 with_icc=no
3514fi
3515
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3517$as_echo "$with_icc" >&6; }
3518
Guido van Rossum8b131c51995-03-09 14:10:13 +00003519# If the user switches compilers, we can't believe the cache
3520if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3521then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003522 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003523(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003524fi
3525
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003526# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3527# when the compiler supports them, but we don't always want -O2, and
3528# we set -g later.
3529if test -z "$CFLAGS"; then
3530 CFLAGS=
3531fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003532
3533if test "$ac_sys_system" = "Darwin"
3534then
3535 # Compiler selection on MacOSX is more complicated than
3536 # AC_PROG_CC can handle, see Mac/README.txt for more
3537 # information
3538 if test -z "${CC}"
3539 then
3540 found_gcc=
3541 found_clang=
3542 as_save_IFS=$IFS; IFS=:
3543 for as_dir in $PATH
3544 do
3545 IFS=$as_save_IFS
3546 if test -x $as_dir/gcc; then
3547 if test -z "${found_gcc}"; then
3548 found_gcc=$as_dir/gcc
3549 fi
3550 fi
3551 if test -x $as_dir/clang; then
3552 if test -z "${found_clang}"; then
3553 found_clang=$as_dir/clang
3554 fi
3555 fi
3556 done
3557 IFS=$as_save_IFS
3558
3559 if test -n "$found_gcc" -a -n "$found_clang"
3560 then
3561 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3564$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3565 CC="$found_clang"
3566 CXX="$found_clang++"
3567 fi
3568
3569
3570 elif test -z "$found_gcc" -a -n "$found_clang"
3571 then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3573$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3574 CC="$found_clang"
3575 CXX="$found_clang++"
3576
3577 elif test -z "$found_gcc" -a -z "$found_clang"
3578 then
3579 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3580 if test -n "${found_clang}"
3581 then
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3583$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3584 CC="${found_clang}"
3585 CXX="`/usr/bin/xcrun -find clang++`"
3586
3587 # else: use default behaviour
3588 fi
3589 fi
3590 fi
3591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003592ac_ext=c
3593ac_cpp='$CPP $CPPFLAGS'
3594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3596ac_compiler_gnu=$ac_cv_c_compiler_gnu
3597if test -n "$ac_tool_prefix"; then
3598 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3599set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3601$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003602if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003604else
3605 if test -n "$CC"; then
3606 ac_cv_prog_CC="$CC" # Let the user override the test.
3607else
Martin v. Löwis11437992002-04-12 09:54:03 +00003608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3609for as_dir in $PATH
3610do
3611 IFS=$as_save_IFS
3612 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 break 2
3618 fi
3619done
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003622
Jack Jansendd19cf82001-12-06 22:36:17 +00003623fi
3624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003625CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003626if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3628$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003629else
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3631$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003632fi
3633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636if test -z "$ac_cv_prog_CC"; then
3637 ac_ct_CC=$CC
3638 # Extract the first word of "gcc", so it can be a program name with args.
3639set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3641$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003642if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003644else
3645 if test -n "$ac_ct_CC"; then
3646 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3647else
3648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3649for as_dir in $PATH
3650do
3651 IFS=$as_save_IFS
3652 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003657 break 2
3658 fi
3659done
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003662
3663fi
3664fi
3665ac_ct_CC=$ac_cv_prog_ac_ct_CC
3666if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3668$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3671$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672fi
3673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674 if test "x$ac_ct_CC" = x; then
3675 CC=""
3676 else
3677 case $cross_compiling:$ac_tool_warned in
3678yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681ac_tool_warned=yes ;;
3682esac
3683 CC=$ac_ct_CC
3684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003685else
3686 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003687fi
3688
Jack Jansendd19cf82001-12-06 22:36:17 +00003689if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690 if test -n "$ac_tool_prefix"; then
3691 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003692set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3694$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003695if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003697else
3698 if test -n "$CC"; then
3699 ac_cv_prog_CC="$CC" # Let the user override the test.
3700else
Martin v. Löwis11437992002-04-12 09:54:03 +00003701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702for as_dir in $PATH
3703do
3704 IFS=$as_save_IFS
3705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 break 2
3711 fi
3712done
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003715
3716fi
3717fi
3718CC=$ac_cv_prog_CC
3719if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3721$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003722else
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3724$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003725fi
3726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729fi
3730if test -z "$CC"; then
3731 # Extract the first word of "cc", so it can be a program name with args.
3732set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003735if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003737else
3738 if test -n "$CC"; then
3739 ac_cv_prog_CC="$CC" # Let the user override the test.
3740else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3743for as_dir in $PATH
3744do
3745 IFS=$as_save_IFS
3746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3750 ac_prog_rejected=yes
3751 continue
3752 fi
3753 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 break 2
3756 fi
3757done
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003760
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761if test $ac_prog_rejected = yes; then
3762 # We found a bogon in the path, so make sure we never use it.
3763 set dummy $ac_cv_prog_CC
3764 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766 # We chose a different compiler from the bogus one.
3767 # However, it has the same basename, so the bogon will be chosen
3768 # first if we set CC to just the basename; use the full file name.
3769 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003770 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771 fi
3772fi
3773fi
3774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3778$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3781$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782fi
3783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784
Martin v. Löwis11437992002-04-12 09:54:03 +00003785fi
3786if test -z "$CC"; then
3787 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 do
3790 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3793$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003794if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003796else
3797 if test -n "$CC"; then
3798 ac_cv_prog_CC="$CC" # Let the user override the test.
3799else
Martin v. Löwis11437992002-04-12 09:54:03 +00003800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3801for as_dir in $PATH
3802do
3803 IFS=$as_save_IFS
3804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003811done
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
3815fi
3816fi
3817CC=$ac_cv_prog_CC
3818if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3820$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821else
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3823$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003824fi
3825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 test -n "$CC" && break
3828 done
3829fi
3830if test -z "$CC"; then
3831 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003833do
3834 # Extract the first word of "$ac_prog", so it can be a program name with args.
3835set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003838if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003840else
3841 if test -n "$ac_ct_CC"; then
3842 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3843else
3844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3845for as_dir in $PATH
3846do
3847 IFS=$as_save_IFS
3848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 break 2
3854 fi
3855done
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
3860fi
3861ac_ct_CC=$ac_cv_prog_ac_ct_CC
3862if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3864$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 test -n "$ac_ct_CC" && break
3872done
Michael W. Hudson54241132001-12-07 15:38:26 +00003873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 if test "x$ac_ct_CC" = x; then
3875 CC=""
3876 else
3877 case $cross_compiling:$ac_tool_warned in
3878yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881ac_tool_warned=yes ;;
3882esac
3883 CC=$ac_ct_CC
3884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003885fi
3886
3887fi
3888
3889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003892as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003893See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003894
3895# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003896$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3897set X $ac_compile
3898ac_compiler=$2
3899for ac_option in --version -v -V -qversion; do
3900 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901case "(($ac_try" in
3902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903 *) ac_try_echo=$ac_try;;
3904esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3906$as_echo "$ac_try_echo"; } >&5
3907 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 if test -s conftest.err; then
3910 sed '10a\
3911... rest of stderr output deleted ...
3912 10q' conftest.err >conftest.er1
3913 cat conftest.er1 >&5
3914 fi
3915 rm -f conftest.er1 conftest.err
3916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }
3918done
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
Matthias Kloseb9621712010-04-24 17:59:49 +00003920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003921/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003922
Martin v. Löwis11437992002-04-12 09:54:03 +00003923int
3924main ()
3925{
3926
3927 ;
3928 return 0;
3929}
3930_ACEOF
3931ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003932ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003933# Try to create an executable without -o first, disregard a.out.
3934# It will help us diagnose broken compilers, and finding out an intuition
3935# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3937$as_echo_n "checking whether the C compiler works... " >&6; }
3938ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3939
3940# The possible output files:
3941ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943ac_rmfiles=
3944for ac_file in $ac_files
3945do
3946 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3949 esac
3950done
3951rm -f $ac_rmfiles
3952
Matthias Kloseb9621712010-04-24 17:59:49 +00003953if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3965# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3966# in a Makefile. We should not override ac_cv_exeext if it was cached,
3967# so that the user can short-circuit this test for compilers unknown to
3968# Autoconf.
3969for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003970do
3971 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974 ;;
3975 [ab].out )
3976 # We found the default executable, but exeext='' is most
3977 # certainly right.
3978 break;;
3979 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 then :; else
3982 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3983 fi
3984 # We set ac_cv_exeext here because the later test for it is not
3985 # safe: cross compilers may not add the suffix if given an `-o'
3986 # argument, so we may need to know it at that point already.
3987 # Even if this section looks crufty: it has the advantage of
3988 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 break;;
3990 * )
3991 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003992 esac
3993done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994test "$ac_cv_exeext" = no && ac_cv_exeext=
3995
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003996else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 ac_file=''
3998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003999if test -z "$ac_file"; then :
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4001$as_echo "no" >&6; }
4002$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004003sed 's/^/| /' conftest.$ac_ext >&5
4004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004007as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004008See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004009else
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4011$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4014$as_echo_n "checking for C compiler default output file name... " >&6; }
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4016$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004017ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018
Matthias Kloseb9621712010-04-24 17:59:49 +00004019rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4022$as_echo_n "checking for suffix of executables... " >&6; }
4023if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024case "(($ac_try" in
4025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4026 *) ac_try_echo=$ac_try;;
4027esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4029$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4033 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4035# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4036# work properly (i.e., refer to `conftest.exe'), while it won't with
4037# `rm'.
4038for ac_file in conftest.exe conftest conftest.*; do
4039 test -f "$ac_file" || continue
4040 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4043 break;;
4044 * ) break;;
4045 esac
4046done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047else
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004050as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004051See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004053rm -f conftest conftest$ac_cv_exeext
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4055$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004056
4057rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004058EXEEXT=$ac_cv_exeext
4059ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4061/* end confdefs.h. */
4062#include <stdio.h>
4063int
4064main ()
4065{
4066FILE *f = fopen ("conftest.out", "w");
4067 return ferror (f) || fclose (f) != 0;
4068
4069 ;
4070 return 0;
4071}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004073ac_clean_files="$ac_clean_files conftest.out"
4074# Check that the compiler produces executables we can run. If not, either
4075# the compiler is broken, or we cross compile.
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4077$as_echo_n "checking whether we are cross compiling... " >&6; }
4078if test "$cross_compiling" != yes; then
4079 { { ac_try="$ac_link"
4080case "(($ac_try" in
4081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082 *) ac_try_echo=$ac_try;;
4083esac
4084eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4085$as_echo "$ac_try_echo"; } >&5
4086 (eval "$ac_link") 2>&5
4087 ac_status=$?
4088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4089 test $ac_status = 0; }
4090 if { ac_try='./conftest$ac_cv_exeext'
4091 { { case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_try") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }; }; then
4101 cross_compiling=no
4102 else
4103 if test "$cross_compiling" = maybe; then
4104 cross_compiling=yes
4105 else
4106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004108as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004110See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 fi
4112 fi
4113fi
4114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4115$as_echo "$cross_compiling" >&6; }
4116
4117rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4118ac_clean_files=$ac_clean_files_save
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4120$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004121if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
4123else
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004125/* end confdefs.h. */
4126
4127int
4128main ()
4129{
4130
4131 ;
4132 return 0;
4133}
4134_ACEOF
4135rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004136if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137case "(($ac_try" in
4138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4139 *) ac_try_echo=$ac_try;;
4140esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004141eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4142$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4146 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147 for ac_file in conftest.o conftest.obj conftest.*; do
4148 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4152 break;;
4153 esac
4154done
4155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004157sed 's/^/| /' conftest.$ac_ext >&5
4158
Matthias Kloseb9621712010-04-24 17:59:49 +00004159{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004161as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004162See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004164rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4167$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004168OBJEXT=$ac_cv_objext
4169ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4171$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004172if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004174else
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004177
Martin v. Löwis11437992002-04-12 09:54:03 +00004178int
4179main ()
4180{
4181#ifndef __GNUC__
4182 choke me
4183#endif
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 ac_compiler_gnu=yes
4191else
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004195ac_cv_c_compiler_gnu=$ac_compiler_gnu
4196
4197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4199$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4200if test $ac_compiler_gnu = yes; then
4201 GCC=yes
4202else
4203 GCC=
4204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004205ac_test_CFLAGS=${CFLAGS+set}
4206ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4208$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004209if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004211else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 ac_save_c_werror_flag=$ac_c_werror_flag
4213 ac_c_werror_flag=yes
4214 ac_cv_prog_cc_g=no
4215 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004218
Martin v. Löwis11437992002-04-12 09:54:03 +00004219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229else
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 CFLAGS=""
4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232/* end confdefs.h. */
4233
4234int
4235main ()
4236{
4237
4238 ;
4239 return 0;
4240}
4241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243
Matthias Kloseb9621712010-04-24 17:59:49 +00004244else
4245 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248/* end confdefs.h. */
4249
4250int
4251main ()
4252{
4253
4254 ;
4255 return 0;
4256}
4257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4266 ac_c_werror_flag=$ac_save_c_werror_flag
4267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4269$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004272elif test $ac_cv_prog_cc_g = yes; then
4273 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004274 CFLAGS="-g -O2"
4275 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004276 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277 fi
4278else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279 if test "$GCC" = yes; then
4280 CFLAGS="-O2"
4281 else
4282 CFLAGS=
4283 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4286$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004287if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004289else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004291ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004293/* end confdefs.h. */
4294#include <stdarg.h>
4295#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004296struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004297/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4298struct buf { int x; };
4299FILE * (*rcsopen) (struct buf *, struct stat *, int);
4300static char *e (p, i)
4301 char **p;
4302 int i;
4303{
4304 return p[i];
4305}
4306static char *f (char * (*g) (char **, int), char **p, ...)
4307{
4308 char *s;
4309 va_list v;
4310 va_start (v,p);
4311 s = g (p, va_arg (v,int));
4312 va_end (v);
4313 return s;
4314}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315
4316/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4317 function prototypes and stuff, but not '\xHH' hex character constants.
4318 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004320 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4321 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4326 inside strings and character constants. */
4327#define FOO(x) 'x'
4328int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4329
Skip Montanaro6dead952003-09-25 14:50:04 +00004330int test (int i, double x);
4331struct s1 {int (*f) (int a);};
4332struct s2 {int (*f) (double a);};
4333int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4334int argc;
4335char **argv;
4336int
4337main ()
4338{
4339return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4340 ;
4341 return 0;
4342}
4343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4345 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004346do
4347 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351rm -f core conftest.err conftest.$ac_objext
4352 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004353done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004355CC=$ac_save_CC
4356
4357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358# AC_CACHE_VAL
4359case "x$ac_cv_prog_cc_c89" in
4360 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4362$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4365$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004366 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4369$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004370esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004374
Martin v. Löwis11437992002-04-12 09:54:03 +00004375ac_ext=c
4376ac_cpp='$CPP $CPPFLAGS'
4377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4379ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004381ac_ext=c
4382ac_cpp='$CPP $CPPFLAGS'
4383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4385ac_compiler_gnu=$ac_cv_c_compiler_gnu
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4387$as_echo_n "checking how to run the C preprocessor... " >&6; }
4388# On Suns, sometimes $CPP names a directory.
4389if test -n "$CPP" && test -d "$CPP"; then
4390 CPP=
4391fi
4392if test -z "$CPP"; then
4393 if ${ac_cv_prog_CPP+:} false; then :
4394 $as_echo_n "(cached) " >&6
4395else
4396 # Double quotes because CPP needs to be expanded
4397 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4398 do
4399 ac_preproc_ok=false
4400for ac_c_preproc_warn_flag in '' yes
4401do
4402 # Use a header file that comes with gcc, so configuring glibc
4403 # with a fresh cross-compiler works.
4404 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4405 # <limits.h> exists even on freestanding compilers.
4406 # On the NeXT, cc -E runs the code through the compiler's parser,
4407 # not just through cpp. "Syntax error" is here to catch this case.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#ifdef __STDC__
4411# include <limits.h>
4412#else
4413# include <assert.h>
4414#endif
4415 Syntax error
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418
4419else
4420 # Broken: fails on valid input.
4421continue
4422fi
4423rm -f conftest.err conftest.i conftest.$ac_ext
4424
4425 # OK, works on sane cases. Now check whether nonexistent headers
4426 # can be detected and how.
4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h. */
4429#include <ac_nonexistent.h>
4430_ACEOF
4431if ac_fn_c_try_cpp "$LINENO"; then :
4432 # Broken: success on invalid input.
4433continue
4434else
4435 # Passes both tests.
4436ac_preproc_ok=:
4437break
4438fi
4439rm -f conftest.err conftest.i conftest.$ac_ext
4440
4441done
4442# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4443rm -f conftest.i conftest.err conftest.$ac_ext
4444if $ac_preproc_ok; then :
4445 break
4446fi
4447
4448 done
4449 ac_cv_prog_CPP=$CPP
4450
4451fi
4452 CPP=$ac_cv_prog_CPP
4453else
4454 ac_cv_prog_CPP=$CPP
4455fi
4456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4457$as_echo "$CPP" >&6; }
4458ac_preproc_ok=false
4459for ac_c_preproc_warn_flag in '' yes
4460do
4461 # Use a header file that comes with gcc, so configuring glibc
4462 # with a fresh cross-compiler works.
4463 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4464 # <limits.h> exists even on freestanding compilers.
4465 # On the NeXT, cc -E runs the code through the compiler's parser,
4466 # not just through cpp. "Syntax error" is here to catch this case.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#ifdef __STDC__
4470# include <limits.h>
4471#else
4472# include <assert.h>
4473#endif
4474 Syntax error
4475_ACEOF
4476if ac_fn_c_try_cpp "$LINENO"; then :
4477
4478else
4479 # Broken: fails on valid input.
4480continue
4481fi
4482rm -f conftest.err conftest.i conftest.$ac_ext
4483
4484 # OK, works on sane cases. Now check whether nonexistent headers
4485 # can be detected and how.
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487/* end confdefs.h. */
4488#include <ac_nonexistent.h>
4489_ACEOF
4490if ac_fn_c_try_cpp "$LINENO"; then :
4491 # Broken: success on invalid input.
4492continue
4493else
4494 # Passes both tests.
4495ac_preproc_ok=:
4496break
4497fi
4498rm -f conftest.err conftest.i conftest.$ac_ext
4499
4500done
4501# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4502rm -f conftest.i conftest.err conftest.$ac_ext
4503if $ac_preproc_ok; then :
4504
4505else
4506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4508as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4509See \`config.log' for more details" "$LINENO" 5; }
4510fi
4511
4512ac_ext=c
4513ac_cpp='$CPP $CPPFLAGS'
4514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4516ac_compiler_gnu=$ac_cv_c_compiler_gnu
4517
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4519$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4520if ${ac_cv_path_GREP+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 if test -z "$GREP"; then
4524 ac_path_GREP_found=false
4525 # Loop through the user's path and test for each of PROGNAME-LIST
4526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
4531 for ac_prog in grep ggrep; do
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4534 as_fn_executable_p "$ac_path_GREP" || continue
4535# Check for GNU ac_path_GREP and select it if it is found.
4536 # Check for GNU $ac_path_GREP
4537case `"$ac_path_GREP" --version 2>&1` in
4538*GNU*)
4539 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4540*)
4541 ac_count=0
4542 $as_echo_n 0123456789 >"conftest.in"
4543 while :
4544 do
4545 cat "conftest.in" "conftest.in" >"conftest.tmp"
4546 mv "conftest.tmp" "conftest.in"
4547 cp "conftest.in" "conftest.nl"
4548 $as_echo 'GREP' >> "conftest.nl"
4549 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4550 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4551 as_fn_arith $ac_count + 1 && ac_count=$as_val
4552 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4553 # Best one so far, save it but keep looking for a better one
4554 ac_cv_path_GREP="$ac_path_GREP"
4555 ac_path_GREP_max=$ac_count
4556 fi
4557 # 10*(2^10) chars as input seems more than enough
4558 test $ac_count -gt 10 && break
4559 done
4560 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4561esac
4562
4563 $ac_path_GREP_found && break 3
4564 done
4565 done
4566 done
4567IFS=$as_save_IFS
4568 if test -z "$ac_cv_path_GREP"; then
4569 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4570 fi
4571else
4572 ac_cv_path_GREP=$GREP
4573fi
4574
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4577$as_echo "$ac_cv_path_GREP" >&6; }
4578 GREP="$ac_cv_path_GREP"
4579
4580
Łukasz Langaa785c872016-09-09 17:37:37 -07004581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4582$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4583if ${ac_cv_path_SED+:} false; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4587 for ac_i in 1 2 3 4 5 6 7; do
4588 ac_script="$ac_script$as_nl$ac_script"
4589 done
4590 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4591 { ac_script=; unset ac_script;}
4592 if test -z "$SED"; then
4593 ac_path_SED_found=false
4594 # Loop through the user's path and test for each of PROGNAME-LIST
4595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in $PATH
4597do
4598 IFS=$as_save_IFS
4599 test -z "$as_dir" && as_dir=.
4600 for ac_prog in sed gsed; do
4601 for ac_exec_ext in '' $ac_executable_extensions; do
4602 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4603 as_fn_executable_p "$ac_path_SED" || continue
4604# Check for GNU ac_path_SED and select it if it is found.
4605 # Check for GNU $ac_path_SED
4606case `"$ac_path_SED" --version 2>&1` in
4607*GNU*)
4608 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4609*)
4610 ac_count=0
4611 $as_echo_n 0123456789 >"conftest.in"
4612 while :
4613 do
4614 cat "conftest.in" "conftest.in" >"conftest.tmp"
4615 mv "conftest.tmp" "conftest.in"
4616 cp "conftest.in" "conftest.nl"
4617 $as_echo '' >> "conftest.nl"
4618 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4619 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4620 as_fn_arith $ac_count + 1 && ac_count=$as_val
4621 if test $ac_count -gt ${ac_path_SED_max-0}; then
4622 # Best one so far, save it but keep looking for a better one
4623 ac_cv_path_SED="$ac_path_SED"
4624 ac_path_SED_max=$ac_count
4625 fi
4626 # 10*(2^10) chars as input seems more than enough
4627 test $ac_count -gt 10 && break
4628 done
4629 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4630esac
4631
4632 $ac_path_SED_found && break 3
4633 done
4634 done
4635 done
4636IFS=$as_save_IFS
4637 if test -z "$ac_cv_path_SED"; then
4638 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4639 fi
4640else
4641 ac_cv_path_SED=$SED
4642fi
4643
4644fi
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4646$as_echo "$ac_cv_path_SED" >&6; }
4647 SED="$ac_cv_path_SED"
4648 rm -f conftest.sed
4649
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004650
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651
4652
Matthias Kloseb9621712010-04-24 17:59:49 +00004653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4654$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004657if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004658 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660 case $withval in
4661 no) with_cxx_main=no
4662 MAINCC='$(CC)';;
4663 yes) with_cxx_main=yes
4664 MAINCC='$(CXX)';;
4665 *) with_cxx_main=yes
4666 MAINCC=$withval
4667 if test -z "$CXX"
4668 then
4669 CXX=$withval
4670 fi;;
4671 esac
4672else
4673
4674 with_cxx_main=no
4675 MAINCC='$(CC)'
4676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004677fi
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4680$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681
4682preset_cxx="$CXX"
4683if test -z "$CXX"
4684then
4685 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004686 gcc) if test -n "$ac_tool_prefix"; then
4687 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4688set dummy ${ac_tool_prefix}g++; ac_word=$2
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690$as_echo_n "checking for $ac_word... " >&6; }
4691if ${ac_cv_path_CXX+:} false; then :
4692 $as_echo_n "(cached) " >&6
4693else
4694 case $CXX in
4695 [\\/]* | ?:[\\/]*)
4696 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4697 ;;
4698 *)
4699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4700for as_dir in notfound
4701do
4702 IFS=$as_save_IFS
4703 test -z "$as_dir" && as_dir=.
4704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004706 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4708 break 2
4709 fi
4710done
4711 done
4712IFS=$as_save_IFS
4713
4714 ;;
4715esac
4716fi
4717CXX=$ac_cv_path_CXX
4718if test -n "$CXX"; then
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4720$as_echo "$CXX" >&6; }
4721else
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723$as_echo "no" >&6; }
4724fi
4725
4726
4727fi
4728if test -z "$ac_cv_path_CXX"; then
4729 ac_pt_CXX=$CXX
4730 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004731set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734if ${ac_cv_path_ac_pt_CXX+:} false; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 case $ac_pt_CXX in
4738 [\\/]* | ?:[\\/]*)
4739 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4740 ;;
4741 *)
4742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743for as_dir in notfound
4744do
4745 IFS=$as_save_IFS
4746 test -z "$as_dir" && as_dir=.
4747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004749 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751 break 2
4752 fi
4753done
4754 done
4755IFS=$as_save_IFS
4756
4757 ;;
4758esac
4759fi
4760ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4761if test -n "$ac_pt_CXX"; then
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4763$as_echo "$ac_pt_CXX" >&6; }
4764else
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
4767fi
4768
4769 if test "x$ac_pt_CXX" = x; then
4770 CXX="g++"
4771 else
4772 case $cross_compiling:$ac_tool_warned in
4773yes:)
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4776ac_tool_warned=yes ;;
4777esac
4778 CXX=$ac_pt_CXX
4779 fi
4780else
4781 CXX="$ac_cv_path_CXX"
4782fi
4783 ;;
4784 cc) if test -n "$ac_tool_prefix"; then
4785 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4786set dummy ${ac_tool_prefix}c++; ac_word=$2
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004789if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791else
4792 case $CXX in
4793 [\\/]* | ?:[\\/]*)
4794 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4795 ;;
4796 *)
4797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in notfound
4799do
4800 IFS=$as_save_IFS
4801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 break 2
4807 fi
4808done
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004810IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 ;;
4813esac
4814fi
4815CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4818$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819else
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004823
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824
4825fi
4826if test -z "$ac_cv_path_CXX"; then
4827 ac_pt_CXX=$CXX
4828 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838 ;;
4839 *)
4840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in notfound
4842do
4843 IFS=$as_save_IFS
4844 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004846 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 break 2
4850 fi
4851done
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004853IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004855 ;;
4856esac
4857fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4859if test -n "$ac_pt_CXX"; then
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4861$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004862else
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004866
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867 if test "x$ac_pt_CXX" = x; then
4868 CXX="c++"
4869 else
4870 case $cross_compiling:$ac_tool_warned in
4871yes:)
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4874ac_tool_warned=yes ;;
4875esac
4876 CXX=$ac_pt_CXX
4877 fi
4878else
4879 CXX="$ac_cv_path_CXX"
4880fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004881 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 clang|*/clang) if test -n "$ac_tool_prefix"; then
4883 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4884set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if ${ac_cv_path_CXX+:} false; then :
4888 $as_echo_n "(cached) " >&6
4889else
4890 case $CXX in
4891 [\\/]* | ?:[\\/]*)
4892 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4893 ;;
4894 *)
4895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in notfound
4897do
4898 IFS=$as_save_IFS
4899 test -z "$as_dir" && as_dir=.
4900 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004901 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004902 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904 break 2
4905 fi
4906done
4907 done
4908IFS=$as_save_IFS
4909
Ned Deilycbfb9a52012-06-23 16:02:19 -07004910 ;;
4911esac
4912fi
4913CXX=$ac_cv_path_CXX
4914if test -n "$CXX"; then
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4916$as_echo "$CXX" >&6; }
4917else
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004922
4923fi
4924if test -z "$ac_cv_path_CXX"; then
4925 ac_pt_CXX=$CXX
4926 # Extract the first word of "clang++", so it can be a program name with args.
4927set dummy clang++; ac_word=$2
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
4930if ${ac_cv_path_ac_pt_CXX+:} false; then :
4931 $as_echo_n "(cached) " >&6
4932else
4933 case $ac_pt_CXX in
4934 [\\/]* | ?:[\\/]*)
4935 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4936 ;;
4937 *)
4938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in notfound
4940do
4941 IFS=$as_save_IFS
4942 test -z "$as_dir" && as_dir=.
4943 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004945 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4947 break 2
4948 fi
4949done
4950 done
4951IFS=$as_save_IFS
4952
4953 ;;
4954esac
4955fi
4956ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4957if test -n "$ac_pt_CXX"; then
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4959$as_echo "$ac_pt_CXX" >&6; }
4960else
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4962$as_echo "no" >&6; }
4963fi
4964
4965 if test "x$ac_pt_CXX" = x; then
4966 CXX="clang++"
4967 else
4968 case $cross_compiling:$ac_tool_warned in
4969yes:)
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4972ac_tool_warned=yes ;;
4973esac
4974 CXX=$ac_pt_CXX
4975 fi
4976else
4977 CXX="$ac_cv_path_CXX"
4978fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004979 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004980 icc|*/icc) if test -n "$ac_tool_prefix"; then
4981 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4982set dummy ${ac_tool_prefix}icpc; ac_word=$2
4983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4984$as_echo_n "checking for $ac_word... " >&6; }
4985if ${ac_cv_path_CXX+:} false; then :
4986 $as_echo_n "(cached) " >&6
4987else
4988 case $CXX in
4989 [\\/]* | ?:[\\/]*)
4990 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4991 ;;
4992 *)
4993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in notfound
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
4998 for ac_exec_ext in '' $ac_executable_extensions; do
4999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5000 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5002 break 2
5003 fi
5004done
5005 done
5006IFS=$as_save_IFS
5007
5008 ;;
5009esac
5010fi
5011CXX=$ac_cv_path_CXX
5012if test -n "$CXX"; then
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5014$as_echo "$CXX" >&6; }
5015else
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017$as_echo "no" >&6; }
5018fi
5019
5020
5021fi
5022if test -z "$ac_cv_path_CXX"; then
5023 ac_pt_CXX=$CXX
5024 # Extract the first word of "icpc", so it can be a program name with args.
5025set dummy icpc; ac_word=$2
5026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027$as_echo_n "checking for $ac_word... " >&6; }
5028if ${ac_cv_path_ac_pt_CXX+:} false; then :
5029 $as_echo_n "(cached) " >&6
5030else
5031 case $ac_pt_CXX in
5032 [\\/]* | ?:[\\/]*)
5033 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5034 ;;
5035 *)
5036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in notfound
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
5041 for ac_exec_ext in '' $ac_executable_extensions; do
5042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5043 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5045 break 2
5046 fi
5047done
5048 done
5049IFS=$as_save_IFS
5050
5051 ;;
5052esac
5053fi
5054ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5055if test -n "$ac_pt_CXX"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5057$as_echo "$ac_pt_CXX" >&6; }
5058else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
5062
5063 if test "x$ac_pt_CXX" = x; then
5064 CXX="icpc"
5065 else
5066 case $cross_compiling:$ac_tool_warned in
5067yes:)
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5070ac_tool_warned=yes ;;
5071esac
5072 CXX=$ac_pt_CXX
5073 fi
5074else
5075 CXX="$ac_cv_path_CXX"
5076fi
5077 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005078 esac
5079 if test "$CXX" = "notfound"
5080 then
5081 CXX=""
5082 fi
5083fi
5084if test -z "$CXX"
5085then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005086 if test -n "$ac_tool_prefix"; then
5087 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5088 do
5089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005093if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095else
5096 if test -n "$CXX"; then
5097 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5098else
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005106 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108 break 2
5109 fi
5110done
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113
5114fi
5115fi
5116CXX=$ac_cv_prog_CXX
5117if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5119$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120else
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123fi
5124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005126 test -n "$CXX" && break
5127 done
5128fi
5129if test -z "$CXX"; then
5130 ac_ct_CXX=$CXX
5131 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5132do
5133 # Extract the first word of "$ac_prog", so it can be a program name with args.
5134set dummy $ac_prog; ac_word=$2
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5136$as_echo_n "checking for $ac_word... " >&6; }
5137if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5138 $as_echo_n "(cached) " >&6
5139else
5140 if test -n "$ac_ct_CXX"; then
5141 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5142else
5143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5144for as_dir in $PATH
5145do
5146 IFS=$as_save_IFS
5147 test -z "$as_dir" && as_dir=.
5148 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005150 ac_cv_prog_ac_ct_CXX="$ac_prog"
5151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5152 break 2
5153 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005155 done
5156IFS=$as_save_IFS
5157
5158fi
5159fi
5160ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5161if test -n "$ac_ct_CXX"; then
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5163$as_echo "$ac_ct_CXX" >&6; }
5164else
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
5167fi
5168
5169
5170 test -n "$ac_ct_CXX" && break
5171done
5172
5173 if test "x$ac_ct_CXX" = x; then
5174 CXX="notfound"
5175 else
5176 case $cross_compiling:$ac_tool_warned in
5177yes:)
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5180ac_tool_warned=yes ;;
5181esac
5182 CXX=$ac_ct_CXX
5183 fi
5184fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185
5186 if test "$CXX" = "notfound"
5187 then
5188 CXX=""
5189 fi
5190fi
5191if test "$preset_cxx" != "$CXX"
5192then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005193 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194
5195 By default, distutils will build C++ extension modules with \"$CXX\".
5196 If this is not intended, then set CXX on the configure command line.
5197 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005198$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005199
5200 By default, distutils will build C++ extension modules with \"$CXX\".
5201 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005202 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203fi
5204
5205
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5207
5208
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5210$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5211cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005212#undef bfin
5213#undef cris
5214#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef hppa
5217#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005219#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005220#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005221#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005222#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005223#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005224 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005225#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226# if defined(__x86_64__) && defined(__LP64__)
5227 x86_64-linux-gnu
5228# elif defined(__x86_64__) && defined(__ILP32__)
5229 x86_64-linux-gnux32
5230# elif defined(__i386__)
5231 i386-linux-gnu
5232# elif defined(__aarch64__) && defined(__AARCH64EL__)
5233# if defined(__ILP32__)
5234 aarch64_ilp32-linux-gnu
5235# else
5236 aarch64-linux-gnu
5237# endif
5238# elif defined(__aarch64__) && defined(__AARCH64EB__)
5239# if defined(__ILP32__)
5240 aarch64_be_ilp32-linux-gnu
5241# else
5242 aarch64_be-linux-gnu
5243# endif
5244# elif defined(__alpha__)
5245 alpha-linux-gnu
5246# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5247# if defined(__ARMEL__)
5248 arm-linux-gnueabihf
5249# else
5250 armeb-linux-gnueabihf
5251# endif
5252# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5253# if defined(__ARMEL__)
5254 arm-linux-gnueabi
5255# else
5256 armeb-linux-gnueabi
5257# endif
5258# elif defined(__hppa__)
5259 hppa-linux-gnu
5260# elif defined(__ia64__)
5261 ia64-linux-gnu
5262# elif defined(__m68k__) && !defined(__mcoldfire__)
5263 m68k-linux-gnu
5264# elif defined(__mips_hard_float) && defined(_MIPSEL)
5265# if _MIPS_SIM == _ABIO32
5266 mipsel-linux-gnu
5267# elif _MIPS_SIM == _ABIN32
5268 mips64el-linux-gnuabin32
5269# elif _MIPS_SIM == _ABI64
5270 mips64el-linux-gnuabi64
5271# else
5272# error unknown platform triplet
5273# endif
5274# elif defined(__mips_hard_float)
5275# if _MIPS_SIM == _ABIO32
5276 mips-linux-gnu
5277# elif _MIPS_SIM == _ABIN32
5278 mips64-linux-gnuabin32
5279# elif _MIPS_SIM == _ABI64
5280 mips64-linux-gnuabi64
5281# else
5282# error unknown platform triplet
5283# endif
5284# elif defined(__or1k__)
5285 or1k-linux-gnu
5286# elif defined(__powerpc__) && defined(__SPE__)
5287 powerpc-linux-gnuspe
5288# elif defined(__powerpc64__)
5289# if defined(__LITTLE_ENDIAN__)
5290 powerpc64le-linux-gnu
5291# else
5292 powerpc64-linux-gnu
5293# endif
5294# elif defined(__powerpc__)
5295 powerpc-linux-gnu
5296# elif defined(__s390x__)
5297 s390x-linux-gnu
5298# elif defined(__s390__)
5299 s390-linux-gnu
5300# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5301 sh4-linux-gnu
5302# elif defined(__sparc__) && defined(__arch64__)
5303 sparc64-linux-gnu
5304# elif defined(__sparc__)
5305 sparc-linux-gnu
5306# else
5307# error unknown platform triplet
5308# endif
5309#elif defined(__FreeBSD_kernel__)
5310# if defined(__LP64__)
5311 x86_64-kfreebsd-gnu
5312# elif defined(__i386__)
5313 i386-kfreebsd-gnu
5314# else
5315# error unknown platform triplet
5316# endif
5317#elif defined(__gnu_hurd__)
5318 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005319#elif defined(__APPLE__)
5320 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321#else
5322# error unknown platform triplet
5323#endif
5324
5325EOF
5326
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005327if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5330$as_echo "$PLATFORM_TRIPLET" >&6; }
5331else
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5333$as_echo "none" >&6; }
5334fi
5335rm -f conftest.c conftest.out
5336
5337if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5338 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5339 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5340 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005341elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5342 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005343fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005344
doko@ubuntu.com55532312016-06-14 08:55:19 +02005345if test x$MULTIARCH != x; then
5346 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5347fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348
5349
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5351$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5352save_LDFLAGS="$LDFLAGS"
5353LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005354
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h. */
5357
5358int
5359main ()
5360{
5361
5362 ;
5363 return 0;
5364}
5365_ACEOF
5366if ac_fn_c_try_link "$LINENO"; then :
5367 NO_AS_NEEDED="-Wl,--no-as-needed"
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5369$as_echo "yes" >&6; }
5370else
5371 NO_AS_NEEDED=""
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373$as_echo "no" >&6; }
5374fi
5375rm -f core conftest.err conftest.$ac_objext \
5376 conftest$ac_exeext conftest.$ac_ext
5377LDFLAGS="$save_LDFLAGS"
5378
5379
5380
5381# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5384$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005385if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387else
5388 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5389 then ac_cv_path_EGREP="$GREP -E"
5390 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 # Loop through the user's path and test for each of PROGNAME-LIST
5394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5396do
5397 IFS=$as_save_IFS
5398 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 for ac_prog in egrep; do
5400 for ac_exec_ext in '' $ac_executable_extensions; do
5401 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005402 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005403# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 # Check for GNU $ac_path_EGREP
5405case `"$ac_path_EGREP" --version 2>&1` in
5406*GNU*)
5407 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5408*)
5409 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 while :
5412 do
5413 cat "conftest.in" "conftest.in" >"conftest.tmp"
5414 mv "conftest.tmp" "conftest.in"
5415 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5418 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5421 # Best one so far, save it but keep looking for a better one
5422 ac_cv_path_EGREP="$ac_path_EGREP"
5423 ac_path_EGREP_max=$ac_count
5424 fi
5425 # 10*(2^10) chars as input seems more than enough
5426 test $ac_count -gt 10 && break
5427 done
5428 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5429esac
5430
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 $ac_path_EGREP_found && break 3
5432 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005437 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439else
5440 ac_cv_path_EGREP=$EGREP
5441fi
5442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443 fi
5444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5446$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005448
5449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5451$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005452if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 $as_echo_n "(cached) " >&6
5454else
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005456/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005457#include <stdlib.h>
5458#include <stdarg.h>
5459#include <string.h>
5460#include <float.h>
5461
5462int
5463main ()
5464{
5465
5466 ;
5467 return 0;
5468}
5469_ACEOF
5470if ac_fn_c_try_compile "$LINENO"; then :
5471 ac_cv_header_stdc=yes
5472else
5473 ac_cv_header_stdc=no
5474fi
5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476
5477if test $ac_cv_header_stdc = yes; then
5478 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5480/* end confdefs.h. */
5481#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005482
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005483_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005487else
Matthias Kloseb9621712010-04-24 17:59:49 +00005488 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005490rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492fi
5493
5494if test $ac_cv_header_stdc = yes; then
5495 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497/* end confdefs.h. */
5498#include <stdlib.h>
5499
5500_ACEOF
5501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5502 $EGREP "free" >/dev/null 2>&1; then :
5503
5504else
5505 ac_cv_header_stdc=no
5506fi
5507rm -f conftest*
5508
5509fi
5510
5511if test $ac_cv_header_stdc = yes; then
5512 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5513 if test "$cross_compiling" = yes; then :
5514 :
5515else
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517/* end confdefs.h. */
5518#include <ctype.h>
5519#include <stdlib.h>
5520#if ((' ' & 0x0FF) == 0x020)
5521# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5522# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5523#else
5524# define ISLOWER(c) \
5525 (('a' <= (c) && (c) <= 'i') \
5526 || ('j' <= (c) && (c) <= 'r') \
5527 || ('s' <= (c) && (c) <= 'z'))
5528# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5529#endif
5530
5531#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5532int
5533main ()
5534{
5535 int i;
5536 for (i = 0; i < 256; i++)
5537 if (XOR (islower (i), ISLOWER (i))
5538 || toupper (i) != TOUPPER (i))
5539 return 2;
5540 return 0;
5541}
5542_ACEOF
5543if ac_fn_c_try_run "$LINENO"; then :
5544
5545else
5546 ac_cv_header_stdc=no
5547fi
5548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5549 conftest.$ac_objext conftest.beam conftest.$ac_ext
5550fi
5551
5552fi
5553fi
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5555$as_echo "$ac_cv_header_stdc" >&6; }
5556if test $ac_cv_header_stdc = yes; then
5557
5558$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5559
5560fi
5561
5562# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5563for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5564 inttypes.h stdint.h unistd.h
5565do :
5566 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5567ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5568"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005569if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 cat >>confdefs.h <<_ACEOF
5571#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5572_ACEOF
5573
5574fi
5575
5576done
5577
5578
5579
5580 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005581if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 MINIX=yes
5583else
5584 MINIX=
5585fi
5586
5587
5588 if test "$MINIX" = yes; then
5589
5590$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5591
5592
5593$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5594
5595
5596$as_echo "#define _MINIX 1" >>confdefs.h
5597
5598 fi
5599
5600
5601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5602$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005603if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 $as_echo_n "(cached) " >&6
5605else
5606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5607/* end confdefs.h. */
5608
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005609# define __EXTENSIONS__ 1
5610 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005611int
5612main ()
5613{
5614
5615 ;
5616 return 0;
5617}
5618_ACEOF
5619if ac_fn_c_try_compile "$LINENO"; then :
5620 ac_cv_safe_to_define___extensions__=yes
5621else
5622 ac_cv_safe_to_define___extensions__=no
5623fi
5624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5625fi
5626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5627$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5628 test $ac_cv_safe_to_define___extensions__ = yes &&
5629 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5630
5631 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5632
5633 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5634
5635 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5636
5637 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5638
5639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
Xavier de Gaye95750b12016-07-09 11:05:42 +02005641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5642$as_echo_n "checking for the Android API level... " >&6; }
5643cat >> conftest.c <<EOF
5644#ifdef __ANDROID__
5645#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005646android_api = __ANDROID_API__
5647arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005648#else
5649#error not Android
5650#endif
5651EOF
5652
5653if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005654 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5655 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5657$as_echo "$ANDROID_API_LEVEL" >&6; }
5658
5659cat >>confdefs.h <<_ACEOF
5660#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5661_ACEOF
5662
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005663
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5665$as_echo_n "checking for the Android arm ABI... " >&6; }
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5667$as_echo "$_arm_arch" >&6; }
5668 if test "$_arm_arch" = 7; then
5669 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5670 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5671 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672else
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5674$as_echo "not Android" >&6; }
5675fi
5676rm -f conftest.c conftest.out
5677
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678# Check for unsupported systems
5679case $ac_sys_system/$ac_sys_release in
5680atheos*|Linux*/1*)
5681 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5682 echo See README for details.
5683 exit 1;;
5684esac
5685
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5688$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005691if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 withval=$with_suffix;
5693 case $withval in
5694 no) EXEEXT=;;
5695 yes) EXEEXT=.exe;;
5696 *) EXEEXT=$withval;;
5697 esac
5698fi
5699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5701$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702
5703# Test whether we're running on a non-case-sensitive system, in which
5704# case we give a warning if no ext is given
5705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5707$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708if test ! -d CaseSensitiveTestDir; then
5709mkdir CaseSensitiveTestDir
5710fi
5711
5712if test -d casesensitivetestdir
5713then
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5715$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 BUILDEXEEXT=.exe
5717else
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 BUILDEXEEXT=$EXEEXT
5721fi
5722rmdir CaseSensitiveTestDir
5723
5724case $MACHDEP in
5725bsdos*)
5726 case $CC in
5727 gcc) CC="$CC -D_HAVE_BSDI";;
5728 esac;;
5729esac
5730
5731case $ac_sys_system in
5732hp*|HP*)
5733 case $CC in
5734 cc|*/cc) CC="$CC -Ae";;
5735 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736esac
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5740$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741if test -z "$LIBRARY"
5742then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005743 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5746$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748# LDLIBRARY is the name of the library to link against (as opposed to the
5749# name of the library into which to insert object files). BLDLIBRARY is also
5750# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5751# is blank as the main program is not linked directly against LDLIBRARY.
5752# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5753# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5754# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5755# DLLLIBRARY is the shared (i.e., DLL) library.
5756#
5757# RUNSHARED is used to run shared python without installed libraries
5758#
5759# INSTSONAME is the name of the shared library that will be use to install
5760# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005761#
5762# LDVERSION is the shared library version number, normally the Python version
5763# with the ABI build flags appended.
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766
5767
5768
5769
5770
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772LDLIBRARY="$LIBRARY"
5773BLDLIBRARY='$(LDLIBRARY)'
5774INSTSONAME='$(LDLIBRARY)'
5775DLLLIBRARY=''
5776LDLIBRARYDIR=''
5777RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005778LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779
5780# LINKCC is the command that links the python executable -- default is $(CC).
5781# If CXX is set, and if it is needed to link a main function that was
5782# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5783# python might then depend on the C++ runtime
5784# This is altered for AIX in order to build the export list before
5785# linking.
5786
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5788$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789if test -z "$LINKCC"
5790then
5791 LINKCC='$(PURIFY) $(MAINCC)'
5792 case $ac_sys_system in
5793 AIX*)
5794 exp_extra="\"\""
5795 if test $ac_sys_release -ge 5 -o \
5796 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5797 exp_extra="."
5798 fi
5799 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 QNX*)
5801 # qcc must be used because the other compilers do not
5802 # support -N.
5803 LINKCC=qcc;;
5804 esac
5805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5807$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808
5809# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5810# make sure we default having it set to "no": this is used by
5811# distutils.unixccompiler to know if it should add --enable-new-dtags
5812# to linker command lines, and failing to detect GNU ld simply results
5813# in the same bahaviour as before.
5814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5816$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817ac_prog=ld
5818if test "$GCC" = yes; then
5819 ac_prog=`$CC -print-prog-name=ld`
5820fi
5821case `"$ac_prog" -V 2>&1 < /dev/null` in
5822 *GNU*)
5823 GNULD=yes;;
5824 *)
5825 GNULD=no;;
5826esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5828$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5831$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005832if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005833 $as_echo_n "(cached) " >&6
5834else
5835 ac_cv_c_inline=no
5836for ac_kw in inline __inline__ __inline; do
5837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5838/* end confdefs.h. */
5839#ifndef __cplusplus
5840typedef int foo_t;
5841static $ac_kw foo_t static_foo () {return 0; }
5842$ac_kw foo_t foo () {return 0; }
5843#endif
5844
5845_ACEOF
5846if ac_fn_c_try_compile "$LINENO"; then :
5847 ac_cv_c_inline=$ac_kw
5848fi
5849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5850 test "$ac_cv_c_inline" != no && break
5851done
5852
5853fi
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5855$as_echo "$ac_cv_c_inline" >&6; }
5856
5857case $ac_cv_c_inline in
5858 inline | yes) ;;
5859 *)
5860 case $ac_cv_c_inline in
5861 no) ac_val=;;
5862 *) ac_val=$ac_cv_c_inline;;
5863 esac
5864 cat >>confdefs.h <<_ACEOF
5865#ifndef __cplusplus
5866#define inline $ac_val
5867#endif
5868_ACEOF
5869 ;;
5870esac
5871
5872if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005873
5874$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005875
5876
5877fi
5878
5879
Matthias Kloseb9621712010-04-24 17:59:49 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5881$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005883if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 enableval=$enable_shared;
5885fi
5886
5887
5888if test -z "$enable_shared"
5889then
5890 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005891 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 enable_shared="yes";;
5893 *)
5894 enable_shared="no";;
5895 esac
5896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5898$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899
Matthias Kloseb9621712010-04-24 17:59:49 +00005900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5901$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005903if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005904 enableval=$enable_profiling;
5905fi
5906
5907if test "x$enable_profiling" = xyes; then
5908 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005909 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911/* end confdefs.h. */
5912int main() { return 0; }
5913_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005914if ac_fn_c_try_link "$LINENO"; then :
5915
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005917 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005919rm -f core conftest.err conftest.$ac_objext \
5920 conftest$ac_exeext conftest.$ac_ext
5921 CC="$ac_save_cc"
5922else
5923 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5926$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
doko@ubuntu.comba015832012-06-30 16:52:05 +02005928if test "x$enable_profiling" = xyes; then
5929 BASECFLAGS="-pg $BASECFLAGS"
5930 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931fi
5932
Matthias Kloseb9621712010-04-24 17:59:49 +00005933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5934$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
5936# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5937# library that we build, but we do not want to link against it (we
5938# will find it with a -framework option). For this reason there is an
5939# extra variable BLDLIBRARY against which Python and the extension
5940# modules are linked, BLDLIBRARY. This is normally the same as
5941# LDLIBRARY, but empty for MacOSX framework builds.
5942if test "$enable_framework"
5943then
5944 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005945 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 BLDLIBRARY=''
5947else
5948 BLDLIBRARY='$(LDLIBRARY)'
5949fi
5950
5951# Other platforms follow
5952if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005953 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
Matthias Kloseb9621712010-04-24 17:59:49 +00005955$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956
5957 case $ac_sys_system in
5958 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).dll.a'
5960 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 ;;
5962 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).so'
5964 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005967 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005968 then
5969 PY3LIBRARY=libpython3.so
5970 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005972 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005973 LDLIBRARY='libpython$(LDVERSION).so'
5974 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005975 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005977 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005978 then
5979 PY3LIBRARY=libpython3.so
5980 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ;;
5982 hp*|HP*)
5983 case `uname -m` in
5984 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005985 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ;;
5987 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005988 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989 ;;
5990 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005991 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005992 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005995 LDLIBRARY='libpython$(LDVERSION).dylib'
5996 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005997 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005999 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006000 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006001 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006002 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003
6004 esac
6005else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006006 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 case $ac_sys_system in
6008 CYGWIN*)
6009 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006010 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011 ;;
6012 esac
6013fi
6014
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006015if test "$cross_compiling" = yes; then
6016 RUNSHARED=
6017fi
6018
Matthias Kloseb9621712010-04-24 17:59:49 +00006019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6020$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021
6022if test -n "$ac_tool_prefix"; then
6023 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6024set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006027if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029else
6030 if test -n "$RANLIB"; then
6031 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6032else
6033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6034for as_dir in $PATH
6035do
6036 IFS=$as_save_IFS
6037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 break 2
6043 fi
6044done
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046IFS=$as_save_IFS
6047
6048fi
6049fi
6050RANLIB=$ac_cv_prog_RANLIB
6051if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6053$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054else
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6056$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057fi
6058
6059
6060fi
6061if test -z "$ac_cv_prog_RANLIB"; then
6062 ac_ct_RANLIB=$RANLIB
6063 # Extract the first word of "ranlib", so it can be a program name with args.
6064set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6066$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006067if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069else
6070 if test -n "$ac_ct_RANLIB"; then
6071 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6072else
6073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6074for as_dir in $PATH
6075do
6076 IFS=$as_save_IFS
6077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082 break 2
6083 fi
6084done
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086IFS=$as_save_IFS
6087
6088fi
6089fi
6090ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6091if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6093$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094else
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6096$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097fi
6098
6099 if test "x$ac_ct_RANLIB" = x; then
6100 RANLIB=":"
6101 else
6102 case $cross_compiling:$ac_tool_warned in
6103yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6105$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106ac_tool_warned=yes ;;
6107esac
6108 RANLIB=$ac_ct_RANLIB
6109 fi
6110else
6111 RANLIB="$ac_cv_prog_RANLIB"
6112fi
6113
6114
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006115if test -n "$ac_tool_prefix"; then
6116 for ac_prog in ar aal
6117 do
6118 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6119set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006122if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124else
6125 if test -n "$AR"; then
6126 ac_cv_prog_AR="$AR" # Let the user override the test.
6127else
6128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129for as_dir in $PATH
6130do
6131 IFS=$as_save_IFS
6132 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006133 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137 break 2
6138 fi
6139done
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141IFS=$as_save_IFS
6142
6143fi
6144fi
6145AR=$ac_cv_prog_AR
6146if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6148$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149else
Matthias Kloseb9621712010-04-24 17:59:49 +00006150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152fi
6153
6154
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006155 test -n "$AR" && break
6156 done
6157fi
6158if test -z "$AR"; then
6159 ac_ct_AR=$AR
6160 for ac_prog in ar aal
6161do
6162 # Extract the first word of "$ac_prog", so it can be a program name with args.
6163set dummy $ac_prog; ac_word=$2
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165$as_echo_n "checking for $ac_word... " >&6; }
6166if ${ac_cv_prog_ac_ct_AR+:} false; then :
6167 $as_echo_n "(cached) " >&6
6168else
6169 if test -n "$ac_ct_AR"; then
6170 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6171else
6172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175 IFS=$as_save_IFS
6176 test -z "$as_dir" && as_dir=.
6177 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006178 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006179 ac_cv_prog_ac_ct_AR="$ac_prog"
6180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181 break 2
6182 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006184 done
6185IFS=$as_save_IFS
6186
6187fi
6188fi
6189ac_ct_AR=$ac_cv_prog_ac_ct_AR
6190if test -n "$ac_ct_AR"; then
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6192$as_echo "$ac_ct_AR" >&6; }
6193else
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6195$as_echo "no" >&6; }
6196fi
6197
6198
6199 test -n "$ac_ct_AR" && break
6200done
6201
6202 if test "x$ac_ct_AR" = x; then
6203 AR="ar"
6204 else
6205 case $cross_compiling:$ac_tool_warned in
6206yes:)
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6208$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6209ac_tool_warned=yes ;;
6210esac
6211 AR=$ac_ct_AR
6212 fi
6213fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214
6215
6216# tweak ARFLAGS only if the user didn't set it on the command line
6217
6218if test -z "$ARFLAGS"
6219then
6220 ARFLAGS="rc"
6221fi
6222
doko@ubuntu.com58844492012-06-30 18:25:32 +02006223if test -n "$ac_tool_prefix"; then
6224 for ac_prog in readelf
6225 do
6226 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6229$as_echo_n "checking for $ac_word... " >&6; }
6230if ${ac_cv_prog_READELF+:} false; then :
6231 $as_echo_n "(cached) " >&6
6232else
6233 if test -n "$READELF"; then
6234 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6235else
6236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239 IFS=$as_save_IFS
6240 test -z "$as_dir" && as_dir=.
6241 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006243 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245 break 2
6246 fi
6247done
6248 done
6249IFS=$as_save_IFS
6250
6251fi
6252fi
6253READELF=$ac_cv_prog_READELF
6254if test -n "$READELF"; then
6255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6256$as_echo "$READELF" >&6; }
6257else
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263 test -n "$READELF" && break
6264 done
6265fi
6266if test -z "$READELF"; then
6267 ac_ct_READELF=$READELF
6268 for ac_prog in readelf
6269do
6270 # Extract the first word of "$ac_prog", so it can be a program name with args.
6271set dummy $ac_prog; ac_word=$2
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6273$as_echo_n "checking for $ac_word... " >&6; }
6274if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6275 $as_echo_n "(cached) " >&6
6276else
6277 if test -n "$ac_ct_READELF"; then
6278 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6279else
6280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283 IFS=$as_save_IFS
6284 test -z "$as_dir" && as_dir=.
6285 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006287 ac_cv_prog_ac_ct_READELF="$ac_prog"
6288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6289 break 2
6290 fi
6291done
6292 done
6293IFS=$as_save_IFS
6294
6295fi
6296fi
6297ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6298if test -n "$ac_ct_READELF"; then
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6300$as_echo "$ac_ct_READELF" >&6; }
6301else
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6303$as_echo "no" >&6; }
6304fi
6305
6306
6307 test -n "$ac_ct_READELF" && break
6308done
6309
6310 if test "x$ac_ct_READELF" = x; then
6311 READELF=":"
6312 else
6313 case $cross_compiling:$ac_tool_warned in
6314yes:)
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6317ac_tool_warned=yes ;;
6318esac
6319 READELF=$ac_ct_READELF
6320 fi
6321fi
6322
6323if test "$cross_compiling" = yes; then
6324 case "$READELF" in
6325 readelf|:)
6326 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6327 ;;
6328 esac
6329fi
6330
6331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333case $MACHDEP in
6334bsdos*|hp*|HP*)
6335 # install -d does not work on BSDI or HP-UX
6336 if test -z "$INSTALL"
6337 then
6338 INSTALL="${srcdir}/install-sh -c"
6339 fi
6340esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341# Find a good install program. We prefer a C program (faster),
6342# so one script is as good as another. But avoid the broken or
6343# incompatible versions:
6344# SysV /etc/install, /usr/sbin/install
6345# SunOS /usr/etc/install
6346# IRIX /sbin/install
6347# AIX /bin/install
6348# AmigaOS /C/install, which installs bootblocks on floppy discs
6349# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6350# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6351# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6352# OS/2's system install, which has a completely different semantic
6353# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006354# Reject install programs that cannot install multiple files.
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6356$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006358if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360else
6361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364 IFS=$as_save_IFS
6365 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 # Account for people who put trailing slashes in PATH elements.
6367case $as_dir/ in #((
6368 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 /usr/ucb/* ) ;;
6372 *)
6373 # OSF1 and SCO ODT 3.0 have their own names for install.
6374 # Don't use installbsd from OSF since it installs stuff as root
6375 # by default.
6376 for ac_prog in ginstall scoinst install; do
6377 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006378 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 if test $ac_prog = install &&
6380 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6381 # AIX install. It has an incompatible calling convention.
6382 :
6383 elif test $ac_prog = install &&
6384 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6385 # program-specific install script used by HP pwplus--don't use.
6386 :
6387 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006388 rm -rf conftest.one conftest.two conftest.dir
6389 echo one > conftest.one
6390 echo two > conftest.two
6391 mkdir conftest.dir
6392 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6393 test -s conftest.one && test -s conftest.two &&
6394 test -s conftest.dir/conftest.one &&
6395 test -s conftest.dir/conftest.two
6396 then
6397 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6398 break 3
6399 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400 fi
6401 fi
6402 done
6403 done
6404 ;;
6405esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006406
6407 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408IFS=$as_save_IFS
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411
6412fi
6413 if test "${ac_cv_path_install+set}" = set; then
6414 INSTALL=$ac_cv_path_install
6415 else
6416 # As a last resort, use the slow shell script. Don't cache a
6417 # value for INSTALL within a source directory, because that will
6418 # break other packages using the cache if that directory is
6419 # removed, or if the value is a relative name.
6420 INSTALL=$ac_install_sh
6421 fi
6422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6424$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425
6426# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6427# It thinks the first close brace ends the variable substitution.
6428test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6429
6430test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6431
6432test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6433
Matthias Klose93a0ef12012-03-15 18:08:34 +01006434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6435$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6436if test -z "$MKDIR_P"; then
6437 if ${ac_cv_path_mkdir+:} false; then :
6438 $as_echo_n "(cached) " >&6
6439else
6440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6442do
6443 IFS=$as_save_IFS
6444 test -z "$as_dir" && as_dir=.
6445 for ac_prog in mkdir gmkdir; do
6446 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006447 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006448 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6449 'mkdir (GNU coreutils) '* | \
6450 'mkdir (coreutils) '* | \
6451 'mkdir (fileutils) '4.1*)
6452 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6453 break 3;;
6454 esac
6455 done
6456 done
6457 done
6458IFS=$as_save_IFS
6459
6460fi
6461
6462 test -d ./--version && rmdir ./--version
6463 if test "${ac_cv_path_mkdir+set}" = set; then
6464 MKDIR_P="$ac_cv_path_mkdir -p"
6465 else
6466 # As a last resort, use the slow shell script. Don't cache a
6467 # value for MKDIR_P within a source directory, because that will
6468 # break other packages using the cache if that directory is
6469 # removed, or if the value is a relative name.
6470 MKDIR_P="$ac_install_sh -d"
6471 fi
6472fi
6473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6474$as_echo "$MKDIR_P" >&6; }
6475
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476
6477# Not every filesystem supports hard links
6478
6479if test -z "$LN" ; then
6480 case $ac_sys_system in
6481 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006482 *) LN=ln;;
6483 esac
6484fi
6485
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006486# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006487
6488ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006489
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006490# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6492$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006493
6494# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006495if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496 withval=$with_pydebug;
6497if test "$withval" != no
6498then
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501
Matthias Kloseb9621712010-04-24 17:59:49 +00006502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6503$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006505 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006506else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508fi
6509else
Matthias Kloseb9621712010-04-24 17:59:49 +00006510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512fi
6513
6514
Brett Cannon63d98bc2016-09-06 17:12:40 -07006515# Enable optimization flags
6516
6517
6518Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6520$as_echo_n "checking for --enable-optimizations... " >&6; }
6521# Check whether --enable-optimizations was given.
6522if test "${enable_optimizations+set}" = set; then :
6523 enableval=$enable_optimizations;
Brett Cannon63d98bc2016-09-06 17:12:40 -07006524if test "$withval" != no
6525then
6526 Py_OPT='true'
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6528$as_echo "yes" >&6; };
6529else
6530 Py_OPT='false'
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532$as_echo "no" >&6; };
6533fi
6534else
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006540 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6541 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006542 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006543 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006544 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006545 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006546 DEF_MAKE_RULE="build_all"
6547else
6548 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006549 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006550 DEF_MAKE_RULE="all"
6551fi
6552
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006553# Enable LTO flags
6554
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6556$as_echo_n "checking for --with-lto... " >&6; }
6557
6558# Check whether --with-lto was given.
6559if test "${with_lto+set}" = set; then :
6560 withval=$with_lto;
6561if test "$withval" != no
6562then
6563 Py_LTO='true'
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6565$as_echo "yes" >&6; };
6566else
6567 Py_LTO='false'
6568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; };
6570fi
6571else
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6573$as_echo "no" >&6; }
6574fi
6575
6576if test "$Py_LTO" = 'true' ; then
6577 case $CC in
6578 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006579 case $ac_sys_system in
6580 Darwin*)
6581 # Any changes made here should be reflected in the GCC+Darwin case below
6582 LTOFLAGS="-flto -Wl,-export_dynamic"
6583 ;;
6584 *)
6585 LTOFLAGS="-flto"
6586 ;;
6587 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006588 ;;
6589 *gcc*)
6590 case $ac_sys_system in
6591 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006592 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006593 ;;
6594 *)
6595 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6596 ;;
6597 esac
6598 ;;
6599 esac
6600fi
6601
Brett Cannon7188a3e2015-09-18 15:13:44 -07006602# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006603
6604
6605
6606
6607
Gregory P. Smith799520c2016-09-07 16:10:00 -07006608# Make this work on systems where llvm tools are not installed with their
6609# normal names in the default $PATH (ie: Ubuntu). They exist under the
6610# non-suffixed name in their versioned llvm directory.
6611llvm_bin_dir=''
6612llvm_path="${PATH}"
6613if test "${CC}" = "clang"
6614then
6615 clang_bin=`which clang`
6616 # Some systems install clang elsewhere as a symlink to the real path
6617 # which is where the related llvm tools are located.
6618 if test -L "${clang_bin}"
6619 then
6620 clang_dir=`dirname "${clang_bin}"`
6621 clang_bin=`readlink "${clang_bin}"`
6622 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6623 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6624 fi
6625fi
Zachary Ware5af85642015-12-21 12:09:17 -06006626
Gregory P. Smith799520c2016-09-07 16:10:00 -07006627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6628$as_echo_n "checking target system type... " >&6; }
6629if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006630 $as_echo_n "(cached) " >&6
6631else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006632 if test "x$target_alias" = x; then
6633 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006634else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006635 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6636 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6637fi
6638
6639fi
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6641$as_echo "$ac_cv_target" >&6; }
6642case $ac_cv_target in
6643*-*-*) ;;
6644*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6645esac
6646target=$ac_cv_target
6647ac_save_IFS=$IFS; IFS='-'
6648set x $ac_cv_target
6649shift
6650target_cpu=$1
6651target_vendor=$2
6652shift; shift
6653# Remember, the first character of IFS is used to create $*,
6654# except with old shells:
6655target_os=$*
6656IFS=$ac_save_IFS
6657case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6658
6659
6660# The aliases save the names the user supplied, while $host etc.
6661# will get canonicalized.
6662test -n "$target_alias" &&
6663 test "$program_prefix$program_suffix$program_transform_name" = \
6664 NONENONEs,x,x, &&
6665 program_prefix=${target_alias}-
6666# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6667set dummy $target_alias-llvm-profdata; ac_word=$2
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669$as_echo_n "checking for $ac_word... " >&6; }
6670if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6671 $as_echo_n "(cached) " >&6
6672else
6673 case $LLVM_PROFDATA in
6674 [\\/]* | ?:[\\/]*)
6675 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6676 ;;
6677 *)
6678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006680do
6681 IFS=$as_save_IFS
6682 test -z "$as_dir" && as_dir=.
6683 for ac_exec_ext in '' $ac_executable_extensions; do
6684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006685 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687 break 2
6688 fi
6689done
6690 done
6691IFS=$as_save_IFS
6692
Gregory P. Smith799520c2016-09-07 16:10:00 -07006693 ;;
6694esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006696LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6697if test -n "$LLVM_PROFDATA"; then
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6699$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006700else
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705
Gregory P. Smith799520c2016-09-07 16:10:00 -07006706if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6707 if test "$build" = "$target"; then
6708 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6709 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6710set dummy llvm-profdata; ac_word=$2
6711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6712$as_echo_n "checking for $ac_word... " >&6; }
6713if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6714 $as_echo_n "(cached) " >&6
6715else
6716 case $ac_pt_LLVM_PROFDATA in
6717 [\\/]* | ?:[\\/]*)
6718 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6719 ;;
6720 *)
6721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6722for as_dir in ${llvm_path}
6723do
6724 IFS=$as_save_IFS
6725 test -z "$as_dir" && as_dir=.
6726 for ac_exec_ext in '' $ac_executable_extensions; do
6727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6728 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6730 break 2
6731 fi
6732done
6733 done
6734IFS=$as_save_IFS
6735
6736 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6737 ;;
6738esac
6739fi
6740ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6741if test -n "$ac_pt_LLVM_PROFDATA"; then
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6743$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6744else
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746$as_echo "no" >&6; }
6747fi
6748
6749 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6750 else
6751 LLVM_PROFDATA="''"
6752 fi
6753else
6754 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6755fi
6756
6757
6758if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6759then
6760 LLVM_PROF_FOUND="found"
6761else
6762 LLVM_PROF_FOUND="not-found"
6763fi
6764if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6765then
6766 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6767 if test -n "${found_llvm_profdata}"
6768 then
6769 # llvm-profdata isn't directly in $PATH in some cases.
6770 # https://apple.stackexchange.com/questions/197053/
6771 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6772 LLVM_PROF_FOUND=found
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6774$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6775 fi
6776fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777LLVM_PROF_ERR=no
6778case $CC in
6779 *clang*)
6780 # Any changes made here should be reflected in the GCC+Darwin case below
6781 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6782 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006783 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6785 if test $LLVM_PROF_FOUND = not-found
6786 then
6787 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006788 if test "${REQUIRE_PGO}" = "yes"
6789 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006790 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006791 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006792 fi
6793 ;;
6794 *gcc*)
6795 case $ac_sys_system in
6796 Darwin*)
6797 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6798 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006799 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006800 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006801 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006802 then
6803 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 if test "${REQUIRE_PGO}" = "yes"
6805 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006806 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006807 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006808 fi
6809 ;;
6810 *)
6811 PGO_PROF_GEN_FLAG="-fprofile-generate"
6812 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6813 LLVM_PROF_MERGER="true"
6814 LLVM_PROF_FILE=""
6815 ;;
6816 esac
6817 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006818 *icc*)
6819 PGO_PROF_GEN_FLAG="-prof-gen"
6820 PGO_PROF_USE_FLAG="-prof-use"
6821 LLVM_PROF_MERGER="true"
6822 LLVM_PROF_FILE=""
6823 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006824esac
6825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6827# merged with this chunk of code?
6828
6829# Optimizer/debugger flags
6830# ------------------------
6831# (The following bit of code is complicated enough - please keep things
6832# indented properly. Just pretend you're editing Python code. ;-)
6833
6834# There are two parallel sets of case statements below, one that checks to
6835# see if OPT was set and one that does BASECFLAGS setting based upon
6836# compiler and platform. BASECFLAGS tweaks need to be made even if the
6837# user set OPT.
6838
6839# tweak OPT based on compiler and platform, only if the user didn't set
6840# it on the command line
6841
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006842if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843then
6844 case $GCC in
6845 yes)
6846 if test "$CC" != 'g++' ; then
6847 STRICT_PROTO="-Wstrict-prototypes"
6848 fi
6849 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6850 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6851 WRAP="-fwrapv"
6852 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006853
6854 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006855 case $CC in
6856 *clang*) WRAP="-fwrapv"
6857 ;;
6858 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 case $ac_cv_prog_cc_g in
6861 yes)
6862 if test "$Py_DEBUG" = 'true' ; then
6863 # Optimization messes up debuggers, so turn it off for
6864 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006865 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6866 OPT="-g -Og -Wall $STRICT_PROTO"
6867 else
6868 OPT="-g -O0 -Wall $STRICT_PROTO"
6869 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 else
6871 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6872 fi
6873 ;;
6874 *)
6875 OPT="-O3 -Wall $STRICT_PROTO"
6876 ;;
6877 esac
6878 case $ac_sys_system in
6879 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6880 ;;
6881 esac
6882 ;;
6883
6884 *)
6885 OPT="-O"
6886 ;;
6887 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888fi
6889
6890
6891
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893# The -arch flags for universal builds on OSX
6894UNIVERSAL_ARCH_FLAGS=
6895
6896
6897# tweak BASECFLAGS based on compiler and platform
6898case $GCC in
6899yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006900 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006901
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6903$as_echo_n "checking for -Wextra... " >&6; }
6904 ac_save_cc="$CC"
6905 CC="$CC -Wextra -Werror"
6906 if ${ac_cv_extra_warnings+:} false; then :
6907 $as_echo_n "(cached) " >&6
6908else
6909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6910/* end confdefs.h. */
6911
6912
6913int
6914main ()
6915{
6916
6917 ;
6918 return 0;
6919}
6920
6921_ACEOF
6922if ac_fn_c_try_compile "$LINENO"; then :
6923
6924 ac_cv_extra_warnings=yes
6925
6926else
6927
6928 ac_cv_extra_warnings=no
6929
6930fi
6931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6932fi
6933
6934 CC="$ac_save_cc"
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6936$as_echo "$ac_cv_extra_warnings" >&6; }
6937
6938 if test $ac_cv_extra_warnings = yes
6939 then
6940 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6941 fi
6942
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006943 # Python doesn't violate C99 aliasing rules, but older versions of
6944 # GCC produce warnings for legal Python code. Enable
6945 # -fno-strict-aliasing on versions of GCC that support but produce
6946 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6948$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949 ac_save_cc="$CC"
6950 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006951 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006952 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006953 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006954else
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006957
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006959int
6960main ()
6961{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006962
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006963 ;
6964 return 0;
6965}
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006968if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006969
6970 CC="$ac_save_cc -fstrict-aliasing"
6971 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973/* end confdefs.h. */
6974
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006975 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006976int
6977main ()
6978{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006979double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980 ;
6981 return 0;
6982}
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006985if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 ac_cv_no_strict_aliasing=no
6988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989else
Matthias Kloseb159a552010-04-25 21:00:44 +00006990
6991 ac_cv_no_strict_aliasing=yes
6992
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006995
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006996else
Matthias Kloseb159a552010-04-25 21:00:44 +00006997
6998 ac_cv_no_strict_aliasing=no
6999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007002fi
7003
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007004 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7007$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009 then
7010 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7011 fi
7012
Zachary Ware5af85642015-12-21 12:09:17 -06007013 # ICC doesn't recognize the option, but only emits a warning
7014 ## XXX does it emit an unused result warning and can it be disabled?
7015 case "$CC" in
7016 *icc*)
7017 ac_cv_disable_unused_result_warning=no
7018 ;;
7019 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7021$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7022 ac_save_cc="$CC"
7023 CC="$CC -Wunused-result -Werror"
7024 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007025 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007026 $as_echo_n "(cached) " >&6
7027else
7028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7029/* end confdefs.h. */
7030
7031
7032int
7033main ()
7034{
7035
7036 ;
7037 return 0;
7038}
7039
7040_ACEOF
7041if ac_fn_c_try_compile "$LINENO"; then :
7042
7043 ac_cv_disable_unused_result_warning=yes
7044
7045else
7046
7047 ac_cv_disable_unused_result_warning=no
7048
7049fi
7050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7051fi
7052
7053 CFLAGS="$save_CFLAGS"
7054 CC="$ac_save_cc"
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7056$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007057 ;;
7058 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007059
7060 if test $ac_cv_disable_unused_result_warning = yes
7061 then
7062 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007063 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7064 fi
7065
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7067$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7068 ac_save_cc="$CC"
7069 CC="$CC -Wunused-parameter -Werror"
7070 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7071 $as_echo_n "(cached) " >&6
7072else
7073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h. */
7075
7076
7077int
7078main ()
7079{
7080
7081 ;
7082 return 0;
7083}
7084
7085_ACEOF
7086if ac_fn_c_try_compile "$LINENO"; then :
7087
7088 ac_cv_disable_unused_parameter_warning=yes
7089
7090else
7091
7092 ac_cv_disable_unused_parameter_warning=no
7093
7094fi
7095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096fi
7097
7098 CC="$ac_save_cc"
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7100$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7101
7102 if test $ac_cv_disable_unused_parameter_warning = yes
7103 then
7104 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7105 fi
7106
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7108$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7109 ac_save_cc="$CC"
7110 CC="$CC -Wmissing-field-initializers -Werror"
7111 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7112 $as_echo_n "(cached) " >&6
7113else
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115/* end confdefs.h. */
7116
7117
7118int
7119main ()
7120{
7121
7122 ;
7123 return 0;
7124}
7125
7126_ACEOF
7127if ac_fn_c_try_compile "$LINENO"; then :
7128
7129 ac_cv_disable_missing_field_initializers=yes
7130
7131else
7132
7133 ac_cv_disable_missing_field_initializers=no
7134
7135fi
7136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137fi
7138
7139 CC="$ac_save_cc"
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7141$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7142
7143 if test $ac_cv_disable_missing_field_initializers = yes
7144 then
7145 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007146 fi
7147
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7149$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7150 ac_save_cc="$CC"
7151 CC="$CC -Wsign-compare"
7152 save_CFLAGS="$CFLAGS"
7153 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155else
7156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157/* end confdefs.h. */
7158
7159
7160int
7161main ()
7162{
7163
7164 ;
7165 return 0;
7166}
7167
7168_ACEOF
7169if ac_fn_c_try_compile "$LINENO"; then :
7170
7171 ac_cv_enable_sign_compare_warning=yes
7172
7173else
7174
7175 ac_cv_enable_sign_compare_warning=no
7176
7177fi
7178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179fi
7180
7181 CFLAGS="$save_CFLAGS"
7182 CC="$ac_save_cc"
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7184$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7185
7186 if test $ac_cv_enable_sign_compare_warning = yes
7187 then
7188 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7189 fi
7190
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7192$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7193 ac_save_cc="$CC"
7194 CC="$CC -Wunreachable-code"
7195 save_CFLAGS="$CFLAGS"
7196 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7197 $as_echo_n "(cached) " >&6
7198else
7199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h. */
7201
7202
7203int
7204main ()
7205{
7206
7207 ;
7208 return 0;
7209}
7210
7211_ACEOF
7212if ac_fn_c_try_compile "$LINENO"; then :
7213
7214 ac_cv_enable_unreachable_code_warning=yes
7215
7216else
7217
7218 ac_cv_enable_unreachable_code_warning=no
7219
7220fi
7221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7222fi
7223
7224 CFLAGS="$save_CFLAGS"
7225 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007226
7227 # Don't enable unreachable code warning in debug mode, since it usually
7228 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007229 # Issue #24324: Unfortunately, the unreachable code warning does not work
7230 # correctly on gcc and has been silently removed from the compiler.
7231 # It is supported on clang but on OS X systems gcc may be an alias
7232 # for clang. Try to determine if the compiler is not really gcc and,
7233 # if so, only then enable the warning.
7234 if test $ac_cv_enable_unreachable_code_warning = yes && \
7235 test "$Py_DEBUG" != "true" && \
7236 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007237 then
7238 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007239 else
7240 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007241 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7243$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7246 # support. Without this, treatment of subnormals doesn't follow
7247 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007248 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249 alpha*)
7250 BASECFLAGS="$BASECFLAGS -mieee"
7251 ;;
7252 esac
7253
7254 case $ac_sys_system in
7255 SCO_SV*)
7256 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7257 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007258
7259 # is there any other compiler on Darwin besides gcc?
7260 Darwin*)
7261 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7262 # used to be here, but non-Apple gcc doesn't accept them.
7263 if test "${CC}" = gcc
7264 then
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007266$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 case "${UNIVERSALSDK}" in
7268 */MacOSX10.4u.sdk)
7269 # Build using 10.4 SDK, force usage of gcc when the
7270 # compiler is gcc, otherwise the user will get very
7271 # confusing error messages when building on OSX 10.6
7272 CC=gcc-4.0
7273 CPP=cpp-4.0
7274 ;;
7275 esac
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007277$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007278 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007279
Ned Deily87adb6e2013-10-18 21:09:56 -07007280 if test "${enable_universalsdk}"
7281 then
7282 case "$UNIVERSAL_ARCHS" in
7283 32-bit)
7284 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7285 LIPO_32BIT_FLAGS=""
7286 ARCH_RUN_32BIT=""
7287 ;;
7288 64-bit)
7289 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7290 LIPO_32BIT_FLAGS=""
7291 ARCH_RUN_32BIT="true"
7292 ;;
7293 all)
7294 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7295 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7296 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7297 ;;
7298 intel)
7299 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7300 LIPO_32BIT_FLAGS="-extract i386"
7301 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7302 ;;
7303 intel-32)
7304 UNIVERSAL_ARCH_FLAGS="-arch i386"
7305 LIPO_32BIT_FLAGS=""
7306 ARCH_RUN_32BIT=""
7307 ;;
7308 3-way)
7309 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7310 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7311 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7312 ;;
7313 *)
7314 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7315 ;;
7316 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317
Ned Deily87adb6e2013-10-18 21:09:56 -07007318 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7319 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7320 if test "${UNIVERSALSDK}" != "/"
7321 then
7322 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7323 fi
7324 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007325
Ned Deily87adb6e2013-10-18 21:09:56 -07007326 # Calculate an appropriate deployment target for this build:
7327 # The deployment target value is used explicitly to enable certain
7328 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007329 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007330 # component of the string returned by distutils.get_platform().
7331 #
7332 # Use the value from:
7333 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7334 # 2. the operating system version of the build machine if >= 10.6
7335 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7336 # below to pick either 10.3, 10.4, or 10.5 as the target.
7337 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338
Ned Deily87adb6e2013-10-18 21:09:56 -07007339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7340$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007341 cur_target_major=`sw_vers -productVersion | \
7342 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7343 cur_target_minor=`sw_vers -productVersion | \
7344 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7345 cur_target="${cur_target_major}.${cur_target_minor}"
7346 if test ${cur_target_major} -eq 10 && \
7347 test ${cur_target_minor} -ge 3 && \
7348 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007349 then
Ned Deily36820b62014-06-25 13:44:22 -07007350 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007351 cur_target=10.3
7352 if test ${enable_universalsdk}
7353 then
7354 case "$UNIVERSAL_ARCHS" in
7355 all|3-way|intel|64-bit)
7356 # These configurations were first supported in 10.5
7357 cur_target='10.5'
7358 ;;
7359 esac
7360 else
7361 if test `/usr/bin/arch` = "i386"
7362 then
7363 # 10.4 was the first release to support Intel archs
7364 cur_target="10.4"
7365 fi
7366 fi
7367 fi
7368 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007369
Ned Deily87adb6e2013-10-18 21:09:56 -07007370 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7371 # environment with a value that is the same as what we'll use
7372 # in the Makefile to ensure that we'll get the same compiler
7373 # environment during configure and build time.
7374 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7375 export MACOSX_DEPLOYMENT_TARGET
7376 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7378$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007379
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 # end of Darwin* tests
7381 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007382 esac
7383 ;;
7384
7385*)
7386 case $ac_sys_system in
7387 OpenUNIX*|UnixWare*)
7388 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7389 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390 SCO_SV*)
7391 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7392 ;;
7393 esac
7394 ;;
7395esac
7396
Zachary Ware5af85642015-12-21 12:09:17 -06007397# ICC needs -fp-model strict or floats behave badly
7398case "$CC" in
7399*icc*)
7400 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7401 ;;
7402esac
7403
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404if test "$Py_DEBUG" = 'true'; then
7405 :
7406else
7407 OPT="-DNDEBUG $OPT"
7408fi
7409
7410if test "$ac_arch_flags"
7411then
7412 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7413fi
7414
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415# On some compilers, pthreads are available without further options
7416# (e.g. MacOS X). On some of these systems, the compiler will not
7417# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7418# So we have to see first whether pthreads are available without
7419# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7421$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007422if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424else
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426 ac_cv_pthread_is_default=no
7427else
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429/* end confdefs.h. */
7430
Stefan Krah7dba5942012-11-22 22:49:11 +01007431#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432#include <pthread.h>
7433
7434void* routine(void* p){return NULL;}
7435
7436int main(){
7437 pthread_t p;
7438 if(pthread_create(&p,NULL,routine,NULL)!=0)
7439 return 1;
7440 (void)pthread_detach(p);
7441 return 0;
7442}
7443
7444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007445if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446
7447 ac_cv_pthread_is_default=yes
7448 ac_cv_kthread=no
7449 ac_cv_pthread=no
7450
7451else
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456fi
7457
7458
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459fi
7460
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7462$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463
7464
7465if test $ac_cv_pthread_is_default = yes
7466then
7467 ac_cv_kpthread=no
7468else
7469# -Kpthread, if available, provides the right #defines
7470# and linker options to make pthread_create available
7471# Some compilers won't report that they do not support -Kpthread,
7472# so we need to run a program to see whether it really made the
7473# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7475$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007476if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007477 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478else
7479 ac_save_cc="$CC"
7480CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007481if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482 ac_cv_kpthread=no
7483else
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485/* end confdefs.h. */
7486
Stefan Krah7dba5942012-11-22 22:49:11 +01007487#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488#include <pthread.h>
7489
7490void* routine(void* p){return NULL;}
7491
7492int main(){
7493 pthread_t p;
7494 if(pthread_create(&p,NULL,routine,NULL)!=0)
7495 return 1;
7496 (void)pthread_detach(p);
7497 return 0;
7498}
7499
7500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007501if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502 ac_cv_kpthread=yes
7503else
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508fi
7509
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510CC="$ac_save_cc"
7511fi
7512
Matthias Kloseb9621712010-04-24 17:59:49 +00007513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7514$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515fi
7516
7517if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7518then
7519# -Kthread, if available, provides the right #defines
7520# and linker options to make pthread_create available
7521# Some compilers won't report that they do not support -Kthread,
7522# so we need to run a program to see whether it really made the
7523# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7525$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007526if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528else
7529 ac_save_cc="$CC"
7530CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007531if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532 ac_cv_kthread=no
7533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535/* end confdefs.h. */
7536
Stefan Krah7dba5942012-11-22 22:49:11 +01007537#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538#include <pthread.h>
7539
7540void* routine(void* p){return NULL;}
7541
7542int main(){
7543 pthread_t p;
7544 if(pthread_create(&p,NULL,routine,NULL)!=0)
7545 return 1;
7546 (void)pthread_detach(p);
7547 return 0;
7548}
7549
7550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007551if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552 ac_cv_kthread=yes
7553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7557 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558fi
7559
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560CC="$ac_save_cc"
7561fi
7562
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7564$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565fi
7566
7567if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7568then
7569# -pthread, if available, provides the right #defines
7570# and linker options to make pthread_create available
7571# Some compilers won't report that they do not support -pthread,
7572# so we need to run a program to see whether it really made the
7573# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7575$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007576if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578else
7579 ac_save_cc="$CC"
7580CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582 ac_cv_pthread=no
7583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585/* end confdefs.h. */
7586
Stefan Krah7dba5942012-11-22 22:49:11 +01007587#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588#include <pthread.h>
7589
7590void* routine(void* p){return NULL;}
7591
7592int main(){
7593 pthread_t p;
7594 if(pthread_create(&p,NULL,routine,NULL)!=0)
7595 return 1;
7596 (void)pthread_detach(p);
7597 return 0;
7598}
7599
7600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007601if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602 ac_cv_pthread=yes
7603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7607 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608fi
7609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610CC="$ac_save_cc"
7611fi
7612
Matthias Kloseb9621712010-04-24 17:59:49 +00007613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7614$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615fi
7616
7617# If we have set a CC compiler flag for thread support then
7618# check if it works for CXX, too.
7619ac_cv_cxx_thread=no
7620if test ! -z "$CXX"
7621then
Matthias Kloseb9621712010-04-24 17:59:49 +00007622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7623$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624ac_save_cxx="$CXX"
7625
7626if test "$ac_cv_kpthread" = "yes"
7627then
7628 CXX="$CXX -Kpthread"
7629 ac_cv_cxx_thread=yes
7630elif test "$ac_cv_kthread" = "yes"
7631then
7632 CXX="$CXX -Kthread"
7633 ac_cv_cxx_thread=yes
7634elif test "$ac_cv_pthread" = "yes"
7635then
7636 CXX="$CXX -pthread"
7637 ac_cv_cxx_thread=yes
7638fi
7639
7640if test $ac_cv_cxx_thread = yes
7641then
7642 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7643 $CXX -c conftest.$ac_ext 2>&5
7644 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7645 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7646 then
7647 ac_cv_cxx_thread=yes
7648 else
7649 ac_cv_cxx_thread=no
7650 fi
7651 rm -fr conftest*
7652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7654$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655fi
7656CXX="$ac_save_cxx"
7657
7658
7659# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7661$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007662if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666/* end confdefs.h. */
7667#include <stdlib.h>
7668#include <stdarg.h>
7669#include <string.h>
7670#include <float.h>
7671
7672int
7673main ()
7674{
7675
7676 ;
7677 return 0;
7678}
7679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007680if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681 ac_cv_header_stdc=yes
7682else
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7686
7687if test $ac_cv_header_stdc = yes; then
7688 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690/* end confdefs.h. */
7691#include <string.h>
7692
7693_ACEOF
7694if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 $EGREP "memchr" >/dev/null 2>&1; then :
7696
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697else
7698 ac_cv_header_stdc=no
7699fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007700rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701
7702fi
7703
7704if test $ac_cv_header_stdc = yes; then
7705 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707/* end confdefs.h. */
7708#include <stdlib.h>
7709
7710_ACEOF
7711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 $EGREP "free" >/dev/null 2>&1; then :
7713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714else
7715 ac_cv_header_stdc=no
7716fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007717rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718
7719fi
7720
7721if test $ac_cv_header_stdc = yes; then
7722 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724 :
7725else
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727/* end confdefs.h. */
7728#include <ctype.h>
7729#include <stdlib.h>
7730#if ((' ' & 0x0FF) == 0x020)
7731# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7732# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7733#else
7734# define ISLOWER(c) \
7735 (('a' <= (c) && (c) <= 'i') \
7736 || ('j' <= (c) && (c) <= 'r') \
7737 || ('s' <= (c) && (c) <= 'z'))
7738# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7739#endif
7740
7741#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7742int
7743main ()
7744{
7745 int i;
7746 for (i = 0; i < 256; i++)
7747 if (XOR (islower (i), ISLOWER (i))
7748 || toupper (i) != TOUPPER (i))
7749 return 2;
7750 return 0;
7751}
7752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007753if ac_fn_c_try_run "$LINENO"; then :
7754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760fi
7761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762fi
7763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7765$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766if test $ac_cv_header_stdc = yes; then
7767
Matthias Kloseb9621712010-04-24 17:59:49 +00007768$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769
7770fi
7771
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007772for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007773fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007774ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007775sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007776unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007777poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007778sys/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 +01007779sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007780sys/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 +01007781sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007782sys/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 -07007783libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007784linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007785sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007786do :
7787 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7788ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007789if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007791#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007792_ACEOF
7793
7794fi
7795
Guido van Rossum627b2d71993-12-24 10:39:16 +00007796done
7797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007798ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007799for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7802$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007803if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007805else
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007807/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007808#include <sys/types.h>
7809#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007810
Martin v. Löwis11437992002-04-12 09:54:03 +00007811int
7812main ()
7813{
7814if ((DIR *) 0)
7815return 0;
7816 ;
7817 return 0;
7818}
7819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827eval ac_res=\$$as_ac_Header
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7829$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007830if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007832#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007833_ACEOF
7834
7835ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007836fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007837
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007838done
7839# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7840if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7842$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007843if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007845else
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850/* Override any GCC internal prototype to avoid an error.
7851 Use char because int might match the return type of a GCC
7852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007853#ifdef __cplusplus
7854extern "C"
7855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007856char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007857int
7858main ()
7859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ;
7862 return 0;
7863}
7864_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865for ac_lib in '' dir; do
7866 if test -z "$ac_lib"; then
7867 ac_res="none required"
7868 else
7869 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007870 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875rm -f core conftest.err conftest.$ac_objext \
7876 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007877 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880done
Victor Stinnere0be4232011-10-25 13:06:09 +02007881if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883else
7884 ac_cv_search_opendir=no
7885fi
7886rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007887LIBS=$ac_func_search_save_LIBS
7888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7890$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007892if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007896
Michael W. Hudson54241132001-12-07 15:38:26 +00007897else
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7899$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007900if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007902else
7903 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907/* Override any GCC internal prototype to avoid an error.
7908 Use char because int might match the return type of a GCC
7909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007910#ifdef __cplusplus
7911extern "C"
7912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007913char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007914int
7915main ()
7916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 ;
7919 return 0;
7920}
7921_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922for ac_lib in '' x; do
7923 if test -z "$ac_lib"; then
7924 ac_res="none required"
7925 else
7926 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007927 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932rm -f core conftest.err conftest.$ac_objext \
7933 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007934 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937done
Victor Stinnere0be4232011-10-25 13:06:09 +02007938if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940else
7941 ac_cv_search_opendir=no
7942fi
7943rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007944LIBS=$ac_func_search_save_LIBS
7945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7947$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007949if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007951
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007952fi
7953
7954fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007955
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7957$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007958if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007960else
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007962/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007963#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007964int
7965main ()
7966{
7967return makedev(0, 0);
7968 ;
7969 return 0;
7970}
7971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007973 ac_cv_header_sys_types_h_makedev=yes
7974else
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007979
7980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7982$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007983
7984if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007985ac_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 +02007986if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007987
Matthias Kloseb9621712010-04-24 17:59:49 +00007988$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007989
7990fi
7991
7992
7993
7994 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 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 +02007996if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007997
Matthias Kloseb9621712010-04-24 17:59:49 +00007998$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007999
8000fi
8001
8002
8003 fi
8004fi
8005
Michael W. Hudson54241132001-12-07 15:38:26 +00008006
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008007# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8008# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8009SAVE_CFLAGS=$CFLAGS
8010CFLAGS="-std=c99 $CFLAGS"
8011for ac_header in bluetooth/bluetooth.h
8012do :
8013 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8014if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8015 cat >>confdefs.h <<_ACEOF
8016#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8017_ACEOF
8018
8019fi
8020
8021done
8022
8023CFLAGS=$SAVE_CFLAGS
8024
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008025# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8026for ac_header in net/if.h
8027do :
8028 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8029#ifdef STDC_HEADERS
8030# include <stdlib.h>
8031# include <stddef.h>
8032#else
8033# ifdef HAVE_STDLIB_H
8034# include <stdlib.h>
8035# endif
8036#endif
8037#ifdef HAVE_SYS_SOCKET_H
8038# include <sys/socket.h>
8039#endif
8040
8041"
Victor Stinnere0be4232011-10-25 13:06:09 +02008042if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008043 cat >>confdefs.h <<_ACEOF
8044#define HAVE_NET_IF_H 1
8045_ACEOF
8046
8047fi
8048
8049done
8050
8051
Martin v. Löwis11017b12006-01-14 18:12:57 +00008052# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008053for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008054do :
8055 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 +00008056#ifdef HAVE_ASM_TYPES_H
8057#include <asm/types.h>
8058#endif
8059#ifdef HAVE_SYS_SOCKET_H
8060#include <sys/socket.h>
8061#endif
8062
Matthias Kloseb9621712010-04-24 17:59:49 +00008063"
Victor Stinnere0be4232011-10-25 13:06:09 +02008064if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008065 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008066#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008067_ACEOF
8068
8069fi
8070
8071done
8072
8073
Charles-François Natali47413c12011-10-06 19:47:44 +02008074# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008075for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008076do :
8077 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8078ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8079#ifdef HAVE_SYS_SOCKET_H
8080#include <sys/socket.h>
8081#endif
8082
8083"
8084if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8085 cat >>confdefs.h <<_ACEOF
8086#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8087_ACEOF
8088
8089fi
8090
8091done
8092
8093
Guido van Rossum627b2d71993-12-24 10:39:16 +00008094# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008095was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8097$as_echo_n "checking for clock_t in time.h... " >&6; }
8098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008099/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008100#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008101
8102_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008103if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008105 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008106else
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
8108
Matthias Kloseb9621712010-04-24 17:59:49 +00008109$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008110
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008111
Guido van Rossum627b2d71993-12-24 10:39:16 +00008112fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008113rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8116$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008117
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8119$as_echo_n "checking for makedev... " >&6; }
8120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008122
Jesus Cea740f53a2010-04-28 11:35:30 +00008123#if defined(MAJOR_IN_MKDEV)
8124#include <sys/mkdev.h>
8125#elif defined(MAJOR_IN_SYSMACROS)
8126#include <sys/sysmacros.h>
8127#else
8128#include <sys/types.h>
8129#endif
8130
Neal Norwitz11690112002-07-30 01:08:28 +00008131int
8132main ()
8133{
Jesus Cea740f53a2010-04-28 11:35:30 +00008134
8135 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008136 ;
8137 return 0;
8138}
Matthias Kloseb159a552010-04-25 21:00:44 +00008139
Neal Norwitz11690112002-07-30 01:08:28 +00008140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008141if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008142 ac_cv_has_makedev=yes
8143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146rm -f core conftest.err conftest.$ac_objext \
8147 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8149$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008150if test "$ac_cv_has_makedev" = "yes"; then
8151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008153
8154fi
8155
Christian Heimes985ecdc2013-11-20 11:46:18 +01008156# byte swapping
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8158$as_echo_n "checking for le64toh... " >&6; }
8159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8160/* end confdefs.h. */
8161
8162#ifdef HAVE_ENDIAN_H
8163#include <endian.h>
8164#elif defined(HAVE_SYS_ENDIAN_H)
8165#include <sys/endian.h>
8166#endif
8167
8168int
8169main ()
8170{
8171
8172 le64toh(1)
8173 ;
8174 return 0;
8175}
8176
8177_ACEOF
8178if ac_fn_c_try_link "$LINENO"; then :
8179 ac_cv_has_le64toh=yes
8180else
8181 ac_cv_has_le64toh=no
8182fi
8183rm -f core conftest.err conftest.$ac_objext \
8184 conftest$ac_exeext conftest.$ac_ext
8185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8186$as_echo "$ac_cv_has_le64toh" >&6; }
8187if test "$ac_cv_has_le64toh" = "yes"; then
8188
8189$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8190
8191fi
8192
Martin v. Löwis399a6892002-10-04 10:22:02 +00008193# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8194# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8195# defined, but the compiler does not support pragma redefine_extname,
8196# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8197# structures (such as rlimit64) without declaring them. As a
8198# work-around, disable LFS on such configurations
8199
8200use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8202$as_echo_n "checking Solaris LFS bug... " >&6; }
8203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008205
8206#define _LARGEFILE_SOURCE 1
8207#define _FILE_OFFSET_BITS 64
8208#include <sys/resource.h>
8209
Martin v. Löwis399a6892002-10-04 10:22:02 +00008210int
8211main ()
8212{
8213struct rlimit foo;
8214 ;
8215 return 0;
8216}
8217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008219 sol_lfs_bug=no
8220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8225$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008226if test "$sol_lfs_bug" = "yes"; then
8227 use_lfs=no
8228fi
8229
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008230# Don't use largefile support for GNU/Hurd
8231case $ac_sys_system in GNU*)
8232 use_lfs=no
8233esac
8234
Martin v. Löwis399a6892002-10-04 10:22:02 +00008235if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008236# Two defines needed to enable largefile support on various platforms
8237# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008238case $ac_sys_system/$ac_sys_release in
8239AIX*)
8240
8241$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8242
8243 ;;
8244esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008245
Matthias Kloseb9621712010-04-24 17:59:49 +00008246$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008247
8248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008250
Martin v. Löwis399a6892002-10-04 10:22:02 +00008251fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008252
Guido van Rossum84e7b241996-08-19 21:59:00 +00008253# Add some code to confdefs.h so that the test for off_t works on SCO
8254cat >> confdefs.h <<\EOF
8255#if defined(SCO_DS)
8256#undef _OFF_T
8257#endif
8258EOF
8259
Guido van Rossumef2255b2000-03-10 22:30:29 +00008260# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008261ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008262if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008263
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008264else
Martin v. Löwis11437992002-04-12 09:54:03 +00008265
8266cat >>confdefs.h <<_ACEOF
8267#define mode_t int
8268_ACEOF
8269
8270fi
8271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008273if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008274
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008275else
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008279_ACEOF
8280
8281fi
8282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008284if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008286else
Martin v. Löwis11437992002-04-12 09:54:03 +00008287
8288cat >>confdefs.h <<_ACEOF
8289#define pid_t int
8290_ACEOF
8291
8292fi
8293
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008296#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008297_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008300if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008301
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008302else
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
8304cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008306_ACEOF
8307
8308fi
8309
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8311$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008312if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008316/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008317#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008322 ac_cv_type_uid_t=yes
8323else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324 ac_cv_type_uid_t=no
8325fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008326rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8330$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008331if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008334
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337
8338fi
8339
Mark Dickinson983bc162012-12-02 12:11:38 +00008340
Matthias Kloseb9621712010-04-24 17:59:49 +00008341ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008345
8346fi
8347
Stefan Krah1919b7e2012-03-21 18:25:23 +01008348ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8349if test "x$ac_cv_type___uint128_t" = xyes; then :
8350
8351$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8352
8353fi
8354
Jack Jansendd19cf82001-12-06 22:36:17 +00008355
Michael W. Hudson54241132001-12-07 15:38:26 +00008356# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008357# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358# The cast to long int works around a bug in the HP C Compiler
8359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8361# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8363$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008364if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008366else
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 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 +00008368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 if test "$ac_cv_type_int" = yes; then
8371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008373as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008374See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375 else
8376 ac_cv_sizeof_int=0
8377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8382$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383
8384
8385
Martin v. Löwis11437992002-04-12 09:54:03 +00008386cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008387#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008388_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008389
8390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8396$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008397if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 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 +00008401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 if test "$ac_cv_type_long" = yes; then
8404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008406as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008407See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408 else
8409 ac_cv_sizeof_long=0
8410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8415$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416
8417
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008420#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008422
8423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424# The cast to long int works around a bug in the HP C Compiler
8425# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8426# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8427# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8429$as_echo_n "checking size of long long... " >&6; }
8430if ${ac_cv_sizeof_long_long+:} false; then :
8431 $as_echo_n "(cached) " >&6
8432else
8433 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8434
8435else
8436 if test "$ac_cv_type_long_long" = yes; then
8437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8439as_fn_error 77 "cannot compute sizeof (long long)
8440See \`config.log' for more details" "$LINENO" 5; }
8441 else
8442 ac_cv_sizeof_long_long=0
8443 fi
8444fi
8445
8446fi
8447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8448$as_echo "$ac_cv_sizeof_long_long" >&6; }
8449
8450
8451
8452cat >>confdefs.h <<_ACEOF
8453#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8454_ACEOF
8455
8456
8457# The cast to long int works around a bug in the HP C Compiler
8458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8460# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8462$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 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 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 if test "$ac_cv_type_void_p" = yes; then
8470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008472as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008473See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 else
8475 ac_cv_sizeof_void_p=0
8476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8481$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482
8483
8484
Martin v. Löwis11437992002-04-12 09:54:03 +00008485cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008486#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008488
8489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8495$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 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 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 if test "$ac_cv_type_short" = yes; then
8503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008505as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008506See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_short=0
8509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8514$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008519#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008521
8522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523# The cast to long int works around a bug in the HP C Compiler
8524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8528$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 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 +00008533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if test "$ac_cv_type_float" = yes; then
8536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008538as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008539See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 else
8541 ac_cv_sizeof_float=0
8542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8547$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
8549
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008552#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008553_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008554
8555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8561$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008562if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 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 +00008566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 if test "$ac_cv_type_double" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008571as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008572See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_double=0
8575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8580$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581
8582
8583
Martin v. Löwis11437992002-04-12 09:54:03 +00008584cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008585#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008586_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008587
8588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8594$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 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 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_fpos_t" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 else
8607 ac_cv_sizeof_fpos_t=0
8608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8613$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008618#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008620
Michael W. Hudson54241132001-12-07 15:38:26 +00008621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8627$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008628if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 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 +00008632
Martin v. Löwis18e16552006-02-15 17:27:45 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 if test "$ac_cv_type_size_t" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008637as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008638See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 else
8640 ac_cv_sizeof_size_t=0
8641 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643
Martin v. Löwis18e16552006-02-15 17:27:45 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8646$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647
8648
8649
Martin v. Löwis18e16552006-02-15 17:27:45 +00008650cat >>confdefs.h <<_ACEOF
8651#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8652_ACEOF
8653
8654
Christian Heimes400adb02008-02-01 08:12:03 +00008655# The cast to long int works around a bug in the HP C Compiler
8656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8658# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8660$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 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 +00008665
Christian Heimes400adb02008-02-01 08:12:03 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 if test "$ac_cv_type_pid_t" = yes; then
8668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008670as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008671See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008672 else
8673 ac_cv_sizeof_pid_t=0
8674 fi
8675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676
Christian Heimes400adb02008-02-01 08:12:03 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8679$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008680
8681
8682
8683cat >>confdefs.h <<_ACEOF
8684#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8685_ACEOF
8686
8687
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008688# The cast to long int works around a bug in the HP C Compiler
8689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8691# This bug is HP SR number 8606223364.
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8693$as_echo_n "checking size of uintptr_t... " >&6; }
8694if ${ac_cv_sizeof_uintptr_t+:} false; then :
8695 $as_echo_n "(cached) " >&6
8696else
8697 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8698
8699else
8700 if test "$ac_cv_type_uintptr_t" = yes; then
8701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8703as_fn_error 77 "cannot compute sizeof (uintptr_t)
8704See \`config.log' for more details" "$LINENO" 5; }
8705 else
8706 ac_cv_sizeof_uintptr_t=0
8707 fi
8708fi
8709
8710fi
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8712$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8713
8714
8715
8716cat >>confdefs.h <<_ACEOF
8717#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8718_ACEOF
8719
8720
Michael W. Hudson54241132001-12-07 15:38:26 +00008721
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8723$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008724have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008726/* end confdefs.h. */
8727
8728int
8729main ()
8730{
8731long double x; x = (long double)0;
8732 ;
8733 return 0;
8734}
8735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008736if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008737
8738
Matthias Kloseb9621712010-04-24 17:59:49 +00008739$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008740
8741 have_long_double=yes
8742
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008743fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8746$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008748# The cast to long int works around a bug in the HP C Compiler
8749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8751# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8753$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008754if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756else
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 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 +00008758
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 if test "$ac_cv_type_long_double" = yes; then
8761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008763as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008764See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008765 else
8766 ac_cv_sizeof_long_double=0
8767 fi
8768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8772$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008773
8774
8775
8776cat >>confdefs.h <<_ACEOF
8777#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8778_ACEOF
8779
8780
8781fi
8782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783# The cast to long int works around a bug in the HP C Compiler
8784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8786# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8788$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008789if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008791else
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 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 +00008793
Thomas Woutersb2137042007-02-01 18:02:27 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 if test "$ac_cv_type__Bool" = yes; then
8796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008798as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008799See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 else
8801 ac_cv_sizeof__Bool=0
8802 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804
Thomas Woutersb2137042007-02-01 18:02:27 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8807$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808
8809
8810
Thomas Woutersb2137042007-02-01 18:02:27 +00008811cat >>confdefs.h <<_ACEOF
8812#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8813_ACEOF
8814
8815
Thomas Woutersb2137042007-02-01 18:02:27 +00008816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008817# The cast to long int works around a bug in the HP C Compiler
8818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8822$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008823if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825else
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827#ifdef HAVE_SYS_TYPES_H
8828#include <sys/types.h>
8829#endif
8830
Matthias Kloseb9621712010-04-24 17:59:49 +00008831"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008833else
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 if test "$ac_cv_type_off_t" = yes; then
8835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008837as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008838See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839 else
8840 ac_cv_sizeof_off_t=0
8841 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8846$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848
8849
Martin v. Löwis11437992002-04-12 09:54:03 +00008850cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008851#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008852_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008853
Michael W. Hudson54241132001-12-07 15:38:26 +00008854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8857$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008858if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008859 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008862
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8864$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008865else
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008868fi
8869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870# The cast to long int works around a bug in the HP C Compiler
8871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8875$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008876if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880#ifdef HAVE_SYS_TYPES_H
8881#include <sys/types.h>
8882#endif
8883#ifdef HAVE_TIME_H
8884#include <time.h>
8885#endif
8886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 if test "$ac_cv_type_time_t" = yes; then
8891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008893as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008894See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895 else
8896 ac_cv_sizeof_time_t=0
8897 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8902$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904
8905
Martin v. Löwis11437992002-04-12 09:54:03 +00008906cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008907#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008908_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008909
Michael W. Hudson54241132001-12-07 15:38:26 +00008910
8911
Trent Mick635f6fb2000-08-23 21:33:05 +00008912# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008913ac_save_cc="$CC"
8914if test "$ac_cv_kpthread" = "yes"
8915then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008916elif test "$ac_cv_kthread" = "yes"
8917then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008918elif test "$ac_cv_pthread" = "yes"
8919then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008920fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8923$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008924have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
8928 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008929int
8930main ()
8931{
Guido van Rossum12580492000-09-24 16:47:19 +00008932pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ;
8934 return 0;
8935}
Matthias Kloseb159a552010-04-25 21:00:44 +00008936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008938if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008939 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8943$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008944if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8947# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8948# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8950$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008951if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008953else
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008955#ifdef HAVE_PTHREAD_H
8956#include <pthread.h>
8957#endif
8958
Matthias Kloseb9621712010-04-24 17:59:49 +00008959"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008961else
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 if test "$ac_cv_type_pthread_t" = yes; then
8963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008965as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008966See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008967 else
8968 ac_cv_sizeof_pthread_t=0
8969 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008971
Trent Mick635f6fb2000-08-23 21:33:05 +00008972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8974$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976
8977
Martin v. Löwis11437992002-04-12 09:54:03 +00008978cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008979#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008980_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982
Trent Mick635f6fb2000-08-23 21:33:05 +00008983fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008984CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008985
Michael W. Hudson54241132001-12-07 15:38:26 +00008986
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008987case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008988 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008989 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8990 ;;
8991 Darwin/*)
8992 OTHER_LIBTOOL_OPT=""
8993 ;;
8994esac
8995
8996
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008998case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008999 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009000 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9001 if test "${enable_universalsdk}"; then
9002 :
9003 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009004 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009005 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009006 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009007 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009008 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009009 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009010 if test ${gcc_version} '<' 4.0
9011 then
9012 LIBTOOL_CRUFT="-lcc_dynamic"
9013 else
9014 LIBTOOL_CRUFT=""
9015 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009017 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018else
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009021
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009022 #include <unistd.h>
9023 int main(int argc, char*argv[])
9024 {
9025 if (sizeof(long) == 4) {
9026 return 0;
9027 } else {
9028 return 1;
9029 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009030 }
9031
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009033if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009034 ac_osx_32bit=yes
9035else
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9039 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040fi
9041
9042
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009044 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009045 i386)
9046 MACOSX_DEFAULT_ARCH="i386"
9047 ;;
9048 ppc)
9049 MACOSX_DEFAULT_ARCH="ppc"
9050 ;;
9051 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009052 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053 ;;
9054 esac
9055 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009056 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009057 i386)
9058 MACOSX_DEFAULT_ARCH="x86_64"
9059 ;;
9060 ppc)
9061 MACOSX_DEFAULT_ARCH="ppc64"
9062 ;;
9063 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009064 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009065 ;;
9066 esac
9067
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009068 fi
9069
9070 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009071 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009072 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009073esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9075$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009076if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009077then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009078 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009080 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009081
Matthias Kloseb9621712010-04-24 17:59:49 +00009082$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9085$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009086 if test $enable_shared = "yes"
9087 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009088 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 +00009089 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009090else
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093fi
9094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9096$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009097case $ac_sys_system/$ac_sys_release in
9098 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9103$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009104 ;;
9105 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9107$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009108 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009109esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009110
Guido van Rossum0a516c91994-09-12 10:58:40 +00009111# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009112
Michael W. Hudson54241132001-12-07 15:38:26 +00009113
9114
9115
9116
Benjamin Peterson99f03762010-04-11 22:15:28 +00009117
Thomas Wouters477c8d52006-05-27 19:21:47 +00009118
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009119# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9120# -- usually .so, .sl on HP-UX, .dll on Cygwin
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9122$as_echo_n "checking the extension of shared libraries... " >&6; }
9123if test -z "$SHLIB_SUFFIX"; then
9124 case $ac_sys_system in
9125 hp*|HP*)
9126 case `uname -m` in
9127 ia64) SHLIB_SUFFIX=.so;;
9128 *) SHLIB_SUFFIX=.sl;;
9129 esac
9130 ;;
9131 CYGWIN*) SHLIB_SUFFIX=.dll;;
9132 *) SHLIB_SUFFIX=.so;;
9133 esac
9134fi
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9136$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009137
Guido van Rossum0a516c91994-09-12 10:58:40 +00009138# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009139# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009140# (Shared libraries in this instance are shared modules to be loaded into
9141# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9143$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009144if test -z "$LDSHARED"
9145then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009146 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009147 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009148 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009149 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009150 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009151 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009152 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009154 if test "$GCC" = "yes" ; then
9155 LDSHARED='$(CC) -shared'
9156 LDCXXSHARED='$(CXX) -shared'
9157 else
9158 LDSHARED='$(CC) -G'
9159 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009160 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009161 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 if test "$GCC" = "yes" ; then
9163 LDSHARED='$(CC) -shared'
9164 LDCXXSHARED='$(CXX) -shared'
9165 else
9166 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009167 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009168 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009169 LDSHARED='$(CC) -bundle'
9170 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009171 if test "$enable_framework" ; then
9172 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009173 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9174 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009175 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009176 else
9177 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009178 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009180 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009181 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009182 LDSHARED='$(CC) -bundle'
9183 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009184 if test "$enable_framework" ; then
9185 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009186 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9187 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009189 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009190 # No framework, use the Python app as bundle-loader
9191 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009192 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009193 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009194 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009195 Darwin/*)
9196 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9197 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009198
Ned Deily36820b62014-06-25 13:44:22 -07009199 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9200 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9201 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9202 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9203 if test ${dep_target_major} -eq 10 && \
9204 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009205 then
Ned Deily36820b62014-06-25 13:44:22 -07009206 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009207 LDSHARED='$(CC) -bundle'
9208 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009209 if test "$enable_framework" ; then
9210 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009211 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9212 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009213 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009214 else
9215 # No framework, use the Python app as bundle-loader
9216 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9217 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009219 fi
Ned Deily36820b62014-06-25 13:44:22 -07009220 else
9221 # building for OS X 10.3 and later
9222 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9223 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9224 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009225 fi
9226 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 Linux*|GNU*|QNX*)
9228 LDSHARED='$(CC) -shared'
9229 LDCXXSHARED='$(CXX) -shared';;
9230 BSD/OS*/4*)
9231 LDSHARED="gcc -shared"
9232 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009233 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009234 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009235 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009236 LDSHARED='$(CC) -shared'
9237 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009238 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009239 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009240 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009241 OpenBSD*)
9242 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9243 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009244 LDSHARED='$(CC) -shared $(CCSHARED)'
9245 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009246 else
9247 case `uname -r` in
9248 [01].* | 2.[0-7] | 2.[0-7].*)
9249 LDSHARED="ld -Bshareable ${LDFLAGS}"
9250 ;;
9251 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009252 LDSHARED='$(CC) -shared $(CCSHARED)'
9253 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009254 ;;
9255 esac
9256 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009257 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009258 LDSHARED='$(CC) -shared'
9259 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009260 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009261 if test "$GCC" = "yes" ; then
9262 LDSHARED='$(CC) -shared'
9263 LDCXXSHARED='$(CXX) -shared'
9264 else
9265 LDSHARED='$(CC) -G'
9266 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009267 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009268 SCO_SV*)
9269 LDSHARED='$(CC) -Wl,-G,-Bexport'
9270 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9271 CYGWIN*)
9272 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9273 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009274 *) LDSHARED="ld";;
9275 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9278$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009279LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009280BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009281# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009282# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9284$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009285if test -z "$CCSHARED"
9286then
Guido van Rossum07397971997-04-29 21:49:50 +00009287 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009288 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009289 then CCSHARED="-fPIC";
9290 elif test `uname -p` = sparc;
9291 then CCSHARED="-xcode=pic32";
9292 else CCSHARED="-Kpic";
9293 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009294 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009295 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009296 else CCSHARED="+z";
9297 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009298 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009299 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009300 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009301 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009302 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009303 if test "$GCC" = "yes"
9304 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009305 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009306 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009307 SCO_SV*)
9308 if test "$GCC" = "yes"
9309 then CCSHARED="-fPIC"
9310 else CCSHARED="-Kpic -belf"
9311 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009312 IRIX*/6*) case $CC in
9313 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009314 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009315 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9319$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009321# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9323$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324if test -z "$LINKFORSHARED"
9325then
Guido van Rossum07397971997-04-29 21:49:50 +00009326 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009327 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009328 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009329 LINKFORSHARED="-Wl,-E -Wl,+s";;
9330# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009331 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009332 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009333 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009336 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009337
9338 # Issue #18075: the default maximum stack size (8MBytes) is too
9339 # small for the default recursion limit. Increase the stack size
9340 # to ensure that tests don't crash
9341 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9342
Jack Jansene578a632001-08-15 01:27:14 +00009343 if test "$enable_framework"
9344 then
Jack Jansenda49e192005-01-07 13:08:22 +00009345 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009346 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009347 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009348 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009349 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009350 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009351 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009352 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9353 then
9354 LINKFORSHARED="-Wl,--export-dynamic"
9355 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009356 SunOS/5*) case $CC in
9357 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009358 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009359 then
9360 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009361 fi;;
9362 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009363 CYGWIN*)
9364 if test $enable_shared = "no"
9365 then
9366 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9367 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009368 QNX*)
9369 # -Wl,-E causes the symbols to be added to the dynamic
9370 # symbol table so that they can be found when a module
9371 # is loaded. -N 2048K causes the stack size to be set
9372 # to 2048 kilobytes so that the stack doesn't overflow
9373 # when running test_compile.py.
9374 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009375 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9378$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009379
Michael W. Hudson54241132001-12-07 15:38:26 +00009380
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009381
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9383$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009384if test ! "$LIBRARY" = "$LDLIBRARY"
9385then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009386 case $ac_sys_system in
9387 CYGWIN*)
9388 # Cygwin needs CCSHARED when building extension DLLs
9389 # but not when building the interpreter DLL.
9390 CFLAGSFORSHARED='';;
9391 *)
9392 CFLAGSFORSHARED='$(CCSHARED)'
9393 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9396$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009397
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009398# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9399# library (with --enable-shared).
9400# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009401# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9402# if it is not required, since it creates a dependency of the shared library
9403# to LIBS. This, in turn, means that applications linking the shared libpython
9404# don't need to link LIBS explicitly. The default should be only changed
9405# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9408$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009409case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009410 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009411 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009412esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9414$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009415
9416
Guido van Rossum627b2d71993-12-24 10:39:16 +00009417# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9419$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009420if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009421 $as_echo_n "(cached) " >&6
9422else
9423 ac_check_lib_save_LIBS=$LIBS
9424LIBS="-lsendfile $LIBS"
9425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9426/* end confdefs.h. */
9427
9428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
9431#ifdef __cplusplus
9432extern "C"
9433#endif
9434char sendfile ();
9435int
9436main ()
9437{
9438return sendfile ();
9439 ;
9440 return 0;
9441}
9442_ACEOF
9443if ac_fn_c_try_link "$LINENO"; then :
9444 ac_cv_lib_sendfile_sendfile=yes
9445else
9446 ac_cv_lib_sendfile_sendfile=no
9447fi
9448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
9450LIBS=$ac_check_lib_save_LIBS
9451fi
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9453$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009455 cat >>confdefs.h <<_ACEOF
9456#define HAVE_LIBSENDFILE 1
9457_ACEOF
9458
9459 LIBS="-lsendfile $LIBS"
9460
9461fi
9462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9464$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009465if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009467else
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473/* Override any GCC internal prototype to avoid an error.
9474 Use char because int might match the return type of a GCC
9475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009476#ifdef __cplusplus
9477extern "C"
9478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009479char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
9482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009490else
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493rm -f core conftest.err conftest.$ac_objext \
9494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9498$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 cat >>confdefs.h <<_ACEOF
9501#define HAVE_LIBDL 1
9502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009504 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009506fi
9507 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9509$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009510if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009512else
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009514LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518/* Override any GCC internal prototype to avoid an error.
9519 Use char because int might match the return type of a GCC
9520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009521#ifdef __cplusplus
9522extern "C"
9523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009524char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009525int
9526main ()
9527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 ;
9530 return 0;
9531}
9532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535else
Matthias Kloseb9621712010-04-24 17:59:49 +00009536 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538rm -f core conftest.err conftest.$ac_objext \
9539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009540LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9543$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009544if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 cat >>confdefs.h <<_ACEOF
9546#define HAVE_LIBDLD 1
9547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009549 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551fi
9552 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009553
Georg Brandlb1441c72009-01-03 22:33:39 +00009554# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009555if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9557$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009558if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009560else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009561 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565/* Override any GCC internal prototype to avoid an error.
9566 Use char because int might match the return type of a GCC
9567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009568#ifdef __cplusplus
9569extern "C"
9570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009571char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009572int
9573main ()
9574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ;
9577 return 0;
9578}
9579_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580for ac_lib in '' pthread rt posix4; do
9581 if test -z "$ac_lib"; then
9582 ac_res="none required"
9583 else
9584 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009585 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009590rm -f core conftest.err conftest.$ac_objext \
9591 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009592 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595done
Victor Stinnere0be4232011-10-25 13:06:09 +02009596if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598else
9599 ac_cv_search_sem_init=no
9600fi
9601rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009602LIBS=$ac_func_search_save_LIBS
9603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9605$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009607if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009609
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009610fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009611 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009612 # posix4 on Solaris 2.6
9613 # pthread (first!) on Linux
9614fi
9615
Martin v. Löwis19d17342003-06-14 21:03:05 +00009616# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9618$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009619if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009621else
9622 ac_check_lib_save_LIBS=$LIBS
9623LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627/* Override any GCC internal prototype to avoid an error.
9628 Use char because int might match the return type of a GCC
9629 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630#ifdef __cplusplus
9631extern "C"
9632#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009634int
9635main ()
9636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009638 ;
9639 return 0;
9640}
9641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009643 ac_cv_lib_intl_textdomain=yes
9644else
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009647rm -f core conftest.err conftest.$ac_objext \
9648 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009649LIBS=$ac_check_lib_save_LIBS
9650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9652$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009653if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656
Brett Cannonc6d936e2009-06-07 20:09:53 +00009657 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658fi
9659
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009660
9661# checks for system dependent C++ extensions support
9662case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9664$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009666/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009667
Georg Brandl59e87bd2011-02-15 19:48:59 +00009668 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009669int
9670main ()
9671{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ;
9674 return 0;
9675}
Matthias Kloseb159a552010-04-25 21:00:44 +00009676
Martin v. Löwis11437992002-04-12 09:54:03 +00009677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009678if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009679
Matthias Kloseb159a552010-04-25 21:00:44 +00009680
Matthias Kloseb9621712010-04-24 17:59:49 +00009681$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
Matthias Kloseb159a552010-04-25 21:00:44 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009684$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009685
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009686else
Matthias Kloseb159a552010-04-25 21:00:44 +00009687
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009689$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009690
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009692rm -f core conftest.err conftest.$ac_objext \
9693 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009694 *) ;;
9695esac
9696
Christian Heimes985ecdc2013-11-20 11:46:18 +01009697# check for systems that require aligned memory access
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9699$as_echo_n "checking aligned memory access is required... " >&6; }
9700if test "$cross_compiling" = yes; then :
9701 aligned_required=yes
9702else
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9704/* end confdefs.h. */
9705
9706int main()
9707{
9708 char s[16];
9709 int i, *p1, *p2;
9710 for (i=0; i < 16; i++)
9711 s[i] = i;
9712 p1 = (int*)(s+1);
9713 p2 = (int*)(s+2);
9714 if (*p1 == *p2)
9715 return 1;
9716 return 0;
9717}
9718
9719_ACEOF
9720if ac_fn_c_try_run "$LINENO"; then :
9721 aligned_required=no
9722else
9723 aligned_required=yes
9724fi
9725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9726 conftest.$ac_objext conftest.beam conftest.$ac_ext
9727fi
9728
9729
9730if test "$aligned_required" = yes ; then
9731
9732$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9733
9734fi
9735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9736$as_echo "$aligned_required" >&6; }
9737
9738
9739# str, bytes and memoryview hash algorithm
9740
9741
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9743$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9744
9745# Check whether --with-hash_algorithm was given.
9746if test "${with_hash_algorithm+set}" = set; then :
9747 withval=$with_hash_algorithm;
9748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9749$as_echo "$withval" >&6; }
9750case "$withval" in
9751 siphash24)
9752 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9753
9754 ;;
9755 fnv)
9756 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9757
9758 ;;
9759 *)
9760 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9761 ;;
9762esac
9763
9764else
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9766$as_echo "default" >&6; }
9767fi
9768
9769
Charles-François Natalid30b0222014-05-08 23:08:51 +01009770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9771$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9772
9773# Check whether --with-address_sanitizer was given.
9774if test "${with_address_sanitizer+set}" = set; then :
9775 withval=$with_address_sanitizer;
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9777$as_echo "$withval" >&6; }
9778BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9779LDFLAGS="-fsanitize=address $LDFLAGS"
9780
9781else
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9783$as_echo "no" >&6; }
9784fi
9785
9786
Guido van Rossum70c7f481998-03-26 18:44:10 +00009787# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9789$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009790if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009792else
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009794LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798/* Override any GCC internal prototype to avoid an error.
9799 Use char because int might match the return type of a GCC
9800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009801#ifdef __cplusplus
9802extern "C"
9803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009804char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
9807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ;
9810 return 0;
9811}
9812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009815else
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009820LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9823$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009824if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009825 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009826fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009827 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9829$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009830if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009832else
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009834LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009844char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009860LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9863$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009865 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009866fi
9867 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009868
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9870$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009873if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9876$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009877LIBS="$withval $LIBS"
9878
9879else
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882fi
9883
Guido van Rossum7f43da71994-08-01 12:15:30 +00009884
Victor Stinner8291b5e2015-03-20 16:03:14 +01009885
9886
9887
9888
9889
9890
9891
9892if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9893 if test -n "$ac_tool_prefix"; then
9894 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9895set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9897$as_echo_n "checking for $ac_word... " >&6; }
9898if ${ac_cv_path_PKG_CONFIG+:} false; then :
9899 $as_echo_n "(cached) " >&6
9900else
9901 case $PKG_CONFIG in
9902 [\\/]* | ?:[\\/]*)
9903 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9904 ;;
9905 *)
9906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907for as_dir in $PATH
9908do
9909 IFS=$as_save_IFS
9910 test -z "$as_dir" && as_dir=.
9911 for ac_exec_ext in '' $ac_executable_extensions; do
9912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9913 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9915 break 2
9916 fi
9917done
9918 done
9919IFS=$as_save_IFS
9920
9921 ;;
9922esac
9923fi
9924PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9925if test -n "$PKG_CONFIG"; then
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9927$as_echo "$PKG_CONFIG" >&6; }
9928else
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930$as_echo "no" >&6; }
9931fi
9932
9933
9934fi
9935if test -z "$ac_cv_path_PKG_CONFIG"; then
9936 ac_pt_PKG_CONFIG=$PKG_CONFIG
9937 # Extract the first word of "pkg-config", so it can be a program name with args.
9938set dummy pkg-config; ac_word=$2
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9940$as_echo_n "checking for $ac_word... " >&6; }
9941if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9942 $as_echo_n "(cached) " >&6
9943else
9944 case $ac_pt_PKG_CONFIG in
9945 [\\/]* | ?:[\\/]*)
9946 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9947 ;;
9948 *)
9949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9950for as_dir in $PATH
9951do
9952 IFS=$as_save_IFS
9953 test -z "$as_dir" && as_dir=.
9954 for ac_exec_ext in '' $ac_executable_extensions; do
9955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9956 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9958 break 2
9959 fi
9960done
9961 done
9962IFS=$as_save_IFS
9963
9964 ;;
9965esac
9966fi
9967ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9968if test -n "$ac_pt_PKG_CONFIG"; then
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9970$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9971else
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9973$as_echo "no" >&6; }
9974fi
9975
9976 if test "x$ac_pt_PKG_CONFIG" = x; then
9977 PKG_CONFIG=""
9978 else
9979 case $cross_compiling:$ac_tool_warned in
9980yes:)
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9983ac_tool_warned=yes ;;
9984esac
9985 PKG_CONFIG=$ac_pt_PKG_CONFIG
9986 fi
9987else
9988 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9989fi
9990
9991fi
9992if test -n "$PKG_CONFIG"; then
9993 _pkg_min_version=0.9.0
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9995$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9996 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9998$as_echo "yes" >&6; }
9999 else
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10001$as_echo "no" >&6; }
10002 PKG_CONFIG=""
10003 fi
10004fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010005
10006# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10008$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010009
10010# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010011if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010012 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010013else
10014 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010015fi
10016
10017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10019$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010020
10021# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10023$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010024
10025# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010026if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010027 withval=$with_system_ffi;
10028fi
10029
10030
Zachary Ware935043d2016-09-09 17:01:21 -070010031case "$with_system_ffi" in
10032 "")
10033 case $ac_sys_system in
10034 Darwin)
10035 with_system_ffi="no"
10036 ;;
10037 *)
10038 with_system_ffi="yes"
10039 ;;
10040 esac
10041 ;;
10042 yes|no)
10043 ;;
10044 *)
10045 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10046 ;;
10047esac
10048
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010049if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010050 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10051else
10052 LIBFFI_INCLUDEDIR=""
10053fi
10054
10055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10057$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010058
Stefan Krah60187b52012-03-23 19:06:27 +010010059# Check for use of the system libmpdec library
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10061$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10062
10063# Check whether --with-system_libmpdec was given.
10064if test "${with_system_libmpdec+set}" = set; then :
10065 withval=$with_system_libmpdec;
10066else
10067 with_system_libmpdec="no"
10068fi
10069
10070
10071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10072$as_echo "$with_system_libmpdec" >&6; }
10073
Benjamin Peterson076ed002010-10-31 17:11:02 +000010074# Check for support for loadable sqlite extensions
10075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10076$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10077# Check whether --enable-loadable-sqlite-extensions was given.
10078if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10079 enableval=$enable_loadable_sqlite_extensions;
10080else
10081 enable_loadable_sqlite_extensions="no"
10082fi
10083
10084
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10086$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10087
Ned Deilyd819b932013-09-06 01:07:05 -070010088# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10089
10090
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10092$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10093
10094# Check whether --with-tcltk-includes was given.
10095if test "${with_tcltk_includes+set}" = set; then :
10096 withval=$with_tcltk_includes;
10097else
10098 with_tcltk_includes="default"
10099fi
10100
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10102$as_echo "$with_tcltk_includes" >&6; }
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10104$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10105
10106# Check whether --with-tcltk-libs was given.
10107if test "${with_tcltk_libs+set}" = set; then :
10108 withval=$with_tcltk_libs;
10109else
10110 with_tcltk_libs="default"
10111fi
10112
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10114$as_echo "$with_tcltk_libs" >&6; }
10115if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10116then
10117 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10118 then
10119 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10120 fi
10121 TCLTK_INCLUDES=""
10122 TCLTK_LIBS=""
10123else
10124 TCLTK_INCLUDES="$with_tcltk_includes"
10125 TCLTK_LIBS="$with_tcltk_libs"
10126fi
10127
Matthias Klose55708cc2009-04-30 08:06:49 +000010128# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10130$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010131
10132# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010133if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010134 withval=$with_dbmliborder;
10135if test x$with_dbmliborder = xyes
10136then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010137as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010138else
10139 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10140 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10141 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010142 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010143 fi
10144 done
10145fi
10146fi
10147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10149$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010150
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010151# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010152
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010153USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
10157# Templates for things AC_DEFINEd more than once.
10158# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010159
10160
Martin v. Löwis11437992002-04-12 09:54:03 +000010161
Matthias Kloseb9621712010-04-24 17:59:49 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10163$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010166if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167 withval=$with_threads;
10168fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010169
10170
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010171# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010174if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175 withval=$with_thread; with_threads=$with_thread
10176fi
10177
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010178
10179if test -z "$with_threads"
10180then with_threads="yes"
10181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10183$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010184
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010185
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010186if test "$with_threads" = "no"
10187then
10188 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010189elif test "$ac_cv_pthread_is_default" = yes
10190then
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010192
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010193 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010195
10196 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010198elif test "$ac_cv_kpthread" = "yes"
10199then
10200 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010201 if test "$ac_cv_cxx_thread" = "yes"; then
10202 CXX="$CXX -Kpthread"
10203 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010206 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010207 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010208elif test "$ac_cv_kthread" = "yes"
10209then
10210 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010211 if test "$ac_cv_cxx_thread" = "yes"; then
10212 CXX="$CXX -Kthread"
10213 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010215
10216 posix_threads=yes
10217 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010218elif test "$ac_cv_pthread" = "yes"
10219then
10220 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010221 if test "$ac_cv_cxx_thread" = "yes"; then
10222 CXX="$CXX -pthread"
10223 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010225
10226 posix_threads=yes
10227 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010228else
10229 if test ! -z "$with_threads" -a -d "$with_threads"
10230 then LDFLAGS="$LDFLAGS -L$with_threads"
10231 fi
10232 if test ! -z "$withval" -a -d "$withval"
10233 then LDFLAGS="$LDFLAGS -L$withval"
10234 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235
10236 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010237 # define _POSIX_THREADS in unistd.h. Some apparently don't
10238 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10240$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010242/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010243
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010244#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010245#ifdef _POSIX_THREADS
10246yes
10247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
10249_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010252 unistd_defines_pthreads=yes
10253else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010254 unistd_defines_pthreads=no
10255fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010256rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10259$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010260
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010262
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010263 # Just looking for pthread_create in libpthread is not enough:
10264 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10265 # So we really have to include pthread.h, and then link.
10266 _libs=$LIBS
10267 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10269$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010271/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010272
10273#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010274#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010275
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010276void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010277int
10278main ()
10279{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010280
10281pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ;
10283 return 0;
10284}
10285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010287
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10289$as_echo "yes" >&6; }
10290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010291
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010292 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010293 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010294else
Martin v. Löwis11437992002-04-12 09:54:03 +000010295
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010296 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010298if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010300
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010301 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010302 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010303else
Guido van Rossumad678af1998-10-02 14:42:15 +000010304
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10306$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010307if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010309else
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010311LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315/* Override any GCC internal prototype to avoid an error.
10316 Use char because int might match the return type of a GCC
10317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318#ifdef __cplusplus
10319extern "C"
10320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010321char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010325return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010332else
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335rm -f core conftest.err conftest.$ac_objext \
10336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010337LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10340$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010341if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010343
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010344 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010345 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010346 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010347else
Greg Steinadf63d62000-07-05 10:38:09 +000010348
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10350$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010351if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010353else
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010355LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359/* Override any GCC internal prototype to avoid an error.
10360 Use char because int might match the return type of a GCC
10361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010362#ifdef __cplusplus
10363extern "C"
10364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010365char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010366int
10367main ()
10368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ;
10371 return 0;
10372}
10373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010376else
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379rm -f core conftest.err conftest.$ac_objext \
10380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010381LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10384$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010385if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010387
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010388 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010389 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010390 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010391else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010392
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10394$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010395if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010397else
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010399LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010403/* Override any GCC internal prototype to avoid an error.
10404 Use char because int might match the return type of a GCC
10405 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010406#ifdef __cplusplus
10407extern "C"
10408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010409char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010410int
10411main ()
10412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010413return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010414 ;
10415 return 0;
10416}
10417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010418if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010420else
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010423rm -f core conftest.err conftest.$ac_objext \
10424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010425LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10428$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010429if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010431
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010432 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010433 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010434 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010435else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010436
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10438$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010439if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010441else
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010443LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447/* Override any GCC internal prototype to avoid an error.
10448 Use char because int might match the return type of a GCC
10449 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010450#ifdef __cplusplus
10451extern "C"
10452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010453char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010454int
10455main ()
10456{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ;
10459 return 0;
10460}
10461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010462if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010464else
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010467rm -f core conftest.err conftest.$ac_objext \
10468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010469LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10472$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010473if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010475
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010476 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010477 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010478 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010479else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010480
Martin v. Löwis130fb172001-07-19 11:00:41 +000010481 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010482fi
10483
Guido van Rossum627b2d71993-12-24 10:39:16 +000010484
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010485fi
10486
Guido van Rossum0be3e491997-05-22 20:33:33 +000010487fi
10488
Guido van Rossum49545951997-12-02 19:28:29 +000010489fi
10490
Guido van Rossumb93a8621998-05-07 13:27:32 +000010491fi
10492
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010494rm -f core conftest.err conftest.$ac_objext \
10495 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010496
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10498$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010499if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010501else
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010503LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507/* Override any GCC internal prototype to avoid an error.
10508 Use char because int might match the return type of a GCC
10509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010510#ifdef __cplusplus
10511extern "C"
10512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010513char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010514int
10515main ()
10516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010518 ;
10519 return 0;
10520}
10521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010524else
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010527rm -f core conftest.err conftest.$ac_objext \
10528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010529LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10532$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010533if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535
Martin v. Löwis130fb172001-07-19 11:00:41 +000010536 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010537 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010538 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539fi
10540
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010541
Neal Norwitza978ab02002-11-02 16:58:05 +000010542 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10544$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010545if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010547else
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010549LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553/* Override any GCC internal prototype to avoid an error.
10554 Use char because int might match the return type of a GCC
10555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010556#ifdef __cplusplus
10557extern "C"
10558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010559char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010560int
10561main ()
10562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010564 ;
10565 return 0;
10566}
10567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570else
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010573rm -f core conftest.err conftest.$ac_objext \
10574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10578$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010579if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010581
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010582 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010583 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010584 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010585fi
10586
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010587 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010588fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010589
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010590if test "$posix_threads" = "yes"; then
10591 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594
10595 fi
10596
10597 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10598 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010599 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010600$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010601
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602 ;;
10603 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010604$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010605
10606 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010607 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010609
10610 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611 esac
10612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10614$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010615 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010617else
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010619 ac_cv_pthread_system_supported=no
10620else
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010622/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010623
10624 #include <stdio.h>
10625 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626 void *foo(void *parm) {
10627 return NULL;
10628 }
10629 main() {
10630 pthread_attr_t attr;
10631 pthread_t id;
10632 if (pthread_attr_init(&attr)) exit(-1);
10633 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10634 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10635 exit(0);
10636 }
10637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010638if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639 ac_cv_pthread_system_supported=yes
10640else
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647
Guido van Rossum627b2d71993-12-24 10:39:16 +000010648fi
10649
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10651$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652 if test "$ac_cv_pthread_system_supported" = "yes"; then
10653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010655
10656 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 for ac_func in pthread_sigmask
10658do :
10659 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010660if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010661 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010662#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010663_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010664 case $ac_sys_system in
10665 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010668
10669 ;;
10670 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010671fi
10672done
10673
Christian Heimesf77b4b22013-08-21 13:26:05 +020010674 for ac_func in pthread_atfork
10675do :
10676 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10677if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10678 cat >>confdefs.h <<_ACEOF
10679#define HAVE_PTHREAD_ATFORK 1
10680_ACEOF
10681
10682fi
10683done
10684
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685fi
10686
10687
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10691$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010693if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010698 ipv6=no
10699 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10701$as_echo "yes" >&6; }
10702 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703
10704 ipv6=yes
10705 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707else
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010710/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711 /* AF_INET6 available check */
10712#include <sys/types.h>
10713#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010714int
10715main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010717int domain = AF_INET6;
10718 ;
10719 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720}
Martin v. Löwis11437992002-04-12 09:54:03 +000010721_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010722if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10725$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728else
Matthias Kloseb159a552010-04-25 21:00:44 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10731$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010737if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10739$as_echo_n "checking if RFC2553 API is available... " >&6; }
10740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010741/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010742
10743 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010745int
10746main ()
10747{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010748struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010749 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 ;
10751 return 0;
10752}
Matthias Kloseb159a552010-04-25 21:00:44 +000010753
Martin v. Löwis11437992002-04-12 09:54:03 +000010754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010755if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010758$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010759 ipv6=yes
10760
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010761else
Matthias Kloseb159a552010-04-25 21:00:44 +000010762
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010764$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010765 ipv6=no
10766
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010769fi
10770
10771if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010773
10774fi
10775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776fi
10777
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778
10779ipv6type=unknown
10780ipv6lib=none
10781ipv6trylibc=no
10782
10783if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10785$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010786 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10787 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 case $i in
10789 inria)
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 IPV6_INRIA_VERSION
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öwis44ddbde2001-12-02 10:15:37 +000010800 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010802rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803
10804 ;;
10805 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809#include <netinet/in.h>
10810#ifdef __KAME__
10811yes
10812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010813_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816 ipv6type=$i;
10817 ipv6lib=inet6
10818 ipv6libdir=/usr/local/v6/lib
10819 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010821rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822
10823 ;;
10824 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010826/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828#include <features.h>
10829#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10830yes
10831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010832_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835 ipv6type=$i;
10836 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010838rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839
10840 ;;
10841 linux-inet6)
10842 if test -d /usr/inet6; then
10843 ipv6type=$i
10844 ipv6lib=inet6
10845 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010846 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847 fi
10848 ;;
10849 solaris)
10850 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010851 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852 ipv6type=$i
10853 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854 fi
10855 fi
10856 ;;
10857 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010859/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861#include <sys/param.h>
10862#ifdef _TOSHIBA_INET6
10863yes
10864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868 ipv6type=$i;
10869 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010870 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010872rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873
10874 ;;
10875 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010877/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879#include </usr/local/v6/include/sys/v6config.h>
10880#ifdef __V6D__
10881yes
10882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010883_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886 ipv6type=$i;
10887 ipv6lib=v6;
10888 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010889 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892
10893 ;;
10894 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898#include <sys/param.h>
10899#ifdef _ZETA_MINAMI_INET6
10900yes
10901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 ipv6type=$i;
10906 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010907 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010909rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910
10911 ;;
10912 esac
10913 if test "$ipv6type" != "unknown"; then
10914 break
10915 fi
10916 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10918$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919fi
10920
10921if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10922 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10923 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10924 echo "using lib$ipv6lib"
10925 else
10926 if test $ipv6trylibc = "yes"; then
10927 echo "using libc"
10928 else
10929 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10930 echo "You need to fetch lib$ipv6lib.a from appropriate"
10931 echo 'ipv6 kit and compile beforehand.'
10932 exit 1
10933 fi
10934 fi
10935fi
10936
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10938$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10940/* end confdefs.h. */
10941 /* CAN_RAW_FD_FRAMES available check */
10942#include <linux/can/raw.h>
10943int
10944main ()
10945{
10946int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10947 ;
10948 return 0;
10949}
10950_ACEOF
10951if ac_fn_c_try_compile "$LINENO"; then :
10952
10953
10954$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10955
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10957$as_echo "yes" >&6; }
10958
10959else
10960
10961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10962$as_echo "no" >&6; }
10963
10964fi
10965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10966
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010967# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10969$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010971# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010972if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010973 withval=$with_doc_strings;
10974fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010975
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010976
10977if test -z "$with_doc_strings"
10978then with_doc_strings="yes"
10979fi
10980if test "$with_doc_strings" != "no"
10981then
10982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010984
10985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10987$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010988
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010989# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10991$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995 withval=$with_pymalloc;
10996fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010997
Neil Schemenauera35c6882001-02-27 04:45:05 +000010998
Neil Schemenauer16c22972002-03-22 15:34:49 +000010999if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011000then
11001 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011002fi
11003if test "$with_pymalloc" != "no"
11004then
Martin v. Löwis11437992002-04-12 09:54:03 +000011005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011007
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011008 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11011$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011012
Benjamin Peterson05159c42009-12-03 03:01:27 +000011013# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11015$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011016
11017# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011018if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011019 withval=$with_valgrind;
11020else
11021 with_valgrind=no
11022fi
11023
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11025$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011026if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 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 +020011028if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011031
11032else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011033 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011034
11035fi
11036
11037
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011038 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011039fi
11040
Łukasz Langaa785c872016-09-09 17:37:37 -070011041# Check for DTrace support
11042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11043$as_echo_n "checking for --with-dtrace... " >&6; }
11044
11045# Check whether --with-dtrace was given.
11046if test "${with_dtrace+set}" = set; then :
11047 withval=$with_dtrace;
11048else
11049 with_dtrace=no
11050fi
11051
11052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11053$as_echo "$with_dtrace" >&6; }
11054
11055
11056
11057
11058
11059DTRACE=
11060DFLAGS=
11061DTRACE_HEADERS=
11062DTRACE_OBJS=
11063
11064if test "$with_dtrace" = "yes"
11065then
11066 # Extract the first word of "dtrace", so it can be a program name with args.
11067set dummy dtrace; ac_word=$2
11068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11069$as_echo_n "checking for $ac_word... " >&6; }
11070if ${ac_cv_path_DTRACE+:} false; then :
11071 $as_echo_n "(cached) " >&6
11072else
11073 case $DTRACE in
11074 [\\/]* | ?:[\\/]*)
11075 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11076 ;;
11077 *)
11078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11079for as_dir in $PATH
11080do
11081 IFS=$as_save_IFS
11082 test -z "$as_dir" && as_dir=.
11083 for ac_exec_ext in '' $ac_executable_extensions; do
11084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11085 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11087 break 2
11088 fi
11089done
11090 done
11091IFS=$as_save_IFS
11092
11093 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11094 ;;
11095esac
11096fi
11097DTRACE=$ac_cv_path_DTRACE
11098if test -n "$DTRACE"; then
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11100$as_echo "$DTRACE" >&6; }
11101else
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11103$as_echo "no" >&6; }
11104fi
11105
11106
11107 if test "$DTRACE" = "not found"; then
11108 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11109 fi
11110
11111$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11112
11113 DTRACE_HEADERS="Include/pydtrace_probes.h"
11114
11115 # On OS X, DTrace providers do not need to be explicitly compiled and
11116 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11117 # generation flag '-G'. We check for presence of this flag, rather than
11118 # hardcoding support by OS, in the interest of robustness.
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11120$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11121if ${ac_cv_dtrace_link+:} false; then :
11122 $as_echo_n "(cached) " >&6
11123else
11124 ac_cv_dtrace_link=no
11125 echo 'BEGIN' > conftest.d
11126 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11127 ac_cv_dtrace_link=yes
11128
11129fi
11130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11131$as_echo "$ac_cv_dtrace_link" >&6; }
11132 if test "$ac_cv_dtrace_link" = "yes"; then
11133 DTRACE_OBJS="Python/pydtrace.o"
11134 fi
11135fi
11136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011137# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011138
Guido van Rossum98935bf2001-09-05 19:13:16 +000011139DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011140
Guido van Rossume97ee181999-12-20 21:27:22 +000011141# the dlopen() function means we might want to use dynload_shlib.o. some
11142# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011143for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011144do :
11145 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011146if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011148#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011149_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011150
Guido van Rossume97ee181999-12-20 21:27:22 +000011151fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011152done
Guido van Rossume97ee181999-12-20 21:27:22 +000011153
Michael W. Hudson54241132001-12-07 15:38:26 +000011154
Guido van Rossume97ee181999-12-20 21:27:22 +000011155# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11156# loading of modules.
11157
Matthias Kloseb9621712010-04-24 17:59:49 +000011158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11159$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011160if test -z "$DYNLOADFILE"
11161then
11162 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011163 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11164 if test "$ac_cv_func_dlopen" = yes
11165 then DYNLOADFILE="dynload_shlib.o"
11166 else DYNLOADFILE="dynload_aix.o"
11167 fi
11168 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011169 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011170 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11171 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011172 *)
11173 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11174 # out any dynamic loading
11175 if test "$ac_cv_func_dlopen" = yes
11176 then DYNLOADFILE="dynload_shlib.o"
11177 else DYNLOADFILE="dynload_stub.o"
11178 fi
11179 ;;
11180 esac
11181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11183$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011184if test "$DYNLOADFILE" != "dynload_stub.o"
11185then
Martin v. Löwis11437992002-04-12 09:54:03 +000011186
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011188
11189fi
11190
Neil Schemenauer4e425612001-06-19 15:44:15 +000011191# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11192
Michael W. Hudson54241132001-12-07 15:38:26 +000011193
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11195$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011196if test -z "$MACHDEP_OBJS"
11197then
Jack Jansene578a632001-08-15 01:27:14 +000011198 MACHDEP_OBJS=$extra_machdep_objs
11199else
11200 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011201fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011202if test -z "$MACHDEP_OBJS"; then
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11204$as_echo "none" >&6; }
11205else
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11207$as_echo "$MACHDEP_OBJS" >&6; }
11208fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011209
Guido van Rossum627b2d71993-12-24 10:39:16 +000011210# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011211for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011212 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011213 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011214 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011215 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011216 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011217 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011218 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011219 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011220 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011221 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011222 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011223 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011224 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011225 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11226 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011227 sigaction sigaltstack siginterrupt sigpending sigrelse \
11228 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011229 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011230 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011231 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011232do :
11233 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11234ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011235if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011238_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011239
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011240fi
11241done
11242
Michael W. Hudson54241132001-12-07 15:38:26 +000011243
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011244ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11245 #include <dirent.h>
11246"
11247if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11248
11249$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11250
11251fi
11252
11253
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011254# For some functions, having a definition is not sufficient, since
11255# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11257$as_echo_n "checking for chroot... " >&6; }
11258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011259/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011260#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011261int
11262main ()
11263{
11264void *x=chroot
11265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011272
Matthias Kloseb159a552010-04-25 21:00:44 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011275else
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011278
11279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11282$as_echo_n "checking for link... " >&6; }
11283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011284/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011285#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011286int
11287main ()
11288{
11289void *x=link
11290 ;
11291 return 0;
11292}
11293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011294if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011297
Matthias Kloseb159a552010-04-25 21:00:44 +000011298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011300else
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11302$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011303
11304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11307$as_echo_n "checking for symlink... " >&6; }
11308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011309/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011311int
11312main ()
11313{
11314void *x=symlink
11315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011322
Matthias Kloseb159a552010-04-25 21:00:44 +000011323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011325else
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011328
11329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11332$as_echo_n "checking for fchdir... " >&6; }
11333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011334/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011335#include <unistd.h>
11336int
11337main ()
11338{
11339void *x=fchdir
11340 ;
11341 return 0;
11342}
11343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011347
Matthias Kloseb159a552010-04-25 21:00:44 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011350else
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11352$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011353
11354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11357$as_echo_n "checking for fsync... " >&6; }
11358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011359/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011360#include <unistd.h>
11361int
11362main ()
11363{
11364void *x=fsync
11365 ;
11366 return 0;
11367}
11368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011372
Matthias Kloseb159a552010-04-25 21:00:44 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011375else
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11377$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011378
11379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11382$as_echo_n "checking for fdatasync... " >&6; }
11383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011385#include <unistd.h>
11386int
11387main ()
11388{
11389void *x=fdatasync
11390 ;
11391 return 0;
11392}
11393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011395
Matthias Kloseb9621712010-04-24 17:59:49 +000011396$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011397
Matthias Kloseb159a552010-04-25 21:00:44 +000011398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011400else
Matthias Kloseb9621712010-04-24 17:59:49 +000011401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011403
11404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11407$as_echo_n "checking for epoll... " >&6; }
11408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011409/* end confdefs.h. */
11410#include <sys/epoll.h>
11411int
11412main ()
11413{
11414void *x=epoll_create
11415 ;
11416 return 0;
11417}
11418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011422
Matthias Kloseb159a552010-04-25 21:00:44 +000011423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011424$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011425else
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011428
11429fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11432$as_echo_n "checking for epoll_create1... " >&6; }
11433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11434/* end confdefs.h. */
11435#include <sys/epoll.h>
11436int
11437main ()
11438{
11439void *x=epoll_create1
11440 ;
11441 return 0;
11442}
11443_ACEOF
11444if ac_fn_c_try_compile "$LINENO"; then :
11445
11446$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11447
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11449$as_echo "yes" >&6; }
11450else
11451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11452$as_echo "no" >&6; }
11453
11454fi
11455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11457$as_echo_n "checking for kqueue... " >&6; }
11458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011459/* end confdefs.h. */
11460
11461#include <sys/types.h>
11462#include <sys/event.h>
11463
11464int
11465main ()
11466{
11467int x=kqueue()
11468 ;
11469 return 0;
11470}
11471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011472if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011475
Matthias Kloseb159a552010-04-25 21:00:44 +000011476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011477$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011478else
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11480$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011481
11482fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11485$as_echo_n "checking for prlimit... " >&6; }
11486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487/* end confdefs.h. */
11488
11489#include <sys/time.h>
11490#include <sys/resource.h>
11491
11492int
11493main ()
11494{
11495void *x=prlimit
11496 ;
11497 return 0;
11498}
11499_ACEOF
11500if ac_fn_c_try_compile "$LINENO"; then :
11501
11502$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11503
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11505$as_echo "yes" >&6; }
11506else
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11508$as_echo "no" >&6; }
11509
11510fi
11511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11512
Martin v. Löwisd5843682002-11-21 20:41:28 +000011513# On some systems (eg. FreeBSD 5), we would find a definition of the
11514# functions ctermid_r, setgroups in the library, but no prototype
11515# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11516# address to avoid compiler warnings and potential miscompilations
11517# because of the missing prototypes.
11518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11520$as_echo_n "checking for ctermid_r... " >&6; }
11521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011522/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011523
Martin v. Löwisd5843682002-11-21 20:41:28 +000011524#include <stdio.h>
11525
Martin v. Löwisd5843682002-11-21 20:41:28 +000011526int
11527main ()
11528{
11529void* p = ctermid_r
11530 ;
11531 return 0;
11532}
11533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011535
Matthias Kloseb9621712010-04-24 17:59:49 +000011536$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011537
Matthias Kloseb159a552010-04-25 21:00:44 +000011538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011539$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011540else
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11542$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011543
11544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11546
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11548$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011549if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011550 $as_echo_n "(cached) " >&6
11551else
11552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011553/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011554#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011555int
11556main ()
11557{
11558void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011559
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011560 ;
11561 return 0;
11562}
11563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011564if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011565 ac_cv_flock_decl=yes
11566else
11567 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011568
11569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011571
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011572fi
11573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11574$as_echo "$ac_cv_flock_decl" >&6; }
11575if test "x${ac_cv_flock_decl}" = xyes; then
11576 for ac_func in flock
11577do :
11578 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011579if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011580 cat >>confdefs.h <<_ACEOF
11581#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011582_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011583
Antoine Pitroua3000072010-09-07 14:52:42 +000011584else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011586$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011587if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011588 $as_echo_n "(cached) " >&6
11589else
11590 ac_check_lib_save_LIBS=$LIBS
11591LIBS="-lbsd $LIBS"
11592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593/* end confdefs.h. */
11594
11595/* Override any GCC internal prototype to avoid an error.
11596 Use char because int might match the return type of a GCC
11597 builtin and then its argument prototype would still apply. */
11598#ifdef __cplusplus
11599extern "C"
11600#endif
11601char flock ();
11602int
11603main ()
11604{
11605return flock ();
11606 ;
11607 return 0;
11608}
11609_ACEOF
11610if ac_fn_c_try_link "$LINENO"; then :
11611 ac_cv_lib_bsd_flock=yes
11612else
11613 ac_cv_lib_bsd_flock=no
11614fi
11615rm -f core conftest.err conftest.$ac_objext \
11616 conftest$ac_exeext conftest.$ac_ext
11617LIBS=$ac_check_lib_save_LIBS
11618fi
11619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11620$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011621if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011622 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011623
11624
11625$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11626
11627
11628fi
11629
11630
11631fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011632done
11633
Antoine Pitroua3000072010-09-07 14:52:42 +000011634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11637$as_echo_n "checking for getpagesize... " >&6; }
11638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011640
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011641#include <unistd.h>
11642
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011643int
11644main ()
11645{
11646void* p = getpagesize
11647 ;
11648 return 0;
11649}
11650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011652
Matthias Kloseb9621712010-04-24 17:59:49 +000011653$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011654
Matthias Kloseb159a552010-04-25 21:00:44 +000011655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011656$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011660
11661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011663
Victor Stinner984890f2011-11-24 13:53:38 +010011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11665$as_echo_n "checking for broken unsetenv... " >&6; }
11666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11667/* end confdefs.h. */
11668
11669#include <stdlib.h>
11670
11671int
11672main ()
11673{
11674int res = unsetenv("DUMMY")
11675 ;
11676 return 0;
11677}
11678_ACEOF
11679if ac_fn_c_try_compile "$LINENO"; then :
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11681$as_echo "no" >&6; }
11682else
11683
11684$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11685
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11687$as_echo "yes" >&6; }
11688
11689fi
11690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011692for ac_prog in true
11693do
11694 # Extract the first word of "$ac_prog", so it can be a program name with args.
11695set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011698if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011700else
11701 if test -n "$TRUE"; then
11702 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11703else
11704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11705for as_dir in $PATH
11706do
11707 IFS=$as_save_IFS
11708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011711 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 $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 +000011713 break 2
11714 fi
11715done
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011717IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011718
11719fi
11720fi
11721TRUE=$ac_cv_prog_TRUE
11722if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11724$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011728fi
11729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011730
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011731 test -n "$TRUE" && break
11732done
11733test -n "$TRUE" || TRUE="/bin/true"
11734
11735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11737$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011738if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011740else
11741 ac_check_lib_save_LIBS=$LIBS
11742LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011744/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011746/* Override any GCC internal prototype to avoid an error.
11747 Use char because int might match the return type of a GCC
11748 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011749#ifdef __cplusplus
11750extern "C"
11751#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011752char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011753int
11754main ()
11755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011756return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011757 ;
11758 return 0;
11759}
11760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011761if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011762 ac_cv_lib_c_inet_aton=yes
11763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011766rm -f core conftest.err conftest.$ac_objext \
11767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011768LIBS=$ac_check_lib_save_LIBS
11769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11771$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011772if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011773 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011774else
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11776$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011777if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011779else
11780 ac_check_lib_save_LIBS=$LIBS
11781LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011783/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011785/* Override any GCC internal prototype to avoid an error.
11786 Use char because int might match the return type of a GCC
11787 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788#ifdef __cplusplus
11789extern "C"
11790#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011791char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792int
11793main ()
11794{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011795return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796 ;
11797 return 0;
11798}
11799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801 ac_cv_lib_resolv_inet_aton=yes
11802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011805rm -f core conftest.err conftest.$ac_objext \
11806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011807LIBS=$ac_check_lib_save_LIBS
11808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11810$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011811if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011812 cat >>confdefs.h <<_ACEOF
11813#define HAVE_LIBRESOLV 1
11814_ACEOF
11815
11816 LIBS="-lresolv $LIBS"
11817
11818fi
11819
11820
11821fi
11822
11823
Christian Heimesd0764e22007-12-04 15:00:33 +000011824# On Tru64, chflags seems to be present, but calling it will
11825# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11827$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011828if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011830else
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011832 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011835/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011836
Christian Heimesd0764e22007-12-04 15:00:33 +000011837#include <sys/stat.h>
11838#include <unistd.h>
11839int main(int argc, char*argv[])
11840{
11841 if(chflags(argv[0], 0) != 0)
11842 return 1;
11843 return 0;
11844}
Ned Deily3eb67d52011-06-28 00:00:28 -070011845
Christian Heimesd0764e22007-12-04 15:00:33 +000011846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011848 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011854fi
11855
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011856
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11859$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011860if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011862if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011863 ac_cv_have_chflags="yes"
11864else
11865 ac_cv_have_chflags="no"
11866fi
11867
11868fi
11869if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011870
Matthias Kloseb9621712010-04-24 17:59:49 +000011871$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011872
11873fi
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11876$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011877if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011881 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011884/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011885
Christian Heimesd0764e22007-12-04 15:00:33 +000011886#include <sys/stat.h>
11887#include <unistd.h>
11888int main(int argc, char*argv[])
11889{
11890 if(lchflags(argv[0], 0) != 0)
11891 return 1;
11892 return 0;
11893}
Ned Deily3eb67d52011-06-28 00:00:28 -070011894
Christian Heimesd0764e22007-12-04 15:00:33 +000011895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011897 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011903fi
11904
11905
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11908$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011909if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011911if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011912 ac_cv_have_lchflags="yes"
11913else
11914 ac_cv_have_lchflags="no"
11915fi
11916
11917fi
11918if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011921
11922fi
11923
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011924case $ac_sys_system/$ac_sys_release in
11925Darwin/*)
11926 _CUR_CFLAGS="${CFLAGS}"
11927 _CUR_LDFLAGS="${LDFLAGS}"
11928 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11929 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11930 ;;
11931esac
11932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11934$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011937else
11938 ac_check_lib_save_LIBS=$LIBS
11939LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011941/* end confdefs.h. */
11942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011943/* Override any GCC internal prototype to avoid an error.
11944 Use char because int might match the return type of a GCC
11945 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011946#ifdef __cplusplus
11947extern "C"
11948#endif
11949char inflateCopy ();
11950int
11951main ()
11952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011953return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011954 ;
11955 return 0;
11956}
11957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011958if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011959 ac_cv_lib_z_inflateCopy=yes
11960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011963rm -f core conftest.err conftest.$ac_objext \
11964 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011965LIBS=$ac_check_lib_save_LIBS
11966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11968$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011969if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011970
Matthias Kloseb9621712010-04-24 17:59:49 +000011971$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011972
11973fi
11974
11975
11976case $ac_sys_system/$ac_sys_release in
11977Darwin/*)
11978 CFLAGS="${_CUR_CFLAGS}"
11979 LDFLAGS="${_CUR_LDFLAGS}"
11980 ;;
11981esac
11982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11984$as_echo_n "checking for hstrerror... " >&6; }
11985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011986/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011987
Martin v. Löwise9416172003-05-03 10:12:45 +000011988#include <netdb.h>
11989
Martin v. Löwise9416172003-05-03 10:12:45 +000011990int
11991main ()
11992{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011993void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011994 ;
11995 return 0;
11996}
11997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012001
Matthias Kloseb159a552010-04-25 21:00:44 +000012002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012007
12008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012009rm -f core conftest.err conftest.$ac_objext \
12010 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012011
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12013$as_echo_n "checking for inet_aton... " >&6; }
12014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012015/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012016
Martin v. Löwis86d66262006-02-17 08:40:11 +000012017#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012018#include <sys/socket.h>
12019#include <netinet/in.h>
12020#include <arpa/inet.h>
12021
Martin v. Löwise9416172003-05-03 10:12:45 +000012022int
12023main ()
12024{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012025void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012026 ;
12027 return 0;
12028}
12029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012030if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012033
Matthias Kloseb159a552010-04-25 21:00:44 +000012034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012035$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012036else
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12038$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012039
12040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012041rm -f core conftest.err conftest.$ac_objext \
12042 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12045$as_echo_n "checking for inet_pton... " >&6; }
12046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012047/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012048
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012049#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012050#include <sys/socket.h>
12051#include <netinet/in.h>
12052#include <arpa/inet.h>
12053
Martin v. Löwise9416172003-05-03 10:12:45 +000012054int
12055main ()
12056{
12057void* p = inet_pton
12058 ;
12059 return 0;
12060}
12061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012065
Matthias Kloseb159a552010-04-25 21:00:44 +000012066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012067$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012068else
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12070$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012071
12072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012074
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012075# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12077$as_echo_n "checking for setgroups... " >&6; }
12078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012079/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012080
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012081#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012082#ifdef HAVE_GRP_H
12083#include <grp.h>
12084#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012085
Martin v. Löwisd5843682002-11-21 20:41:28 +000012086int
12087main ()
12088{
12089void* p = setgroups
12090 ;
12091 return 0;
12092}
12093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012094if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012097
Matthias Kloseb159a552010-04-25 21:00:44 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012099$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12102$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012103
12104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012106
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012107# check for openpty and forkpty
12108
12109for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012110do :
12111 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012112if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012114#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012115_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012116
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12119$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012122else
Martin v. Löwis11437992002-04-12 09:54:03 +000012123 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012124LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128/* Override any GCC internal prototype to avoid an error.
12129 Use char because int might match the return type of a GCC
12130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012131#ifdef __cplusplus
12132extern "C"
12133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012134char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012135int
12136main ()
12137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 ;
12140 return 0;
12141}
12142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012148rm -f core conftest.err conftest.$ac_objext \
12149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012150LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12153$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012154if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012156 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12159$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012160if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012162else
12163 ac_check_lib_save_LIBS=$LIBS
12164LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012166/* end confdefs.h. */
12167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168/* Override any GCC internal prototype to avoid an error.
12169 Use char because int might match the return type of a GCC
12170 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012171#ifdef __cplusplus
12172extern "C"
12173#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012174char openpty ();
12175int
12176main ()
12177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012178return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012179 ;
12180 return 0;
12181}
12182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012184 ac_cv_lib_bsd_openpty=yes
12185else
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012188rm -f core conftest.err conftest.$ac_objext \
12189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012190LIBS=$ac_check_lib_save_LIBS
12191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12193$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012194if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012196 LIBS="$LIBS -lbsd"
12197fi
12198
12199
12200fi
12201
Fred Drake8cef4cf2000-06-28 16:40:38 +000012202
12203fi
12204done
12205
12206for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012207do :
12208 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012212_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012213
Fred Drake8cef4cf2000-06-28 16:40:38 +000012214else
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12216$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012217if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012219else
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012221LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225/* Override any GCC internal prototype to avoid an error.
12226 Use char because int might match the return type of a GCC
12227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012228#ifdef __cplusplus
12229extern "C"
12230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012231char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012232int
12233main ()
12234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 ;
12237 return 0;
12238}
12239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012240if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012242else
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012245rm -f core conftest.err conftest.$ac_objext \
12246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012247LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12250$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012251if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012253 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012254else
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12256$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012257if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012259else
12260 ac_check_lib_save_LIBS=$LIBS
12261LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012263/* end confdefs.h. */
12264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265/* Override any GCC internal prototype to avoid an error.
12266 Use char because int might match the return type of a GCC
12267 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012268#ifdef __cplusplus
12269extern "C"
12270#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012271char forkpty ();
12272int
12273main ()
12274{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012275return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012276 ;
12277 return 0;
12278}
12279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012281 ac_cv_lib_bsd_forkpty=yes
12282else
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012285rm -f core conftest.err conftest.$ac_objext \
12286 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012287LIBS=$ac_check_lib_save_LIBS
12288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12290$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012291if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012293 LIBS="$LIBS -lbsd"
12294fi
12295
12296
12297fi
12298
Fred Drake8cef4cf2000-06-28 16:40:38 +000012299
12300fi
12301done
12302
Jack Jansendd19cf82001-12-06 22:36:17 +000012303
Christian Heimesb186d002008-03-18 15:15:01 +000012304# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012305for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012306do :
12307 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012308if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012309 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012311_ACEOF
12312
12313fi
12314done
12315
12316
Michael W. Hudson54241132001-12-07 15:38:26 +000012317# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012318for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012319do :
12320 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12321ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012322if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012325_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012326
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012327fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012328done
12329
Michael W. Hudson54241132001-12-07 15:38:26 +000012330
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012331ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012332if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012333 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012334
Martin v. Löwis1142de32002-03-29 16:28:31 +000012335else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012337 *" dup2.$ac_objext "* ) ;;
12338 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012340esac
12341
Martin v. Löwis1142de32002-03-29 16:28:31 +000012342fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012343
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012344ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012345if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012346 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12347
12348else
12349 case " $LIBOBJS " in
12350 *" strdup.$ac_objext "* ) ;;
12351 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12352 ;;
12353esac
12354
12355fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012356
12357
12358for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012359do :
12360 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012361if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012363#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012366/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012367#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012368int
12369main ()
12370{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 ;
12373 return 0;
12374}
12375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
Matthias Kloseb9621712010-04-24 17:59:49 +000012378$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012379
Guido van Rossum627b2d71993-12-24 10:39:16 +000012380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012382
Guido van Rossum627b2d71993-12-24 10:39:16 +000012383fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012384done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012385
Jack Jansen150753c2003-03-29 22:07:47 +000012386for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012387do :
12388 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012389if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012390 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012394/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012395#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012396int
12397main ()
12398{
12399setpgrp(0,0);
12400 ;
12401 return 0;
12402}
12403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012407
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012410
12411fi
12412done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012413
Thomas Wouters3a584202000-08-05 23:28:51 +000012414for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012415do :
12416 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012419#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012422/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012423#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012424int
12425main ()
12426{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 ;
12429 return 0;
12430}
12431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if ac_fn_c_try_compile "$LINENO"; then :
12433
Guido van Rossum627b2d71993-12-24 10:39:16 +000012434else
Skip Montanaro6dead952003-09-25 14:50:04 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012437
Martin v. Löwis11437992002-04-12 09:54:03 +000012438
Guido van Rossum627b2d71993-12-24 10:39:16 +000012439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012442fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012443done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012444
Michael W. Hudson54241132001-12-07 15:38:26 +000012445
Victor Stinnere0be4232011-10-25 13:06:09 +020012446for ac_func in clock_gettime
12447do :
12448 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12449if test "x$ac_cv_func_clock_gettime" = xyes; then :
12450 cat >>confdefs.h <<_ACEOF
12451#define HAVE_CLOCK_GETTIME 1
12452_ACEOF
12453
12454else
12455
12456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12457$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12458if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12459 $as_echo_n "(cached) " >&6
12460else
12461 ac_check_lib_save_LIBS=$LIBS
12462LIBS="-lrt $LIBS"
12463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12464/* end confdefs.h. */
12465
12466/* Override any GCC internal prototype to avoid an error.
12467 Use char because int might match the return type of a GCC
12468 builtin and then its argument prototype would still apply. */
12469#ifdef __cplusplus
12470extern "C"
12471#endif
12472char clock_gettime ();
12473int
12474main ()
12475{
12476return clock_gettime ();
12477 ;
12478 return 0;
12479}
12480_ACEOF
12481if ac_fn_c_try_link "$LINENO"; then :
12482 ac_cv_lib_rt_clock_gettime=yes
12483else
12484 ac_cv_lib_rt_clock_gettime=no
12485fi
12486rm -f core conftest.err conftest.$ac_objext \
12487 conftest$ac_exeext conftest.$ac_ext
12488LIBS=$ac_check_lib_save_LIBS
12489fi
12490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12491$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12492if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12493
Victor Stinner7efb8332014-08-29 15:41:08 +020012494 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012495 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12496
12497
12498$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12499
12500
12501fi
12502
12503
12504fi
12505done
12506
12507
12508for ac_func in clock_getres
12509do :
12510 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12511if test "x$ac_cv_func_clock_getres" = xyes; then :
12512 cat >>confdefs.h <<_ACEOF
12513#define HAVE_CLOCK_GETRES 1
12514_ACEOF
12515
12516else
12517
12518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12519$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12520if ${ac_cv_lib_rt_clock_getres+:} false; then :
12521 $as_echo_n "(cached) " >&6
12522else
12523 ac_check_lib_save_LIBS=$LIBS
12524LIBS="-lrt $LIBS"
12525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12526/* end confdefs.h. */
12527
12528/* Override any GCC internal prototype to avoid an error.
12529 Use char because int might match the return type of a GCC
12530 builtin and then its argument prototype would still apply. */
12531#ifdef __cplusplus
12532extern "C"
12533#endif
12534char clock_getres ();
12535int
12536main ()
12537{
12538return clock_getres ();
12539 ;
12540 return 0;
12541}
12542_ACEOF
12543if ac_fn_c_try_link "$LINENO"; then :
12544 ac_cv_lib_rt_clock_getres=yes
12545else
12546 ac_cv_lib_rt_clock_getres=no
12547fi
12548rm -f core conftest.err conftest.$ac_objext \
12549 conftest$ac_exeext conftest.$ac_ext
12550LIBS=$ac_check_lib_save_LIBS
12551fi
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12553$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12554if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12555
12556 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12557
12558
12559fi
12560
12561
12562fi
12563done
12564
12565
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012566for ac_func in clock_settime
12567do :
12568 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12569if test "x$ac_cv_func_clock_settime" = xyes; then :
12570 cat >>confdefs.h <<_ACEOF
12571#define HAVE_CLOCK_SETTIME 1
12572_ACEOF
12573
12574else
12575
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12577$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12578if ${ac_cv_lib_rt_clock_settime+:} false; then :
12579 $as_echo_n "(cached) " >&6
12580else
12581 ac_check_lib_save_LIBS=$LIBS
12582LIBS="-lrt $LIBS"
12583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12584/* end confdefs.h. */
12585
12586/* Override any GCC internal prototype to avoid an error.
12587 Use char because int might match the return type of a GCC
12588 builtin and then its argument prototype would still apply. */
12589#ifdef __cplusplus
12590extern "C"
12591#endif
12592char clock_settime ();
12593int
12594main ()
12595{
12596return clock_settime ();
12597 ;
12598 return 0;
12599}
12600_ACEOF
12601if ac_fn_c_try_link "$LINENO"; then :
12602 ac_cv_lib_rt_clock_settime=yes
12603else
12604 ac_cv_lib_rt_clock_settime=no
12605fi
12606rm -f core conftest.err conftest.$ac_objext \
12607 conftest$ac_exeext conftest.$ac_ext
12608LIBS=$ac_check_lib_save_LIBS
12609fi
12610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12611$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12612if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12613
12614 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12615
12616
12617fi
12618
12619
12620fi
12621done
12622
12623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12625$as_echo_n "checking for major... " >&6; }
12626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012627/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012628
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012629#if defined(MAJOR_IN_MKDEV)
12630#include <sys/mkdev.h>
12631#elif defined(MAJOR_IN_SYSMACROS)
12632#include <sys/sysmacros.h>
12633#else
12634#include <sys/types.h>
12635#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012636
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012637int
12638main ()
12639{
12640
12641 makedev(major(0),minor(0));
12642
12643 ;
12644 return 0;
12645}
12646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012647if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012648
12649
Matthias Kloseb9621712010-04-24 17:59:49 +000012650$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012651
Matthias Kloseb9621712010-04-24 17:59:49 +000012652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12653$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012654
12655else
Skip Montanaro6dead952003-09-25 14:50:04 +000012656
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012659
12660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012661rm -f core conftest.err conftest.$ac_objext \
12662 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012663
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012664# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12665# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12667$as_echo_n "checking for if_nameindex... " >&6; }
12668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669/* end confdefs.h. */
12670
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012671#include <stdio.h>
12672#ifdef STDC_HEADERS
12673# include <stdlib.h>
12674# include <stddef.h>
12675#else
12676# ifdef HAVE_STDLIB_H
12677# include <stdlib.h>
12678# endif
12679#endif
12680#ifdef HAVE_SYS_SOCKET_H
12681# include <sys/socket.h>
12682#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012683#ifdef HAVE_NET_IF_H
12684# include <net/if.h>
12685#endif
12686
12687int
12688main ()
12689{
12690struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12691 ;
12692 return 0;
12693}
12694_ACEOF
12695if ac_fn_c_try_link "$LINENO"; then :
12696
12697$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12698
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12700$as_echo "yes" >&6; }
12701else
12702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12703$as_echo "no" >&6; }
12704
12705fi
12706rm -f core conftest.err conftest.$ac_objext \
12707 conftest$ac_exeext conftest.$ac_ext
12708
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012709# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12710# macro is not defined in android-ndk-r13.
12711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12712$as_echo_n "checking for lockf... " >&6; }
12713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12714/* end confdefs.h. */
12715#include <unistd.h>
12716int
12717main ()
12718{
12719lockf(0, F_LOCK, 0);
12720 ;
12721 return 0;
12722}
12723_ACEOF
12724if ac_fn_c_try_link "$LINENO"; then :
12725
12726$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12727
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12729$as_echo "yes" >&6; }
12730else
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12732$as_echo "no" >&6; }
12733
12734fi
12735rm -f core conftest.err conftest.$ac_objext \
12736 conftest$ac_exeext conftest.$ac_ext
12737
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012738# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012739# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12741$as_echo_n "checking for getaddrinfo... " >&6; }
12742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012743/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012744
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012745#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012746#include <sys/socket.h>
12747#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012748#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012749
Martin v. Löwis11437992002-04-12 09:54:03 +000012750int
12751main ()
12752{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012753getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 ;
12755 return 0;
12756}
12757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012758if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012759 have_getaddrinfo=yes
12760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012763rm -f core conftest.err conftest.$ac_objext \
12764 conftest$ac_exeext conftest.$ac_ext
12765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12766$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012767if test $have_getaddrinfo = yes
12768then
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12770$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012771 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012773else
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012775
12776if test "${enable_ipv6+set}" = set; then
12777 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12778else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012779 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012780fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012781else
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012784
Stefan Krah19c21392012-11-22 23:47:32 +010012785#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012786#include <sys/types.h>
12787#include <netdb.h>
12788#include <string.h>
12789#include <sys/socket.h>
12790#include <netinet/in.h>
12791
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012792int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793{
12794 int passive, gaierr, inet4 = 0, inet6 = 0;
12795 struct addrinfo hints, *ai, *aitop;
12796 char straddr[INET6_ADDRSTRLEN], strport[16];
12797
12798 for (passive = 0; passive <= 1; passive++) {
12799 memset(&hints, 0, sizeof(hints));
12800 hints.ai_family = AF_UNSPEC;
12801 hints.ai_flags = passive ? AI_PASSIVE : 0;
12802 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012803 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012804 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12805 (void)gai_strerror(gaierr);
12806 goto bad;
12807 }
12808 for (ai = aitop; ai; ai = ai->ai_next) {
12809 if (ai->ai_addr == NULL ||
12810 ai->ai_addrlen == 0 ||
12811 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12812 straddr, sizeof(straddr), strport, sizeof(strport),
12813 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12814 goto bad;
12815 }
12816 switch (ai->ai_family) {
12817 case AF_INET:
12818 if (strcmp(strport, "54321") != 0) {
12819 goto bad;
12820 }
12821 if (passive) {
12822 if (strcmp(straddr, "0.0.0.0") != 0) {
12823 goto bad;
12824 }
12825 } else {
12826 if (strcmp(straddr, "127.0.0.1") != 0) {
12827 goto bad;
12828 }
12829 }
12830 inet4++;
12831 break;
12832 case AF_INET6:
12833 if (strcmp(strport, "54321") != 0) {
12834 goto bad;
12835 }
12836 if (passive) {
12837 if (strcmp(straddr, "::") != 0) {
12838 goto bad;
12839 }
12840 } else {
12841 if (strcmp(straddr, "::1") != 0) {
12842 goto bad;
12843 }
12844 }
12845 inet6++;
12846 break;
12847 case AF_UNSPEC:
12848 goto bad;
12849 break;
12850 default:
12851 /* another family support? */
12852 break;
12853 }
12854 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012855 freeaddrinfo(aitop);
12856 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012857 }
12858
12859 if (!(inet4 == 0 || inet4 == 2))
12860 goto bad;
12861 if (!(inet6 == 0 || inet6 == 2))
12862 goto bad;
12863
12864 if (aitop)
12865 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012866 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012867
12868 bad:
12869 if (aitop)
12870 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012871 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012872}
12873
Martin v. Löwis11437992002-04-12 09:54:03 +000012874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012875if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012876 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012877else
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012884fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012885
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12889$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12890
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012891if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012892then
12893 if test $ipv6 = yes
12894 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012895 echo 'Fatal: You must get working getaddrinfo() function.'
12896 echo ' or you can specify "--disable-ipv6"'.
12897 exit 1
12898 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012899else
Martin v. Löwis11437992002-04-12 09:54:03 +000012900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012902
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012903fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012904
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012905for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012906do :
12907 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012908if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012910#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012911_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012913fi
12914done
12915
Michael W. Hudson54241132001-12-07 15:38:26 +000012916
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012917# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12919$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012920if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012922else
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012924/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925#include <sys/types.h>
12926#include <sys/time.h>
12927#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Martin v. Löwis11437992002-04-12 09:54:03 +000012929int
12930main ()
12931{
12932if ((struct tm *) 0)
12933return 0;
12934 ;
12935 return 0;
12936}
12937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012938if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012939 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012940else
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12946$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012947if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950
12951fi
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12954$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012955if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012959/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012960#include <sys/types.h>
12961#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
Martin v. Löwis11437992002-04-12 09:54:03 +000012963int
12964main ()
12965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966struct tm tm;
12967 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012974 ac_cv_struct_tm=time.h
12975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12981$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012982if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012985
12986fi
12987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988ac_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 +000012989#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012990
Matthias Kloseb9621712010-04-24 17:59:49 +000012991"
Victor Stinnere0be4232011-10-25 13:06:09 +020012992if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
12994cat >>confdefs.h <<_ACEOF
12995#define HAVE_STRUCT_TM_TM_ZONE 1
12996_ACEOF
12997
12998
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012999fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013000
Martin v. Löwis11437992002-04-12 09:54:03 +000013001if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004
13005else
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13007"
Victor Stinnere0be4232011-10-25 13:06:09 +020013008if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012fi
13013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013014cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013015#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013016_ACEOF
13017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13019$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013020if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022else
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013024/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013025#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026#if !HAVE_DECL_TZNAME
13027extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013029
Martin v. Löwis11437992002-04-12 09:54:03 +000013030int
13031main ()
13032{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013033return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 ;
13035 return 0;
13036}
13037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013038if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013039 ac_cv_var_tzname=yes
13040else
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013043rm -f core conftest.err conftest.$ac_objext \
13044 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13047$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013048 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013049
Matthias Kloseb9621712010-04-24 17:59:49 +000013050$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013052 fi
13053fi
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055ac_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 +020013056if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
13058cat >>confdefs.h <<_ACEOF
13059#define HAVE_STRUCT_STAT_ST_RDEV 1
13060_ACEOF
13061
13062
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013063fi
13064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065ac_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 +020013066if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013067
Martin v. Löwis11437992002-04-12 09:54:03 +000013068cat >>confdefs.h <<_ACEOF
13069#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13070_ACEOF
13071
13072
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013073fi
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075ac_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 +020013076if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013077
13078cat >>confdefs.h <<_ACEOF
13079#define HAVE_STRUCT_STAT_ST_FLAGS 1
13080_ACEOF
13081
13082
13083fi
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085ac_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 +020013086if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013087
13088cat >>confdefs.h <<_ACEOF
13089#define HAVE_STRUCT_STAT_ST_GEN 1
13090_ACEOF
13091
13092
13093fi
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095ac_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 +020013096if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013097
13098cat >>confdefs.h <<_ACEOF
13099#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13100_ACEOF
13101
13102
13103fi
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105ac_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 +020013106if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013107
Martin v. Löwis11437992002-04-12 09:54:03 +000013108cat >>confdefs.h <<_ACEOF
13109#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13110_ACEOF
13111
13112
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013113fi
13114
Stefan Krah267b6392016-04-26 01:09:18 +020013115ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13116 #include <sys/types.h>
13117 #include <pwd.h>
13118
13119"
13120if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13121
13122cat >>confdefs.h <<_ACEOF
13123#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13124_ACEOF
13125
13126
13127fi
13128ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13129 #include <sys/types.h>
13130 #include <pwd.h>
13131
13132"
13133if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13134
13135cat >>confdefs.h <<_ACEOF
13136#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13137_ACEOF
13138
13139
13140fi
13141
Michael W. Hudson54241132001-12-07 15:38:26 +000013142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13144$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013145if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013147else
Matthias Kloseb159a552010-04-25 21:00:44 +000013148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013150/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013151#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013152int
13153main ()
13154{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013155return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 ;
13157 return 0;
13158}
13159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013160if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013161 ac_cv_header_time_altzone=yes
13162else
Matthias Kloseb9621712010-04-24 17:59:49 +000013163 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013167fi
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13170$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013171if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013174
13175fi
13176
Guido van Rossumda88dad1995-01-26 00:46:29 +000013177was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13179$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013181/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013182
13183#include <sys/types.h>
13184#include <sys/select.h>
13185#include <sys/time.h>
13186
Martin v. Löwis11437992002-04-12 09:54:03 +000013187int
13188main ()
13189{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013190;
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 ;
13192 return 0;
13193}
13194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013196
13197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013200 was_it_defined=yes
13201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13205$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13208$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013209if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211else
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013214#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013215int
13216main ()
13217{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013218struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 ;
13220 return 0;
13221}
13222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013224 ac_cv_struct_addrinfo=yes
13225else
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13229fi
13230
Matthias Kloseb9621712010-04-24 17:59:49 +000013231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13232$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236
13237fi
13238
Matthias Kloseb9621712010-04-24 17:59:49 +000013239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13240$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013241if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013245/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013246
13247# include <sys/types.h>
13248# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013249int
13250main ()
13251{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013252struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 ;
13254 return 0;
13255}
13256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258 ac_cv_struct_sockaddr_storage=yes
13259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13263fi
13264
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13266$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013270
13271fi
13272
Christian Heimesdffa3942016-09-05 23:54:41 +020013273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13274$as_echo_n "checking for sockaddr_alg... " >&6; }
13275if ${ac_cv_struct_sockaddr_alg+:} false; then :
13276 $as_echo_n "(cached) " >&6
13277else
13278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13279/* end confdefs.h. */
13280
13281# include <sys/types.h>
13282# include <sys/socket.h>
13283# include <linux/if_alg.h>
13284int
13285main ()
13286{
13287struct sockaddr_alg s
13288 ;
13289 return 0;
13290}
13291_ACEOF
13292if ac_fn_c_try_compile "$LINENO"; then :
13293 ac_cv_struct_sockaddr_alg=yes
13294else
13295 ac_cv_struct_sockaddr_alg=no
13296fi
13297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13298fi
13299
13300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13301$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13302if test $ac_cv_struct_sockaddr_alg = yes; then
13303
13304$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13305
13306fi
13307
Guido van Rossum627b2d71993-12-24 10:39:16 +000013308# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13311$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013312if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013317$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013318int
13319main ()
13320{
13321static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013322test_array [0] = 0;
13323return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
13325 ;
13326 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013327}
Martin v. Löwis11437992002-04-12 09:54:03 +000013328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013329if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013330 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13337$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340
13341fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013342
Matthias Kloseb9621712010-04-24 17:59:49 +000013343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13344$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013345if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013349/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351int
13352main ()
13353{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013356 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013358 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360 char const *const *pcpcc;
13361 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 /* NEC SVR4.0.2 mips cc rejects this. */
13363 struct point {int x, y;};
13364 static struct point const zero = {0,0};
13365 /* AIX XL C 1.02.0.0 rejects this.
13366 It does not let you subtract one const X* pointer from another in
13367 an arm of an if-expression whose if-part is not a constant
13368 expression */
13369 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013371 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372 ++pcpcc;
13373 ppc = (char**) pcpcc;
13374 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013375 { /* SCO 3.2v4 cc rejects this sort of thing. */
13376 char tx;
13377 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013382 }
13383 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13384 int x[] = {25, 17};
13385 const int *foo = &x[0];
13386 ++foo;
13387 }
13388 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13389 typedef const int *iptr;
13390 iptr p = 0;
13391 ++p;
13392 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013393 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013395 struct s { int j; const int *ap[3]; } bx;
13396 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 }
13398 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13399 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013403#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405 ;
13406 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013407}
Martin v. Löwis11437992002-04-12 09:54:03 +000013408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013409if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410 ac_cv_c_const=yes
13411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13417$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421
13422fi
13423
Michael W. Hudson54241132001-12-07 15:38:26 +000013424
Guido van Rossumda88dad1995-01-26 00:46:29 +000013425works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13427$as_echo_n "checking for working volatile... " >&6; }
13428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013430
Martin v. Löwis11437992002-04-12 09:54:03 +000013431int
13432main ()
13433{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013434volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 ;
13436 return 0;
13437}
13438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013439if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013440 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013441else
Skip Montanaro6dead952003-09-25 14:50:04 +000013442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013444
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013445
Guido van Rossum627b2d71993-12-24 10:39:16 +000013446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13449$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013450
Guido van Rossumda88dad1995-01-26 00:46:29 +000013451works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13453$as_echo_n "checking for working signed char... " >&6; }
13454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013455/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013456
Martin v. Löwis11437992002-04-12 09:54:03 +000013457int
13458main ()
13459{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013460signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 ;
13462 return 0;
13463}
13464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013465if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013466 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013467else
Skip Montanaro6dead952003-09-25 14:50:04 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013470
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013471
Guido van Rossum7f43da71994-08-01 12:15:30 +000013472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13475$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013476
Guido van Rossumda88dad1995-01-26 00:46:29 +000013477have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13479$as_echo_n "checking for prototypes... " >&6; }
13480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013481/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013482int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013483int
13484main ()
13485{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 ;
13488 return 0;
13489}
13490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
Matthias Kloseb159a552010-04-25 21:00:44 +000013495 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13499$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500
Guido van Rossumda88dad1995-01-26 00:46:29 +000013501works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13503$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013506
13507#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013508int foo(int x, ...) {
13509 va_list va;
13510 va_start(va, x);
13511 va_arg(va, int);
13512 va_arg(va, char *);
13513 va_arg(va, double);
13514 return 0;
13515}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013516
Martin v. Löwis11437992002-04-12 09:54:03 +000013517int
13518main ()
13519{
Guido van Rossum90eea071996-08-30 20:58:57 +000013520return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 ;
13522 return 0;
13523}
13524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
13527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013529
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013530 works=yes
13531
Guido van Rossum627b2d71993-12-24 10:39:16 +000013532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13535$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536
Martin v. Löwisd6320502004-08-12 13:45:08 +000013537# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13539$as_echo_n "checking for socketpair... " >&6; }
13540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013541/* end confdefs.h. */
13542
13543#include <sys/types.h>
13544#include <sys/socket.h>
13545
13546int
13547main ()
13548{
13549void *x=socketpair
13550 ;
13551 return 0;
13552}
13553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013557
Matthias Kloseb159a552010-04-25 21:00:44 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013559$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13562$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013563
13564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013566
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013567# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13569$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013571/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013572#include <sys/types.h>
13573#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013574int
13575main ()
13576{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013577struct sockaddr x;
13578x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013579 ;
13580 return 0;
13581}
13582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013583if ac_fn_c_try_compile "$LINENO"; then :
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13585$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013588
13589else
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13591$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013592
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013595
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013596# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
13598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013600if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13605$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013606 OLD_CFLAGS=$CFLAGS
13607 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013609/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610
13611# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Martin v. Löwis11437992002-04-12 09:54:03 +000013613int
13614main ()
13615{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013616
13617 char *name;
13618 struct hostent *he, *res;
13619 char buffer[2048];
13620 int buflen = 2048;
13621 int h_errnop;
13622
13623 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
13625 ;
13626 return 0;
13627}
13628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013632
Martin v. Löwis11437992002-04-12 09:54:03 +000013633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13637$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013638
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013639else
Skip Montanaro6dead952003-09-25 14:50:04 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13642$as_echo "no" >&6; }
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13644$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013646/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013647
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013648# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Martin v. Löwis11437992002-04-12 09:54:03 +000013650int
13651main ()
13652{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013653
13654 char *name;
13655 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013656 char buffer[2048];
13657 int buflen = 2048;
13658 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013659
Matthias Kloseb159a552010-04-25 21:00:44 +000013660 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013661
13662 ;
13663 return 0;
13664}
13665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013669
Martin v. Löwis11437992002-04-12 09:54:03 +000013670
Matthias Kloseb159a552010-04-25 21:00:44 +000013671$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13674$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013676else
Skip Montanaro6dead952003-09-25 14:50:04 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13679$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13681$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13683/* end confdefs.h. */
13684
13685# include <netdb.h>
13686
13687int
13688main ()
13689{
13690
13691 char *name;
13692 struct hostent *he;
13693 struct hostent_data data;
13694
13695 (void) gethostbyname_r(name, he, &data);
13696
13697 ;
13698 return 0;
13699}
13700_ACEOF
13701if ac_fn_c_try_compile "$LINENO"; then :
13702
13703 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13704
13705
13706$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13707
13708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13709$as_echo "yes" >&6; }
13710
13711else
13712
13713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13714$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013715
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013721
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013724 CFLAGS=$OLD_CFLAGS
13725
13726else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 for ac_func in gethostbyname
13729do :
13730 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013731if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013733#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013734_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013735
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013736fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013737done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013738
Michael W. Hudson54241132001-12-07 15:38:26 +000013739
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013740fi
13741
Michael W. Hudson54241132001-12-07 15:38:26 +000013742
13743
13744
13745
13746
13747
Guido van Rossum627b2d71993-12-24 10:39:16 +000013748# checks for system services
13749# (none yet)
13750
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013752ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013753if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013754
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013755else
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13757$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013758if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013760else
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013762LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766/* Override any GCC internal prototype to avoid an error.
13767 Use char because int might match the return type of a GCC
13768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013769#ifdef __cplusplus
13770extern "C"
13771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013772char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013773int
13774main ()
13775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 ;
13778 return 0;
13779}
13780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013783else
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013786rm -f core conftest.err conftest.$ac_objext \
13787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13791$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013792if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 cat >>confdefs.h <<_ACEOF
13794#define HAVE_LIBIEEE 1
13795_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013797 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799fi
13800
Michael W. Hudson54241132001-12-07 15:38:26 +000013801
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013802fi
13803
Michael W. Hudson54241132001-12-07 15:38:26 +000013804
Guido van Rossum7f253911997-05-09 02:42:48 +000013805# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13807$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013810if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013812if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013813then
13814
Matthias Kloseb9621712010-04-24 17:59:49 +000013815$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13818$as_echo "yes" >&6; }
13819else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13820$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013821fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013822else
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13824$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825fi
13826
Guido van Rossum7f253911997-05-09 02:42:48 +000013827
Guido van Rossum7f43da71994-08-01 12:15:30 +000013828# check for --with-libm=...
13829
Guido van Rossum563e7081996-09-10 18:20:48 +000013830case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013831Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013832*) LIBM=-lm
13833esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13835$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013840if test "$withval" = no
13841then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13843$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013844elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013845then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13847$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013848else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013849fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13852$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853fi
13854
Guido van Rossum7f43da71994-08-01 12:15:30 +000013855
13856# check for --with-libc=...
13857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13859$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013862if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013864if test "$withval" = no
13865then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13867$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013868elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013869then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13871$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013872else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013873fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013874else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13876$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877fi
13878
Guido van Rossum7f43da71994-08-01 12:15:30 +000013879
Stefan Krah1919b7e2012-03-21 18:25:23 +010013880# **************************************
13881# * Check for gcc x64 inline assembler *
13882# **************************************
13883
13884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13885$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887/* end confdefs.h. */
13888
13889int
13890main ()
13891{
13892
13893 __asm__ __volatile__ ("movq %rcx, %rax");
13894
13895 ;
13896 return 0;
13897}
13898_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013899if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013900 have_gcc_asm_for_x64=yes
13901else
13902 have_gcc_asm_for_x64=no
13903fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013904rm -f core conftest.err conftest.$ac_objext \
13905 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13907$as_echo "$have_gcc_asm_for_x64" >&6; }
13908if test "$have_gcc_asm_for_x64" = yes
13909then
13910
13911$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13912
13913fi
13914
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013915# **************************************************
13916# * Check for various properties of floating point *
13917# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13920$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013921if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013923else
13924
Matthias Kloseb9621712010-04-24 17:59:49 +000013925if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013926 ac_cv_little_endian_double=no
13927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013929/* end confdefs.h. */
13930
13931#include <string.h>
13932int main() {
13933 double x = 9006104071832581.0;
13934 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13935 return 0;
13936 else
13937 return 1;
13938}
13939
13940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942 ac_cv_little_endian_double=yes
13943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948fi
13949
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013950fi
13951
Matthias Kloseb9621712010-04-24 17:59:49 +000013952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13953$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954if test "$ac_cv_little_endian_double" = yes
13955then
13956
Matthias Kloseb9621712010-04-24 17:59:49 +000013957$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013958
13959fi
13960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13962$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013963if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013965else
13966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968 ac_cv_big_endian_double=no
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971/* end confdefs.h. */
13972
13973#include <string.h>
13974int main() {
13975 double x = 9006104071832581.0;
13976 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13977 return 0;
13978 else
13979 return 1;
13980}
13981
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984 ac_cv_big_endian_double=yes
13985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13989 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990fi
13991
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992fi
13993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13995$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996if test "$ac_cv_big_endian_double" = yes
13997then
13998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000
14001fi
14002
14003# Some ARM platforms use a mixed-endian representation for doubles.
14004# While Python doesn't currently have full support for these platforms
14005# (see e.g., issue 1762561), we can at least make sure that float <-> string
14006# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14008$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014009if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011else
14012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014 ac_cv_mixed_endian_double=no
14015else
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014017/* end confdefs.h. */
14018
14019#include <string.h>
14020int main() {
14021 double x = 9006104071832581.0;
14022 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14023 return 0;
14024 else
14025 return 1;
14026}
14027
14028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014029if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030 ac_cv_mixed_endian_double=yes
14031else
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014036fi
14037
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014038fi
14039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14041$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014042if test "$ac_cv_mixed_endian_double" = yes
14043then
14044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014046
14047fi
14048
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014049# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014050# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014051# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014052# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014053# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014054# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014055
14056# This inline assembler syntax may also work for suncc and icc,
14057# so we try it on all platforms.
14058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14060$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014062/* end confdefs.h. */
14063
14064int
14065main ()
14066{
14067
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014068 unsigned short cw;
14069 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14070 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014071
14072 ;
14073 return 0;
14074}
14075_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014076if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014077 have_gcc_asm_for_x87=yes
14078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014080fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014081rm -f core conftest.err conftest.$ac_objext \
14082 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14084$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014085if test "$have_gcc_asm_for_x87" = yes
14086then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014089
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014091
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14093$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14095/* end confdefs.h. */
14096
14097int
14098main ()
14099{
14100
14101 unsigned int fpcr;
14102 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14103 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14104
14105 ;
14106 return 0;
14107}
14108_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014109if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014110 have_gcc_asm_for_mc68881=yes
14111else
14112 have_gcc_asm_for_mc68881=no
14113fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014114rm -f core conftest.err conftest.$ac_objext \
14115 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14117$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14118if test "$have_gcc_asm_for_mc68881" = yes
14119then
14120
14121$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14122
14123fi
14124
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014125# Detect whether system arithmetic is subject to x87-style double
14126# rounding issues. The result of this test has little meaning on non
14127# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14128# mode is round-to-nearest and double rounding issues are present, and
14129# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14131$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014132# $BASECFLAGS may affect the result
14133ac_save_cc="$CC"
14134CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014135if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014136 ac_cv_x87_double_rounding=no
14137else
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014139/* end confdefs.h. */
14140
14141#include <stdlib.h>
14142#include <math.h>
14143int main() {
14144 volatile double x, y, z;
14145 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14146 x = 0.99999999999999989; /* 1-2**-53 */
14147 y = 1./x;
14148 if (y != 1.)
14149 exit(0);
14150 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14151 x = 1e16;
14152 y = 2.99999;
14153 z = x + y;
14154 if (z != 1e16+4.)
14155 exit(0);
14156 /* both tests show evidence of double rounding */
14157 exit(1);
14158}
14159
14160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014161if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014162 ac_cv_x87_double_rounding=no
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014168fi
14169
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014170CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14172$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014173if test "$ac_cv_x87_double_rounding" = yes
14174then
14175
Matthias Kloseb9621712010-04-24 17:59:49 +000014176$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014177
14178fi
14179
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014180# ************************************
14181# * Check for mathematical functions *
14182# ************************************
14183
14184LIBS_SAVE=$LIBS
14185LIBS="$LIBS $LIBM"
14186
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014187for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14188do :
14189 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14190ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014191if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014192 cat >>confdefs.h <<_ACEOF
14193#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14194_ACEOF
14195
14196fi
14197done
14198
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014199for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014200do :
14201 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14202ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014203if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014204 cat >>confdefs.h <<_ACEOF
14205#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14206_ACEOF
14207
14208fi
14209done
14210
14211ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14212"
Victor Stinnere0be4232011-10-25 13:06:09 +020014213if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014214 ac_have_decl=1
14215else
14216 ac_have_decl=0
14217fi
14218
14219cat >>confdefs.h <<_ACEOF
14220#define HAVE_DECL_ISINF $ac_have_decl
14221_ACEOF
14222ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14223"
Victor Stinnere0be4232011-10-25 13:06:09 +020014224if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014225 ac_have_decl=1
14226else
14227 ac_have_decl=0
14228fi
14229
14230cat >>confdefs.h <<_ACEOF
14231#define HAVE_DECL_ISNAN $ac_have_decl
14232_ACEOF
14233ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14234"
Victor Stinnere0be4232011-10-25 13:06:09 +020014235if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014236 ac_have_decl=1
14237else
14238 ac_have_decl=0
14239fi
14240
14241cat >>confdefs.h <<_ACEOF
14242#define HAVE_DECL_ISFINITE $ac_have_decl
14243_ACEOF
14244
14245
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014246# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14247# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14249$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014250if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014252else
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014255 ac_cv_tanh_preserves_zero_sign=no
14256else
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014258/* end confdefs.h. */
14259
14260#include <math.h>
14261#include <stdlib.h>
14262int main() {
14263 /* return 0 if either negative zeros don't exist
14264 on this platform or if negative zeros exist
14265 and tanh(-0.) == -0. */
14266 if (atan2(0., -1.) == atan2(-0., -1.) ||
14267 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14268 else exit(1);
14269}
14270
14271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014272if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014273 ac_cv_tanh_preserves_zero_sign=yes
14274else
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14278 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014279fi
14280
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014281fi
14282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14284$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014285if test "$ac_cv_tanh_preserves_zero_sign" = yes
14286then
14287
Matthias Kloseb9621712010-04-24 17:59:49 +000014288$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014289
14290fi
14291
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014292if test "$ac_cv_func_log1p" = yes
14293then
14294 # On some versions of AIX, log1p(-0.) returns 0. instead of
14295 # -0. See issue #9920.
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14297$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014298 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014299 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014300else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014301
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014302 if test "$cross_compiling" = yes; then :
14303 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014304else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14306/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014307
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014308 #include <math.h>
14309 #include <stdlib.h>
14310 int main() {
14311 /* Fail if the signs of log1p(-0.) and -0. can be
14312 distinguished. */
14313 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14314 return 0;
14315 else
14316 return 1;
14317 }
14318
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014319_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014320if ac_fn_c_try_run "$LINENO"; then :
14321 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014322else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014323 ac_cv_log1p_drops_zero_sign=yes
14324fi
14325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014327fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014328
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014329fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014330
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14332$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14333fi
14334if test "$ac_cv_log1p_drops_zero_sign" = yes
14335then
14336
14337$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14338
14339fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014340
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014341LIBS=$LIBS_SAVE
14342
Mark Dickinsona614f042009-11-28 12:48:43 +000014343# For multiprocessing module, check that sem_open
14344# actually works. For FreeBSD versions <= 7.2,
14345# the kernel module that provides POSIX semaphores
14346# isn't loaded by default, so an attempt to call
14347# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14349$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014350if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014352else
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014354 ac_cv_posix_semaphores_enabled=yes
14355else
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014357/* end confdefs.h. */
14358
14359#include <unistd.h>
14360#include <fcntl.h>
14361#include <stdio.h>
14362#include <semaphore.h>
14363#include <sys/stat.h>
14364
14365int main(void) {
14366 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14367 if (a == SEM_FAILED) {
14368 perror("sem_open");
14369 return 1;
14370 }
14371 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014372 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014373 return 0;
14374}
14375
14376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014377if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014378 ac_cv_posix_semaphores_enabled=yes
14379else
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14383 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014384fi
14385
14386
Mark Dickinsona614f042009-11-28 12:48:43 +000014387fi
14388
Matthias Kloseb9621712010-04-24 17:59:49 +000014389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14390$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014391if test $ac_cv_posix_semaphores_enabled = no
14392then
14393
Matthias Kloseb9621712010-04-24 17:59:49 +000014394$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014395
14396fi
14397
Mark Dickinson10683072009-04-18 21:18:19 +000014398# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14400$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014401if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014403else
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014405 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014406else
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014408/* end confdefs.h. */
14409
14410#include <unistd.h>
14411#include <fcntl.h>
14412#include <stdio.h>
14413#include <semaphore.h>
14414#include <sys/stat.h>
14415
14416int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014417 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014418 int count;
14419 int res;
14420 if(a==SEM_FAILED){
14421 perror("sem_open");
14422 return 1;
14423
14424 }
14425 res = sem_getvalue(a, &count);
14426 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014427 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014428 return res==-1 ? 1 : 0;
14429}
14430
Mark Dickinson10683072009-04-18 21:18:19 +000014431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014432if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014433 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014434else
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14438 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014439fi
14440
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014441
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014442fi
14443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14445$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014446if test $ac_cv_broken_sem_getvalue = yes
14447then
14448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014450
14451fi
14452
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014453ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14454"
14455if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14456 ac_have_decl=1
14457else
14458 ac_have_decl=0
14459fi
14460
14461cat >>confdefs.h <<_ACEOF
14462#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14463_ACEOF
14464ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14465"
14466if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14467 ac_have_decl=1
14468else
14469 ac_have_decl=0
14470fi
14471
14472cat >>confdefs.h <<_ACEOF
14473#define HAVE_DECL_RTLD_NOW $ac_have_decl
14474_ACEOF
14475ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14476"
14477if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14478 ac_have_decl=1
14479else
14480 ac_have_decl=0
14481fi
14482
14483cat >>confdefs.h <<_ACEOF
14484#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14485_ACEOF
14486ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14487"
14488if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14489 ac_have_decl=1
14490else
14491 ac_have_decl=0
14492fi
14493
14494cat >>confdefs.h <<_ACEOF
14495#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14496_ACEOF
14497ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14498"
14499if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14500 ac_have_decl=1
14501else
14502 ac_have_decl=0
14503fi
14504
14505cat >>confdefs.h <<_ACEOF
14506#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14507_ACEOF
14508ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14509"
14510if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14511 ac_have_decl=1
14512else
14513 ac_have_decl=0
14514fi
14515
14516cat >>confdefs.h <<_ACEOF
14517#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14518_ACEOF
14519ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14520"
14521if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14522 ac_have_decl=1
14523else
14524 ac_have_decl=0
14525fi
14526
14527cat >>confdefs.h <<_ACEOF
14528#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14529_ACEOF
14530
14531
Mark Dickinsonbd792642009-03-18 20:06:12 +000014532# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14534$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014535# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014536if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014537 enableval=$enable_big_digits; case $enable_big_digits in
14538yes)
14539 enable_big_digits=30 ;;
14540no)
14541 enable_big_digits=15 ;;
1454215|30)
14543 ;;
14544*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014545 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 +000014546esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14548$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014549
14550cat >>confdefs.h <<_ACEOF
14551#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14552_ACEOF
14553
14554
14555else
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14557$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014558fi
14559
14560
Guido van Rossumef2255b2000-03-10 22:30:29 +000014561# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014562ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014563if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014564
14565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014567
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014568 wchar_h="yes"
14569
Guido van Rossumef2255b2000-03-10 22:30:29 +000014570else
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014572
14573fi
14574
Michael W. Hudson54241132001-12-07 15:38:26 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014577# determine wchar_t size
14578if test "$wchar_h" = yes
14579then
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14582# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14583# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14585$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014586if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014588else
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14590"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014591
Martin v. Löwis11437992002-04-12 09:54:03 +000014592else
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 if test "$ac_cv_type_wchar_t" = yes; then
14594 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014596as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014597See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598 else
14599 ac_cv_sizeof_wchar_t=0
14600 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014602
Martin v. Löwis11437992002-04-12 09:54:03 +000014603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14605$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606
14607
14608
Martin v. Löwis11437992002-04-12 09:54:03 +000014609cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014610#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014611_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014612
Michael W. Hudson54241132001-12-07 15:38:26 +000014613
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014614fi
14615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14617$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014618have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014620/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014621
14622#include <tcl.h>
14623#if TCL_UTF_MAX != 6
14624# error "NOT UCS4_TCL"
14625#endif
14626int
14627main ()
14628{
14629
14630 ;
14631 return 0;
14632}
14633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014635
14636
Matthias Kloseb9621712010-04-24 17:59:49 +000014637$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014638
14639 have_ucs4_tcl=yes
14640
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14644$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014645
Skip Montanaro6dead952003-09-25 14:50:04 +000014646# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014647if test "$wchar_h" = yes
14648then
14649 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14651$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014652 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014653 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014654else
14655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014657 ac_cv_wchar_t_signed=yes
14658else
Matthias Kloseb9621712010-04-24 17:59:49 +000014659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014660/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014661
14662 #include <wchar.h>
14663 int main()
14664 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014665 /* Success: exit code 0 */
14666 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014667 }
14668
14669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014670if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014671 ac_cv_wchar_t_signed=yes
14672else
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014677fi
14678
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014679fi
14680
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14682$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683fi
14684
Georg Brandl52d168a2008-01-07 18:10:24 +000014685# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014686if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014687 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014688then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014689 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014690
Matthias Kloseb9621712010-04-24 17:59:49 +000014691$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014692
Georg Brandl52d168a2008-01-07 18:10:24 +000014693else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014694 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014695fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14697$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014698
14699# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14701$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014702if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704else
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 ac_cv_c_bigendian=unknown
14706 # See if we're dealing with a universal compiler.
14707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14708/* end confdefs.h. */
14709#ifndef __APPLE_CC__
14710 not a universal capable compiler
14711 #endif
14712 typedef int dummy;
14713
Skip Montanaro6dead952003-09-25 14:50:04 +000014714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014715if ac_fn_c_try_compile "$LINENO"; then :
14716
14717 # Check for potential -arch flags. It is not universal unless
14718 # there are at least two -arch flags with different values.
14719 ac_arch=
14720 ac_prev=
14721 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14722 if test -n "$ac_prev"; then
14723 case $ac_word in
14724 i?86 | x86_64 | ppc | ppc64)
14725 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14726 ac_arch=$ac_word
14727 else
14728 ac_cv_c_bigendian=universal
14729 break
14730 fi
14731 ;;
14732 esac
14733 ac_prev=
14734 elif test "x$ac_word" = "x-arch"; then
14735 ac_prev=arch
14736 fi
14737 done
14738fi
14739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14740 if test $ac_cv_c_bigendian = unknown; then
14741 # See if sys/param.h defines the BYTE_ORDER macro.
14742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014743/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014744#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014746
Martin v. Löwis11437992002-04-12 09:54:03 +000014747int
14748main ()
14749{
Matthias Kloseb9621712010-04-24 17:59:49 +000014750#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14751 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14752 && LITTLE_ENDIAN)
14753 bogus endian macros
14754 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014755
14756 ;
14757 return 0;
14758}
14759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014760if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014761 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014763/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014764#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014766
Martin v. Löwis11437992002-04-12 09:54:03 +000014767int
14768main ()
14769{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014770#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 not big endian
14772 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014773
14774 ;
14775 return 0;
14776}
14777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014778if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014779 ac_cv_c_bigendian=yes
14780else
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014784fi
14785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14786 fi
14787 if test $ac_cv_c_bigendian = unknown; then
14788 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014790/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014791#include <limits.h>
14792
Martin v. Löwis11437992002-04-12 09:54:03 +000014793int
14794main ()
14795{
Matthias Kloseb9621712010-04-24 17:59:49 +000014796#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14797 bogus endian macros
14798 #endif
14799
Martin v. Löwis11437992002-04-12 09:54:03 +000014800 ;
14801 return 0;
14802}
14803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014804if ac_fn_c_try_compile "$LINENO"; then :
14805 # It does; now see whether it defined to _BIG_ENDIAN or not.
14806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14807/* end confdefs.h. */
14808#include <limits.h>
14809
14810int
14811main ()
14812{
14813#ifndef _BIG_ENDIAN
14814 not big endian
14815 #endif
14816
14817 ;
14818 return 0;
14819}
14820_ACEOF
14821if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014823else
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14827fi
14828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14829 fi
14830 if test $ac_cv_c_bigendian = unknown; then
14831 # Compile a test program.
14832 if test "$cross_compiling" = yes; then :
14833 # Try to guess by grepping values from an object file.
14834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835/* end confdefs.h. */
14836short int ascii_mm[] =
14837 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14838 short int ascii_ii[] =
14839 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14840 int use_ascii (int i) {
14841 return ascii_mm[i] + ascii_ii[i];
14842 }
14843 short int ebcdic_ii[] =
14844 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14845 short int ebcdic_mm[] =
14846 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14847 int use_ebcdic (int i) {
14848 return ebcdic_mm[i] + ebcdic_ii[i];
14849 }
14850 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852int
14853main ()
14854{
14855return use_ascii (foo) == use_ebcdic (foo);
14856 ;
14857 return 0;
14858}
14859_ACEOF
14860if ac_fn_c_try_compile "$LINENO"; then :
14861 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14862 ac_cv_c_bigendian=yes
14863 fi
14864 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14865 if test "$ac_cv_c_bigendian" = unknown; then
14866 ac_cv_c_bigendian=no
14867 else
14868 # finding both strings is unlikely to happen, but who knows?
14869 ac_cv_c_bigendian=unknown
14870 fi
14871 fi
14872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014874else
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014876/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014878int
14879main ()
14880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 /* Are we little or big endian? From Harbison&Steele. */
14883 union
14884 {
14885 long int l;
14886 char c[sizeof (long int)];
14887 } u;
14888 u.l = 1;
14889 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890
14891 ;
14892 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014893}
Martin v. Löwis11437992002-04-12 09:54:03 +000014894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014895if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014896 ac_cv_c_bigendian=no
14897else
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903
Matthias Kloseb9621712010-04-24 17:59:49 +000014904 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14907$as_echo "$ac_cv_c_bigendian" >&6; }
14908 case $ac_cv_c_bigendian in #(
14909 yes)
14910 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14911;; #(
14912 no)
14913 ;; #(
14914 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 ;; #(
14919 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014920 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014921 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014923
Michael W. Hudson54241132001-12-07 15:38:26 +000014924
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014925# ABI version string for Python extension modules. This appears between the
14926# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14927# from the following attributes which affect the ABI of this Python build (in
14928# this order):
14929#
14930# * The Python implementation (always 'cpython-' for us)
14931# * The major and minor version numbers
14932# * --with-pydebug (adds a 'd')
14933# * --with-pymalloc (adds a 'm')
14934# * --with-wide-unicode (adds a 'u')
14935#
14936# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014937# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14938# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014939
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14941$as_echo_n "checking ABIFLAGS... " >&6; }
14942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14943$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14945$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014946SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14948$as_echo "$SOABI" >&6; }
14949
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014950
14951case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014952 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014953 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14954 *)
14955 EXT_SUFFIX=${SHLIB_SUFFIX};;
14956esac
14957
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14959$as_echo_n "checking LDVERSION... " >&6; }
14960LDVERSION='$(VERSION)$(ABIFLAGS)'
14961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14962$as_echo "$LDVERSION" >&6; }
14963
doko@python.org87421192013-01-26 11:39:31 +010014964
doko@ubuntu.com55532312016-06-14 08:55:19 +020014965if test x$PLATFORM_TRIPLET = x; then
14966 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14967else
14968 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14969fi
doko@python.org87421192013-01-26 11:39:31 +010014970
14971
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014972# Check whether right shifting a negative integer extends the sign bit
14973# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14975$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014976if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014978else
Martin v. Löwis11437992002-04-12 09:54:03 +000014979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014981 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014982else
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014984/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014985
14986int main()
14987{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014988 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014989}
14990
Martin v. Löwis11437992002-04-12 09:54:03 +000014991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014992if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014993 ac_cv_rshift_extends_sign=yes
14994else
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014999fi
15000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001fi
15002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15004$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015005if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015006then
Martin v. Löwis11437992002-04-12 09:54:03 +000015007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015009
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015010fi
15011
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015012# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15014$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015015if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015017else
Martin v. Löwis11437992002-04-12 09:54:03 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015020/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015021#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015022int
15023main ()
15024{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015025
15026 FILE *f = fopen("/dev/null", "r");
15027 flockfile(f);
15028 getc_unlocked(f);
15029 funlockfile(f);
15030
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 ;
15032 return 0;
15033}
15034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015035if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015036 ac_cv_have_getc_unlocked=yes
15037else
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 ac_cv_have_getc_unlocked=no
15039fi
15040rm -f core conftest.err conftest.$ac_objext \
15041 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043
Matthias Kloseb9621712010-04-24 17:59:49 +000015044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15045$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015046if test "$ac_cv_have_getc_unlocked" = yes
15047then
Martin v. Löwis11437992002-04-12 09:54:03 +000015048
Matthias Kloseb9621712010-04-24 17:59:49 +000015049$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015050
15051fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015052
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015053# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015054# save the value of LIBS so we don't actually link Python with readline
15055LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015056
Gregory P. Smith18820942008-09-07 06:24:49 +000015057# On some systems we need to link readline to a termcap compatible
15058# library. NOTE: Keep the precedence of listed libraries synchronised
15059# with setup.py.
15060py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15062$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015063for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015064 if test -z "$py_libtermcap"; then
15065 READLINE_LIBS="-lreadline"
15066 else
15067 READLINE_LIBS="-lreadline -l$py_libtermcap"
15068 fi
15069 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015071/* end confdefs.h. */
15072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073/* Override any GCC internal prototype to avoid an error.
15074 Use char because int might match the return type of a GCC
15075 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015076#ifdef __cplusplus
15077extern "C"
15078#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015079char readline ();
15080int
15081main ()
15082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015084 ;
15085 return 0;
15086}
15087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015088if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015089 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015091rm -f core conftest.err conftest.$ac_objext \
15092 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015093 if test $py_cv_lib_readline = yes; then
15094 break
15095 fi
15096done
15097# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15098#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015099if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15101$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015102else
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15104$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015105
Matthias Kloseb9621712010-04-24 17:59:49 +000015106$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015107
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015108fi
15109
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015110# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15112$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015113if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015115else
15116 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015117LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015119/* end confdefs.h. */
15120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121/* Override any GCC internal prototype to avoid an error.
15122 Use char because int might match the return type of a GCC
15123 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015124#ifdef __cplusplus
15125extern "C"
15126#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015127char rl_callback_handler_install ();
15128int
15129main ()
15130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015132 ;
15133 return 0;
15134}
15135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015136if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015137 ac_cv_lib_readline_rl_callback_handler_install=yes
15138else
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015141rm -f core conftest.err conftest.$ac_objext \
15142 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015143LIBS=$ac_check_lib_save_LIBS
15144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15146$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015147if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015150
15151fi
15152
15153
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015154# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015156/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015157#include <readline/readline.h>
15158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015159if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015160 have_readline=yes
15161else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015162 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015163
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015164fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015165rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015166if test $have_readline = yes
15167then
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015169/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015170#include <readline/readline.h>
15171
15172_ACEOF
15173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015177
15178fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015179rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015180
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015182/* end confdefs.h. */
15183#include <readline/readline.h>
15184
15185_ACEOF
15186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015188
Matthias Kloseb9621712010-04-24 17:59:49 +000015189$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015190
15191fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015192rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015193
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015194fi
15195
Martin v. Löwis0daad592001-09-30 21:09:59 +000015196# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15198$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015199if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015201else
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015203LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207/* Override any GCC internal prototype to avoid an error.
15208 Use char because int might match the return type of a GCC
15209 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015210#ifdef __cplusplus
15211extern "C"
15212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015213char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015214int
15215main ()
15216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015217return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 ;
15219 return 0;
15220}
15221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015222if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015224else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015227rm -f core conftest.err conftest.$ac_objext \
15228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015229LIBS=$ac_check_lib_save_LIBS
15230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15232$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015233if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015234
Matthias Kloseb9621712010-04-24 17:59:49 +000015235$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015236
Martin v. Löwis0daad592001-09-30 21:09:59 +000015237fi
15238
Michael W. Hudson54241132001-12-07 15:38:26 +000015239
Thomas Wouters89d996e2007-09-08 17:39:28 +000015240# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15242$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015243if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015244 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015245else
15246 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015247LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015249/* end confdefs.h. */
15250
15251/* Override any GCC internal prototype to avoid an error.
15252 Use char because int might match the return type of a GCC
15253 builtin and then its argument prototype would still apply. */
15254#ifdef __cplusplus
15255extern "C"
15256#endif
15257char rl_completion_display_matches_hook ();
15258int
15259main ()
15260{
15261return rl_completion_display_matches_hook ();
15262 ;
15263 return 0;
15264}
15265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015266if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015267 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15268else
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015271rm -f core conftest.err conftest.$ac_objext \
15272 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015273LIBS=$ac_check_lib_save_LIBS
15274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15276$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015277if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015278
Matthias Kloseb9621712010-04-24 17:59:49 +000015279$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015280
15281fi
15282
15283
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015284# also in 4.0, but not in editline
15285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15286$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15287if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15288 $as_echo_n "(cached) " >&6
15289else
15290 ac_check_lib_save_LIBS=$LIBS
15291LIBS="-lreadline $READLINE_LIBS $LIBS"
15292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15293/* end confdefs.h. */
15294
15295/* Override any GCC internal prototype to avoid an error.
15296 Use char because int might match the return type of a GCC
15297 builtin and then its argument prototype would still apply. */
15298#ifdef __cplusplus
15299extern "C"
15300#endif
15301char rl_resize_terminal ();
15302int
15303main ()
15304{
15305return rl_resize_terminal ();
15306 ;
15307 return 0;
15308}
15309_ACEOF
15310if ac_fn_c_try_link "$LINENO"; then :
15311 ac_cv_lib_readline_rl_resize_terminal=yes
15312else
15313 ac_cv_lib_readline_rl_resize_terminal=no
15314fi
15315rm -f core conftest.err conftest.$ac_objext \
15316 conftest$ac_exeext conftest.$ac_ext
15317LIBS=$ac_check_lib_save_LIBS
15318fi
15319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15320$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15321if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15322
15323$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15324
15325fi
15326
15327
Martin v. Löwis0daad592001-09-30 21:09:59 +000015328# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15330$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015331if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015333else
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015335LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339/* Override any GCC internal prototype to avoid an error.
15340 Use char because int might match the return type of a GCC
15341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015342#ifdef __cplusplus
15343extern "C"
15344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015345char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015346int
15347main ()
15348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ;
15351 return 0;
15352}
15353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015354if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015356else
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015359rm -f core conftest.err conftest.$ac_objext \
15360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015361LIBS=$ac_check_lib_save_LIBS
15362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15364$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015365if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015368
Guido van Rossum353ae582001-07-10 16:45:32 +000015369fi
15370
Jack Jansendd19cf82001-12-06 22:36:17 +000015371
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015372# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015374/* end confdefs.h. */
15375#include <readline/readline.h>
15376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015377if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015378 have_readline=yes
15379else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015380 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015381
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015382fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015383rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015384if test $have_readline = yes
15385then
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015387/* end confdefs.h. */
15388#include <readline/readline.h>
15389
15390_ACEOF
15391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015393
Matthias Kloseb9621712010-04-24 17:59:49 +000015394$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015395
15396fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015397rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015398
15399fi
15400
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15402$as_echo_n "checking for append_history in -lreadline... " >&6; }
15403if ${ac_cv_lib_readline_append_history+:} false; then :
15404 $as_echo_n "(cached) " >&6
15405else
15406 ac_check_lib_save_LIBS=$LIBS
15407LIBS="-lreadline $READLINE_LIBS $LIBS"
15408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15409/* end confdefs.h. */
15410
15411/* Override any GCC internal prototype to avoid an error.
15412 Use char because int might match the return type of a GCC
15413 builtin and then its argument prototype would still apply. */
15414#ifdef __cplusplus
15415extern "C"
15416#endif
15417char append_history ();
15418int
15419main ()
15420{
15421return append_history ();
15422 ;
15423 return 0;
15424}
15425_ACEOF
15426if ac_fn_c_try_link "$LINENO"; then :
15427 ac_cv_lib_readline_append_history=yes
15428else
15429 ac_cv_lib_readline_append_history=no
15430fi
15431rm -f core conftest.err conftest.$ac_objext \
15432 conftest$ac_exeext conftest.$ac_ext
15433LIBS=$ac_check_lib_save_LIBS
15434fi
15435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15436$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15437if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15438
15439$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15440
15441fi
15442
15443
Martin v. Löwis82bca632006-02-10 20:49:30 +000015444# End of readline checks: restore LIBS
15445LIBS=$LIBS_no_readline
15446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15448$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015449if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015451else
Martin v. Löwis11437992002-04-12 09:54:03 +000015452
Matthias Kloseb9621712010-04-24 17:59:49 +000015453if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015454 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015455else
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015457/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015458
15459int main()
15460{
15461 int val1 = nice(1);
15462 if (val1 != -1 && val1 == nice(2))
15463 exit(0);
15464 exit(1);
15465}
15466
Martin v. Löwis11437992002-04-12 09:54:03 +000015467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015468if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015469 ac_cv_broken_nice=yes
15470else
Matthias Kloseb9621712010-04-24 17:59:49 +000015471 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15474 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015475fi
15476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015477fi
15478
Matthias Kloseb9621712010-04-24 17:59:49 +000015479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15480$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015481if test "$ac_cv_broken_nice" = yes
15482then
Martin v. Löwis11437992002-04-12 09:54:03 +000015483
Matthias Kloseb9621712010-04-24 17:59:49 +000015484$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015485
15486fi
15487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15489$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015490if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015492else
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015494 ac_cv_broken_poll=no
15495else
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015497/* end confdefs.h. */
15498
15499#include <poll.h>
15500
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015501int main()
15502{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015503 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015504 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015505
15506 close (42);
15507
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015508 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015509 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015510 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015511 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015512 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015513 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015514 return 1;
15515}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015516
15517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015518if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015519 ac_cv_broken_poll=yes
15520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015527fi
15528
Matthias Kloseb9621712010-04-24 17:59:49 +000015529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15530$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015531if test "$ac_cv_broken_poll" = yes
15532then
15533
Matthias Kloseb9621712010-04-24 17:59:49 +000015534$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015535
15536fi
15537
Brett Cannon43802422005-02-10 20:48:03 +000015538# 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 +000015539# (which is not required by ISO C or UNIX spec) and/or if we support
15540# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015541ac_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 +000015542#include <$ac_cv_struct_tm>
15543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544"
Victor Stinnere0be4232011-10-25 13:06:09 +020015545if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015546
15547cat >>confdefs.h <<_ACEOF
15548#define HAVE_STRUCT_TM_TM_ZONE 1
15549_ACEOF
15550
15551
15552fi
15553
15554if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015557
15558else
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15560"
Victor Stinnere0be4232011-10-25 13:06:09 +020015561if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563else
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565fi
15566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015568#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569_ACEOF
15570
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15572$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015573if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575else
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015577/* end confdefs.h. */
15578#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015579#if !HAVE_DECL_TZNAME
15580extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015581#endif
15582
15583int
15584main ()
15585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015587 ;
15588 return 0;
15589}
15590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015591if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015592 ac_cv_var_tzname=yes
15593else
Matthias Kloseb9621712010-04-24 17:59:49 +000015594 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015596rm -f core conftest.err conftest.$ac_objext \
15597 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15600$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015601 if test $ac_cv_var_tzname = yes; then
15602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015604
15605 fi
15606fi
15607
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015608
Martin v. Löwis1d459062005-03-14 21:23:33 +000015609# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15611$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015612if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015614else
15615
Matthias Kloseb9621712010-04-24 17:59:49 +000015616if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015617 ac_cv_working_tzset=no
15618else
Matthias Kloseb9621712010-04-24 17:59:49 +000015619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015620/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015621
15622#include <stdlib.h>
15623#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015624#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015625
15626#if HAVE_TZNAME
15627extern char *tzname[];
15628#endif
15629
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015630int main()
15631{
Brett Cannon18367812003-09-19 00:59:16 +000015632 /* Note that we need to ensure that not only does tzset(3)
15633 do 'something' with localtime, but it works as documented
15634 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015635 This includes making sure that tzname is set properly if
15636 tm->tm_zone does not exist since it is the alternative way
15637 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015638
15639 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015640 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015641 */
15642
Martin v. Löwis1d459062005-03-14 21:23:33 +000015643 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015644 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15645
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015646 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015647 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015648 if (localtime(&groundhogday)->tm_hour != 0)
15649 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015650#if HAVE_TZNAME
15651 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15652 if (strcmp(tzname[0], "UTC") ||
15653 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15654 exit(1);
15655#endif
Brett Cannon18367812003-09-19 00:59:16 +000015656
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015657 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015658 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015659 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015660 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015661#if HAVE_TZNAME
15662 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15663 exit(1);
15664#endif
Brett Cannon18367812003-09-19 00:59:16 +000015665
15666 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15667 tzset();
15668 if (localtime(&groundhogday)->tm_hour != 11)
15669 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015670#if HAVE_TZNAME
15671 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15672 exit(1);
15673#endif
15674
15675#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015676 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15677 exit(1);
15678 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15679 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015680#endif
Brett Cannon18367812003-09-19 00:59:16 +000015681
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015682 exit(0);
15683}
15684
15685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015686if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015687 ac_cv_working_tzset=yes
15688else
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015693fi
15694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015695fi
15696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15698$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015699if test "$ac_cv_working_tzset" = yes
15700then
15701
Matthias Kloseb9621712010-04-24 17:59:49 +000015702$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015703
15704fi
15705
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015706# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15708$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015709if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015710 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015711else
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015713/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015714#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015715int
15716main ()
15717{
15718
15719struct stat st;
15720st.st_mtim.tv_nsec = 1;
15721
15722 ;
15723 return 0;
15724}
15725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015726if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015727 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015728else
Matthias Kloseb9621712010-04-24 17:59:49 +000015729 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15732fi
15733
Matthias Kloseb9621712010-04-24 17:59:49 +000015734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15735$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015736if test "$ac_cv_stat_tv_nsec" = yes
15737then
15738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015740
15741fi
15742
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015743# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15745$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015746if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015747 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015748else
Matthias Kloseb9621712010-04-24 17:59:49 +000015749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015750/* end confdefs.h. */
15751#include <sys/stat.h>
15752int
15753main ()
15754{
15755
15756struct stat st;
15757st.st_mtimespec.tv_nsec = 1;
15758
15759 ;
15760 return 0;
15761}
15762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015763if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015764 ac_cv_stat_tv_nsec2=yes
15765else
Matthias Kloseb9621712010-04-24 17:59:49 +000015766 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15769fi
15770
Matthias Kloseb9621712010-04-24 17:59:49 +000015771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15772$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015773if test "$ac_cv_stat_tv_nsec2" = yes
15774then
15775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015777
15778fi
15779
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015780# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015781ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015782if test "$cross_compiling" = no; then
15783 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15784fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015785
15786for ac_header in curses.h ncurses.h
15787do :
15788 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15789ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15790if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15791 cat >>confdefs.h <<_ACEOF
15792#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15793_ACEOF
15794
15795fi
15796
15797done
15798
15799
15800# On Solaris, term.h requires curses.h
15801for ac_header in term.h
15802do :
15803 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15804#ifdef HAVE_CURSES_H
15805#include <curses.h>
15806#endif
15807
15808"
15809if test "x$ac_cv_header_term_h" = xyes; then :
15810 cat >>confdefs.h <<_ACEOF
15811#define HAVE_TERM_H 1
15812_ACEOF
15813
15814fi
15815
15816done
15817
15818
Jack Jansen666b1e72001-10-31 12:11:48 +000015819# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15821$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015822if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015823 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015824else
Matthias Kloseb9621712010-04-24 17:59:49 +000015825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015826/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015827#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015828int
15829main ()
15830{
Jack Jansen666b1e72001-10-31 12:11:48 +000015831
15832 int rtn;
15833 rtn = mvwdelch(0,0,0);
15834
Martin v. Löwis11437992002-04-12 09:54:03 +000015835 ;
15836 return 0;
15837}
15838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015839if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015840 ac_cv_mvwdelch_is_expression=yes
15841else
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15845fi
15846
Matthias Kloseb9621712010-04-24 17:59:49 +000015847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15848$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015849
15850if test "$ac_cv_mvwdelch_is_expression" = yes
15851then
Martin v. Löwis11437992002-04-12 09:54:03 +000015852
Matthias Kloseb9621712010-04-24 17:59:49 +000015853$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015854
15855fi
15856
Matthias Kloseb9621712010-04-24 17:59:49 +000015857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15858$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015859if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015860 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015861else
Matthias Kloseb9621712010-04-24 17:59:49 +000015862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015863/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015864#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015865int
15866main ()
15867{
Jack Jansen666b1e72001-10-31 12:11:48 +000015868
15869 WINDOW *w;
15870 w->_flags = 0;
15871
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 ;
15873 return 0;
15874}
15875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015876if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015877 ac_cv_window_has_flags=yes
15878else
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15882fi
15883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15885$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015886
Jack Jansen666b1e72001-10-31 12:11:48 +000015887
15888if test "$ac_cv_window_has_flags" = yes
15889then
Martin v. Löwis11437992002-04-12 09:54:03 +000015890
Matthias Kloseb9621712010-04-24 17:59:49 +000015891$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015892
15893fi
15894
Matthias Kloseb9621712010-04-24 17:59:49 +000015895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15896$as_echo_n "checking for is_term_resized... " >&6; }
15897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015898/* end confdefs.h. */
15899#include <curses.h>
15900int
15901main ()
15902{
15903void *x=is_term_resized
15904 ;
15905 return 0;
15906}
15907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015908if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015911
Matthias Kloseb159a552010-04-25 21:00:44 +000015912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015913$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015914else
Matthias Kloseb9621712010-04-24 17:59:49 +000015915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15916$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015917
15918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15920
Matthias Kloseb9621712010-04-24 17:59:49 +000015921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15922$as_echo_n "checking for resize_term... " >&6; }
15923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015924/* end confdefs.h. */
15925#include <curses.h>
15926int
15927main ()
15928{
15929void *x=resize_term
15930 ;
15931 return 0;
15932}
15933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015934if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015935
Matthias Kloseb9621712010-04-24 17:59:49 +000015936$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015937
Matthias Kloseb159a552010-04-25 21:00:44 +000015938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015939$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015940else
Matthias Kloseb9621712010-04-24 17:59:49 +000015941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15942$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015943
15944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15946
Matthias Kloseb9621712010-04-24 17:59:49 +000015947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15948$as_echo_n "checking for resizeterm... " >&6; }
15949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015950/* end confdefs.h. */
15951#include <curses.h>
15952int
15953main ()
15954{
15955void *x=resizeterm
15956 ;
15957 return 0;
15958}
15959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015960if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015961
Matthias Kloseb9621712010-04-24 17:59:49 +000015962$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015963
Matthias Kloseb159a552010-04-25 21:00:44 +000015964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015965$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015966else
Matthias Kloseb9621712010-04-24 17:59:49 +000015967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15968$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015969
15970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015972# last curses configure check
15973CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15976$as_echo "$as_me: checking for device files" >&6;}
15977
15978if test "x$cross_compiling" = xyes; then
15979 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15981$as_echo_n "checking for /dev/ptmx... " >&6; }
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15983$as_echo "not set" >&6; }
15984 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15985 fi
15986 if test "${ac_cv_file__dev_ptc+set}" != set; then
15987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15988$as_echo_n "checking for /dev/ptc... " >&6; }
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15990$as_echo "not set" >&6; }
15991 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15992 fi
15993fi
15994
Matthias Kloseb9621712010-04-24 17:59:49 +000015995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15996$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015997if ${ac_cv_file__dev_ptmx+:} false; then :
15998 $as_echo_n "(cached) " >&6
15999else
16000 test "$cross_compiling" = yes &&
16001 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16002if test -r "/dev/ptmx"; then
16003 ac_cv_file__dev_ptmx=yes
16004else
16005 ac_cv_file__dev_ptmx=no
16006fi
16007fi
16008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16009$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16010if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016011
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016012fi
16013
16014if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016015
Matthias Kloseb9621712010-04-24 17:59:49 +000016016$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016017
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16020$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016021if ${ac_cv_file__dev_ptc+:} false; then :
16022 $as_echo_n "(cached) " >&6
16023else
16024 test "$cross_compiling" = yes &&
16025 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16026if test -r "/dev/ptc"; then
16027 ac_cv_file__dev_ptc=yes
16028else
16029 ac_cv_file__dev_ptc=no
16030fi
16031fi
16032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16033$as_echo "$ac_cv_file__dev_ptc" >&6; }
16034if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016035
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016036fi
16037
16038if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016039
Matthias Kloseb9621712010-04-24 17:59:49 +000016040$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016041
Neal Norwitz865400f2003-03-21 01:42:58 +000016042fi
16043
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016044if test $ac_sys_system = Darwin
16045then
16046 LIBS="$LIBS -framework CoreFoundation"
16047fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016048
Matthias Kloseb9621712010-04-24 17:59:49 +000016049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16050$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016051if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016052 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016053else
Matthias Kloseb9621712010-04-24 17:59:49 +000016054 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016055 ac_cv_have_size_t_format="cross -- assuming yes"
16056
Thomas Wouters477c8d52006-05-27 19:21:47 +000016057else
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016059/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016060
Thomas Wouters477c8d52006-05-27 19:21:47 +000016061#include <stdio.h>
16062#include <stddef.h>
16063#include <string.h>
16064
Christian Heimes2c181612007-12-17 20:04:13 +000016065#ifdef HAVE_SYS_TYPES_H
16066#include <sys/types.h>
16067#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016068
16069#ifdef HAVE_SSIZE_T
16070typedef ssize_t Py_ssize_t;
16071#elif SIZEOF_VOID_P == SIZEOF_LONG
16072typedef long Py_ssize_t;
16073#else
16074typedef int Py_ssize_t;
16075#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016076
Christian Heimes2c181612007-12-17 20:04:13 +000016077int main()
16078{
16079 char buffer[256];
16080
Thomas Wouters477c8d52006-05-27 19:21:47 +000016081 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16082 return 1;
16083
Thomas Wouters89f507f2006-12-13 04:49:30 +000016084 if (strcmp(buffer, "123"))
16085 return 1;
16086
16087 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16088 return 1;
16089
16090 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016091 return 1;
16092
16093 return 0;
16094}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016095
Thomas Wouters477c8d52006-05-27 19:21:47 +000016096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016097if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016098 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016099else
Matthias Kloseb9621712010-04-24 17:59:49 +000016100 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016104fi
16105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16108$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016109if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016110
Matthias Kloseb9621712010-04-24 17:59:49 +000016111$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016112
16113fi
16114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016116#ifdef HAVE_SYS_TYPES_H
16117#include <sys/types.h>
16118#endif
16119#ifdef HAVE_SYS_SOCKET_H
16120#include <sys/socket.h>
16121#endif
16122
Matthias Kloseb9621712010-04-24 17:59:49 +000016123"
Victor Stinnere0be4232011-10-25 13:06:09 +020016124if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016125
Martin v. Löwis11437992002-04-12 09:54:03 +000016126else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016127
Matthias Kloseb9621712010-04-24 17:59:49 +000016128$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016129
16130fi
16131
Michael W. Hudson54241132001-12-07 15:38:26 +000016132
Matthias Kloseb9621712010-04-24 17:59:49 +000016133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16134$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016135if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016136 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016137else
Matthias Kloseb9621712010-04-24 17:59:49 +000016138 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016139 ac_cv_broken_mbstowcs=no
16140else
Matthias Kloseb9621712010-04-24 17:59:49 +000016141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016142/* end confdefs.h. */
16143
Stefan Krah19c21392012-11-22 23:47:32 +010016144#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016145#include<stdlib.h>
16146int main() {
16147 size_t len = -1;
16148 const char *str = "text";
16149 len = mbstowcs(NULL, str, 0);
16150 return (len != 4);
16151}
16152
16153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016154if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016155 ac_cv_broken_mbstowcs=no
16156else
Matthias Kloseb9621712010-04-24 17:59:49 +000016157 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016161fi
16162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016163fi
16164
Matthias Kloseb9621712010-04-24 17:59:49 +000016165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16166$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016167if test "$ac_cv_broken_mbstowcs" = yes
16168then
16169
Matthias Kloseb9621712010-04-24 17:59:49 +000016170$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016171
16172fi
16173
Antoine Pitroub52ec782009-01-25 16:34:23 +000016174# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16176$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016177
16178# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016179if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016180 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016181if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016182then
16183
Matthias Kloseb9621712010-04-24 17:59:49 +000016184$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016185
Matthias Kloseb9621712010-04-24 17:59:49 +000016186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16187$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016188fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016189if test "$withval" = no
16190then
16191
16192$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16195$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016196fi
16197
Antoine Pitrou042b1282010-08-13 21:15:58 +000016198else
16199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16200$as_echo "no value specified" >&6; }
16201fi
16202
Antoine Pitroub52ec782009-01-25 16:34:23 +000016203
Matthias Kloseb17289e2012-03-15 19:51:34 +010016204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16205$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16206if ${ac_cv_computed_gotos+:} false; then :
16207 $as_echo_n "(cached) " >&6
16208else
16209 if test "$cross_compiling" = yes; then :
16210 if test "${with_computed_gotos+set}" = set; then
16211 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16212 else
16213 ac_cv_computed_gotos=no
16214 fi
16215else
16216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16217/* end confdefs.h. */
16218
16219int main(int argc, char **argv)
16220{
16221 static void *targets[1] = { &&LABEL1 };
16222 goto LABEL2;
16223LABEL1:
16224 return 0;
16225LABEL2:
16226 goto *targets[0];
16227 return 1;
16228}
16229
16230_ACEOF
16231if ac_fn_c_try_run "$LINENO"; then :
16232 ac_cv_computed_gotos=yes
16233else
16234 ac_cv_computed_gotos=no
16235fi
16236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16237 conftest.$ac_objext conftest.beam conftest.$ac_ext
16238fi
16239
16240fi
16241
16242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16243$as_echo "$ac_cv_computed_gotos" >&6; }
16244case "$ac_cv_computed_gotos" in yes*)
16245
16246$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16247
16248esac
16249
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016250case $ac_sys_system in
16251AIX*)
16252
16253$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16254 ;;
16255esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016256
Michael W. Hudson54241132001-12-07 15:38:26 +000016257
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016258
16259
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016260for h in `(cd $srcdir;echo Python/thread_*.h)`
16261do
16262 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16263done
16264
Michael W. Hudson54241132001-12-07 15:38:26 +000016265
Ned Deily0db50cf2014-07-25 12:41:31 -070016266SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16268$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016269for dir in $SRCDIRS; do
16270 if test ! -d $dir; then
16271 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016272 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016273done
Matthias Kloseb9621712010-04-24 17:59:49 +000016274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16275$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016276
Stefan Krah1919b7e2012-03-21 18:25:23 +010016277# Availability of -O2:
16278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16279$as_echo_n "checking for -O2... " >&6; }
16280saved_cflags="$CFLAGS"
16281CFLAGS="-O2"
16282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16283/* end confdefs.h. */
16284
16285int
16286main ()
16287{
16288
16289
16290 ;
16291 return 0;
16292}
16293_ACEOF
16294if ac_fn_c_try_compile "$LINENO"; then :
16295 have_O2=yes
16296else
16297 have_O2=no
16298fi
16299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16301$as_echo "$have_O2" >&6; }
16302CFLAGS="$saved_cflags"
16303
16304# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16305# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16307$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16308saved_cflags="$CFLAGS"
16309CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16310if test "$have_O2" = no; then
16311 CFLAGS=""
16312fi
16313if test "$cross_compiling" = yes; then :
16314 have_glibc_memmove_bug=undefined
16315else
16316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16317/* end confdefs.h. */
16318
16319#include <stdio.h>
16320#include <stdlib.h>
16321#include <string.h>
16322void foo(void *p, void *q) { memmove(p, q, 19); }
16323int main() {
16324 char a[32] = "123456789000000000";
16325 foo(&a[9], a);
16326 if (strcmp(a, "123456789123456789000000000") != 0)
16327 return 1;
16328 foo(a, &a[9]);
16329 if (strcmp(a, "123456789000000000") != 0)
16330 return 1;
16331 return 0;
16332}
16333
16334_ACEOF
16335if ac_fn_c_try_run "$LINENO"; then :
16336 have_glibc_memmove_bug=no
16337else
16338 have_glibc_memmove_bug=yes
16339fi
16340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16341 conftest.$ac_objext conftest.beam conftest.$ac_ext
16342fi
16343
16344CFLAGS="$saved_cflags"
16345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16346$as_echo "$have_glibc_memmove_bug" >&6; }
16347if test "$have_glibc_memmove_bug" = yes; then
16348
16349$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16350
16351fi
16352
16353if test "$have_gcc_asm_for_x87" = yes; then
16354 # Some versions of gcc miscompile inline asm:
16355 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16356 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16357 case $CC in
16358 *gcc*)
16359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16360$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16361 saved_cflags="$CFLAGS"
16362 CFLAGS="-O2"
16363 if test "$cross_compiling" = yes; then :
16364 have_ipa_pure_const_bug=undefined
16365else
16366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16367/* end confdefs.h. */
16368
16369 __attribute__((noinline)) int
16370 foo(int *p) {
16371 int r;
16372 asm ( "movl \$6, (%1)\n\t"
16373 "xorl %0, %0\n\t"
16374 : "=r" (r) : "r" (p) : "memory"
16375 );
16376 return r;
16377 }
16378 int main() {
16379 int p = 8;
16380 if ((foo(&p) ? : p) != 6)
16381 return 1;
16382 return 0;
16383 }
16384
16385_ACEOF
16386if ac_fn_c_try_run "$LINENO"; then :
16387 have_ipa_pure_const_bug=no
16388else
16389 have_ipa_pure_const_bug=yes
16390fi
16391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16392 conftest.$ac_objext conftest.beam conftest.$ac_ext
16393fi
16394
16395 CFLAGS="$saved_cflags"
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16397$as_echo "$have_ipa_pure_const_bug" >&6; }
16398 if test "$have_ipa_pure_const_bug" = yes; then
16399
16400$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16401
16402 fi
16403 ;;
16404 esac
16405fi
16406
Victor Stinner4f5366e2015-01-09 02:13:19 +010016407# Check for stdatomic.h
16408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16409$as_echo_n "checking for stdatomic.h... " >&6; }
16410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16411/* end confdefs.h. */
16412
16413
16414 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016415 atomic_int value = ATOMIC_VAR_INIT(1);
16416 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016417 int main() {
16418 int loaded_value = atomic_load(&value);
16419 return 0;
16420 }
16421
16422
16423_ACEOF
16424if ac_fn_c_try_link "$LINENO"; then :
16425 have_stdatomic_h=yes
16426else
16427 have_stdatomic_h=no
16428fi
16429rm -f core conftest.err conftest.$ac_objext \
16430 conftest$ac_exeext conftest.$ac_ext
16431
16432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16433$as_echo "$have_stdatomic_h" >&6; }
16434
16435if test "$have_stdatomic_h" = yes; then
16436
16437$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16438
16439fi
16440
16441# Check for GCC >= 4.7 __atomic builtins
16442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16443$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16445/* end confdefs.h. */
16446
16447
16448 volatile int val = 1;
16449 int main() {
16450 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16451 return 0;
16452 }
16453
16454
16455_ACEOF
16456if ac_fn_c_try_link "$LINENO"; then :
16457 have_builtin_atomic=yes
16458else
16459 have_builtin_atomic=no
16460fi
16461rm -f core conftest.err conftest.$ac_objext \
16462 conftest$ac_exeext conftest.$ac_ext
16463
16464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16465$as_echo "$have_builtin_atomic" >&6; }
16466
16467if test "$have_builtin_atomic" = yes; then
16468
16469$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16470
16471fi
16472
Ned Deily322f5ba2013-11-21 23:01:59 -080016473# ensurepip option
16474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16475$as_echo_n "checking for ensurepip... " >&6; }
16476
16477# Check whether --with-ensurepip was given.
16478if test "${with_ensurepip+set}" = set; then :
16479 withval=$with_ensurepip;
16480else
16481 with_ensurepip=upgrade
16482fi
16483
16484case $with_ensurepip in #(
16485 yes|upgrade) :
16486 ENSUREPIP=upgrade ;; #(
16487 install) :
16488 ENSUREPIP=install ;; #(
16489 no) :
16490 ENSUREPIP=no ;; #(
16491 *) :
16492 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16493esac
16494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16495$as_echo "$ENSUREPIP" >&6; }
16496
16497
Victor Stinner35a97c02015-03-08 02:59:09 +010016498# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16500$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16502/* end confdefs.h. */
16503
16504
16505 #include <dirent.h>
16506
16507 int main() {
16508 struct dirent entry;
16509 return entry.d_type == DT_UNKNOWN;
16510 }
16511
16512
16513_ACEOF
16514if ac_fn_c_try_link "$LINENO"; then :
16515 have_dirent_d_type=yes
16516else
16517 have_dirent_d_type=no
16518fi
16519rm -f core conftest.err conftest.$ac_objext \
16520 conftest$ac_exeext conftest.$ac_ext
16521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16522$as_echo "$have_dirent_d_type" >&6; }
16523
16524if test "$have_dirent_d_type" = yes; then
16525
16526$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16527
16528fi
16529
Victor Stinner9eb57c52015-03-19 22:21:49 +010016530# check if the Linux getrandom() syscall is available
16531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16532$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16534/* end confdefs.h. */
16535
16536
Victor Stinner1b80b242016-04-12 22:34:58 +020016537 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016538 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016539 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016540
16541 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016542 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016543 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016544 const int flags = GRND_NONBLOCK;
16545 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016546 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016547 return 0;
16548 }
16549
16550
16551_ACEOF
16552if ac_fn_c_try_link "$LINENO"; then :
16553 have_getrandom_syscall=yes
16554else
16555 have_getrandom_syscall=no
16556fi
16557rm -f core conftest.err conftest.$ac_objext \
16558 conftest$ac_exeext conftest.$ac_ext
16559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16560$as_echo "$have_getrandom_syscall" >&6; }
16561
16562if test "$have_getrandom_syscall" = yes; then
16563
16564$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16565
16566fi
16567
Victor Stinner3abf44e2015-09-18 15:38:37 +020016568# check if the getrandom() function is available
16569# the test was written for the Solaris function of <sys/random.h>
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16571$as_echo_n "checking for the getrandom() function... " >&6; }
16572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573/* end confdefs.h. */
16574
16575
16576 #include <sys/random.h>
16577
16578 int main() {
16579 char buffer[1];
16580 const size_t buflen = sizeof(buffer);
16581 const int flags = 0;
16582 /* ignore the result, Python checks for ENOSYS at runtime */
16583 (void)getrandom(buffer, buflen, flags);
16584 return 0;
16585 }
16586
16587
16588_ACEOF
16589if ac_fn_c_try_link "$LINENO"; then :
16590 have_getrandom=yes
16591else
16592 have_getrandom=no
16593fi
16594rm -f core conftest.err conftest.$ac_objext \
16595 conftest$ac_exeext conftest.$ac_ext
16596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16597$as_echo "$have_getrandom" >&6; }
16598
16599if test "$have_getrandom" = yes; then
16600
16601$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16602
16603fi
16604
Guido van Rossum627b2d71993-12-24 10:39:16 +000016605# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016606ac_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 +000016607
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016608ac_config_files="$ac_config_files Modules/ld_so_aix"
16609
Martin v. Löwis11437992002-04-12 09:54:03 +000016610cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016611# This file is a shell script that caches the results of configure
16612# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016613# scripts and configure runs, see configure's option --config-cache.
16614# It is not useful on other systems. If it contains results you don't
16615# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016616#
Martin v. Löwis11437992002-04-12 09:54:03 +000016617# config.status only pays attention to the cache file if you give it
16618# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016619#
Skip Montanaro6dead952003-09-25 14:50:04 +000016620# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016621# loading this file, other *unset* `ac_cv_foo' will be assigned the
16622# following values.
16623
16624_ACEOF
16625
Guido van Rossumf78abae1997-01-21 22:02:36 +000016626# The following way of writing the cache mishandles newlines in values,
16627# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016629# Ultrix sh set writes to stderr and can't be redirected directly,
16630# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631(
16632 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16633 eval ac_val=\$$ac_var
16634 case $ac_val in #(
16635 *${as_nl}*)
16636 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016637 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16638$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 esac
16640 case $ac_var in #(
16641 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016642 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16643 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 esac ;;
16645 esac
16646 done
16647
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16650 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016651 # `set' does not quote correctly, so add quotes: double-quote
16652 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016653 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016654 "s/'/'\\\\''/g;
16655 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 *)
16658 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661 esac |
16662 sort
16663) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16669 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16671 :end' >>confcache
16672if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16673 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016674 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16676$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016677 if test ! -f "$cache_file" || test -h "$cache_file"; then
16678 cat confcache >"$cache_file"
16679 else
16680 case $cache_file in #(
16681 */* | ?:*)
16682 mv -f confcache "$cache_file"$$ &&
16683 mv -f "$cache_file"$$ "$cache_file" ;; #(
16684 *)
16685 mv -f confcache "$cache_file" ;;
16686 esac
16687 fi
16688 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016689 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016690 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16691$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016692 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016693fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016694rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016695
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016696test "x$prefix" = xNONE && prefix=$ac_default_prefix
16697# Let make expand exec_prefix.
16698test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016699
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016700DEFS=-DHAVE_CONFIG_H
16701
Skip Montanaro6dead952003-09-25 14:50:04 +000016702ac_libobjs=
16703ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016704U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016705for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16706 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016708 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16710 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016711 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16712 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016713done
16714LIBOBJS=$ac_libobjs
16715
16716LTLIBOBJS=$ac_ltlibobjs
16717
16718
Martin v. Löwis11437992002-04-12 09:54:03 +000016719
Matthias Kloseb9621712010-04-24 17:59:49 +000016720
Victor Stinnere0be4232011-10-25 13:06:09 +020016721: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016722ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016723ac_clean_files_save=$ac_clean_files
16724ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016725{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16726$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16727as_write_fail=0
16728cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016729#! $SHELL
16730# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016731# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016732# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016733# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016734
Martin v. Löwis11437992002-04-12 09:54:03 +000016735debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016736ac_cs_recheck=false
16737ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016738
Matthias Kloseb9621712010-04-24 17:59:49 +000016739SHELL=\${CONFIG_SHELL-$SHELL}
16740export SHELL
16741_ASEOF
16742cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16743## -------------------- ##
16744## M4sh Initialization. ##
16745## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747# Be more Bourne compatible
16748DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016749if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016750 emulate sh
16751 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016752 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016753 # is contrary to our usage. Disable this feature.
16754 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016756else
Matthias Kloseb9621712010-04-24 17:59:49 +000016757 case `(set -o) 2>/dev/null` in #(
16758 *posix*) :
16759 set -o posix ;; #(
16760 *) :
16761 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016763fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016764
16765
Matthias Kloseb9621712010-04-24 17:59:49 +000016766as_nl='
16767'
16768export as_nl
16769# Printing a long string crashes Solaris 7 /usr/bin/printf.
16770as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16771as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16772as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16773# Prefer a ksh shell builtin over an external printf program on Solaris,
16774# but without wasting forks for bash or zsh.
16775if test -z "$BASH_VERSION$ZSH_VERSION" \
16776 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16777 as_echo='print -r --'
16778 as_echo_n='print -rn --'
16779elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16780 as_echo='printf %s\n'
16781 as_echo_n='printf %s'
16782else
16783 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16784 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16785 as_echo_n='/usr/ucb/echo -n'
16786 else
16787 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16788 as_echo_n_body='eval
16789 arg=$1;
16790 case $arg in #(
16791 *"$as_nl"*)
16792 expr "X$arg" : "X\\(.*\\)$as_nl";
16793 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16794 esac;
16795 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16796 '
16797 export as_echo_n_body
16798 as_echo_n='sh -c $as_echo_n_body as_echo'
16799 fi
16800 export as_echo_body
16801 as_echo='sh -c $as_echo_body as_echo'
16802fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016803
16804# The user is always right.
16805if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016806 PATH_SEPARATOR=:
16807 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16808 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16809 PATH_SEPARATOR=';'
16810 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016813
16814# IFS
16815# We need space, tab and new line, in precisely that order. Quoting is
16816# there to prevent editors from complaining about space-tab.
16817# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16818# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819IFS=" "" $as_nl"
16820
16821# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016822as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016823case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824 *[\\/]* ) as_myself=$0 ;;
16825 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016826for as_dir in $PATH
16827do
16828 IFS=$as_save_IFS
16829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016830 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16831 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834 ;;
16835esac
16836# We did not find ourselves, most probably we were run as `sh COMMAND'
16837# in which case we are not to be found in the path.
16838if test "x$as_myself" = x; then
16839 as_myself=$0
16840fi
16841if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016842 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16843 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016844fi
16845
Matthias Kloseb9621712010-04-24 17:59:49 +000016846# Unset variables that we do not need and which cause bugs (e.g. in
16847# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16848# suppresses any "Segmentation fault" message there. '((' could
16849# trigger a bug in pdksh 5.2.14.
16850for as_var in BASH_ENV ENV MAIL MAILPATH
16851do eval test x\${$as_var+set} = xset \
16852 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853done
16854PS1='$ '
16855PS2='> '
16856PS4='+ '
16857
16858# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016859LC_ALL=C
16860export LC_ALL
16861LANGUAGE=C
16862export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863
Matthias Kloseb9621712010-04-24 17:59:49 +000016864# CDPATH.
16865(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16866
16867
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016868# as_fn_error STATUS ERROR [LINENO LOG_FD]
16869# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016870# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16871# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016872# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016873as_fn_error ()
16874{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016875 as_status=$1; test $as_status -eq 0 && as_status=1
16876 if test "$4"; then
16877 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16878 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016879 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016880 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016881 as_fn_exit $as_status
16882} # as_fn_error
16883
16884
16885# as_fn_set_status STATUS
16886# -----------------------
16887# Set $? to STATUS, without forking.
16888as_fn_set_status ()
16889{
16890 return $1
16891} # as_fn_set_status
16892
16893# as_fn_exit STATUS
16894# -----------------
16895# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16896as_fn_exit ()
16897{
16898 set +e
16899 as_fn_set_status $1
16900 exit $1
16901} # as_fn_exit
16902
16903# as_fn_unset VAR
16904# ---------------
16905# Portably unset VAR.
16906as_fn_unset ()
16907{
16908 { eval $1=; unset $1;}
16909}
16910as_unset=as_fn_unset
16911# as_fn_append VAR VALUE
16912# ----------------------
16913# Append the text in VALUE to the end of the definition contained in VAR. Take
16914# advantage of any shell optimizations that allow amortized linear growth over
16915# repeated appends, instead of the typical quadratic growth present in naive
16916# implementations.
16917if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16918 eval 'as_fn_append ()
16919 {
16920 eval $1+=\$2
16921 }'
16922else
16923 as_fn_append ()
16924 {
16925 eval $1=\$$1\$2
16926 }
16927fi # as_fn_append
16928
16929# as_fn_arith ARG...
16930# ------------------
16931# Perform arithmetic evaluation on the ARGs, and store the result in the
16932# global $as_val. Take advantage of shells that can avoid forks. The arguments
16933# must be portable across $(()) and expr.
16934if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16935 eval 'as_fn_arith ()
16936 {
16937 as_val=$(( $* ))
16938 }'
16939else
16940 as_fn_arith ()
16941 {
16942 as_val=`expr "$@" || test $? -eq 1`
16943 }
16944fi # as_fn_arith
16945
16946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947if expr a : '\(a\)' >/dev/null 2>&1 &&
16948 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16949 as_expr=expr
16950else
16951 as_expr=false
16952fi
16953
16954if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16955 as_basename=basename
16956else
16957 as_basename=false
16958fi
16959
Matthias Kloseb9621712010-04-24 17:59:49 +000016960if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16961 as_dirname=dirname
16962else
16963 as_dirname=false
16964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966as_me=`$as_basename -- "$0" ||
16967$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16968 X"$0" : 'X\(//\)$' \| \
16969 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016970$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016971 sed '/^.*\/\([^/][^/]*\)\/*$/{
16972 s//\1/
16973 q
16974 }
16975 /^X\/\(\/\/\)$/{
16976 s//\1/
16977 q
16978 }
16979 /^X\/\(\/\).*/{
16980 s//\1/
16981 q
16982 }
16983 s/.*/./; q'`
16984
Matthias Kloseb9621712010-04-24 17:59:49 +000016985# Avoid depending upon Character Ranges.
16986as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16987as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16988as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16989as_cr_digits='0123456789'
16990as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991
16992ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016993case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016994-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016995 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016997 xy) ECHO_C='\c';;
16998 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16999 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000 esac;;
17001*)
17002 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017003esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017004
Martin v. Löwis11437992002-04-12 09:54:03 +000017005rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006if test -d conf$$.dir; then
17007 rm -f conf$$.dir/conf$$.file
17008else
17009 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017010 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017012if (echo >conf$$.file) 2>/dev/null; then
17013 if ln -s conf$$.file conf$$ 2>/dev/null; then
17014 as_ln_s='ln -s'
17015 # ... but there are two gotchas:
17016 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17017 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017018 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017019 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017020 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017021 elif ln conf$$.file conf$$ 2>/dev/null; then
17022 as_ln_s=ln
17023 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017024 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017025 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017026else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017027 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17030rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017031
Matthias Kloseb9621712010-04-24 17:59:49 +000017032
17033# as_fn_mkdir_p
17034# -------------
17035# Create "$as_dir" as a directory, including parents if necessary.
17036as_fn_mkdir_p ()
17037{
17038
17039 case $as_dir in #(
17040 -*) as_dir=./$as_dir;;
17041 esac
17042 test -d "$as_dir" || eval $as_mkdir_p || {
17043 as_dirs=
17044 while :; do
17045 case $as_dir in #(
17046 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17047 *) as_qdir=$as_dir;;
17048 esac
17049 as_dirs="'$as_qdir' $as_dirs"
17050 as_dir=`$as_dirname -- "$as_dir" ||
17051$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17052 X"$as_dir" : 'X\(//\)[^/]' \| \
17053 X"$as_dir" : 'X\(//\)$' \| \
17054 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17055$as_echo X"$as_dir" |
17056 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17057 s//\1/
17058 q
17059 }
17060 /^X\(\/\/\)[^/].*/{
17061 s//\1/
17062 q
17063 }
17064 /^X\(\/\/\)$/{
17065 s//\1/
17066 q
17067 }
17068 /^X\(\/\).*/{
17069 s//\1/
17070 q
17071 }
17072 s/.*/./; q'`
17073 test -d "$as_dir" && break
17074 done
17075 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017076 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017077
17078
17079} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017080if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017081 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017082else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017083 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017084 as_mkdir_p=false
17085fi
17086
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017087
17088# as_fn_executable_p FILE
17089# -----------------------
17090# Test if FILE is an executable regular file.
17091as_fn_executable_p ()
17092{
17093 test -f "$1" && test -x "$1"
17094} # as_fn_executable_p
17095as_test_x='test -x'
17096as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017097
17098# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017099as_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 +000017100
17101# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017102as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017103
17104
Martin v. Löwis11437992002-04-12 09:54:03 +000017105exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017106## ----------------------------------- ##
17107## Main body of $CONFIG_STATUS script. ##
17108## ----------------------------------- ##
17109_ASEOF
17110test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017111
Matthias Kloseb9621712010-04-24 17:59:49 +000017112cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17113# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017114# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115# values after options handling.
17116ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017117This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017118generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017119
17120 CONFIG_FILES = $CONFIG_FILES
17121 CONFIG_HEADERS = $CONFIG_HEADERS
17122 CONFIG_LINKS = $CONFIG_LINKS
17123 CONFIG_COMMANDS = $CONFIG_COMMANDS
17124 $ $0 $@
17125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126on `(hostname || uname -n) 2>/dev/null | sed 1q`
17127"
17128
Martin v. Löwis11437992002-04-12 09:54:03 +000017129_ACEOF
17130
Matthias Kloseb9621712010-04-24 17:59:49 +000017131case $ac_config_files in *"
17132"*) set x $ac_config_files; shift; ac_config_files=$*;;
17133esac
17134
17135case $ac_config_headers in *"
17136"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17137esac
17138
17139
17140cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017141# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017142config_files="$ac_config_files"
17143config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017146
Matthias Kloseb9621712010-04-24 17:59:49 +000017147cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017148ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017149\`$as_me' instantiates files and other configuration actions
17150from templates according to the current configuration. Unless the files
17151and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
Matthias Kloseb9621712010-04-24 17:59:49 +000017153Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
17155 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017156 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017157 --config print configuration, then exit
17158 -q, --quiet, --silent
17159 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017160 -d, --debug don't remove temporary files
17161 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017162 --file=FILE[:TEMPLATE]
17163 instantiate the configuration file FILE
17164 --header=FILE[:TEMPLATE]
17165 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017166
17167Configuration files:
17168$config_files
17169
17170Configuration headers:
17171$config_headers
17172
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017173Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17177ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017178ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017179python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017180configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017181 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017182
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017183Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017184This config.status script is free software; the Free Software Foundation
17185gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186
17187ac_pwd='$ac_pwd'
17188srcdir='$srcdir'
17189INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017190MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017191test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017192_ACEOF
17193
Matthias Kloseb9621712010-04-24 17:59:49 +000017194cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17195# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017196ac_need_defaults=:
17197while test $# != 0
17198do
17199 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017200 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17202 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017203 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017204 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017205 --*=)
17206 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17207 ac_optarg=
17208 ac_shift=:
17209 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017211 ac_option=$1
17212 ac_optarg=$2
17213 ac_shift=shift
17214 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 esac
17216
Skip Montanaro6dead952003-09-25 14:50:04 +000017217 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017218 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017219 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17220 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017222 $as_echo "$ac_cs_version"; exit ;;
17223 --config | --confi | --conf | --con | --co | --c )
17224 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017226 debug=: ;;
17227 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017228 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017229 case $ac_optarg in
17230 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017231 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017232 esac
17233 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017234 ac_need_defaults=false;;
17235 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017236 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017237 case $ac_optarg in
17238 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17239 esac
17240 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017241 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242 --he | --h)
17243 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017244 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017245Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017247 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017248 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17249 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17250 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017251
17252 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017253 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017254Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017255
Matthias Kloseb9621712010-04-24 17:59:49 +000017256 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017258
17259 esac
17260 shift
17261done
17262
Skip Montanaro6dead952003-09-25 14:50:04 +000017263ac_configure_extra_args=
17264
17265if $ac_cs_silent; then
17266 exec 6>/dev/null
17267 ac_configure_extra_args="$ac_configure_extra_args --silent"
17268fi
17269
17270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017272if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017273 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017274 shift
17275 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17276 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017278 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017279fi
17280
Martin v. Löwis11437992002-04-12 09:54:03 +000017281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017282cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283exec 5>>config.log
17284{
17285 echo
17286 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17287## Running $as_me. ##
17288_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017289 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017293cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017295
Matthias Kloseb9621712010-04-24 17:59:49 +000017296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297
17298# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017299for ac_config_target in $ac_config_targets
17300do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 case $ac_config_target in
17302 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17303 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17304 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017305 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17306 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17308 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017309 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017310 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017311 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312
Victor Stinnere0be4232011-10-25 13:06:09 +020017313 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017314 esac
17315done
17316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317
Martin v. Löwis11437992002-04-12 09:54:03 +000017318# If the user did not use the arguments to specify the items to instantiate,
17319# then the envvar interface is used. Set only those that are not.
17320# We use the long form for the default assignment because of an extremely
17321# bizarre bug on SunOS 4.1.3.
17322if $ac_need_defaults; then
17323 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17324 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17325fi
17326
Skip Montanaro6dead952003-09-25 14:50:04 +000017327# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017329# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330# Hook for its removal unless debugging.
17331# Note that there is a small window in which the directory will not be cleaned:
17332# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017333$debug ||
17334{
Victor Stinnere0be4232011-10-25 13:06:09 +020017335 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017337 : "${ac_tmp:=$tmp}"
17338 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017340 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017341}
Martin v. Löwis11437992002-04-12 09:54:03 +000017342# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017343
Martin v. Löwis11437992002-04-12 09:54:03 +000017344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017346 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017347} ||
17348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349 tmp=./conf$$-$RANDOM
17350 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017351} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017352ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017353
Matthias Kloseb9621712010-04-24 17:59:49 +000017354# Set up the scripts for CONFIG_FILES section.
17355# No need to generate them if there are no CONFIG_FILES.
17356# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017357if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017358
Matthias Kloseb9621712010-04-24 17:59:49 +000017359
17360ac_cr=`echo X | tr X '\015'`
17361# On cygwin, bash can eat \r inside `` if the user requested igncr.
17362# But we know of no other shell where ac_cr would be empty at this
17363# point, so we can use a bashism as a fallback.
17364if test "x$ac_cr" = x; then
17365 eval ac_cr=\$\'\\r\'
17366fi
17367ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17368if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017369 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017370else
17371 ac_cs_awk_cr=$ac_cr
17372fi
17373
Victor Stinnere0be4232011-10-25 13:06:09 +020017374echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017375_ACEOF
17376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377
Matthias Kloseb9621712010-04-24 17:59:49 +000017378{
17379 echo "cat >conf$$subs.awk <<_ACEOF" &&
17380 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17381 echo "_ACEOF"
17382} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017383 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17384ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385ac_delim='%!_!# '
17386for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017387 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017388 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389
Matthias Kloseb9621712010-04-24 17:59:49 +000017390 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17391 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392 break
17393 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017394 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 else
17396 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017397 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398done
Matthias Kloseb9621712010-04-24 17:59:49 +000017399rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400
Matthias Kloseb9621712010-04-24 17:59:49 +000017401cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017402cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017404sed -n '
17405h
17406s/^/S["/; s/!.*/"]=/
17407p
17408g
17409s/^[^!]*!//
17410:repl
17411t repl
17412s/'"$ac_delim"'$//
17413t delim
17414:nl
17415h
17416s/\(.\{148\}\)..*/\1/
17417t more1
17418s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17419p
17420n
17421b repl
17422:more1
17423s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17424p
17425g
17426s/.\{148\}//
17427t nl
17428:delim
17429h
17430s/\(.\{148\}\)..*/\1/
17431t more2
17432s/["\\]/\\&/g; s/^/"/; s/$/"/
17433p
17434b
17435:more2
17436s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17437p
17438g
17439s/.\{148\}//
17440t delim
17441' <conf$$subs.awk | sed '
17442/^[^""]/{
17443 N
17444 s/\n//
17445}
17446' >>$CONFIG_STATUS || ac_write_fail=1
17447rm -f conf$$subs.awk
17448cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17449_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017450cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017451 for (key in S) S_is_set[key] = 1
17452 FS = ""
17453
17454}
17455{
17456 line = $ 0
17457 nfields = split(line, field, "@")
17458 substed = 0
17459 len = length(field[1])
17460 for (i = 2; i < nfields; i++) {
17461 key = field[i]
17462 keylen = length(key)
17463 if (S_is_set[key]) {
17464 value = S[key]
17465 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17466 len += length(value) + length(field[++i])
17467 substed = 1
17468 } else
17469 len += 1 + keylen
17470 }
17471
17472 print line
17473}
17474
17475_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17478if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17479 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17480else
17481 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017482fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017483 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017484_ACEOF
17485
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017486# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17487# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017488# trailing colons and then remove the whole line if VPATH becomes empty
17489# (actually we leave an empty line to preserve line numbers).
17490if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017491 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17492h
17493s///
17494s/^/:/
17495s/[ ]*$/:/
17496s/:\$(srcdir):/:/g
17497s/:\${srcdir}:/:/g
17498s/:@srcdir@:/:/g
17499s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017501x
17502s/\(=[ ]*\).*/\1/
17503G
17504s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505s/^[^=]*=[ ]*$//
17506}'
17507fi
17508
Matthias Kloseb9621712010-04-24 17:59:49 +000017509cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017510fi # test -n "$CONFIG_FILES"
17511
Matthias Kloseb9621712010-04-24 17:59:49 +000017512# Set up the scripts for CONFIG_HEADERS section.
17513# No need to generate them if there are no CONFIG_HEADERS.
17514# This happens for instance with `./config.status Makefile'.
17515if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017516cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017517BEGIN {
17518_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519
Matthias Kloseb9621712010-04-24 17:59:49 +000017520# Transform confdefs.h into an awk script `defines.awk', embedded as
17521# here-document in config.status, that substitutes the proper values into
17522# config.h.in to produce config.h.
17523
17524# Create a delimiter string that does not exist in confdefs.h, to ease
17525# handling of long lines.
17526ac_delim='%!_!# '
17527for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017528 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17529 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017530 break
17531 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017532 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017533 else
17534 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17535 fi
17536done
17537
17538# For the awk script, D is an array of macro values keyed by name,
17539# likewise P contains macro parameters if any. Preserve backslash
17540# newline sequences.
17541
17542ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17543sed -n '
17544s/.\{148\}/&'"$ac_delim"'/g
17545t rset
17546:rset
17547s/^[ ]*#[ ]*define[ ][ ]*/ /
17548t def
17549d
17550:def
17551s/\\$//
17552t bsnl
17553s/["\\]/\\&/g
17554s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17555D["\1"]=" \3"/p
17556s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17557d
17558:bsnl
17559s/["\\]/\\&/g
17560s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17561D["\1"]=" \3\\\\\\n"\\/p
17562t cont
17563s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17564t cont
17565d
17566:cont
17567n
17568s/.\{148\}/&'"$ac_delim"'/g
17569t clear
17570:clear
17571s/\\$//
17572t bsnlc
17573s/["\\]/\\&/g; s/^/"/; s/$/"/p
17574d
17575:bsnlc
17576s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17577b cont
17578' <confdefs.h | sed '
17579s/'"$ac_delim"'/"\\\
17580"/g' >>$CONFIG_STATUS || ac_write_fail=1
17581
17582cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17583 for (key in D) D_is_set[key] = 1
17584 FS = ""
17585}
17586/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17587 line = \$ 0
17588 split(line, arg, " ")
17589 if (arg[1] == "#") {
17590 defundef = arg[2]
17591 mac1 = arg[3]
17592 } else {
17593 defundef = substr(arg[1], 2)
17594 mac1 = arg[2]
17595 }
17596 split(mac1, mac2, "(") #)
17597 macro = mac2[1]
17598 prefix = substr(line, 1, index(line, defundef) - 1)
17599 if (D_is_set[macro]) {
17600 # Preserve the white space surrounding the "#".
17601 print prefix "define", macro P[macro] D[macro]
17602 next
17603 } else {
17604 # Replace #undef with comments. This is necessary, for example,
17605 # in the case of _POSIX_SOURCE, which is predefined and required
17606 # on some systems where configure will not decide to define it.
17607 if (defundef == "undef") {
17608 print "/*", prefix defundef, macro, "*/"
17609 next
17610 }
17611 }
17612}
17613{ print }
17614_ACAWK
17615_ACEOF
17616cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017617 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017618fi # test -n "$CONFIG_HEADERS"
17619
17620
17621eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17622shift
17623for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624do
17625 case $ac_tag in
17626 :[FHLC]) ac_mode=$ac_tag; continue;;
17627 esac
17628 case $ac_mode$ac_tag in
17629 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017630 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631 :[FH]-) ac_tag=-:-;;
17632 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17633 esac
17634 ac_save_IFS=$IFS
17635 IFS=:
17636 set x $ac_tag
17637 IFS=$ac_save_IFS
17638 shift
17639 ac_file=$1
17640 shift
17641
17642 case $ac_mode in
17643 :L) ac_source=$1;;
17644 :[FH])
17645 ac_file_inputs=
17646 for ac_f
17647 do
17648 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017649 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650 *) # Look for the file first in the build tree, then in the source tree
17651 # (if the path is not absolute). The absolute path cannot be DOS-style,
17652 # because $ac_f cannot contain `:'.
17653 test -f "$ac_f" ||
17654 case $ac_f in
17655 [\\/$]*) false;;
17656 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17657 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017658 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017660 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17661 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662 done
17663
17664 # Let's still pretend it is `configure' which instantiates (i.e., don't
17665 # use $as_me), people would be surprised to read:
17666 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017667 configure_input='Generated from '`
17668 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17669 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670 if test x"$ac_file" != x-; then
17671 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017672 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17673$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017675 # Neutralize special characters interpreted by sed in replacement strings.
17676 case $configure_input in #(
17677 *\&* | *\|* | *\\* )
17678 ac_sed_conf_input=`$as_echo "$configure_input" |
17679 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17680 *) ac_sed_conf_input=$configure_input;;
17681 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682
17683 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017684 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17685 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686 esac
17687 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017688 esac
17689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017691$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017692 X"$ac_file" : 'X\(//\)[^/]' \| \
17693 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017695$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017696 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17697 s//\1/
17698 q
17699 }
17700 /^X\(\/\/\)[^/].*/{
17701 s//\1/
17702 q
17703 }
17704 /^X\(\/\/\)$/{
17705 s//\1/
17706 q
17707 }
17708 /^X\(\/\).*/{
17709 s//\1/
17710 q
17711 }
17712 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017713 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017714 ac_builddir=.
17715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716case "$ac_dir" in
17717.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17718*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017719 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017721 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 case $ac_top_builddir_sub in
17723 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17724 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17725 esac ;;
17726esac
17727ac_abs_top_builddir=$ac_pwd
17728ac_abs_builddir=$ac_pwd$ac_dir_suffix
17729# for backward compatibility:
17730ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017731
17732case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017734 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735 ac_top_srcdir=$ac_top_builddir_sub
17736 ac_abs_top_srcdir=$ac_pwd ;;
17737 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017738 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 ac_top_srcdir=$srcdir
17740 ac_abs_top_srcdir=$srcdir ;;
17741 *) # Relative name.
17742 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17743 ac_top_srcdir=$ac_top_build_prefix$srcdir
17744 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017745esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017747
Martin v. Löwis11437992002-04-12 09:54:03 +000017748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749 case $ac_mode in
17750 :F)
17751 #
17752 # CONFIG_FILE
17753 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017754
17755 case $INSTALL in
17756 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017759 ac_MKDIR_P=$MKDIR_P
17760 case $MKDIR_P in
17761 [\\/$]* | ?:[\\/]* ) ;;
17762 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17763 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017764_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765
Matthias Kloseb9621712010-04-24 17:59:49 +000017766cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767# If the template does not know about datarootdir, expand it.
17768# FIXME: This hack should be removed a few years after 2.60.
17769ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017770ac_sed_dataroot='
17771/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 p
17773 q
17774}
17775/@datadir@/p
17776/@docdir@/p
17777/@infodir@/p
17778/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017779/@mandir@/p'
17780case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781*datarootdir*) ac_datarootdir_seen=yes;;
17782*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17784$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017786cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017787 ac_datarootdir_hack='
17788 s&@datadir@&$datadir&g
17789 s&@docdir@&$docdir&g
17790 s&@infodir@&$infodir&g
17791 s&@localedir@&$localedir&g
17792 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017793 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794esac
17795_ACEOF
17796
17797# Neutralize VPATH when `$srcdir' = `.'.
17798# Shell code in configure.ac might set extrasub.
17799# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17801ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017802$extrasub
17803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017805:t
17806/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017807s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017809s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810s&@srcdir@&$ac_srcdir&;t t
17811s&@abs_srcdir@&$ac_abs_srcdir&;t t
17812s&@top_srcdir@&$ac_top_srcdir&;t t
17813s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17814s&@builddir@&$ac_builddir&;t t
17815s&@abs_builddir@&$ac_abs_builddir&;t t
17816s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17817s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017818s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017820"
Victor Stinnere0be4232011-10-25 13:06:09 +020017821eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17822 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017825 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17826 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17827 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017829which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017830$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017831which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017832
Victor Stinnere0be4232011-10-25 13:06:09 +020017833 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017834 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017835 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17836 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017837 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017838 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839 ;;
17840 :H)
17841 #
17842 # CONFIG_HEADER
17843 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017844 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017845 {
17846 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017847 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17848 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017849 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017850 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017851 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17852$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017853 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017854 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017855 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017856 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 fi
17858 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017859 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017860 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017861 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017865
17866 esac
17867
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017868
17869 case $ac_file$ac_mode in
17870 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17871
17872 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873done # for ac_tag
17874
Guido van Rossum627b2d71993-12-24 10:39:16 +000017875
Matthias Kloseb9621712010-04-24 17:59:49 +000017876as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017877_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017878ac_clean_files=$ac_clean_files_save
17879
Matthias Kloseb9621712010-04-24 17:59:49 +000017880test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017881 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017882
Martin v. Löwis11437992002-04-12 09:54:03 +000017883
17884# configure is writing to config.log, and then calls config.status.
17885# config.status does its own redirection, appending to config.log.
17886# Unfortunately, on DOS this fails, as config.log is still kept open
17887# by configure, so config.status won't be able to write to it; its
17888# output is simply discarded. So we exec the FD to /dev/null,
17889# effectively closing config.log, so it can be properly (re)opened and
17890# appended to by config.status. When coming back to configure, we
17891# need to make the FD available again.
17892if test "$no_create" != yes; then
17893 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017894 ac_config_status_args=
17895 test "$silent" = yes &&
17896 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017898 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 exec 5>>config.log
17900 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17901 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017902 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017903fi
17904if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17906$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017907fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017908
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017909
Christian Heimes75ed8902013-11-20 01:11:18 +010017910echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017911if test ! -f Modules/Setup
17912then
17913 cp $srcdir/Modules/Setup.dist Modules/Setup
17914fi
17915
Christian Heimes75ed8902013-11-20 01:11:18 +010017916echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017917if test ! -f Modules/Setup.local
17918then
17919 echo "# Edit this file for local setup changes" >Modules/Setup.local
17920fi
17921
Christian Heimes75ed8902013-11-20 01:11:18 +010017922echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017923$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17924 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017925 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017926mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017927
17928if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17929 echo "" >&6
17930 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017931 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 +000017932 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017933 echo "" >&6
17934 echo "" >&6
17935fi
17936