blob: ec42e08f8961c161782c83674973e470d2b383b7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700684LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
698RANLIB
699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
812with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600813with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200819with_assertions
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
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
838with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700840with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_fpectl
842with_libm
843with_libc
844enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800846with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000847'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848 ac_precious_vars='build_alias
849host_alias
850target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100851MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852CC
853CFLAGS
854LDFLAGS
855LIBS
856CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100857CPP
858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899includedir='${prefix}/include'
900oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 ac_prev=
919 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200923 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *=) ac_optarg= ;;
925 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Accept the important Cygnus configure options, so we can diagnose typos.
929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_dashdash$ac_option in
931 --)
932 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -bindir | --bindir | --bindi | --bind | --bin | --bi)
935 ac_prev=bindir ;;
936 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
939 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 -cache-file | --cache-file | --cache-fil | --cache-fi \
945 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946 ac_prev=cache_file ;;
947 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 cache_file=$ac_optarg ;;
950
951 --config-cache | -C)
952 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960 | --dataroo | --dataro | --datar)
961 ac_prev=datarootdir ;;
962 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964 datarootdir=$ac_optarg ;;
965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981
982 -docdir | --docdir | --docdi | --doc | --do)
983 ac_prev=docdir ;;
984 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985 docdir=$ac_optarg ;;
986
987 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988 ac_prev=dvidir ;;
989 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200996 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010 | --exec | --exe | --ex)
1011 ac_prev=exec_prefix ;;
1012 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --with-gas.
1019 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 -help | --help | --hel | --he | -h)
1022 ac_init_help=long ;;
1023 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024 ac_init_help=recursive ;;
1025 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034 ac_prev=htmldir ;;
1035 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036 | --ht=*)
1037 htmldir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -includedir | --includedir | --includedi | --included | --include \
1040 | --includ | --inclu | --incl | --inc)
1041 ac_prev=includedir ;;
1042 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -infodir | --infodir | --infodi | --infod | --info | --inf)
1047 ac_prev=infodir ;;
1048 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libdir | --libdir | --libdi | --libd)
1052 ac_prev=libdir ;;
1053 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057 | --libexe | --libex | --libe)
1058 ac_prev=libexecdir ;;
1059 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -localedir | --localedir | --localedi | --localed | --locale)
1064 ac_prev=localedir ;;
1065 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066 localedir=$ac_optarg ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 ac_prev=localstatedir ;;
1071 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076 ac_prev=mandir ;;
1077 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 # Obsolete; use --without-fp.
1082 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 no_create=yes ;;
1087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094 | --oldin | --oldi | --old | --ol | --o)
1095 ac_prev=oldincludedir ;;
1096 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102 ac_prev=prefix ;;
1103 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107 | --program-pre | --program-pr | --program-p)
1108 ac_prev=program_prefix ;;
1109 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114 | --program-suf | --program-su | --program-s)
1115 ac_prev=program_suffix ;;
1116 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-transform-name | --program-transform-name \
1121 | --program-transform-nam | --program-transform-na \
1122 | --program-transform-n | --program-transform- \
1123 | --program-transform | --program-transfor \
1124 | --program-transfo | --program-transf \
1125 | --program-trans | --program-tran \
1126 | --progr-tra | --program-tr | --program-t)
1127 ac_prev=program_transform_name ;;
1128 -program-transform-name=* | --program-transform-name=* \
1129 | --program-transform-nam=* | --program-transform-na=* \
1130 | --program-transform-n=* | --program-transform-=* \
1131 | --program-transform=* | --program-transfor=* \
1132 | --program-transfo=* | --program-transf=* \
1133 | --program-trans=* | --program-tran=* \
1134 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138 ac_prev=pdfdir ;;
1139 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140 pdfdir=$ac_optarg ;;
1141
1142 -psdir | --psdir | --psdi | --psd | --ps)
1143 ac_prev=psdir ;;
1144 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145 psdir=$ac_optarg ;;
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148 | -silent | --silent | --silen | --sile | --sil)
1149 silent=yes ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001288 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001401\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1441 --libdir=DIR object code libraries [EPREFIX/lib]
1442 --includedir=DIR C header files [PREFIX/include]
1443 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1444 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1445 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1446 --infodir=DIR info documentation [DATAROOTDIR/info]
1447 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1448 --mandir=DIR man documentation [DATAROOTDIR/man]
1449 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1450 --htmldir=DIR html documentation [DOCDIR]
1451 --dvidir=DIR dvi documentation [DOCDIR]
1452 --pdfdir=DIR pdf documentation [DOCDIR]
1453 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001454_ACEOF
1455
1456 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001457
1458System types:
1459 --build=BUILD configure for building on BUILD [guessed]
1460 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001461 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001467 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001481 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1482 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001483 --enable-loadable-sqlite-extensions
1484 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-ipv6 Enable ipv6 (with ipv4) support
1486 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001487 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Optional Packages:
1491 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1492 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001493 --with-universal-archs=ARCH
1494 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001495 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001496 --with-framework-name=FRAMEWORK
1497 specify an alternate name of the framework built
1498 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001500 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-cxx-main=<compiler>
1502 compile main() and link python executable with C++
1503 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-suffix=.exe set executable suffix
1505 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001506 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001507 --with-lto Enable Link Time Optimization in PGO builds.
1508 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001509 --with-hash-algorithm=[fnv|siphash24]
1510 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001511 --with-address-sanitizer
1512 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001514 --with-system-expat build pyexpat module using an installed expat
1515 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001516 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001517 --with-system-libmpdec build _decimal module using an installed libmpdec
1518 library
Ned Deilyd819b932013-09-06 01:07:05 -07001519 --with-tcltk-includes='-I...'
1520 override search for Tcl and Tk include files
1521 --with-tcltk-libs='-L...'
1522 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001523 --with-dbmliborder=db1:db2:...
1524 order to check db backends for dbm. Valid value is a
1525 colon separated string with the backend names
1526 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-threads[=DIRECTORY]
1528 disable/enable thread support
1529 --with(out)-thread[=DIRECTORY]
1530 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
1532 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001533 --with(out)-c-locale-coercion
1534 disable/enable C locale coercion to a UTF-8 based
1535 locale
1536 --with(out)-c-locale-warning
1537 disable/enable locale compatibility warning in the C
1538 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001539 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001540 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001541 --with-fpectl enable SIGFPE catching
1542 --with-libm=STRING math library
1543 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001544 --with(out)-computed-gotos
1545 Use computed gotos in evaluation loop (enabled by
1546 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001547 --with(out)-ensurepip=[=upgrade]
1548 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
1550Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001551 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 CC C compiler command
1553 CFLAGS C compiler flags
1554 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1555 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001557 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001560 PKG_CONFIG path to pkg-config utility
1561 PKG_CONFIG_PATH
1562 directories to add to pkg-config's search path
1563 PKG_CONFIG_LIBDIR
1564 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
1566Use these variables to override the choices made by `configure' or to help
1567it to find libraries and programs with nonstandard names/locations.
1568
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001569Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001572fi
1573
1574if test "$ac_init_help" = "recursive"; then
1575 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 test -d "$ac_dir" ||
1578 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1579 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_builddir=.
1581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582case "$ac_dir" in
1583.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 case $ac_top_builddir_sub in
1589 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1591 esac ;;
1592esac
1593ac_abs_top_builddir=$ac_pwd
1594ac_abs_builddir=$ac_pwd$ac_dir_suffix
1595# for backward compatibility:
1596ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001597
1598case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 ac_top_srcdir=$ac_top_builddir_sub
1602 ac_abs_top_srcdir=$ac_pwd ;;
1603 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 ac_top_srcdir=$srcdir
1606 ac_abs_top_srcdir=$srcdir ;;
1607 *) # Relative name.
1608 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1609 ac_top_srcdir=$ac_top_build_prefix$srcdir
1610 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001611esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 cd "$ac_dir" || { ac_status=$?; continue; }
1615 # Check for guested configure.
1616 if test -f "$ac_srcdir/configure.gnu"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1619 elif test -f "$ac_srcdir/configure"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001622 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001623 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624 fi || ac_status=$?
1625 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001626 done
1627fi
1628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001630if $ac_init_version; then
1631 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001632python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001633generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001634
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001636This configure script is free software; the Free Software Foundation
1637gives unlimited permission to copy, distribute and modify it.
1638_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001639 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001641
1642## ------------------------ ##
1643## Autoconf initialization. ##
1644## ------------------------ ##
1645
1646# ac_fn_c_try_compile LINENO
1647# --------------------------
1648# Try to compile conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_compile ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 rm -f conftest.$ac_objext
1653 if { { ac_try="$ac_compile"
1654case "(($ac_try" in
1655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656 *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660 (eval "$ac_compile") 2>conftest.err
1661 ac_status=$?
1662 if test -s conftest.err; then
1663 grep -v '^ *+' conftest.err >conftest.er1
1664 cat conftest.er1 >&5
1665 mv -f conftest.er1 conftest.err
1666 fi
1667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668 test $ac_status = 0; } && {
1669 test -z "$ac_c_werror_flag" ||
1670 test ! -s conftest.err
1671 } && test -s conftest.$ac_objext; then :
1672 ac_retval=0
1673else
1674 $as_echo "$as_me: failed program was:" >&5
1675sed 's/^/| /' conftest.$ac_ext >&5
1676
1677 ac_retval=1
1678fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001679 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001680 as_fn_set_status $ac_retval
1681
1682} # ac_fn_c_try_compile
1683
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001684# ac_fn_c_try_cpp LINENO
1685# ----------------------
1686# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_cpp ()
1688{
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 if { { ac_try="$ac_cpp conftest.$ac_ext"
1691case "(($ac_try" in
1692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1693 *) ac_try_echo=$ac_try;;
1694esac
1695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1696$as_echo "$ac_try_echo"; } >&5
1697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1698 ac_status=$?
1699 if test -s conftest.err; then
1700 grep -v '^ *+' conftest.err >conftest.er1
1701 cat conftest.er1 >&5
1702 mv -f conftest.er1 conftest.err
1703 fi
1704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705 test $ac_status = 0; } > conftest.i && {
1706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1707 test ! -s conftest.err
1708 }; then :
1709 ac_retval=0
1710else
1711 $as_echo "$as_me: failed program was:" >&5
1712sed 's/^/| /' conftest.$ac_ext >&5
1713
1714 ac_retval=1
1715fi
1716 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1717 as_fn_set_status $ac_retval
1718
1719} # ac_fn_c_try_cpp
1720
Matthias Kloseb9621712010-04-24 17:59:49 +00001721# ac_fn_c_try_link LINENO
1722# -----------------------
1723# Try to link conftest.$ac_ext, and return whether this succeeded.
1724ac_fn_c_try_link ()
1725{
1726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1727 rm -f conftest.$ac_objext conftest$ac_exeext
1728 if { { ac_try="$ac_link"
1729case "(($ac_try" in
1730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1731 *) ac_try_echo=$ac_try;;
1732esac
1733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1734$as_echo "$ac_try_echo"; } >&5
1735 (eval "$ac_link") 2>conftest.err
1736 ac_status=$?
1737 if test -s conftest.err; then
1738 grep -v '^ *+' conftest.err >conftest.er1
1739 cat conftest.er1 >&5
1740 mv -f conftest.er1 conftest.err
1741 fi
1742 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1743 test $ac_status = 0; } && {
1744 test -z "$ac_c_werror_flag" ||
1745 test ! -s conftest.err
1746 } && test -s conftest$ac_exeext && {
1747 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001748 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001749 }; then :
1750 ac_retval=0
1751else
1752 $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
1754
1755 ac_retval=1
1756fi
1757 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1758 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1759 # interfere with the next link command; also delete a directory that is
1760 # left behind by Apple's compiler. We do this before executing the actions.
1761 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001762 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001763 as_fn_set_status $ac_retval
1764
1765} # ac_fn_c_try_link
1766
Matthias Kloseb9621712010-04-24 17:59:49 +00001767# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1768# -------------------------------------------------------
1769# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1770# the include files in INCLUDES and setting the cache variable VAR
1771# accordingly.
1772ac_fn_c_check_header_mongrel ()
1773{
1774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001775 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1777$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001778if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 $as_echo_n "(cached) " >&6
1780fi
1781eval ac_res=\$$3
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1783$as_echo "$ac_res" >&6; }
1784else
1785 # Is the header compilable?
1786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1787$as_echo_n "checking $2 usability... " >&6; }
1788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1789/* end confdefs.h. */
1790$4
1791#include <$2>
1792_ACEOF
1793if ac_fn_c_try_compile "$LINENO"; then :
1794 ac_header_compiler=yes
1795else
1796 ac_header_compiler=no
1797fi
1798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1800$as_echo "$ac_header_compiler" >&6; }
1801
1802# Is the header present?
1803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1804$as_echo_n "checking $2 presence... " >&6; }
1805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1806/* end confdefs.h. */
1807#include <$2>
1808_ACEOF
1809if ac_fn_c_try_cpp "$LINENO"; then :
1810 ac_header_preproc=yes
1811else
1812 ac_header_preproc=no
1813fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001814rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1816$as_echo "$ac_header_preproc" >&6; }
1817
1818# So? What about this header?
1819case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1820 yes:no: )
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1822$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1824$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1825 ;;
1826 no:yes:* )
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1828$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1830$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1832$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1834$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1836$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001837( $as_echo "## --------------------------------------- ##
1838## Report this to https://bugs.python.org/ ##
1839## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001840 ) | sed "s/^/$as_me: WARNING: /" >&2
1841 ;;
1842esac
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1844$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001845if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001846 $as_echo_n "(cached) " >&6
1847else
1848 eval "$3=\$ac_header_compiler"
1849fi
1850eval ac_res=\$$3
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852$as_echo "$ac_res" >&6; }
1853fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001854 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001855
1856} # ac_fn_c_check_header_mongrel
1857
1858# ac_fn_c_try_run LINENO
1859# ----------------------
1860# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1861# that executables *can* be run.
1862ac_fn_c_try_run ()
1863{
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 if { { ac_try="$ac_link"
1866case "(($ac_try" in
1867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1868 *) ac_try_echo=$ac_try;;
1869esac
1870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1871$as_echo "$ac_try_echo"; } >&5
1872 (eval "$ac_link") 2>&5
1873 ac_status=$?
1874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1875 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1876 { { case "(($ac_try" in
1877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878 *) ac_try_echo=$ac_try;;
1879esac
1880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881$as_echo "$ac_try_echo"; } >&5
1882 (eval "$ac_try") 2>&5
1883 ac_status=$?
1884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885 test $ac_status = 0; }; }; then :
1886 ac_retval=0
1887else
1888 $as_echo "$as_me: program exited with status $ac_status" >&5
1889 $as_echo "$as_me: failed program was:" >&5
1890sed 's/^/| /' conftest.$ac_ext >&5
1891
1892 ac_retval=$ac_status
1893fi
1894 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896 as_fn_set_status $ac_retval
1897
1898} # ac_fn_c_try_run
1899
1900# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1901# -------------------------------------------------------
1902# Tests whether HEADER exists and can be compiled using the include files in
1903# INCLUDES, setting the cache variable VAR accordingly.
1904ac_fn_c_check_header_compile ()
1905{
1906 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1908$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001909if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001910 $as_echo_n "(cached) " >&6
1911else
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915#include <$2>
1916_ACEOF
1917if ac_fn_c_try_compile "$LINENO"; then :
1918 eval "$3=yes"
1919else
1920 eval "$3=no"
1921fi
1922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1923fi
1924eval ac_res=\$$3
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1926$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001928
1929} # ac_fn_c_check_header_compile
1930
Matthias Kloseb9621712010-04-24 17:59:49 +00001931# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1932# -------------------------------------------
1933# Tests whether TYPE exists after having included INCLUDES, setting cache
1934# variable VAR accordingly.
1935ac_fn_c_check_type ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1939$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001941 $as_echo_n "(cached) " >&6
1942else
1943 eval "$3=no"
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$4
1947int
1948main ()
1949{
1950if (sizeof ($2))
1951 return 0;
1952 ;
1953 return 0;
1954}
1955_ACEOF
1956if ac_fn_c_try_compile "$LINENO"; then :
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
1961main ()
1962{
1963if (sizeof (($2)))
1964 return 0;
1965 ;
1966 return 0;
1967}
1968_ACEOF
1969if ac_fn_c_try_compile "$LINENO"; then :
1970
1971else
1972 eval "$3=yes"
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978eval ac_res=\$$3
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1980$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001981 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001982
1983} # ac_fn_c_check_type
1984
Matthias Kloseb9621712010-04-24 17:59:49 +00001985# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1986# --------------------------------------------
1987# Tries to find the compile-time value of EXPR in a program that includes
1988# INCLUDES, setting VAR accordingly. Returns whether the value could be
1989# computed
1990ac_fn_c_compute_int ()
1991{
1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993 if test "$cross_compiling" = yes; then
1994 # Depending upon the size, compute the lo and hi bounds.
1995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996/* end confdefs.h. */
1997$4
1998int
1999main ()
2000{
2001static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002002test_array [0] = 0;
2003return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002004
2005 ;
2006 return 0;
2007}
2008_ACEOF
2009if ac_fn_c_try_compile "$LINENO"; then :
2010 ac_lo=0 ac_mid=0
2011 while :; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002019test_array [0] = 0;
2020return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002046test_array [0] = 0;
2047return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_hi=-1 ac_mid=-1
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002063test_array [0] = 0;
2064return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002065
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_lo=$ac_mid; break
2072else
2073 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2074 if test $ac_mid -le $ac_hi; then
2075 ac_lo= ac_hi=
2076 break
2077 fi
2078 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 done
2082else
2083 ac_lo= ac_hi=
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088# Binary search between lo and hi bounds.
2089while test "x$ac_lo" != "x$ac_hi"; do
2090 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002098test_array [0] = 0;
2099return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=$ac_mid
2107else
2108 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2109fi
2110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111done
2112case $ac_lo in #((
2113?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2114'') ac_retval=1 ;;
2115esac
2116 else
2117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120static long int longval () { return $2; }
2121static unsigned long int ulongval () { return $2; }
2122#include <stdio.h>
2123#include <stdlib.h>
2124int
2125main ()
2126{
2127
2128 FILE *f = fopen ("conftest.val", "w");
2129 if (! f)
2130 return 1;
2131 if (($2) < 0)
2132 {
2133 long int i = longval ();
2134 if (i != ($2))
2135 return 1;
2136 fprintf (f, "%ld", i);
2137 }
2138 else
2139 {
2140 unsigned long int i = ulongval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%lu", i);
2144 }
2145 /* Do not output a trailing newline, as this causes \r\n confusion
2146 on some platforms. */
2147 return ferror (f) || fclose (f) != 0;
2148
2149 ;
2150 return 0;
2151}
2152_ACEOF
2153if ac_fn_c_try_run "$LINENO"; then :
2154 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2155else
2156 ac_retval=1
2157fi
2158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2159 conftest.$ac_objext conftest.beam conftest.$ac_ext
2160rm -f conftest.val
2161
2162 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002163 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002164 as_fn_set_status $ac_retval
2165
2166} # ac_fn_c_compute_int
2167
2168# ac_fn_c_check_func LINENO FUNC VAR
2169# ----------------------------------
2170# Tests whether FUNC exists, setting the cache variable VAR accordingly
2171ac_fn_c_check_func ()
2172{
2173 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2175$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002176if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 $as_echo_n "(cached) " >&6
2178else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2183#define $2 innocuous_$2
2184
2185/* System header to define __stub macros and hopefully few prototypes,
2186 which can conflict with char $2 (); below.
2187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2188 <limits.h> exists even on freestanding compilers. */
2189
2190#ifdef __STDC__
2191# include <limits.h>
2192#else
2193# include <assert.h>
2194#endif
2195
2196#undef $2
2197
2198/* Override any GCC internal prototype to avoid an error.
2199 Use char because int might match the return type of a GCC
2200 builtin and then its argument prototype would still apply. */
2201#ifdef __cplusplus
2202extern "C"
2203#endif
2204char $2 ();
2205/* The GNU C library defines this for functions which it implements
2206 to always fail with ENOSYS. Some functions are actually named
2207 something starting with __ and the normal name is an alias. */
2208#if defined __stub_$2 || defined __stub___$2
2209choke me
2210#endif
2211
2212int
2213main ()
2214{
2215return $2 ();
2216 ;
2217 return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_link "$LINENO"; then :
2221 eval "$3=yes"
2222else
2223 eval "$3=no"
2224fi
2225rm -f core conftest.err conftest.$ac_objext \
2226 conftest$ac_exeext conftest.$ac_ext
2227fi
2228eval ac_res=\$$3
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002231 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002232
2233} # ac_fn_c_check_func
2234
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002235# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2236# ---------------------------------------------
2237# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2238# accordingly.
2239ac_fn_c_check_decl ()
2240{
2241 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2242 as_decl_name=`echo $2|sed 's/ *(.*//'`
2243 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2245$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2246if eval \${$3+:} false; then :
2247 $as_echo_n "(cached) " >&6
2248else
2249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250/* end confdefs.h. */
2251$4
2252int
2253main ()
2254{
2255#ifndef $as_decl_name
2256#ifdef __cplusplus
2257 (void) $as_decl_use;
2258#else
2259 (void) $as_decl_name;
2260#endif
2261#endif
2262
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_compile "$LINENO"; then :
2268 eval "$3=yes"
2269else
2270 eval "$3=no"
2271fi
2272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2273fi
2274eval ac_res=\$$3
2275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2276$as_echo "$ac_res" >&6; }
2277 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2278
2279} # ac_fn_c_check_decl
2280
Matthias Kloseb9621712010-04-24 17:59:49 +00002281# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2282# ----------------------------------------------------
2283# Tries to find if the field MEMBER exists in type AGGR, after including
2284# INCLUDES, setting cache variable VAR accordingly.
2285ac_fn_c_check_member ()
2286{
2287 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2289$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002290if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002291 $as_echo_n "(cached) " >&6
2292else
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h. */
2295$5
2296int
2297main ()
2298{
2299static $2 ac_aggr;
2300if (ac_aggr.$3)
2301return 0;
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_compile "$LINENO"; then :
2307 eval "$4=yes"
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$5
2312int
2313main ()
2314{
2315static $2 ac_aggr;
2316if (sizeof ac_aggr.$3)
2317return 0;
2318 ;
2319 return 0;
2320}
2321_ACEOF
2322if ac_fn_c_try_compile "$LINENO"; then :
2323 eval "$4=yes"
2324else
2325 eval "$4=no"
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331eval ac_res=\$$4
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2333$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002334 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002335
2336} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002338This file contains any messages produced by compilers while
2339running configure, to aid debugging if configure makes a mistake.
2340
Ned Deily4829bc62016-09-12 17:29:04 -04002341It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002342generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002343
2344 $ $0 $@
2345
2346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002348{
2349cat <<_ASUNAME
2350## --------- ##
2351## Platform. ##
2352## --------- ##
2353
2354hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2355uname -m = `(uname -m) 2>/dev/null || echo unknown`
2356uname -r = `(uname -r) 2>/dev/null || echo unknown`
2357uname -s = `(uname -s) 2>/dev/null || echo unknown`
2358uname -v = `(uname -v) 2>/dev/null || echo unknown`
2359
2360/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2361/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2362
2363/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2364/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2365/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002366/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002367/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2368/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2369/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2370
2371_ASUNAME
2372
2373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2374for as_dir in $PATH
2375do
2376 IFS=$as_save_IFS
2377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002378 $as_echo "PATH: $as_dir"
2379 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002381
2382} >&5
2383
2384cat >&5 <<_ACEOF
2385
2386
2387## ----------- ##
2388## Core tests. ##
2389## ----------- ##
2390
2391_ACEOF
2392
2393
2394# Keep a trace of the command line.
2395# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_configure_args0=
2401ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_must_keep_next=false
2403for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002404do
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 for ac_arg
2406 do
2407 case $ac_arg in
2408 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2409 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2410 | -silent | --silent | --silen | --sile | --sil)
2411 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 esac
2415 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 case $ac_arg in
2423 *=* | --config-cache | -C | -disable-* | --disable-* \
2424 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2425 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2426 | -with-* | --with-* | -without-* | --without-* | --x)
2427 case "$ac_configure_args0 " in
2428 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2429 esac
2430 ;;
2431 -* ) ac_must_keep_next=true ;;
2432 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002434 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 ;;
2436 esac
2437 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002438done
Matthias Kloseb9621712010-04-24 17:59:49 +00002439{ ac_configure_args0=; unset ac_configure_args0;}
2440{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442# When interrupted or exit'd, cleanup temporary files, and complete
2443# config.log. We remove comments because anyway the quotes in there
2444# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445# WARNING: Use '\'' to represent an apostrophe within the trap.
2446# 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 +00002447trap 'exit_status=$?
2448 # Save into config.log some information that might help in debugging.
2449 {
2450 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002451
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002452 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002453## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002455 echo
2456 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457(
2458 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2459 eval ac_val=\$$ac_var
2460 case $ac_val in #(
2461 *${as_nl}*)
2462 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2464$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac
2466 case $ac_var in #(
2467 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2469 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 esac ;;
2471 esac
2472 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2475 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 "s/'\''/'\''\\\\'\'''\''/g;
2478 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2479 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac |
2484 sort
2485)
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002487
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002489## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 echo
2492 for ac_var in $ac_subst_vars
2493 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 eval ac_val=\$$ac_var
2495 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 done | sort
2500 echo
2501
2502 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 echo
2507 for ac_var in $ac_subst_files
2508 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 eval ac_val=\$$ac_var
2510 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 done | sort
2515 echo
2516 fi
2517
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002520## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
2525 fi
2526 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 $as_echo "$as_me: caught signal $ac_signal"
2528 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 rm -f core *.core core.conftest.* &&
2531 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002534for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002536done
2537ac_signal=0
2538
2539# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002541
Matthias Kloseb9621712010-04-24 17:59:49 +00002542$as_echo "/* confdefs.h */" > confdefs.h
2543
Martin v. Löwis11437992002-04-12 09:54:03 +00002544# Predefined preprocessor variables.
2545
2546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_NAME "$PACKAGE_NAME"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_VERSION "$PACKAGE_VERSION"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_STRING "$PACKAGE_STRING"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2564_ACEOF
2565
Matthias Kloseb9621712010-04-24 17:59:49 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_URL "$PACKAGE_URL"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570
2571# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002572# Prefer an explicitly selected file to automatically selected ones.
2573ac_site_file1=NONE
2574ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 # We do not want a PATH search for config.site.
2577 case $CONFIG_SITE in #((
2578 -*) ac_site_file1=./$CONFIG_SITE;;
2579 */*) ac_site_file1=$CONFIG_SITE;;
2580 *) ac_site_file1=./$CONFIG_SITE;;
2581 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$prefix/share/config.site
2584 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585else
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$ac_default_prefix/share/config.site
2587 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002589for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590do
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 test "x$ac_site_file" = xNONE && continue
2592 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2594$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002596 . "$ac_site_file" \
2597 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2599as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002600See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601 fi
2602done
2603
2604if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 # Some versions of bash will fail to source /dev/null (special files
2606 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2607 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2609$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2612 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 esac
2614 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615else
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2617$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 >$cache_file
2619fi
2620
2621# Check that the precious variables saved in the cache have kept the same
2622# value.
2623ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2626 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2628 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 case $ac_old_set,$ac_new_set in
2630 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2632$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 +00002633 ac_cache_corrupted=: ;;
2634 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_cache_corrupted=: ;;
2638 ,);;
2639 *)
2640 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 # differences in whitespace do not lead to failure.
2642 ac_old_val_w=`echo x $ac_old_val`
2643 ac_new_val_w=`echo x $ac_new_val`
2644 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2646$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2647 ac_cache_corrupted=:
2648 else
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2650$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2651 eval $ac_var=\$ac_old_val
2652 fi
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2654$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2656$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 fi;;
2658 esac
2659 # Pass precious variables to config.status.
2660 if test "$ac_new_set" = set; then
2661 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 *) ac_arg=$ac_var=$ac_new_val ;;
2664 esac
2665 case " $ac_configure_args " in
2666 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 esac
2669 fi
2670done
2671if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2675$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002676 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002678## -------------------- ##
2679## Main body of script. ##
2680## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681
Guido van Rossum7f43da71994-08-01 12:15:30 +00002682ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687
Guido van Rossum627b2d71993-12-24 10:39:16 +00002688
Michael W. Hudson54241132001-12-07 15:38:26 +00002689
Trent Nelson4d4ec652012-10-16 08:51:24 -04002690
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002691if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692 # If we're building out-of-tree, we need to make sure the following
2693 # resources get picked up before their $srcdir counterparts.
2694 # Objects/ -> typeslots.inc
2695 # Include/ -> Python-ast.h, graminit.h
2696 # Python/ -> importlib.h
2697 # (A side effect of this is that these resources will automatically be
2698 # regenerated when building out-of-tree, regardless of whether or not
2699 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2700 # off.)
2701 BASECPPFLAGS="-IObjects -IInclude -IPython"
2702else
2703 BASECPPFLAGS=""
2704fi
2705
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706
2707
2708
2709
Victor Stinner9ed34a82017-05-02 22:35:58 +02002710if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712# Extract the first word of "git", so it can be a program name with args.
2713set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2715$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717 $as_echo_n "(cached) " >&6
2718else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719 if test -n "$HAS_GIT"; then
2720 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721else
2722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2723for as_dir in $PATH
2724do
2725 IFS=$as_save_IFS
2726 test -z "$as_dir" && as_dir=.
2727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2731 break 2
2732 fi
2733done
2734 done
2735IFS=$as_save_IFS
2736
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738fi
2739fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740HAS_GIT=$ac_cv_prog_HAS_GIT
2741if test -n "$HAS_GIT"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2743$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2746$as_echo "no" >&6; }
2747fi
2748
2749
2750else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754then
Ned Deily554626a2017-03-20 23:41:52 -04002755 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2756 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITVERSION=""
2760 GITTAG=""
2761 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762fi
2763
2764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002766
2767
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002768ac_aux_dir=
2769for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2770 if test -f "$ac_dir/install-sh"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/install-sh -c"
2773 break
2774 elif test -f "$ac_dir/install.sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install.sh -c"
2777 break
2778 elif test -f "$ac_dir/shtool"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/shtool install -c"
2781 break
2782 fi
2783done
2784if test -z "$ac_aux_dir"; then
2785 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2786fi
2787
2788# These three variables are undocumented and unsupported,
2789# and are intended to be withdrawn in a future Autoconf release.
2790# They can cause serious problems if a builder's source tree is in a directory
2791# whose full name contains unusual characters.
2792ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2793ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2794ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2795
2796
2797# Make sure we can run config.sub.
2798$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2799 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2800
2801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2802$as_echo_n "checking build system type... " >&6; }
2803if ${ac_cv_build+:} false; then :
2804 $as_echo_n "(cached) " >&6
2805else
2806 ac_build_alias=$build_alias
2807test "x$ac_build_alias" = x &&
2808 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2809test "x$ac_build_alias" = x &&
2810 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2811ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2812 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2813
2814fi
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2816$as_echo "$ac_cv_build" >&6; }
2817case $ac_cv_build in
2818*-*-*) ;;
2819*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2820esac
2821build=$ac_cv_build
2822ac_save_IFS=$IFS; IFS='-'
2823set x $ac_cv_build
2824shift
2825build_cpu=$1
2826build_vendor=$2
2827shift; shift
2828# Remember, the first character of IFS is used to create $*,
2829# except with old shells:
2830build_os=$*
2831IFS=$ac_save_IFS
2832case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2833
2834
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2836$as_echo_n "checking host system type... " >&6; }
2837if ${ac_cv_host+:} false; then :
2838 $as_echo_n "(cached) " >&6
2839else
2840 if test "x$host_alias" = x; then
2841 ac_cv_host=$ac_cv_build
2842else
2843 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2844 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2845fi
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2849$as_echo "$ac_cv_host" >&6; }
2850case $ac_cv_host in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2853esac
2854host=$ac_cv_host
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_host
2857shift
2858host_cpu=$1
2859host_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863host_os=$*
2864IFS=$ac_save_IFS
2865case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2866
2867
2868
doko@python.orga10e4a92013-01-25 18:45:12 +01002869
2870
Ned Deilyfcbc2462014-08-22 13:32:49 -07002871# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2872rm -f pybuilddir.txt
2873
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002874for ac_prog in python$PACKAGE_VERSION python3 python
2875do
2876 # Extract the first word of "$ac_prog", so it can be a program name with args.
2877set dummy $ac_prog; ac_word=$2
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2879$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002880if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002881 $as_echo_n "(cached) " >&6
2882else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002883 if test -n "$PYTHON_FOR_REGEN"; then
2884 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885else
2886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2887for as_dir in $PATH
2888do
2889 IFS=$as_save_IFS
2890 test -z "$as_dir" && as_dir=.
2891 for ac_exec_ext in '' $ac_executable_extensions; do
2892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002893 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2895 break 2
2896 fi
2897done
2898 done
2899IFS=$as_save_IFS
2900
2901fi
2902fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002903PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2904if test -n "$PYTHON_FOR_REGEN"; then
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2906$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907else
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2909$as_echo "no" >&6; }
2910fi
2911
2912
Victor Stinnera5c62a82017-05-03 18:21:48 +02002913 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
2918
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002919if test "$cross_compiling" = yes; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2921$as_echo_n "checking for python interpreter for cross build... " >&6; }
2922 if test -z "$PYTHON_FOR_BUILD"; then
2923 for interp in python$PACKAGE_VERSION python3 python; do
2924 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002925 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 +02002926 break
2927 fi
2928 interp=
2929 done
2930 if test x$interp = x; then
2931 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2934$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002935 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 +02002936 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002937elif test "$cross_compiling" = maybe; then
2938 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002939else
2940 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Ned Deily4829bc62016-09-12 17:29:04 -04002959VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989
2990
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2993# them.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002996
2997
2998
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002999define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003000
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003001# Arguments passed to configure.
3002
3003CONFIG_ARGS="$ac_configure_args"
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3006$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003008if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010 case $enableval in
3011 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 # Locate the best usable SDK, see Mac/README.txt for more
3013 # information
3014 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003015 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003017 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3018 if test ! -d "${enableval}"
3019 then
3020 enableval=/
3021 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023 ;;
3024 esac
3025 case $enableval in
3026 no)
3027 UNIVERSALSDK=
3028 enable_universalsdk=
3029 ;;
3030 *)
3031 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 if test ! -d "${UNIVERSALSDK}"
3033 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003034 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036 ;;
3037 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003038
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040else
3041
3042 UNIVERSALSDK=
3043 enable_universalsdk=
3044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047if test -n "${UNIVERSALSDK}"
3048then
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3050$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051else
Matthias Kloseb9621712010-04-24 17:59:49 +00003052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deily87adb6e2013-10-18 21:09:56 -07003058ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060# For backward compatibility reasons we prefer to select '32-bit' if available,
3061# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003062UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063if test "`uname -s`" = "Darwin"
3064then
3065 if test -n "${UNIVERSALSDK}"
3066 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003067 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 then
3069 UNIVERSAL_ARCHS="intel"
3070 fi
3071 fi
3072fi
3073
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3076$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077
3078# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003079if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 UNIVERSAL_ARCHS="$withval"
3082
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083fi
3084
Ned Deily87adb6e2013-10-18 21:09:56 -07003085if test -n "${UNIVERSALSDK}"
3086then
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3088$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3089else
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3091$as_echo "no" >&6; }
3092fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094
3095# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003096if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003097 withval=$with_framework_name;
3098 PYTHONFRAMEWORK=${withval}
3099 PYTHONFRAMEWORKDIR=${withval}.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3101
3102else
3103
3104 PYTHONFRAMEWORK=Python
3105 PYTHONFRAMEWORKDIR=Python.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3107
3108fi
3109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003113 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003114 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003115 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 esac
3117 case $enableval in
3118 no)
3119 PYTHONFRAMEWORK=
3120 PYTHONFRAMEWORKDIR=no-framework
3121 PYTHONFRAMEWORKPREFIX=
3122 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123 FRAMEWORKINSTALLFIRST=
3124 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 FRAMEWORKALTINSTALLFIRST=
3126 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003127 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003128 if test "x${prefix}" = "xNONE"; then
3129 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3130 else
3131 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3132 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003134 ;;
3135 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003137 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003139 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003140 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3141 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003142 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003148 else
3149 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3150 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151
3152 case "${enableval}" in
3153 /System*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 if test "${prefix}" = "NONE" ; then
3156 # See below
3157 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3158 fi
3159 ;;
3160
3161 /Library*)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 ;;
3164
3165 */Library/Frameworks)
3166 MDIR="`dirname "${enableval}"`"
3167 MDIR="`dirname "${MDIR}"`"
3168 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3169
3170 if test "${prefix}" = "NONE"; then
3171 # User hasn't specified the
3172 # --prefix option, but wants to install
3173 # the framework in a non-default location,
3174 # ensure that the compatibility links get
3175 # installed relative to that prefix as well
3176 # instead of in /usr/local.
3177 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3178 fi
3179 ;;
3180
3181 *)
3182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3183 ;;
3184 esac
3185
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3195
3196 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3197
Jack Jansene578a632001-08-15 01:27:14 +00003198 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Guido van Rossum563e7081996-09-10 18:20:48 +00003200else
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORKPREFIX=
3205 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206 FRAMEWORKINSTALLFIRST=
3207 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 FRAMEWORKALTINSTALLFIRST=
3209 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003210 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211 if test "x${prefix}" = "xNONE" ; then
3212 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3213 else
3214 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3215 fi
Jack Jansene578a632001-08-15 01:27:14 +00003216 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219fi
3220
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
3222
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
3224
3225
3226
Jack Jansene578a632001-08-15 01:27:14 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228
3229
3230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003232
Ned Deilyb8f944f2013-11-21 22:42:25 -08003233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003250 *-*-linux-android*)
3251 ac_sys_system=Linux-android
3252 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
3259 *)
3260 # for now, limit cross builds to known configurations
3261 MACHDEP="unknown"
3262 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3263 esac
3264 ac_sys_release=
3265 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003267 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003268 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 fi
3274 ac_md_system=`echo $ac_sys_system |
3275 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3276 ac_md_release=`echo $ac_sys_release |
3277 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3278 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003279
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003281 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003282 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003283 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003284 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On FreeBSD 4, the math functions C89 does not cover are never defined
3366 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3367 FreeBSD/4.*)
3368 define_xopen_source=no;;
3369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Guido van Rossum91922671997-10-09 20:24:13 +00003433#
3434# SGI compilers allow the specification of the both the ABI and the
3435# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003436# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003437#
3438# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3439# thus supply support for various ABI/ISA combinations. The MACHDEP
3440# variable is also adjusted.
3441#
3442
3443if test ! -z "$SGI_ABI"
3444then
3445 CC="cc $SGI_ABI"
3446 LDFLAGS="$SGI_ABI $LDFLAGS"
3447 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3450$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003451
Jack Jansen6b08a402004-06-03 12:41:45 +00003452# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3453# it may influence the way we can build extensions, so distutils
3454# needs to check it
3455
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003458EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003459
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003461
3462# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3463# for debug/optimization stuff. BASECFLAGS is for flags that are required
3464# just to get things to compile and link. Users are free to override OPT
3465# when running configure or make. The build should not break if they do.
3466# BASECFLAGS should generally not be messed with, however.
3467
3468# XXX shouldn't some/most/all of this code be merged with the stuff later
3469# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3471$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003474if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003477 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478 without_gcc=yes;;
3479 yes) CC=gcc
3480 without_gcc=no;;
3481 *) CC=$withval
3482 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003483 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003484else
Martin v. Löwis11437992002-04-12 09:54:03 +00003485
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003486 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003487 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003488 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003489 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003490 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491fi
3492
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3494$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003495
Zachary Ware5af85642015-12-21 12:09:17 -06003496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3497$as_echo_n "checking for --with-icc... " >&6; }
3498
3499# Check whether --with-icc was given.
3500if test "${with_icc+set}" = set; then :
3501 withval=$with_icc;
3502 case $withval in
3503 no) CC=${CC:-cc}
3504 with_icc=no;;
3505 yes) CC=icc
3506 CXX=icpc
3507 with_icc=yes;;
3508 *) CC=$withval
3509 with_icc=$withval;;
3510 esac
3511else
3512
3513 with_icc=no
3514fi
3515
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3517$as_echo "$with_icc" >&6; }
3518
Guido van Rossum8b131c51995-03-09 14:10:13 +00003519# If the user switches compilers, we can't believe the cache
3520if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3521then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003522 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003523(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003524fi
3525
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003526# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3527# when the compiler supports them, but we don't always want -O2, and
3528# we set -g later.
3529if test -z "$CFLAGS"; then
3530 CFLAGS=
3531fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003532
3533if test "$ac_sys_system" = "Darwin"
3534then
3535 # Compiler selection on MacOSX is more complicated than
3536 # AC_PROG_CC can handle, see Mac/README.txt for more
3537 # information
3538 if test -z "${CC}"
3539 then
3540 found_gcc=
3541 found_clang=
3542 as_save_IFS=$IFS; IFS=:
3543 for as_dir in $PATH
3544 do
3545 IFS=$as_save_IFS
3546 if test -x $as_dir/gcc; then
3547 if test -z "${found_gcc}"; then
3548 found_gcc=$as_dir/gcc
3549 fi
3550 fi
3551 if test -x $as_dir/clang; then
3552 if test -z "${found_clang}"; then
3553 found_clang=$as_dir/clang
3554 fi
3555 fi
3556 done
3557 IFS=$as_save_IFS
3558
3559 if test -n "$found_gcc" -a -n "$found_clang"
3560 then
3561 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3564$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3565 CC="$found_clang"
3566 CXX="$found_clang++"
3567 fi
3568
3569
3570 elif test -z "$found_gcc" -a -n "$found_clang"
3571 then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3573$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3574 CC="$found_clang"
3575 CXX="$found_clang++"
3576
3577 elif test -z "$found_gcc" -a -z "$found_clang"
3578 then
3579 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3580 if test -n "${found_clang}"
3581 then
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3583$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3584 CC="${found_clang}"
3585 CXX="`/usr/bin/xcrun -find clang++`"
3586
3587 # else: use default behaviour
3588 fi
3589 fi
3590 fi
3591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003592ac_ext=c
3593ac_cpp='$CPP $CPPFLAGS'
3594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3596ac_compiler_gnu=$ac_cv_c_compiler_gnu
3597if test -n "$ac_tool_prefix"; then
3598 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3599set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3601$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003602if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003604else
3605 if test -n "$CC"; then
3606 ac_cv_prog_CC="$CC" # Let the user override the test.
3607else
Martin v. Löwis11437992002-04-12 09:54:03 +00003608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3609for as_dir in $PATH
3610do
3611 IFS=$as_save_IFS
3612 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 break 2
3618 fi
3619done
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003622
Jack Jansendd19cf82001-12-06 22:36:17 +00003623fi
3624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003625CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003626if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3628$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003629else
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3631$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003632fi
3633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636if test -z "$ac_cv_prog_CC"; then
3637 ac_ct_CC=$CC
3638 # Extract the first word of "gcc", so it can be a program name with args.
3639set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3641$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003642if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003644else
3645 if test -n "$ac_ct_CC"; then
3646 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3647else
3648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3649for as_dir in $PATH
3650do
3651 IFS=$as_save_IFS
3652 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003657 break 2
3658 fi
3659done
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003662
3663fi
3664fi
3665ac_ct_CC=$ac_cv_prog_ac_ct_CC
3666if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3668$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3671$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672fi
3673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674 if test "x$ac_ct_CC" = x; then
3675 CC=""
3676 else
3677 case $cross_compiling:$ac_tool_warned in
3678yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681ac_tool_warned=yes ;;
3682esac
3683 CC=$ac_ct_CC
3684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003685else
3686 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003687fi
3688
Jack Jansendd19cf82001-12-06 22:36:17 +00003689if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690 if test -n "$ac_tool_prefix"; then
3691 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003692set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3694$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003695if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003697else
3698 if test -n "$CC"; then
3699 ac_cv_prog_CC="$CC" # Let the user override the test.
3700else
Martin v. Löwis11437992002-04-12 09:54:03 +00003701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702for as_dir in $PATH
3703do
3704 IFS=$as_save_IFS
3705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 break 2
3711 fi
3712done
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003715
3716fi
3717fi
3718CC=$ac_cv_prog_CC
3719if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3721$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003722else
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3724$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003725fi
3726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729fi
3730if test -z "$CC"; then
3731 # Extract the first word of "cc", so it can be a program name with args.
3732set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003735if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003737else
3738 if test -n "$CC"; then
3739 ac_cv_prog_CC="$CC" # Let the user override the test.
3740else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3743for as_dir in $PATH
3744do
3745 IFS=$as_save_IFS
3746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3750 ac_prog_rejected=yes
3751 continue
3752 fi
3753 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 break 2
3756 fi
3757done
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003760
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761if test $ac_prog_rejected = yes; then
3762 # We found a bogon in the path, so make sure we never use it.
3763 set dummy $ac_cv_prog_CC
3764 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766 # We chose a different compiler from the bogus one.
3767 # However, it has the same basename, so the bogon will be chosen
3768 # first if we set CC to just the basename; use the full file name.
3769 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003770 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771 fi
3772fi
3773fi
3774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3778$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3781$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782fi
3783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784
Martin v. Löwis11437992002-04-12 09:54:03 +00003785fi
3786if test -z "$CC"; then
3787 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 do
3790 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3793$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003794if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003796else
3797 if test -n "$CC"; then
3798 ac_cv_prog_CC="$CC" # Let the user override the test.
3799else
Martin v. Löwis11437992002-04-12 09:54:03 +00003800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3801for as_dir in $PATH
3802do
3803 IFS=$as_save_IFS
3804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003811done
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
3815fi
3816fi
3817CC=$ac_cv_prog_CC
3818if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3820$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821else
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3823$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003824fi
3825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 test -n "$CC" && break
3828 done
3829fi
3830if test -z "$CC"; then
3831 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003833do
3834 # Extract the first word of "$ac_prog", so it can be a program name with args.
3835set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003838if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003840else
3841 if test -n "$ac_ct_CC"; then
3842 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3843else
3844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3845for as_dir in $PATH
3846do
3847 IFS=$as_save_IFS
3848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 break 2
3854 fi
3855done
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
3860fi
3861ac_ct_CC=$ac_cv_prog_ac_ct_CC
3862if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3864$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 test -n "$ac_ct_CC" && break
3872done
Michael W. Hudson54241132001-12-07 15:38:26 +00003873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 if test "x$ac_ct_CC" = x; then
3875 CC=""
3876 else
3877 case $cross_compiling:$ac_tool_warned in
3878yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881ac_tool_warned=yes ;;
3882esac
3883 CC=$ac_ct_CC
3884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003885fi
3886
3887fi
3888
3889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003892as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003893See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003894
3895# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003896$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3897set X $ac_compile
3898ac_compiler=$2
3899for ac_option in --version -v -V -qversion; do
3900 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901case "(($ac_try" in
3902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903 *) ac_try_echo=$ac_try;;
3904esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3906$as_echo "$ac_try_echo"; } >&5
3907 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 if test -s conftest.err; then
3910 sed '10a\
3911... rest of stderr output deleted ...
3912 10q' conftest.err >conftest.er1
3913 cat conftest.er1 >&5
3914 fi
3915 rm -f conftest.er1 conftest.err
3916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }
3918done
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
Matthias Kloseb9621712010-04-24 17:59:49 +00003920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003921/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003922
Martin v. Löwis11437992002-04-12 09:54:03 +00003923int
3924main ()
3925{
3926
3927 ;
3928 return 0;
3929}
3930_ACEOF
3931ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003932ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003933# Try to create an executable without -o first, disregard a.out.
3934# It will help us diagnose broken compilers, and finding out an intuition
3935# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3937$as_echo_n "checking whether the C compiler works... " >&6; }
3938ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3939
3940# The possible output files:
3941ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943ac_rmfiles=
3944for ac_file in $ac_files
3945do
3946 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3949 esac
3950done
3951rm -f $ac_rmfiles
3952
Matthias Kloseb9621712010-04-24 17:59:49 +00003953if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3965# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3966# in a Makefile. We should not override ac_cv_exeext if it was cached,
3967# so that the user can short-circuit this test for compilers unknown to
3968# Autoconf.
3969for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003970do
3971 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974 ;;
3975 [ab].out )
3976 # We found the default executable, but exeext='' is most
3977 # certainly right.
3978 break;;
3979 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 then :; else
3982 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3983 fi
3984 # We set ac_cv_exeext here because the later test for it is not
3985 # safe: cross compilers may not add the suffix if given an `-o'
3986 # argument, so we may need to know it at that point already.
3987 # Even if this section looks crufty: it has the advantage of
3988 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 break;;
3990 * )
3991 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003992 esac
3993done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994test "$ac_cv_exeext" = no && ac_cv_exeext=
3995
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003996else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 ac_file=''
3998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003999if test -z "$ac_file"; then :
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4001$as_echo "no" >&6; }
4002$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004003sed 's/^/| /' conftest.$ac_ext >&5
4004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004007as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004008See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004009else
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4011$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4014$as_echo_n "checking for C compiler default output file name... " >&6; }
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4016$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004017ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018
Matthias Kloseb9621712010-04-24 17:59:49 +00004019rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4022$as_echo_n "checking for suffix of executables... " >&6; }
4023if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024case "(($ac_try" in
4025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4026 *) ac_try_echo=$ac_try;;
4027esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4029$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4033 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4035# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4036# work properly (i.e., refer to `conftest.exe'), while it won't with
4037# `rm'.
4038for ac_file in conftest.exe conftest conftest.*; do
4039 test -f "$ac_file" || continue
4040 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4043 break;;
4044 * ) break;;
4045 esac
4046done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047else
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004050as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004051See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004053rm -f conftest conftest$ac_cv_exeext
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4055$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004056
4057rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004058EXEEXT=$ac_cv_exeext
4059ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4061/* end confdefs.h. */
4062#include <stdio.h>
4063int
4064main ()
4065{
4066FILE *f = fopen ("conftest.out", "w");
4067 return ferror (f) || fclose (f) != 0;
4068
4069 ;
4070 return 0;
4071}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004073ac_clean_files="$ac_clean_files conftest.out"
4074# Check that the compiler produces executables we can run. If not, either
4075# the compiler is broken, or we cross compile.
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4077$as_echo_n "checking whether we are cross compiling... " >&6; }
4078if test "$cross_compiling" != yes; then
4079 { { ac_try="$ac_link"
4080case "(($ac_try" in
4081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082 *) ac_try_echo=$ac_try;;
4083esac
4084eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4085$as_echo "$ac_try_echo"; } >&5
4086 (eval "$ac_link") 2>&5
4087 ac_status=$?
4088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4089 test $ac_status = 0; }
4090 if { ac_try='./conftest$ac_cv_exeext'
4091 { { case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_try") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }; }; then
4101 cross_compiling=no
4102 else
4103 if test "$cross_compiling" = maybe; then
4104 cross_compiling=yes
4105 else
4106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004108as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004110See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 fi
4112 fi
4113fi
4114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4115$as_echo "$cross_compiling" >&6; }
4116
4117rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4118ac_clean_files=$ac_clean_files_save
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4120$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004121if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
4123else
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004125/* end confdefs.h. */
4126
4127int
4128main ()
4129{
4130
4131 ;
4132 return 0;
4133}
4134_ACEOF
4135rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004136if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137case "(($ac_try" in
4138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4139 *) ac_try_echo=$ac_try;;
4140esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004141eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4142$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4146 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147 for ac_file in conftest.o conftest.obj conftest.*; do
4148 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4152 break;;
4153 esac
4154done
4155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004157sed 's/^/| /' conftest.$ac_ext >&5
4158
Matthias Kloseb9621712010-04-24 17:59:49 +00004159{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004161as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004162See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004164rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4167$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004168OBJEXT=$ac_cv_objext
4169ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4171$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004172if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004174else
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004177
Martin v. Löwis11437992002-04-12 09:54:03 +00004178int
4179main ()
4180{
4181#ifndef __GNUC__
4182 choke me
4183#endif
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 ac_compiler_gnu=yes
4191else
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004195ac_cv_c_compiler_gnu=$ac_compiler_gnu
4196
4197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4199$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4200if test $ac_compiler_gnu = yes; then
4201 GCC=yes
4202else
4203 GCC=
4204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004205ac_test_CFLAGS=${CFLAGS+set}
4206ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4208$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004209if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004211else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 ac_save_c_werror_flag=$ac_c_werror_flag
4213 ac_c_werror_flag=yes
4214 ac_cv_prog_cc_g=no
4215 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004218
Martin v. Löwis11437992002-04-12 09:54:03 +00004219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229else
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 CFLAGS=""
4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232/* end confdefs.h. */
4233
4234int
4235main ()
4236{
4237
4238 ;
4239 return 0;
4240}
4241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243
Matthias Kloseb9621712010-04-24 17:59:49 +00004244else
4245 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248/* end confdefs.h. */
4249
4250int
4251main ()
4252{
4253
4254 ;
4255 return 0;
4256}
4257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4266 ac_c_werror_flag=$ac_save_c_werror_flag
4267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4269$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004272elif test $ac_cv_prog_cc_g = yes; then
4273 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004274 CFLAGS="-g -O2"
4275 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004276 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277 fi
4278else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279 if test "$GCC" = yes; then
4280 CFLAGS="-O2"
4281 else
4282 CFLAGS=
4283 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4286$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004287if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004289else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004291ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004293/* end confdefs.h. */
4294#include <stdarg.h>
4295#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004296struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004297/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4298struct buf { int x; };
4299FILE * (*rcsopen) (struct buf *, struct stat *, int);
4300static char *e (p, i)
4301 char **p;
4302 int i;
4303{
4304 return p[i];
4305}
4306static char *f (char * (*g) (char **, int), char **p, ...)
4307{
4308 char *s;
4309 va_list v;
4310 va_start (v,p);
4311 s = g (p, va_arg (v,int));
4312 va_end (v);
4313 return s;
4314}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315
4316/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4317 function prototypes and stuff, but not '\xHH' hex character constants.
4318 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004320 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4321 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4326 inside strings and character constants. */
4327#define FOO(x) 'x'
4328int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4329
Skip Montanaro6dead952003-09-25 14:50:04 +00004330int test (int i, double x);
4331struct s1 {int (*f) (int a);};
4332struct s2 {int (*f) (double a);};
4333int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4334int argc;
4335char **argv;
4336int
4337main ()
4338{
4339return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4340 ;
4341 return 0;
4342}
4343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4345 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004346do
4347 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351rm -f core conftest.err conftest.$ac_objext
4352 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004353done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004355CC=$ac_save_CC
4356
4357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358# AC_CACHE_VAL
4359case "x$ac_cv_prog_cc_c89" in
4360 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4362$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4365$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004366 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4369$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004370esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004374
Martin v. Löwis11437992002-04-12 09:54:03 +00004375ac_ext=c
4376ac_cpp='$CPP $CPPFLAGS'
4377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4379ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004381ac_ext=c
4382ac_cpp='$CPP $CPPFLAGS'
4383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4385ac_compiler_gnu=$ac_cv_c_compiler_gnu
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4387$as_echo_n "checking how to run the C preprocessor... " >&6; }
4388# On Suns, sometimes $CPP names a directory.
4389if test -n "$CPP" && test -d "$CPP"; then
4390 CPP=
4391fi
4392if test -z "$CPP"; then
4393 if ${ac_cv_prog_CPP+:} false; then :
4394 $as_echo_n "(cached) " >&6
4395else
4396 # Double quotes because CPP needs to be expanded
4397 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4398 do
4399 ac_preproc_ok=false
4400for ac_c_preproc_warn_flag in '' yes
4401do
4402 # Use a header file that comes with gcc, so configuring glibc
4403 # with a fresh cross-compiler works.
4404 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4405 # <limits.h> exists even on freestanding compilers.
4406 # On the NeXT, cc -E runs the code through the compiler's parser,
4407 # not just through cpp. "Syntax error" is here to catch this case.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#ifdef __STDC__
4411# include <limits.h>
4412#else
4413# include <assert.h>
4414#endif
4415 Syntax error
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418
4419else
4420 # Broken: fails on valid input.
4421continue
4422fi
4423rm -f conftest.err conftest.i conftest.$ac_ext
4424
4425 # OK, works on sane cases. Now check whether nonexistent headers
4426 # can be detected and how.
4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h. */
4429#include <ac_nonexistent.h>
4430_ACEOF
4431if ac_fn_c_try_cpp "$LINENO"; then :
4432 # Broken: success on invalid input.
4433continue
4434else
4435 # Passes both tests.
4436ac_preproc_ok=:
4437break
4438fi
4439rm -f conftest.err conftest.i conftest.$ac_ext
4440
4441done
4442# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4443rm -f conftest.i conftest.err conftest.$ac_ext
4444if $ac_preproc_ok; then :
4445 break
4446fi
4447
4448 done
4449 ac_cv_prog_CPP=$CPP
4450
4451fi
4452 CPP=$ac_cv_prog_CPP
4453else
4454 ac_cv_prog_CPP=$CPP
4455fi
4456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4457$as_echo "$CPP" >&6; }
4458ac_preproc_ok=false
4459for ac_c_preproc_warn_flag in '' yes
4460do
4461 # Use a header file that comes with gcc, so configuring glibc
4462 # with a fresh cross-compiler works.
4463 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4464 # <limits.h> exists even on freestanding compilers.
4465 # On the NeXT, cc -E runs the code through the compiler's parser,
4466 # not just through cpp. "Syntax error" is here to catch this case.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#ifdef __STDC__
4470# include <limits.h>
4471#else
4472# include <assert.h>
4473#endif
4474 Syntax error
4475_ACEOF
4476if ac_fn_c_try_cpp "$LINENO"; then :
4477
4478else
4479 # Broken: fails on valid input.
4480continue
4481fi
4482rm -f conftest.err conftest.i conftest.$ac_ext
4483
4484 # OK, works on sane cases. Now check whether nonexistent headers
4485 # can be detected and how.
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487/* end confdefs.h. */
4488#include <ac_nonexistent.h>
4489_ACEOF
4490if ac_fn_c_try_cpp "$LINENO"; then :
4491 # Broken: success on invalid input.
4492continue
4493else
4494 # Passes both tests.
4495ac_preproc_ok=:
4496break
4497fi
4498rm -f conftest.err conftest.i conftest.$ac_ext
4499
4500done
4501# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4502rm -f conftest.i conftest.err conftest.$ac_ext
4503if $ac_preproc_ok; then :
4504
4505else
4506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4508as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4509See \`config.log' for more details" "$LINENO" 5; }
4510fi
4511
4512ac_ext=c
4513ac_cpp='$CPP $CPPFLAGS'
4514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4516ac_compiler_gnu=$ac_cv_c_compiler_gnu
4517
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4519$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4520if ${ac_cv_path_GREP+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 if test -z "$GREP"; then
4524 ac_path_GREP_found=false
4525 # Loop through the user's path and test for each of PROGNAME-LIST
4526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
4531 for ac_prog in grep ggrep; do
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4534 as_fn_executable_p "$ac_path_GREP" || continue
4535# Check for GNU ac_path_GREP and select it if it is found.
4536 # Check for GNU $ac_path_GREP
4537case `"$ac_path_GREP" --version 2>&1` in
4538*GNU*)
4539 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4540*)
4541 ac_count=0
4542 $as_echo_n 0123456789 >"conftest.in"
4543 while :
4544 do
4545 cat "conftest.in" "conftest.in" >"conftest.tmp"
4546 mv "conftest.tmp" "conftest.in"
4547 cp "conftest.in" "conftest.nl"
4548 $as_echo 'GREP' >> "conftest.nl"
4549 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4550 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4551 as_fn_arith $ac_count + 1 && ac_count=$as_val
4552 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4553 # Best one so far, save it but keep looking for a better one
4554 ac_cv_path_GREP="$ac_path_GREP"
4555 ac_path_GREP_max=$ac_count
4556 fi
4557 # 10*(2^10) chars as input seems more than enough
4558 test $ac_count -gt 10 && break
4559 done
4560 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4561esac
4562
4563 $ac_path_GREP_found && break 3
4564 done
4565 done
4566 done
4567IFS=$as_save_IFS
4568 if test -z "$ac_cv_path_GREP"; then
4569 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4570 fi
4571else
4572 ac_cv_path_GREP=$GREP
4573fi
4574
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4577$as_echo "$ac_cv_path_GREP" >&6; }
4578 GREP="$ac_cv_path_GREP"
4579
4580
Łukasz Langaa785c872016-09-09 17:37:37 -07004581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4582$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4583if ${ac_cv_path_SED+:} false; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4587 for ac_i in 1 2 3 4 5 6 7; do
4588 ac_script="$ac_script$as_nl$ac_script"
4589 done
4590 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4591 { ac_script=; unset ac_script;}
4592 if test -z "$SED"; then
4593 ac_path_SED_found=false
4594 # Loop through the user's path and test for each of PROGNAME-LIST
4595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in $PATH
4597do
4598 IFS=$as_save_IFS
4599 test -z "$as_dir" && as_dir=.
4600 for ac_prog in sed gsed; do
4601 for ac_exec_ext in '' $ac_executable_extensions; do
4602 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4603 as_fn_executable_p "$ac_path_SED" || continue
4604# Check for GNU ac_path_SED and select it if it is found.
4605 # Check for GNU $ac_path_SED
4606case `"$ac_path_SED" --version 2>&1` in
4607*GNU*)
4608 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4609*)
4610 ac_count=0
4611 $as_echo_n 0123456789 >"conftest.in"
4612 while :
4613 do
4614 cat "conftest.in" "conftest.in" >"conftest.tmp"
4615 mv "conftest.tmp" "conftest.in"
4616 cp "conftest.in" "conftest.nl"
4617 $as_echo '' >> "conftest.nl"
4618 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4619 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4620 as_fn_arith $ac_count + 1 && ac_count=$as_val
4621 if test $ac_count -gt ${ac_path_SED_max-0}; then
4622 # Best one so far, save it but keep looking for a better one
4623 ac_cv_path_SED="$ac_path_SED"
4624 ac_path_SED_max=$ac_count
4625 fi
4626 # 10*(2^10) chars as input seems more than enough
4627 test $ac_count -gt 10 && break
4628 done
4629 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4630esac
4631
4632 $ac_path_SED_found && break 3
4633 done
4634 done
4635 done
4636IFS=$as_save_IFS
4637 if test -z "$ac_cv_path_SED"; then
4638 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4639 fi
4640else
4641 ac_cv_path_SED=$SED
4642fi
4643
4644fi
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4646$as_echo "$ac_cv_path_SED" >&6; }
4647 SED="$ac_cv_path_SED"
4648 rm -f conftest.sed
4649
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004650
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651
4652
Matthias Kloseb9621712010-04-24 17:59:49 +00004653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4654$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004657if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004658 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660 case $withval in
4661 no) with_cxx_main=no
4662 MAINCC='$(CC)';;
4663 yes) with_cxx_main=yes
4664 MAINCC='$(CXX)';;
4665 *) with_cxx_main=yes
4666 MAINCC=$withval
4667 if test -z "$CXX"
4668 then
4669 CXX=$withval
4670 fi;;
4671 esac
4672else
4673
4674 with_cxx_main=no
4675 MAINCC='$(CC)'
4676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004677fi
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4680$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681
4682preset_cxx="$CXX"
4683if test -z "$CXX"
4684then
4685 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004686 gcc) if test -n "$ac_tool_prefix"; then
4687 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4688set dummy ${ac_tool_prefix}g++; ac_word=$2
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690$as_echo_n "checking for $ac_word... " >&6; }
4691if ${ac_cv_path_CXX+:} false; then :
4692 $as_echo_n "(cached) " >&6
4693else
4694 case $CXX in
4695 [\\/]* | ?:[\\/]*)
4696 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4697 ;;
4698 *)
4699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4700for as_dir in notfound
4701do
4702 IFS=$as_save_IFS
4703 test -z "$as_dir" && as_dir=.
4704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004706 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4708 break 2
4709 fi
4710done
4711 done
4712IFS=$as_save_IFS
4713
4714 ;;
4715esac
4716fi
4717CXX=$ac_cv_path_CXX
4718if test -n "$CXX"; then
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4720$as_echo "$CXX" >&6; }
4721else
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723$as_echo "no" >&6; }
4724fi
4725
4726
4727fi
4728if test -z "$ac_cv_path_CXX"; then
4729 ac_pt_CXX=$CXX
4730 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004731set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734if ${ac_cv_path_ac_pt_CXX+:} false; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 case $ac_pt_CXX in
4738 [\\/]* | ?:[\\/]*)
4739 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4740 ;;
4741 *)
4742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743for as_dir in notfound
4744do
4745 IFS=$as_save_IFS
4746 test -z "$as_dir" && as_dir=.
4747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004749 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751 break 2
4752 fi
4753done
4754 done
4755IFS=$as_save_IFS
4756
4757 ;;
4758esac
4759fi
4760ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4761if test -n "$ac_pt_CXX"; then
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4763$as_echo "$ac_pt_CXX" >&6; }
4764else
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
4767fi
4768
4769 if test "x$ac_pt_CXX" = x; then
4770 CXX="g++"
4771 else
4772 case $cross_compiling:$ac_tool_warned in
4773yes:)
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4776ac_tool_warned=yes ;;
4777esac
4778 CXX=$ac_pt_CXX
4779 fi
4780else
4781 CXX="$ac_cv_path_CXX"
4782fi
4783 ;;
4784 cc) if test -n "$ac_tool_prefix"; then
4785 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4786set dummy ${ac_tool_prefix}c++; ac_word=$2
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004789if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791else
4792 case $CXX in
4793 [\\/]* | ?:[\\/]*)
4794 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4795 ;;
4796 *)
4797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in notfound
4799do
4800 IFS=$as_save_IFS
4801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 break 2
4807 fi
4808done
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004810IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 ;;
4813esac
4814fi
4815CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4818$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819else
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004823
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824
4825fi
4826if test -z "$ac_cv_path_CXX"; then
4827 ac_pt_CXX=$CXX
4828 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838 ;;
4839 *)
4840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in notfound
4842do
4843 IFS=$as_save_IFS
4844 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004846 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 break 2
4850 fi
4851done
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004853IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004855 ;;
4856esac
4857fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4859if test -n "$ac_pt_CXX"; then
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4861$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004862else
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004866
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867 if test "x$ac_pt_CXX" = x; then
4868 CXX="c++"
4869 else
4870 case $cross_compiling:$ac_tool_warned in
4871yes:)
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4874ac_tool_warned=yes ;;
4875esac
4876 CXX=$ac_pt_CXX
4877 fi
4878else
4879 CXX="$ac_cv_path_CXX"
4880fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004881 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 clang|*/clang) if test -n "$ac_tool_prefix"; then
4883 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4884set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if ${ac_cv_path_CXX+:} false; then :
4888 $as_echo_n "(cached) " >&6
4889else
4890 case $CXX in
4891 [\\/]* | ?:[\\/]*)
4892 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4893 ;;
4894 *)
4895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in notfound
4897do
4898 IFS=$as_save_IFS
4899 test -z "$as_dir" && as_dir=.
4900 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004901 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004902 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904 break 2
4905 fi
4906done
4907 done
4908IFS=$as_save_IFS
4909
Ned Deilycbfb9a52012-06-23 16:02:19 -07004910 ;;
4911esac
4912fi
4913CXX=$ac_cv_path_CXX
4914if test -n "$CXX"; then
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4916$as_echo "$CXX" >&6; }
4917else
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004922
4923fi
4924if test -z "$ac_cv_path_CXX"; then
4925 ac_pt_CXX=$CXX
4926 # Extract the first word of "clang++", so it can be a program name with args.
4927set dummy clang++; ac_word=$2
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
4930if ${ac_cv_path_ac_pt_CXX+:} false; then :
4931 $as_echo_n "(cached) " >&6
4932else
4933 case $ac_pt_CXX in
4934 [\\/]* | ?:[\\/]*)
4935 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4936 ;;
4937 *)
4938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in notfound
4940do
4941 IFS=$as_save_IFS
4942 test -z "$as_dir" && as_dir=.
4943 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004945 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4947 break 2
4948 fi
4949done
4950 done
4951IFS=$as_save_IFS
4952
4953 ;;
4954esac
4955fi
4956ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4957if test -n "$ac_pt_CXX"; then
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4959$as_echo "$ac_pt_CXX" >&6; }
4960else
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4962$as_echo "no" >&6; }
4963fi
4964
4965 if test "x$ac_pt_CXX" = x; then
4966 CXX="clang++"
4967 else
4968 case $cross_compiling:$ac_tool_warned in
4969yes:)
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4972ac_tool_warned=yes ;;
4973esac
4974 CXX=$ac_pt_CXX
4975 fi
4976else
4977 CXX="$ac_cv_path_CXX"
4978fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004979 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004980 icc|*/icc) if test -n "$ac_tool_prefix"; then
4981 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4982set dummy ${ac_tool_prefix}icpc; ac_word=$2
4983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4984$as_echo_n "checking for $ac_word... " >&6; }
4985if ${ac_cv_path_CXX+:} false; then :
4986 $as_echo_n "(cached) " >&6
4987else
4988 case $CXX in
4989 [\\/]* | ?:[\\/]*)
4990 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4991 ;;
4992 *)
4993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in notfound
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
4998 for ac_exec_ext in '' $ac_executable_extensions; do
4999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5000 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5002 break 2
5003 fi
5004done
5005 done
5006IFS=$as_save_IFS
5007
5008 ;;
5009esac
5010fi
5011CXX=$ac_cv_path_CXX
5012if test -n "$CXX"; then
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5014$as_echo "$CXX" >&6; }
5015else
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017$as_echo "no" >&6; }
5018fi
5019
5020
5021fi
5022if test -z "$ac_cv_path_CXX"; then
5023 ac_pt_CXX=$CXX
5024 # Extract the first word of "icpc", so it can be a program name with args.
5025set dummy icpc; ac_word=$2
5026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027$as_echo_n "checking for $ac_word... " >&6; }
5028if ${ac_cv_path_ac_pt_CXX+:} false; then :
5029 $as_echo_n "(cached) " >&6
5030else
5031 case $ac_pt_CXX in
5032 [\\/]* | ?:[\\/]*)
5033 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5034 ;;
5035 *)
5036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in notfound
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
5041 for ac_exec_ext in '' $ac_executable_extensions; do
5042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5043 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5045 break 2
5046 fi
5047done
5048 done
5049IFS=$as_save_IFS
5050
5051 ;;
5052esac
5053fi
5054ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5055if test -n "$ac_pt_CXX"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5057$as_echo "$ac_pt_CXX" >&6; }
5058else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
5062
5063 if test "x$ac_pt_CXX" = x; then
5064 CXX="icpc"
5065 else
5066 case $cross_compiling:$ac_tool_warned in
5067yes:)
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5070ac_tool_warned=yes ;;
5071esac
5072 CXX=$ac_pt_CXX
5073 fi
5074else
5075 CXX="$ac_cv_path_CXX"
5076fi
5077 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005078 esac
5079 if test "$CXX" = "notfound"
5080 then
5081 CXX=""
5082 fi
5083fi
5084if test -z "$CXX"
5085then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005086 if test -n "$ac_tool_prefix"; then
5087 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5088 do
5089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005093if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095else
5096 if test -n "$CXX"; then
5097 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5098else
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005106 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108 break 2
5109 fi
5110done
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113
5114fi
5115fi
5116CXX=$ac_cv_prog_CXX
5117if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5119$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120else
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123fi
5124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005126 test -n "$CXX" && break
5127 done
5128fi
5129if test -z "$CXX"; then
5130 ac_ct_CXX=$CXX
5131 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5132do
5133 # Extract the first word of "$ac_prog", so it can be a program name with args.
5134set dummy $ac_prog; ac_word=$2
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5136$as_echo_n "checking for $ac_word... " >&6; }
5137if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5138 $as_echo_n "(cached) " >&6
5139else
5140 if test -n "$ac_ct_CXX"; then
5141 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5142else
5143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5144for as_dir in $PATH
5145do
5146 IFS=$as_save_IFS
5147 test -z "$as_dir" && as_dir=.
5148 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005150 ac_cv_prog_ac_ct_CXX="$ac_prog"
5151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5152 break 2
5153 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005155 done
5156IFS=$as_save_IFS
5157
5158fi
5159fi
5160ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5161if test -n "$ac_ct_CXX"; then
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5163$as_echo "$ac_ct_CXX" >&6; }
5164else
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
5167fi
5168
5169
5170 test -n "$ac_ct_CXX" && break
5171done
5172
5173 if test "x$ac_ct_CXX" = x; then
5174 CXX="notfound"
5175 else
5176 case $cross_compiling:$ac_tool_warned in
5177yes:)
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5180ac_tool_warned=yes ;;
5181esac
5182 CXX=$ac_ct_CXX
5183 fi
5184fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185
5186 if test "$CXX" = "notfound"
5187 then
5188 CXX=""
5189 fi
5190fi
5191if test "$preset_cxx" != "$CXX"
5192then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005193 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194
5195 By default, distutils will build C++ extension modules with \"$CXX\".
5196 If this is not intended, then set CXX on the configure command line.
5197 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005198$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005199
5200 By default, distutils will build C++ extension modules with \"$CXX\".
5201 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005202 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203fi
5204
5205
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5207
5208
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5210$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5211cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005212#undef bfin
5213#undef cris
5214#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef hppa
5217#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005219#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005220#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005221#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005222#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005223#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005224 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005225#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226# if defined(__x86_64__) && defined(__LP64__)
5227 x86_64-linux-gnu
5228# elif defined(__x86_64__) && defined(__ILP32__)
5229 x86_64-linux-gnux32
5230# elif defined(__i386__)
5231 i386-linux-gnu
5232# elif defined(__aarch64__) && defined(__AARCH64EL__)
5233# if defined(__ILP32__)
5234 aarch64_ilp32-linux-gnu
5235# else
5236 aarch64-linux-gnu
5237# endif
5238# elif defined(__aarch64__) && defined(__AARCH64EB__)
5239# if defined(__ILP32__)
5240 aarch64_be_ilp32-linux-gnu
5241# else
5242 aarch64_be-linux-gnu
5243# endif
5244# elif defined(__alpha__)
5245 alpha-linux-gnu
5246# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5247# if defined(__ARMEL__)
5248 arm-linux-gnueabihf
5249# else
5250 armeb-linux-gnueabihf
5251# endif
5252# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5253# if defined(__ARMEL__)
5254 arm-linux-gnueabi
5255# else
5256 armeb-linux-gnueabi
5257# endif
5258# elif defined(__hppa__)
5259 hppa-linux-gnu
5260# elif defined(__ia64__)
5261 ia64-linux-gnu
5262# elif defined(__m68k__) && !defined(__mcoldfire__)
5263 m68k-linux-gnu
5264# elif defined(__mips_hard_float) && defined(_MIPSEL)
5265# if _MIPS_SIM == _ABIO32
5266 mipsel-linux-gnu
5267# elif _MIPS_SIM == _ABIN32
5268 mips64el-linux-gnuabin32
5269# elif _MIPS_SIM == _ABI64
5270 mips64el-linux-gnuabi64
5271# else
5272# error unknown platform triplet
5273# endif
5274# elif defined(__mips_hard_float)
5275# if _MIPS_SIM == _ABIO32
5276 mips-linux-gnu
5277# elif _MIPS_SIM == _ABIN32
5278 mips64-linux-gnuabin32
5279# elif _MIPS_SIM == _ABI64
5280 mips64-linux-gnuabi64
5281# else
5282# error unknown platform triplet
5283# endif
5284# elif defined(__or1k__)
5285 or1k-linux-gnu
5286# elif defined(__powerpc__) && defined(__SPE__)
5287 powerpc-linux-gnuspe
5288# elif defined(__powerpc64__)
5289# if defined(__LITTLE_ENDIAN__)
5290 powerpc64le-linux-gnu
5291# else
5292 powerpc64-linux-gnu
5293# endif
5294# elif defined(__powerpc__)
5295 powerpc-linux-gnu
5296# elif defined(__s390x__)
5297 s390x-linux-gnu
5298# elif defined(__s390__)
5299 s390-linux-gnu
5300# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5301 sh4-linux-gnu
5302# elif defined(__sparc__) && defined(__arch64__)
5303 sparc64-linux-gnu
5304# elif defined(__sparc__)
5305 sparc-linux-gnu
5306# else
5307# error unknown platform triplet
5308# endif
5309#elif defined(__FreeBSD_kernel__)
5310# if defined(__LP64__)
5311 x86_64-kfreebsd-gnu
5312# elif defined(__i386__)
5313 i386-kfreebsd-gnu
5314# else
5315# error unknown platform triplet
5316# endif
5317#elif defined(__gnu_hurd__)
5318 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005319#elif defined(__APPLE__)
5320 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321#else
5322# error unknown platform triplet
5323#endif
5324
5325EOF
5326
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005327if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5330$as_echo "$PLATFORM_TRIPLET" >&6; }
5331else
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5333$as_echo "none" >&6; }
5334fi
5335rm -f conftest.c conftest.out
5336
5337if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5338 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5339 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5340 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005341elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5342 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005343fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005344
doko@ubuntu.com55532312016-06-14 08:55:19 +02005345if test x$MULTIARCH != x; then
5346 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5347fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348
5349
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5351$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5352save_LDFLAGS="$LDFLAGS"
5353LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005354
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h. */
5357
5358int
5359main ()
5360{
5361
5362 ;
5363 return 0;
5364}
5365_ACEOF
5366if ac_fn_c_try_link "$LINENO"; then :
5367 NO_AS_NEEDED="-Wl,--no-as-needed"
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5369$as_echo "yes" >&6; }
5370else
5371 NO_AS_NEEDED=""
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373$as_echo "no" >&6; }
5374fi
5375rm -f core conftest.err conftest.$ac_objext \
5376 conftest$ac_exeext conftest.$ac_ext
5377LDFLAGS="$save_LDFLAGS"
5378
5379
5380
5381# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5384$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005385if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387else
5388 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5389 then ac_cv_path_EGREP="$GREP -E"
5390 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 # Loop through the user's path and test for each of PROGNAME-LIST
5394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5396do
5397 IFS=$as_save_IFS
5398 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 for ac_prog in egrep; do
5400 for ac_exec_ext in '' $ac_executable_extensions; do
5401 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005402 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005403# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 # Check for GNU $ac_path_EGREP
5405case `"$ac_path_EGREP" --version 2>&1` in
5406*GNU*)
5407 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5408*)
5409 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 while :
5412 do
5413 cat "conftest.in" "conftest.in" >"conftest.tmp"
5414 mv "conftest.tmp" "conftest.in"
5415 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5418 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5421 # Best one so far, save it but keep looking for a better one
5422 ac_cv_path_EGREP="$ac_path_EGREP"
5423 ac_path_EGREP_max=$ac_count
5424 fi
5425 # 10*(2^10) chars as input seems more than enough
5426 test $ac_count -gt 10 && break
5427 done
5428 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5429esac
5430
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 $ac_path_EGREP_found && break 3
5432 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005437 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439else
5440 ac_cv_path_EGREP=$EGREP
5441fi
5442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443 fi
5444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5446$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005448
5449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5451$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005452if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 $as_echo_n "(cached) " >&6
5454else
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005456/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005457#include <stdlib.h>
5458#include <stdarg.h>
5459#include <string.h>
5460#include <float.h>
5461
5462int
5463main ()
5464{
5465
5466 ;
5467 return 0;
5468}
5469_ACEOF
5470if ac_fn_c_try_compile "$LINENO"; then :
5471 ac_cv_header_stdc=yes
5472else
5473 ac_cv_header_stdc=no
5474fi
5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476
5477if test $ac_cv_header_stdc = yes; then
5478 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5480/* end confdefs.h. */
5481#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005482
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005483_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005487else
Matthias Kloseb9621712010-04-24 17:59:49 +00005488 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005490rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492fi
5493
5494if test $ac_cv_header_stdc = yes; then
5495 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497/* end confdefs.h. */
5498#include <stdlib.h>
5499
5500_ACEOF
5501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5502 $EGREP "free" >/dev/null 2>&1; then :
5503
5504else
5505 ac_cv_header_stdc=no
5506fi
5507rm -f conftest*
5508
5509fi
5510
5511if test $ac_cv_header_stdc = yes; then
5512 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5513 if test "$cross_compiling" = yes; then :
5514 :
5515else
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517/* end confdefs.h. */
5518#include <ctype.h>
5519#include <stdlib.h>
5520#if ((' ' & 0x0FF) == 0x020)
5521# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5522# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5523#else
5524# define ISLOWER(c) \
5525 (('a' <= (c) && (c) <= 'i') \
5526 || ('j' <= (c) && (c) <= 'r') \
5527 || ('s' <= (c) && (c) <= 'z'))
5528# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5529#endif
5530
5531#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5532int
5533main ()
5534{
5535 int i;
5536 for (i = 0; i < 256; i++)
5537 if (XOR (islower (i), ISLOWER (i))
5538 || toupper (i) != TOUPPER (i))
5539 return 2;
5540 return 0;
5541}
5542_ACEOF
5543if ac_fn_c_try_run "$LINENO"; then :
5544
5545else
5546 ac_cv_header_stdc=no
5547fi
5548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5549 conftest.$ac_objext conftest.beam conftest.$ac_ext
5550fi
5551
5552fi
5553fi
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5555$as_echo "$ac_cv_header_stdc" >&6; }
5556if test $ac_cv_header_stdc = yes; then
5557
5558$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5559
5560fi
5561
5562# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5563for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5564 inttypes.h stdint.h unistd.h
5565do :
5566 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5567ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5568"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005569if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 cat >>confdefs.h <<_ACEOF
5571#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5572_ACEOF
5573
5574fi
5575
5576done
5577
5578
5579
5580 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005581if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 MINIX=yes
5583else
5584 MINIX=
5585fi
5586
5587
5588 if test "$MINIX" = yes; then
5589
5590$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5591
5592
5593$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5594
5595
5596$as_echo "#define _MINIX 1" >>confdefs.h
5597
5598 fi
5599
5600
5601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5602$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005603if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 $as_echo_n "(cached) " >&6
5605else
5606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5607/* end confdefs.h. */
5608
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005609# define __EXTENSIONS__ 1
5610 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005611int
5612main ()
5613{
5614
5615 ;
5616 return 0;
5617}
5618_ACEOF
5619if ac_fn_c_try_compile "$LINENO"; then :
5620 ac_cv_safe_to_define___extensions__=yes
5621else
5622 ac_cv_safe_to_define___extensions__=no
5623fi
5624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5625fi
5626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5627$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5628 test $ac_cv_safe_to_define___extensions__ = yes &&
5629 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5630
5631 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5632
5633 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5634
5635 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5636
5637 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5638
5639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
Xavier de Gaye95750b12016-07-09 11:05:42 +02005641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5642$as_echo_n "checking for the Android API level... " >&6; }
5643cat >> conftest.c <<EOF
5644#ifdef __ANDROID__
5645#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005646android_api = __ANDROID_API__
5647arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005648#else
5649#error not Android
5650#endif
5651EOF
5652
5653if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005654 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5655 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5657$as_echo "$ANDROID_API_LEVEL" >&6; }
5658
5659cat >>confdefs.h <<_ACEOF
5660#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5661_ACEOF
5662
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005663
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5665$as_echo_n "checking for the Android arm ABI... " >&6; }
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5667$as_echo "$_arm_arch" >&6; }
5668 if test "$_arm_arch" = 7; then
5669 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5670 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5671 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672else
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5674$as_echo "not Android" >&6; }
5675fi
5676rm -f conftest.c conftest.out
5677
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678# Check for unsupported systems
5679case $ac_sys_system/$ac_sys_release in
5680atheos*|Linux*/1*)
5681 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5682 echo See README for details.
5683 exit 1;;
5684esac
5685
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5688$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005691if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 withval=$with_suffix;
5693 case $withval in
5694 no) EXEEXT=;;
5695 yes) EXEEXT=.exe;;
5696 *) EXEEXT=$withval;;
5697 esac
5698fi
5699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5701$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702
5703# Test whether we're running on a non-case-sensitive system, in which
5704# case we give a warning if no ext is given
5705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5707$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708if test ! -d CaseSensitiveTestDir; then
5709mkdir CaseSensitiveTestDir
5710fi
5711
5712if test -d casesensitivetestdir
5713then
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5715$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 BUILDEXEEXT=.exe
5717else
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 BUILDEXEEXT=$EXEEXT
5721fi
5722rmdir CaseSensitiveTestDir
5723
5724case $MACHDEP in
5725bsdos*)
5726 case $CC in
5727 gcc) CC="$CC -D_HAVE_BSDI";;
5728 esac;;
5729esac
5730
5731case $ac_sys_system in
5732hp*|HP*)
5733 case $CC in
5734 cc|*/cc) CC="$CC -Ae";;
5735 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736esac
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5740$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741if test -z "$LIBRARY"
5742then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005743 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5746$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748# LDLIBRARY is the name of the library to link against (as opposed to the
5749# name of the library into which to insert object files). BLDLIBRARY is also
5750# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5751# is blank as the main program is not linked directly against LDLIBRARY.
5752# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5753# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5754# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5755# DLLLIBRARY is the shared (i.e., DLL) library.
5756#
5757# RUNSHARED is used to run shared python without installed libraries
5758#
5759# INSTSONAME is the name of the shared library that will be use to install
5760# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005761#
5762# LDVERSION is the shared library version number, normally the Python version
5763# with the ABI build flags appended.
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766
5767
5768
5769
5770
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772LDLIBRARY="$LIBRARY"
5773BLDLIBRARY='$(LDLIBRARY)'
5774INSTSONAME='$(LDLIBRARY)'
5775DLLLIBRARY=''
5776LDLIBRARYDIR=''
5777RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005778LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779
5780# LINKCC is the command that links the python executable -- default is $(CC).
5781# If CXX is set, and if it is needed to link a main function that was
5782# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5783# python might then depend on the C++ runtime
5784# This is altered for AIX in order to build the export list before
5785# linking.
5786
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5788$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789if test -z "$LINKCC"
5790then
5791 LINKCC='$(PURIFY) $(MAINCC)'
5792 case $ac_sys_system in
5793 AIX*)
5794 exp_extra="\"\""
5795 if test $ac_sys_release -ge 5 -o \
5796 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5797 exp_extra="."
5798 fi
5799 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 QNX*)
5801 # qcc must be used because the other compilers do not
5802 # support -N.
5803 LINKCC=qcc;;
5804 esac
5805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5807$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808
5809# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5810# make sure we default having it set to "no": this is used by
5811# distutils.unixccompiler to know if it should add --enable-new-dtags
5812# to linker command lines, and failing to detect GNU ld simply results
5813# in the same bahaviour as before.
5814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5816$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817ac_prog=ld
5818if test "$GCC" = yes; then
5819 ac_prog=`$CC -print-prog-name=ld`
5820fi
5821case `"$ac_prog" -V 2>&1 < /dev/null` in
5822 *GNU*)
5823 GNULD=yes;;
5824 *)
5825 GNULD=no;;
5826esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5828$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
Matthias Kloseb9621712010-04-24 17:59:49 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5831$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005833if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834 enableval=$enable_shared;
5835fi
5836
5837
5838if test -z "$enable_shared"
5839then
5840 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005841 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842 enable_shared="yes";;
5843 *)
5844 enable_shared="no";;
5845 esac
5846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5848$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849
Matthias Kloseb9621712010-04-24 17:59:49 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5851$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005853if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005854 enableval=$enable_profiling;
5855fi
5856
5857if test "x$enable_profiling" = xyes; then
5858 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005859 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861/* end confdefs.h. */
5862int main() { return 0; }
5863_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005864if ac_fn_c_try_link "$LINENO"; then :
5865
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005867 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005869rm -f core conftest.err conftest.$ac_objext \
5870 conftest$ac_exeext conftest.$ac_ext
5871 CC="$ac_save_cc"
5872else
5873 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5876$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877
doko@ubuntu.comba015832012-06-30 16:52:05 +02005878if test "x$enable_profiling" = xyes; then
5879 BASECFLAGS="-pg $BASECFLAGS"
5880 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881fi
5882
Matthias Kloseb9621712010-04-24 17:59:49 +00005883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5884$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
5886# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5887# library that we build, but we do not want to link against it (we
5888# will find it with a -framework option). For this reason there is an
5889# extra variable BLDLIBRARY against which Python and the extension
5890# modules are linked, BLDLIBRARY. This is normally the same as
5891# LDLIBRARY, but empty for MacOSX framework builds.
5892if test "$enable_framework"
5893then
5894 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005895 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 BLDLIBRARY=''
5897else
5898 BLDLIBRARY='$(LDLIBRARY)'
5899fi
5900
5901# Other platforms follow
5902if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005903 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904
Matthias Kloseb9621712010-04-24 17:59:49 +00005905$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906
5907 case $ac_sys_system in
5908 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005909 LDLIBRARY='libpython$(LDVERSION).dll.a'
5910 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
5912 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).so'
5914 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005915 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005917 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005918 then
5919 PY3LIBRARY=libpython3.so
5920 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005922 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 LDLIBRARY='libpython$(LDVERSION).so'
5924 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005925 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005927 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005928 then
5929 PY3LIBRARY=libpython3.so
5930 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 ;;
5932 hp*|HP*)
5933 case `uname -m` in
5934 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 ;;
5937 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005938 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
5940 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005942 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945 LDLIBRARY='libpython$(LDVERSION).dylib'
5946 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005947 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005949 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005951 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005952 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953
5954 esac
5955else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005956 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 case $ac_sys_system in
5958 CYGWIN*)
5959 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005960 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 ;;
5962 esac
5963fi
5964
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005965if test "$cross_compiling" = yes; then
5966 RUNSHARED=
5967fi
5968
Matthias Kloseb9621712010-04-24 17:59:49 +00005969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5970$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971
5972if test -n "$ac_tool_prefix"; then
5973 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5974set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005977if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979else
5980 if test -n "$RANLIB"; then
5981 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5982else
5983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986 IFS=$as_save_IFS
5987 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 break 2
5993 fi
5994done
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996IFS=$as_save_IFS
5997
5998fi
5999fi
6000RANLIB=$ac_cv_prog_RANLIB
6001if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6003$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004else
Matthias Kloseb9621712010-04-24 17:59:49 +00006005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007fi
6008
6009
6010fi
6011if test -z "$ac_cv_prog_RANLIB"; then
6012 ac_ct_RANLIB=$RANLIB
6013 # Extract the first word of "ranlib", so it can be a program name with args.
6014set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6016$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006017if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019else
6020 if test -n "$ac_ct_RANLIB"; then
6021 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6022else
6023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6024for as_dir in $PATH
6025do
6026 IFS=$as_save_IFS
6027 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032 break 2
6033 fi
6034done
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036IFS=$as_save_IFS
6037
6038fi
6039fi
6040ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6041if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6043$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044else
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6046$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047fi
6048
6049 if test "x$ac_ct_RANLIB" = x; then
6050 RANLIB=":"
6051 else
6052 case $cross_compiling:$ac_tool_warned in
6053yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006054{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6055$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056ac_tool_warned=yes ;;
6057esac
6058 RANLIB=$ac_ct_RANLIB
6059 fi
6060else
6061 RANLIB="$ac_cv_prog_RANLIB"
6062fi
6063
6064
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006065if test -n "$ac_tool_prefix"; then
6066 for ac_prog in ar aal
6067 do
6068 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6069set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006072if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006073 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074else
6075 if test -n "$AR"; then
6076 ac_cv_prog_AR="$AR" # Let the user override the test.
6077else
6078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6079for as_dir in $PATH
6080do
6081 IFS=$as_save_IFS
6082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006085 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087 break 2
6088 fi
6089done
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091IFS=$as_save_IFS
6092
6093fi
6094fi
6095AR=$ac_cv_prog_AR
6096if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6098$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099else
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102fi
6103
6104
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006105 test -n "$AR" && break
6106 done
6107fi
6108if test -z "$AR"; then
6109 ac_ct_AR=$AR
6110 for ac_prog in ar aal
6111do
6112 # Extract the first word of "$ac_prog", so it can be a program name with args.
6113set dummy $ac_prog; ac_word=$2
6114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6115$as_echo_n "checking for $ac_word... " >&6; }
6116if ${ac_cv_prog_ac_ct_AR+:} false; then :
6117 $as_echo_n "(cached) " >&6
6118else
6119 if test -n "$ac_ct_AR"; then
6120 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6121else
6122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6123for as_dir in $PATH
6124do
6125 IFS=$as_save_IFS
6126 test -z "$as_dir" && as_dir=.
6127 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006129 ac_cv_prog_ac_ct_AR="$ac_prog"
6130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6131 break 2
6132 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006134 done
6135IFS=$as_save_IFS
6136
6137fi
6138fi
6139ac_ct_AR=$ac_cv_prog_ac_ct_AR
6140if test -n "$ac_ct_AR"; then
6141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6142$as_echo "$ac_ct_AR" >&6; }
6143else
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6145$as_echo "no" >&6; }
6146fi
6147
6148
6149 test -n "$ac_ct_AR" && break
6150done
6151
6152 if test "x$ac_ct_AR" = x; then
6153 AR="ar"
6154 else
6155 case $cross_compiling:$ac_tool_warned in
6156yes:)
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6159ac_tool_warned=yes ;;
6160esac
6161 AR=$ac_ct_AR
6162 fi
6163fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164
6165
6166# tweak ARFLAGS only if the user didn't set it on the command line
6167
6168if test -z "$ARFLAGS"
6169then
6170 ARFLAGS="rc"
6171fi
6172
doko@ubuntu.com58844492012-06-30 18:25:32 +02006173if test -n "$ac_tool_prefix"; then
6174 for ac_prog in readelf
6175 do
6176 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6177set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6179$as_echo_n "checking for $ac_word... " >&6; }
6180if ${ac_cv_prog_READELF+:} false; then :
6181 $as_echo_n "(cached) " >&6
6182else
6183 if test -n "$READELF"; then
6184 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6185else
6186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6187for as_dir in $PATH
6188do
6189 IFS=$as_save_IFS
6190 test -z "$as_dir" && as_dir=.
6191 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006192 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006193 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6195 break 2
6196 fi
6197done
6198 done
6199IFS=$as_save_IFS
6200
6201fi
6202fi
6203READELF=$ac_cv_prog_READELF
6204if test -n "$READELF"; then
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6206$as_echo "$READELF" >&6; }
6207else
6208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6209$as_echo "no" >&6; }
6210fi
6211
6212
6213 test -n "$READELF" && break
6214 done
6215fi
6216if test -z "$READELF"; then
6217 ac_ct_READELF=$READELF
6218 for ac_prog in readelf
6219do
6220 # Extract the first word of "$ac_prog", so it can be a program name with args.
6221set dummy $ac_prog; ac_word=$2
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6223$as_echo_n "checking for $ac_word... " >&6; }
6224if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6225 $as_echo_n "(cached) " >&6
6226else
6227 if test -n "$ac_ct_READELF"; then
6228 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6229else
6230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6231for as_dir in $PATH
6232do
6233 IFS=$as_save_IFS
6234 test -z "$as_dir" && as_dir=.
6235 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006236 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006237 ac_cv_prog_ac_ct_READELF="$ac_prog"
6238 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6239 break 2
6240 fi
6241done
6242 done
6243IFS=$as_save_IFS
6244
6245fi
6246fi
6247ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6248if test -n "$ac_ct_READELF"; then
6249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6250$as_echo "$ac_ct_READELF" >&6; }
6251else
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6253$as_echo "no" >&6; }
6254fi
6255
6256
6257 test -n "$ac_ct_READELF" && break
6258done
6259
6260 if test "x$ac_ct_READELF" = x; then
6261 READELF=":"
6262 else
6263 case $cross_compiling:$ac_tool_warned in
6264yes:)
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6266$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6267ac_tool_warned=yes ;;
6268esac
6269 READELF=$ac_ct_READELF
6270 fi
6271fi
6272
6273if test "$cross_compiling" = yes; then
6274 case "$READELF" in
6275 readelf|:)
6276 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6277 ;;
6278 esac
6279fi
6280
6281
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283case $MACHDEP in
6284bsdos*|hp*|HP*)
6285 # install -d does not work on BSDI or HP-UX
6286 if test -z "$INSTALL"
6287 then
6288 INSTALL="${srcdir}/install-sh -c"
6289 fi
6290esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291# Find a good install program. We prefer a C program (faster),
6292# so one script is as good as another. But avoid the broken or
6293# incompatible versions:
6294# SysV /etc/install, /usr/sbin/install
6295# SunOS /usr/etc/install
6296# IRIX /sbin/install
6297# AIX /bin/install
6298# AmigaOS /C/install, which installs bootblocks on floppy discs
6299# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6300# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6301# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6302# OS/2's system install, which has a completely different semantic
6303# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006304# Reject install programs that cannot install multiple files.
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6306$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006308if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006309 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310else
6311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312for as_dir in $PATH
6313do
6314 IFS=$as_save_IFS
6315 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 # Account for people who put trailing slashes in PATH elements.
6317case $as_dir/ in #((
6318 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321 /usr/ucb/* ) ;;
6322 *)
6323 # OSF1 and SCO ODT 3.0 have their own names for install.
6324 # Don't use installbsd from OSF since it installs stuff as root
6325 # by default.
6326 for ac_prog in ginstall scoinst install; do
6327 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006328 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 if test $ac_prog = install &&
6330 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6331 # AIX install. It has an incompatible calling convention.
6332 :
6333 elif test $ac_prog = install &&
6334 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6335 # program-specific install script used by HP pwplus--don't use.
6336 :
6337 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 rm -rf conftest.one conftest.two conftest.dir
6339 echo one > conftest.one
6340 echo two > conftest.two
6341 mkdir conftest.dir
6342 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6343 test -s conftest.one && test -s conftest.two &&
6344 test -s conftest.dir/conftest.one &&
6345 test -s conftest.dir/conftest.two
6346 then
6347 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6348 break 3
6349 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350 fi
6351 fi
6352 done
6353 done
6354 ;;
6355esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006356
6357 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006358IFS=$as_save_IFS
6359
Matthias Kloseb9621712010-04-24 17:59:49 +00006360rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361
6362fi
6363 if test "${ac_cv_path_install+set}" = set; then
6364 INSTALL=$ac_cv_path_install
6365 else
6366 # As a last resort, use the slow shell script. Don't cache a
6367 # value for INSTALL within a source directory, because that will
6368 # break other packages using the cache if that directory is
6369 # removed, or if the value is a relative name.
6370 INSTALL=$ac_install_sh
6371 fi
6372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6374$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375
6376# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6377# It thinks the first close brace ends the variable substitution.
6378test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6379
6380test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6381
6382test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6383
Matthias Klose93a0ef12012-03-15 18:08:34 +01006384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6385$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6386if test -z "$MKDIR_P"; then
6387 if ${ac_cv_path_mkdir+:} false; then :
6388 $as_echo_n "(cached) " >&6
6389else
6390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6391for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6392do
6393 IFS=$as_save_IFS
6394 test -z "$as_dir" && as_dir=.
6395 for ac_prog in mkdir gmkdir; do
6396 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006397 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006398 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6399 'mkdir (GNU coreutils) '* | \
6400 'mkdir (coreutils) '* | \
6401 'mkdir (fileutils) '4.1*)
6402 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6403 break 3;;
6404 esac
6405 done
6406 done
6407 done
6408IFS=$as_save_IFS
6409
6410fi
6411
6412 test -d ./--version && rmdir ./--version
6413 if test "${ac_cv_path_mkdir+set}" = set; then
6414 MKDIR_P="$ac_cv_path_mkdir -p"
6415 else
6416 # As a last resort, use the slow shell script. Don't cache a
6417 # value for MKDIR_P 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 MKDIR_P="$ac_install_sh -d"
6421 fi
6422fi
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6424$as_echo "$MKDIR_P" >&6; }
6425
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426
6427# Not every filesystem supports hard links
6428
6429if test -z "$LN" ; then
6430 case $ac_sys_system in
6431 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432 *) LN=ln;;
6433 esac
6434fi
6435
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006436# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006437
6438ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006439
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6442$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443
6444# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006445if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446 withval=$with_pydebug;
6447if test "$withval" != no
6448then
6449
Matthias Kloseb9621712010-04-24 17:59:49 +00006450$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006451
Matthias Kloseb9621712010-04-24 17:59:49 +00006452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6453$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006455 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006456else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458fi
6459else
Matthias Kloseb9621712010-04-24 17:59:49 +00006460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462fi
6463
6464
T. Woutersddbfa2c2017-05-23 01:30:49 +02006465# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6466# the ABI. This allows enabling assertions without changing the ABI.
6467assertions='false'
6468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6469$as_echo_n "checking for --with-assertions... " >&6; }
6470
6471# Check whether --with-assertions was given.
6472if test "${with_assertions+set}" = set; then :
6473 withval=$with_assertions;
6474if test "$withval" != no
6475then
6476 assertions='true'
6477fi
6478fi
6479
6480if test "$assertions" = 'true'; then
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6482$as_echo "yes" >&6; }
6483elif test "$Py_DEBUG" = 'true'; then
6484 assertions='true'
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6486$as_echo "implied by --with-pydebug" >&6; }
6487else
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
Brett Cannon63d98bc2016-09-06 17:12:40 -07006492# Enable optimization flags
6493
6494
6495Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6497$as_echo_n "checking for --enable-optimizations... " >&6; }
6498# Check whether --enable-optimizations was given.
6499if test "${enable_optimizations+set}" = set; then :
6500 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006501if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006502then
6503 Py_OPT='true'
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6505$as_echo "yes" >&6; };
6506else
6507 Py_OPT='false'
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; };
6510fi
6511else
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; }
6514fi
6515
6516if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006517 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6518 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006519 # 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 +00006520 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006521 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006522 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006523 DEF_MAKE_RULE="build_all"
6524else
6525 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006526 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006527 DEF_MAKE_RULE="all"
6528fi
6529
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006530# Enable LTO flags
6531
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6533$as_echo_n "checking for --with-lto... " >&6; }
6534
6535# Check whether --with-lto was given.
6536if test "${with_lto+set}" = set; then :
6537 withval=$with_lto;
6538if test "$withval" != no
6539then
6540 Py_LTO='true'
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6542$as_echo "yes" >&6; };
6543else
6544 Py_LTO='false'
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546$as_echo "no" >&6; };
6547fi
6548else
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553if test "$Py_LTO" = 'true' ; then
6554 case $CC in
6555 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006556 case $ac_sys_system in
6557 Darwin*)
6558 # Any changes made here should be reflected in the GCC+Darwin case below
6559 LTOFLAGS="-flto -Wl,-export_dynamic"
6560 ;;
6561 *)
6562 LTOFLAGS="-flto"
6563 ;;
6564 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006565 ;;
6566 *gcc*)
6567 case $ac_sys_system in
6568 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006569 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006570 ;;
6571 *)
6572 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6573 ;;
6574 esac
6575 ;;
6576 esac
6577fi
6578
Brett Cannon7188a3e2015-09-18 15:13:44 -07006579# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006580
6581
6582
6583
6584
Gregory P. Smith799520c2016-09-07 16:10:00 -07006585# Make this work on systems where llvm tools are not installed with their
6586# normal names in the default $PATH (ie: Ubuntu). They exist under the
6587# non-suffixed name in their versioned llvm directory.
6588llvm_bin_dir=''
6589llvm_path="${PATH}"
6590if test "${CC}" = "clang"
6591then
6592 clang_bin=`which clang`
6593 # Some systems install clang elsewhere as a symlink to the real path
6594 # which is where the related llvm tools are located.
6595 if test -L "${clang_bin}"
6596 then
6597 clang_dir=`dirname "${clang_bin}"`
6598 clang_bin=`readlink "${clang_bin}"`
6599 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6600 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6601 fi
6602fi
Zachary Ware5af85642015-12-21 12:09:17 -06006603
Gregory P. Smith799520c2016-09-07 16:10:00 -07006604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6605$as_echo_n "checking target system type... " >&6; }
6606if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006607 $as_echo_n "(cached) " >&6
6608else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006609 if test "x$target_alias" = x; then
6610 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006611else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006612 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6613 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6614fi
6615
6616fi
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6618$as_echo "$ac_cv_target" >&6; }
6619case $ac_cv_target in
6620*-*-*) ;;
6621*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6622esac
6623target=$ac_cv_target
6624ac_save_IFS=$IFS; IFS='-'
6625set x $ac_cv_target
6626shift
6627target_cpu=$1
6628target_vendor=$2
6629shift; shift
6630# Remember, the first character of IFS is used to create $*,
6631# except with old shells:
6632target_os=$*
6633IFS=$ac_save_IFS
6634case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6635
6636
6637# The aliases save the names the user supplied, while $host etc.
6638# will get canonicalized.
6639test -n "$target_alias" &&
6640 test "$program_prefix$program_suffix$program_transform_name" = \
6641 NONENONEs,x,x, &&
6642 program_prefix=${target_alias}-
6643# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6644set dummy $target_alias-llvm-profdata; ac_word=$2
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6646$as_echo_n "checking for $ac_word... " >&6; }
6647if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6648 $as_echo_n "(cached) " >&6
6649else
6650 case $LLVM_PROFDATA in
6651 [\\/]* | ?:[\\/]*)
6652 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6653 ;;
6654 *)
6655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6656for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006657do
6658 IFS=$as_save_IFS
6659 test -z "$as_dir" && as_dir=.
6660 for ac_exec_ext in '' $ac_executable_extensions; do
6661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006663 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6664 break 2
6665 fi
6666done
6667 done
6668IFS=$as_save_IFS
6669
Gregory P. Smith799520c2016-09-07 16:10:00 -07006670 ;;
6671esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006673LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6674if test -n "$LLVM_PROFDATA"; then
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6676$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006677else
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679$as_echo "no" >&6; }
6680fi
6681
6682
Gregory P. Smith799520c2016-09-07 16:10:00 -07006683if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6684 if test "$build" = "$target"; then
6685 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6686 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6687set dummy llvm-profdata; ac_word=$2
6688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6689$as_echo_n "checking for $ac_word... " >&6; }
6690if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6691 $as_echo_n "(cached) " >&6
6692else
6693 case $ac_pt_LLVM_PROFDATA in
6694 [\\/]* | ?:[\\/]*)
6695 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6696 ;;
6697 *)
6698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6699for as_dir in ${llvm_path}
6700do
6701 IFS=$as_save_IFS
6702 test -z "$as_dir" && as_dir=.
6703 for ac_exec_ext in '' $ac_executable_extensions; do
6704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6705 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6707 break 2
6708 fi
6709done
6710 done
6711IFS=$as_save_IFS
6712
6713 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6714 ;;
6715esac
6716fi
6717ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6718if test -n "$ac_pt_LLVM_PROFDATA"; then
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6720$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6721else
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723$as_echo "no" >&6; }
6724fi
6725
6726 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6727 else
6728 LLVM_PROFDATA="''"
6729 fi
6730else
6731 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6732fi
6733
6734
6735if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6736then
6737 LLVM_PROF_FOUND="found"
6738else
6739 LLVM_PROF_FOUND="not-found"
6740fi
6741if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6742then
6743 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6744 if test -n "${found_llvm_profdata}"
6745 then
6746 # llvm-profdata isn't directly in $PATH in some cases.
6747 # https://apple.stackexchange.com/questions/197053/
6748 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6749 LLVM_PROF_FOUND=found
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6751$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6752 fi
6753fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754LLVM_PROF_ERR=no
6755case $CC in
6756 *clang*)
6757 # Any changes made here should be reflected in the GCC+Darwin case below
6758 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6759 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6762 if test $LLVM_PROF_FOUND = not-found
6763 then
6764 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 if test "${REQUIRE_PGO}" = "yes"
6766 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006767 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 -07006768 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 fi
6770 ;;
6771 *gcc*)
6772 case $ac_sys_system in
6773 Darwin*)
6774 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6775 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006779 then
6780 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006781 if test "${REQUIRE_PGO}" = "yes"
6782 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006783 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 -07006784 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785 fi
6786 ;;
6787 *)
6788 PGO_PROF_GEN_FLAG="-fprofile-generate"
6789 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6790 LLVM_PROF_MERGER="true"
6791 LLVM_PROF_FILE=""
6792 ;;
6793 esac
6794 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006795 *icc*)
6796 PGO_PROF_GEN_FLAG="-prof-gen"
6797 PGO_PROF_USE_FLAG="-prof-use"
6798 LLVM_PROF_MERGER="true"
6799 LLVM_PROF_FILE=""
6800 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801esac
6802
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6804# merged with this chunk of code?
6805
6806# Optimizer/debugger flags
6807# ------------------------
6808# (The following bit of code is complicated enough - please keep things
6809# indented properly. Just pretend you're editing Python code. ;-)
6810
6811# There are two parallel sets of case statements below, one that checks to
6812# see if OPT was set and one that does BASECFLAGS setting based upon
6813# compiler and platform. BASECFLAGS tweaks need to be made even if the
6814# user set OPT.
6815
6816# tweak OPT based on compiler and platform, only if the user didn't set
6817# it on the command line
6818
Victor Stinner9ed34a82017-05-02 22:35:58 +02006819
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006820if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821then
6822 case $GCC in
6823 yes)
6824 if test "$CC" != 'g++' ; then
6825 STRICT_PROTO="-Wstrict-prototypes"
6826 fi
6827 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6828 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6829 WRAP="-fwrapv"
6830 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006831
Stefan Krahaf04ff22011-12-08 22:20:31 +01006832 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006833 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006834 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006835 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006836 *)
6837 if $CC --version 2>&1 | grep -q clang
6838 then
6839 cc_is_clang=1
6840 else
6841 cc_is_clang=
6842 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006843 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006844
Victor Stinner35f3d242017-04-21 12:35:24 +02006845 if test -n "${cc_is_clang}"
6846 then
6847 # Clang also needs -fwrapv
6848 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006849 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6850 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006851 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006852 fi
6853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 case $ac_cv_prog_cc_g in
6855 yes)
6856 if test "$Py_DEBUG" = 'true' ; then
6857 # Optimization messes up debuggers, so turn it off for
6858 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006859 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006860 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006861 else
Victor Stinner28205b22017-04-21 11:24:34 +02006862 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006863 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864 else
Victor Stinner28205b22017-04-21 11:24:34 +02006865 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866 fi
6867 ;;
6868 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006869 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 ;;
6871 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006872
Victor Stinner826f83f2017-04-28 15:07:10 +02006873 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 case $ac_sys_system in
6876 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6877 ;;
6878 esac
6879 ;;
6880
6881 *)
6882 OPT="-O"
6883 ;;
6884 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885fi
6886
6887
6888
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006889
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890# The -arch flags for universal builds on OSX
6891UNIVERSAL_ARCH_FLAGS=
6892
6893
6894# tweak BASECFLAGS based on compiler and platform
6895case $GCC in
6896yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006897 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006898
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6900$as_echo_n "checking for -Wextra... " >&6; }
6901 ac_save_cc="$CC"
6902 CC="$CC -Wextra -Werror"
6903 if ${ac_cv_extra_warnings+:} false; then :
6904 $as_echo_n "(cached) " >&6
6905else
6906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6907/* end confdefs.h. */
6908
6909
6910int
6911main ()
6912{
6913
6914 ;
6915 return 0;
6916}
6917
6918_ACEOF
6919if ac_fn_c_try_compile "$LINENO"; then :
6920
6921 ac_cv_extra_warnings=yes
6922
6923else
6924
6925 ac_cv_extra_warnings=no
6926
6927fi
6928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6929fi
6930
6931 CC="$ac_save_cc"
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6933$as_echo "$ac_cv_extra_warnings" >&6; }
6934
6935 if test $ac_cv_extra_warnings = yes
6936 then
6937 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6938 fi
6939
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006940 # Python doesn't violate C99 aliasing rules, but older versions of
6941 # GCC produce warnings for legal Python code. Enable
6942 # -fno-strict-aliasing on versions of GCC that support but produce
6943 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6945$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946 ac_save_cc="$CC"
6947 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006948 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006949 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006951else
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006954
Matthias Kloseb159a552010-04-25 21:00:44 +00006955
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006956int
6957main ()
6958{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006959
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006960 ;
6961 return 0;
6962}
Matthias Kloseb159a552010-04-25 21:00:44 +00006963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006965if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
6967 CC="$ac_save_cc -fstrict-aliasing"
6968 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006970/* end confdefs.h. */
6971
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006972 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973int
6974main ()
6975{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006976double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006977 ;
6978 return 0;
6979}
Matthias Kloseb159a552010-04-25 21:00:44 +00006980
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006982if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
6984 ac_cv_no_strict_aliasing=no
6985
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986else
Matthias Kloseb159a552010-04-25 21:00:44 +00006987
6988 ac_cv_no_strict_aliasing=yes
6989
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006992
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993else
Matthias Kloseb159a552010-04-25 21:00:44 +00006994
6995 ac_cv_no_strict_aliasing=no
6996
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006999fi
7000
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007002 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7004$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007005 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006 then
7007 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7008 fi
7009
Zachary Ware5af85642015-12-21 12:09:17 -06007010 # ICC doesn't recognize the option, but only emits a warning
7011 ## XXX does it emit an unused result warning and can it be disabled?
7012 case "$CC" in
7013 *icc*)
7014 ac_cv_disable_unused_result_warning=no
7015 ;;
7016 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7018$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7019 ac_save_cc="$CC"
7020 CC="$CC -Wunused-result -Werror"
7021 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007022 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007023 $as_echo_n "(cached) " >&6
7024else
7025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7026/* end confdefs.h. */
7027
7028
7029int
7030main ()
7031{
7032
7033 ;
7034 return 0;
7035}
7036
7037_ACEOF
7038if ac_fn_c_try_compile "$LINENO"; then :
7039
7040 ac_cv_disable_unused_result_warning=yes
7041
7042else
7043
7044 ac_cv_disable_unused_result_warning=no
7045
7046fi
7047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7048fi
7049
7050 CFLAGS="$save_CFLAGS"
7051 CC="$ac_save_cc"
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7053$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007054 ;;
7055 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007056
7057 if test $ac_cv_disable_unused_result_warning = yes
7058 then
7059 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007060 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7061 fi
7062
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7064$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7065 ac_save_cc="$CC"
7066 CC="$CC -Wunused-parameter -Werror"
7067 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7068 $as_echo_n "(cached) " >&6
7069else
7070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7071/* end confdefs.h. */
7072
7073
7074int
7075main ()
7076{
7077
7078 ;
7079 return 0;
7080}
7081
7082_ACEOF
7083if ac_fn_c_try_compile "$LINENO"; then :
7084
7085 ac_cv_disable_unused_parameter_warning=yes
7086
7087else
7088
7089 ac_cv_disable_unused_parameter_warning=no
7090
7091fi
7092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7093fi
7094
7095 CC="$ac_save_cc"
7096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7097$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7098
7099 if test $ac_cv_disable_unused_parameter_warning = yes
7100 then
7101 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7102 fi
7103
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7105$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7106 ac_save_cc="$CC"
7107 CC="$CC -Wmissing-field-initializers -Werror"
7108 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7109 $as_echo_n "(cached) " >&6
7110else
7111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7112/* end confdefs.h. */
7113
7114
7115int
7116main ()
7117{
7118
7119 ;
7120 return 0;
7121}
7122
7123_ACEOF
7124if ac_fn_c_try_compile "$LINENO"; then :
7125
7126 ac_cv_disable_missing_field_initializers=yes
7127
7128else
7129
7130 ac_cv_disable_missing_field_initializers=no
7131
7132fi
7133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7134fi
7135
7136 CC="$ac_save_cc"
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7138$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7139
7140 if test $ac_cv_disable_missing_field_initializers = yes
7141 then
7142 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007143 fi
7144
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7146$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7147 ac_save_cc="$CC"
7148 CC="$CC -Wsign-compare"
7149 save_CFLAGS="$CFLAGS"
7150 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7151 $as_echo_n "(cached) " >&6
7152else
7153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7154/* end confdefs.h. */
7155
7156
7157int
7158main ()
7159{
7160
7161 ;
7162 return 0;
7163}
7164
7165_ACEOF
7166if ac_fn_c_try_compile "$LINENO"; then :
7167
7168 ac_cv_enable_sign_compare_warning=yes
7169
7170else
7171
7172 ac_cv_enable_sign_compare_warning=no
7173
7174fi
7175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7176fi
7177
7178 CFLAGS="$save_CFLAGS"
7179 CC="$ac_save_cc"
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7181$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7182
7183 if test $ac_cv_enable_sign_compare_warning = yes
7184 then
7185 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7186 fi
7187
7188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7189$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7190 ac_save_cc="$CC"
7191 CC="$CC -Wunreachable-code"
7192 save_CFLAGS="$CFLAGS"
7193 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7194 $as_echo_n "(cached) " >&6
7195else
7196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7197/* end confdefs.h. */
7198
7199
7200int
7201main ()
7202{
7203
7204 ;
7205 return 0;
7206}
7207
7208_ACEOF
7209if ac_fn_c_try_compile "$LINENO"; then :
7210
7211 ac_cv_enable_unreachable_code_warning=yes
7212
7213else
7214
7215 ac_cv_enable_unreachable_code_warning=no
7216
7217fi
7218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7219fi
7220
7221 CFLAGS="$save_CFLAGS"
7222 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007223
7224 # Don't enable unreachable code warning in debug mode, since it usually
7225 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007226 # Issue #24324: Unfortunately, the unreachable code warning does not work
7227 # correctly on gcc and has been silently removed from the compiler.
7228 # It is supported on clang but on OS X systems gcc may be an alias
7229 # for clang. Try to determine if the compiler is not really gcc and,
7230 # if so, only then enable the warning.
7231 if test $ac_cv_enable_unreachable_code_warning = yes && \
7232 test "$Py_DEBUG" != "true" && \
7233 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007234 then
7235 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007236 else
7237 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007238 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7240$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007241
Victor Stinner193ee0a2017-02-06 14:24:00 +01007242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7243$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7244 ac_save_cc="$CC"
7245 CC="$CC -Werror=implicit-function-declaration"
7246 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7247 $as_echo_n "(cached) " >&6
7248else
7249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7250/* end confdefs.h. */
7251
7252
7253int
7254main ()
7255{
7256
7257 ;
7258 return 0;
7259}
7260
7261_ACEOF
7262if ac_fn_c_try_compile "$LINENO"; then :
7263
7264 ac_cv_enable_implicit_function_declaration_error=yes
7265
7266else
7267
7268 ac_cv_enable_implicit_function_declaration_error=no
7269
7270fi
7271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7272fi
7273
7274 CC="$ac_save_cc"
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7276$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7277
7278 if test $ac_cv_enable_implicit_function_declaration_error = yes
7279 then
7280 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7281 fi
7282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007283 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7284 # support. Without this, treatment of subnormals doesn't follow
7285 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007286 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287 alpha*)
7288 BASECFLAGS="$BASECFLAGS -mieee"
7289 ;;
7290 esac
7291
7292 case $ac_sys_system in
7293 SCO_SV*)
7294 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7295 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007296
7297 # is there any other compiler on Darwin besides gcc?
7298 Darwin*)
7299 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7300 # used to be here, but non-Apple gcc doesn't accept them.
7301 if test "${CC}" = gcc
7302 then
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007304$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007305 case "${UNIVERSALSDK}" in
7306 */MacOSX10.4u.sdk)
7307 # Build using 10.4 SDK, force usage of gcc when the
7308 # compiler is gcc, otherwise the user will get very
7309 # confusing error messages when building on OSX 10.6
7310 CC=gcc-4.0
7311 CPP=cpp-4.0
7312 ;;
7313 esac
7314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007315$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007316 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317
Ned Deily87adb6e2013-10-18 21:09:56 -07007318 if test "${enable_universalsdk}"
7319 then
7320 case "$UNIVERSAL_ARCHS" in
7321 32-bit)
7322 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7323 LIPO_32BIT_FLAGS=""
7324 ARCH_RUN_32BIT=""
7325 ;;
7326 64-bit)
7327 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7328 LIPO_32BIT_FLAGS=""
7329 ARCH_RUN_32BIT="true"
7330 ;;
7331 all)
7332 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7333 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7334 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7335 ;;
7336 intel)
7337 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7338 LIPO_32BIT_FLAGS="-extract i386"
7339 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7340 ;;
7341 intel-32)
7342 UNIVERSAL_ARCH_FLAGS="-arch i386"
7343 LIPO_32BIT_FLAGS=""
7344 ARCH_RUN_32BIT=""
7345 ;;
7346 3-way)
7347 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7348 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7349 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7350 ;;
7351 *)
7352 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7353 ;;
7354 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355
Ned Deily87adb6e2013-10-18 21:09:56 -07007356 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7357 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7358 if test "${UNIVERSALSDK}" != "/"
7359 then
7360 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7361 fi
7362 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363
Ned Deily87adb6e2013-10-18 21:09:56 -07007364 # Calculate an appropriate deployment target for this build:
7365 # The deployment target value is used explicitly to enable certain
7366 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007367 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007368 # component of the string returned by distutils.get_platform().
7369 #
7370 # Use the value from:
7371 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7372 # 2. the operating system version of the build machine if >= 10.6
7373 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7374 # below to pick either 10.3, 10.4, or 10.5 as the target.
7375 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376
Ned Deily87adb6e2013-10-18 21:09:56 -07007377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7378$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007379 cur_target_major=`sw_vers -productVersion | \
7380 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7381 cur_target_minor=`sw_vers -productVersion | \
7382 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7383 cur_target="${cur_target_major}.${cur_target_minor}"
7384 if test ${cur_target_major} -eq 10 && \
7385 test ${cur_target_minor} -ge 3 && \
7386 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007387 then
Ned Deily36820b62014-06-25 13:44:22 -07007388 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007389 cur_target=10.3
7390 if test ${enable_universalsdk}
7391 then
7392 case "$UNIVERSAL_ARCHS" in
7393 all|3-way|intel|64-bit)
7394 # These configurations were first supported in 10.5
7395 cur_target='10.5'
7396 ;;
7397 esac
7398 else
7399 if test `/usr/bin/arch` = "i386"
7400 then
7401 # 10.4 was the first release to support Intel archs
7402 cur_target="10.4"
7403 fi
7404 fi
7405 fi
7406 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007407
Ned Deily87adb6e2013-10-18 21:09:56 -07007408 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7409 # environment with a value that is the same as what we'll use
7410 # in the Makefile to ensure that we'll get the same compiler
7411 # environment during configure and build time.
7412 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7413 export MACOSX_DEPLOYMENT_TARGET
7414 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7416$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007417
Ned Deily87adb6e2013-10-18 21:09:56 -07007418 # end of Darwin* tests
7419 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420 esac
7421 ;;
7422
7423*)
7424 case $ac_sys_system in
7425 OpenUNIX*|UnixWare*)
7426 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7427 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428 SCO_SV*)
7429 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7430 ;;
7431 esac
7432 ;;
7433esac
7434
Zachary Ware5af85642015-12-21 12:09:17 -06007435# ICC needs -fp-model strict or floats behave badly
7436case "$CC" in
7437*icc*)
7438 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7439 ;;
7440esac
7441
T. Woutersddbfa2c2017-05-23 01:30:49 +02007442if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443 :
7444else
7445 OPT="-DNDEBUG $OPT"
7446fi
7447
7448if test "$ac_arch_flags"
7449then
7450 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7451fi
7452
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453# On some compilers, pthreads are available without further options
7454# (e.g. MacOS X). On some of these systems, the compiler will not
7455# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7456# So we have to see first whether pthreads are available without
7457# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7459$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007460if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462else
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464 ac_cv_pthread_is_default=no
7465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467/* end confdefs.h. */
7468
Stefan Krah7dba5942012-11-22 22:49:11 +01007469#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470#include <pthread.h>
7471
7472void* routine(void* p){return NULL;}
7473
7474int main(){
7475 pthread_t p;
7476 if(pthread_create(&p,NULL,routine,NULL)!=0)
7477 return 1;
7478 (void)pthread_detach(p);
7479 return 0;
7480}
7481
7482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007483if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484
7485 ac_cv_pthread_is_default=yes
7486 ac_cv_kthread=no
7487 ac_cv_pthread=no
7488
7489else
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7493 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494fi
7495
7496
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497fi
7498
Matthias Kloseb9621712010-04-24 17:59:49 +00007499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7500$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501
7502
7503if test $ac_cv_pthread_is_default = yes
7504then
7505 ac_cv_kpthread=no
7506else
7507# -Kpthread, if available, provides the right #defines
7508# and linker options to make pthread_create available
7509# Some compilers won't report that they do not support -Kpthread,
7510# so we need to run a program to see whether it really made the
7511# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7513$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007514if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007515 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516else
7517 ac_save_cc="$CC"
7518CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007519if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520 ac_cv_kpthread=no
7521else
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523/* end confdefs.h. */
7524
Stefan Krah7dba5942012-11-22 22:49:11 +01007525#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526#include <pthread.h>
7527
7528void* routine(void* p){return NULL;}
7529
7530int main(){
7531 pthread_t p;
7532 if(pthread_create(&p,NULL,routine,NULL)!=0)
7533 return 1;
7534 (void)pthread_detach(p);
7535 return 0;
7536}
7537
7538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007539if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540 ac_cv_kpthread=yes
7541else
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
7547
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548CC="$ac_save_cc"
7549fi
7550
Matthias Kloseb9621712010-04-24 17:59:49 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7552$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553fi
7554
7555if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7556then
7557# -Kthread, if available, provides the right #defines
7558# and linker options to make pthread_create available
7559# Some compilers won't report that they do not support -Kthread,
7560# so we need to run a program to see whether it really made the
7561# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7563$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007564if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007565 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566else
7567 ac_save_cc="$CC"
7568CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007569if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570 ac_cv_kthread=no
7571else
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573/* end confdefs.h. */
7574
Stefan Krah7dba5942012-11-22 22:49:11 +01007575#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576#include <pthread.h>
7577
7578void* routine(void* p){return NULL;}
7579
7580int main(){
7581 pthread_t p;
7582 if(pthread_create(&p,NULL,routine,NULL)!=0)
7583 return 1;
7584 (void)pthread_detach(p);
7585 return 0;
7586}
7587
7588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007589if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590 ac_cv_kthread=yes
7591else
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7595 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596fi
7597
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598CC="$ac_save_cc"
7599fi
7600
Matthias Kloseb9621712010-04-24 17:59:49 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7602$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603fi
7604
7605if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7606then
7607# -pthread, if available, provides the right #defines
7608# and linker options to make pthread_create available
7609# Some compilers won't report that they do not support -pthread,
7610# so we need to run a program to see whether it really made the
7611# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7613$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007614if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616else
7617 ac_save_cc="$CC"
7618CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007619if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620 ac_cv_pthread=no
7621else
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623/* end confdefs.h. */
7624
Stefan Krah7dba5942012-11-22 22:49:11 +01007625#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626#include <pthread.h>
7627
7628void* routine(void* p){return NULL;}
7629
7630int main(){
7631 pthread_t p;
7632 if(pthread_create(&p,NULL,routine,NULL)!=0)
7633 return 1;
7634 (void)pthread_detach(p);
7635 return 0;
7636}
7637
7638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007639if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640 ac_cv_pthread=yes
7641else
Matthias Kloseb9621712010-04-24 17:59:49 +00007642 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7645 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646fi
7647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648CC="$ac_save_cc"
7649fi
7650
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7652$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653fi
7654
7655# If we have set a CC compiler flag for thread support then
7656# check if it works for CXX, too.
7657ac_cv_cxx_thread=no
7658if test ! -z "$CXX"
7659then
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7661$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662ac_save_cxx="$CXX"
7663
7664if test "$ac_cv_kpthread" = "yes"
7665then
7666 CXX="$CXX -Kpthread"
7667 ac_cv_cxx_thread=yes
7668elif test "$ac_cv_kthread" = "yes"
7669then
7670 CXX="$CXX -Kthread"
7671 ac_cv_cxx_thread=yes
7672elif test "$ac_cv_pthread" = "yes"
7673then
7674 CXX="$CXX -pthread"
7675 ac_cv_cxx_thread=yes
7676fi
7677
7678if test $ac_cv_cxx_thread = yes
7679then
7680 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7681 $CXX -c conftest.$ac_ext 2>&5
7682 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7683 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7684 then
7685 ac_cv_cxx_thread=yes
7686 else
7687 ac_cv_cxx_thread=no
7688 fi
7689 rm -fr conftest*
7690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7692$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693fi
7694CXX="$ac_save_cxx"
7695
7696
7697# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7699$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007700if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702else
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704/* end confdefs.h. */
7705#include <stdlib.h>
7706#include <stdarg.h>
7707#include <string.h>
7708#include <float.h>
7709
7710int
7711main ()
7712{
7713
7714 ;
7715 return 0;
7716}
7717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007718if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719 ac_cv_header_stdc=yes
7720else
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7724
7725if test $ac_cv_header_stdc = yes; then
7726 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728/* end confdefs.h. */
7729#include <string.h>
7730
7731_ACEOF
7732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 $EGREP "memchr" >/dev/null 2>&1; then :
7734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735else
7736 ac_cv_header_stdc=no
7737fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007738rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739
7740fi
7741
7742if test $ac_cv_header_stdc = yes; then
7743 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745/* end confdefs.h. */
7746#include <stdlib.h>
7747
7748_ACEOF
7749if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 $EGREP "free" >/dev/null 2>&1; then :
7751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752else
7753 ac_cv_header_stdc=no
7754fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007755rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756
7757fi
7758
7759if test $ac_cv_header_stdc = yes; then
7760 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762 :
7763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765/* end confdefs.h. */
7766#include <ctype.h>
7767#include <stdlib.h>
7768#if ((' ' & 0x0FF) == 0x020)
7769# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7770# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7771#else
7772# define ISLOWER(c) \
7773 (('a' <= (c) && (c) <= 'i') \
7774 || ('j' <= (c) && (c) <= 'r') \
7775 || ('s' <= (c) && (c) <= 'z'))
7776# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7777#endif
7778
7779#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7780int
7781main ()
7782{
7783 int i;
7784 for (i = 0; i < 256; i++)
7785 if (XOR (islower (i), ISLOWER (i))
7786 || toupper (i) != TOUPPER (i))
7787 return 2;
7788 return 0;
7789}
7790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007791if ac_fn_c_try_run "$LINENO"; then :
7792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793else
Matthias Kloseb9621712010-04-24 17:59:49 +00007794 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798fi
7799
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007800fi
7801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7803$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007804if test $ac_cv_header_stdc = yes; then
7805
Matthias Kloseb9621712010-04-24 17:59:49 +00007806$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807
7808fi
7809
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007810for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007811fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007812ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007813sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007814unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007815poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007816sys/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 +01007817sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007818sys/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 +01007819sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007820sys/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 -07007821libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007822linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007823sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007824do :
7825 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7826ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007827if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007829#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007830_ACEOF
7831
7832fi
7833
Guido van Rossum627b2d71993-12-24 10:39:16 +00007834done
7835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007836ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007837for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7840$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007841if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007843else
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007845/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007846#include <sys/types.h>
7847#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
7851{
7852if ((DIR *) 0)
7853return 0;
7854 ;
7855 return 0;
7856}
7857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007858if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007860else
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865eval ac_res=\$$as_ac_Header
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7867$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007868if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007870#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007871_ACEOF
7872
7873ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007876done
7877# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7878if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7880$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007881if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007883else
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888/* Override any GCC internal prototype to avoid an error.
7889 Use char because int might match the return type of a GCC
7890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007891#ifdef __cplusplus
7892extern "C"
7893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007894char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007895int
7896main ()
7897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ;
7900 return 0;
7901}
7902_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903for ac_lib in '' dir; do
7904 if test -z "$ac_lib"; then
7905 ac_res="none required"
7906 else
7907 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007908 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007913rm -f core conftest.err conftest.$ac_objext \
7914 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007915 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007918done
Victor Stinnere0be4232011-10-25 13:06:09 +02007919if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921else
7922 ac_cv_search_opendir=no
7923fi
7924rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007925LIBS=$ac_func_search_save_LIBS
7926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7928$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007930if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007932
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007934
Michael W. Hudson54241132001-12-07 15:38:26 +00007935else
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7937$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007938if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007940else
7941 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945/* Override any GCC internal prototype to avoid an error.
7946 Use char because int might match the return type of a GCC
7947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007948#ifdef __cplusplus
7949extern "C"
7950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007951char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007952int
7953main ()
7954{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ;
7957 return 0;
7958}
7959_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960for ac_lib in '' x; do
7961 if test -z "$ac_lib"; then
7962 ac_res="none required"
7963 else
7964 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007965 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970rm -f core conftest.err conftest.$ac_objext \
7971 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007972 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975done
Victor Stinnere0be4232011-10-25 13:06:09 +02007976if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978else
7979 ac_cv_search_opendir=no
7980fi
7981rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007982LIBS=$ac_func_search_save_LIBS
7983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7985$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007987if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007990fi
7991
7992fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007993
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7995$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007996if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007998else
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008000/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008001#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008002int
8003main ()
8004{
8005return makedev(0, 0);
8006 ;
8007 return 0;
8008}
8009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008011 ac_cv_header_sys_types_h_makedev=yes
8012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015rm -f core conftest.err conftest.$ac_objext \
8016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008017
8018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8020$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008021
8022if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008023ac_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 +02008024if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008025
Matthias Kloseb9621712010-04-24 17:59:49 +00008026$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008027
8028fi
8029
8030
8031
8032 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 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 +02008034if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008037
8038fi
8039
8040
8041 fi
8042fi
8043
Michael W. Hudson54241132001-12-07 15:38:26 +00008044
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008045# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8046# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8047SAVE_CFLAGS=$CFLAGS
8048CFLAGS="-std=c99 $CFLAGS"
8049for ac_header in bluetooth/bluetooth.h
8050do :
8051 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8052if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8053 cat >>confdefs.h <<_ACEOF
8054#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8055_ACEOF
8056
8057fi
8058
8059done
8060
8061CFLAGS=$SAVE_CFLAGS
8062
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008063# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8064for ac_header in net/if.h
8065do :
8066 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8067#ifdef STDC_HEADERS
8068# include <stdlib.h>
8069# include <stddef.h>
8070#else
8071# ifdef HAVE_STDLIB_H
8072# include <stdlib.h>
8073# endif
8074#endif
8075#ifdef HAVE_SYS_SOCKET_H
8076# include <sys/socket.h>
8077#endif
8078
8079"
Victor Stinnere0be4232011-10-25 13:06:09 +02008080if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008081 cat >>confdefs.h <<_ACEOF
8082#define HAVE_NET_IF_H 1
8083_ACEOF
8084
8085fi
8086
8087done
8088
8089
Martin v. Löwis11017b12006-01-14 18:12:57 +00008090# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008091for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008092do :
8093 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 +00008094#ifdef HAVE_ASM_TYPES_H
8095#include <asm/types.h>
8096#endif
8097#ifdef HAVE_SYS_SOCKET_H
8098#include <sys/socket.h>
8099#endif
8100
Matthias Kloseb9621712010-04-24 17:59:49 +00008101"
Victor Stinnere0be4232011-10-25 13:06:09 +02008102if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008103 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008104#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008105_ACEOF
8106
8107fi
8108
8109done
8110
8111
Charles-François Natali47413c12011-10-06 19:47:44 +02008112# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008113for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008114do :
8115 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8116ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8117#ifdef HAVE_SYS_SOCKET_H
8118#include <sys/socket.h>
8119#endif
8120
8121"
8122if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8123 cat >>confdefs.h <<_ACEOF
8124#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8125_ACEOF
8126
8127fi
8128
8129done
8130
8131
Guido van Rossum627b2d71993-12-24 10:39:16 +00008132# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008133was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8135$as_echo_n "checking for clock_t in time.h... " >&6; }
8136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008138#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
8140_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008143 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008144else
Martin v. Löwis11437992002-04-12 09:54:03 +00008145
8146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008148
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008149
Guido van Rossum627b2d71993-12-24 10:39:16 +00008150fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008151rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008152
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8154$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008155
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8157$as_echo_n "checking for makedev... " >&6; }
8158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008159/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008160
Jesus Cea740f53a2010-04-28 11:35:30 +00008161#if defined(MAJOR_IN_MKDEV)
8162#include <sys/mkdev.h>
8163#elif defined(MAJOR_IN_SYSMACROS)
8164#include <sys/sysmacros.h>
8165#else
8166#include <sys/types.h>
8167#endif
8168
Neal Norwitz11690112002-07-30 01:08:28 +00008169int
8170main ()
8171{
Jesus Cea740f53a2010-04-28 11:35:30 +00008172
8173 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008174 ;
8175 return 0;
8176}
Matthias Kloseb159a552010-04-25 21:00:44 +00008177
Neal Norwitz11690112002-07-30 01:08:28 +00008178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008179if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008180 ac_cv_has_makedev=yes
8181else
Matthias Kloseb9621712010-04-24 17:59:49 +00008182 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008184rm -f core conftest.err conftest.$ac_objext \
8185 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8187$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008188if test "$ac_cv_has_makedev" = "yes"; then
8189
Matthias Kloseb9621712010-04-24 17:59:49 +00008190$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008191
8192fi
8193
Christian Heimes985ecdc2013-11-20 11:46:18 +01008194# byte swapping
8195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8196$as_echo_n "checking for le64toh... " >&6; }
8197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8198/* end confdefs.h. */
8199
8200#ifdef HAVE_ENDIAN_H
8201#include <endian.h>
8202#elif defined(HAVE_SYS_ENDIAN_H)
8203#include <sys/endian.h>
8204#endif
8205
8206int
8207main ()
8208{
8209
8210 le64toh(1)
8211 ;
8212 return 0;
8213}
8214
8215_ACEOF
8216if ac_fn_c_try_link "$LINENO"; then :
8217 ac_cv_has_le64toh=yes
8218else
8219 ac_cv_has_le64toh=no
8220fi
8221rm -f core conftest.err conftest.$ac_objext \
8222 conftest$ac_exeext conftest.$ac_ext
8223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8224$as_echo "$ac_cv_has_le64toh" >&6; }
8225if test "$ac_cv_has_le64toh" = "yes"; then
8226
8227$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8228
8229fi
8230
Martin v. Löwis399a6892002-10-04 10:22:02 +00008231# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8232# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8233# defined, but the compiler does not support pragma redefine_extname,
8234# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8235# structures (such as rlimit64) without declaring them. As a
8236# work-around, disable LFS on such configurations
8237
8238use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8240$as_echo_n "checking Solaris LFS bug... " >&6; }
8241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008242/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008243
8244#define _LARGEFILE_SOURCE 1
8245#define _FILE_OFFSET_BITS 64
8246#include <sys/resource.h>
8247
Martin v. Löwis399a6892002-10-04 10:22:02 +00008248int
8249main ()
8250{
8251struct rlimit foo;
8252 ;
8253 return 0;
8254}
8255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008257 sol_lfs_bug=no
8258else
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8263$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008264if test "$sol_lfs_bug" = "yes"; then
8265 use_lfs=no
8266fi
8267
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008268# Don't use largefile support for GNU/Hurd
8269case $ac_sys_system in GNU*)
8270 use_lfs=no
8271esac
8272
Martin v. Löwis399a6892002-10-04 10:22:02 +00008273if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008274# Two defines needed to enable largefile support on various platforms
8275# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008276case $ac_sys_system/$ac_sys_release in
8277AIX*)
8278
8279$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8280
8281 ;;
8282esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008285
8286
Matthias Kloseb9621712010-04-24 17:59:49 +00008287$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008288
Martin v. Löwis399a6892002-10-04 10:22:02 +00008289fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008290
Guido van Rossum84e7b241996-08-19 21:59:00 +00008291# Add some code to confdefs.h so that the test for off_t works on SCO
8292cat >> confdefs.h <<\EOF
8293#if defined(SCO_DS)
8294#undef _OFF_T
8295#endif
8296EOF
8297
Guido van Rossumef2255b2000-03-10 22:30:29 +00008298# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008299ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008300if test "x$ac_cv_type_mode_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
8305#define mode_t int
8306_ACEOF
8307
8308fi
8309
Matthias Kloseb9621712010-04-24 17:59:49 +00008310ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008311if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008312
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008313else
Martin v. Löwis11437992002-04-12 09:54:03 +00008314
8315cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008317_ACEOF
8318
8319fi
8320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008322if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008323
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324else
Martin v. Löwis11437992002-04-12 09:54:03 +00008325
8326cat >>confdefs.h <<_ACEOF
8327#define pid_t int
8328_ACEOF
8329
8330fi
8331
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008334#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008335_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008338if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008339
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008340else
Martin v. Löwis11437992002-04-12 09:54:03 +00008341
8342cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
8345
8346fi
8347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8349$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008350if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008352else
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008354/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008355#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
8357_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008360 ac_cv_type_uid_t=yes
8361else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008362 ac_cv_type_uid_t=no
8363fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008364rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008365
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8368$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008369if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008372
8373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008375
8376fi
8377
Mark Dickinson983bc162012-12-02 12:11:38 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008380if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008383
8384fi
8385
Stefan Krah1919b7e2012-03-21 18:25:23 +01008386ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8387if test "x$ac_cv_type___uint128_t" = xyes; then :
8388
8389$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8390
8391fi
8392
Jack Jansendd19cf82001-12-06 22:36:17 +00008393
Michael W. Hudson54241132001-12-07 15:38:26 +00008394# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008395# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396# The cast to long int works around a bug in the HP C Compiler
8397# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8398# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8399# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8401$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008402if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008404else
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 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 +00008406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407else
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 if test "$ac_cv_type_int" = yes; then
8409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008411as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008412See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413 else
8414 ac_cv_sizeof_int=0
8415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8420$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421
8422
8423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008425#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008426_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008427
8428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429# The cast to long int works around a bug in the HP C Compiler
8430# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8431# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8432# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8434$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008435if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008437else
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 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 +00008439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440else
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 if test "$ac_cv_type_long" = yes; then
8442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008444as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008445See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446 else
8447 ac_cv_sizeof_long=0
8448 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008450
Martin v. Löwis11437992002-04-12 09:54:03 +00008451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8453$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454
8455
8456
Martin v. Löwis11437992002-04-12 09:54:03 +00008457cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008458#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008459_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008460
8461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008462# The cast to long int works around a bug in the HP C Compiler
8463# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8464# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8465# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8467$as_echo_n "checking size of long long... " >&6; }
8468if ${ac_cv_sizeof_long_long+:} false; then :
8469 $as_echo_n "(cached) " >&6
8470else
8471 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8472
8473else
8474 if test "$ac_cv_type_long_long" = yes; then
8475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8477as_fn_error 77 "cannot compute sizeof (long long)
8478See \`config.log' for more details" "$LINENO" 5; }
8479 else
8480 ac_cv_sizeof_long_long=0
8481 fi
8482fi
8483
8484fi
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8486$as_echo "$ac_cv_sizeof_long_long" >&6; }
8487
8488
8489
8490cat >>confdefs.h <<_ACEOF
8491#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8492_ACEOF
8493
8494
8495# The cast to long int works around a bug in the HP C Compiler
8496# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8497# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8498# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8500$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008501if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008503else
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 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 +00008505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506else
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 if test "$ac_cv_type_void_p" = yes; then
8508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008510as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008511See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512 else
8513 ac_cv_sizeof_void_p=0
8514 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8519$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520
8521
8522
Martin v. Löwis11437992002-04-12 09:54:03 +00008523cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008524#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008525_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008526
8527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528# The cast to long int works around a bug in the HP C Compiler
8529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8531# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8533$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008534if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008536else
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 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 +00008538
Martin v. Löwis11437992002-04-12 09:54:03 +00008539else
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 if test "$ac_cv_type_short" = yes; then
8541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008543as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008544See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545 else
8546 ac_cv_sizeof_short=0
8547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549
Martin v. Löwis11437992002-04-12 09:54:03 +00008550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8552$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553
8554
8555
Martin v. Löwis11437992002-04-12 09:54:03 +00008556cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008557#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008558_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008559
8560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561# The cast to long int works around a bug in the HP C Compiler
8562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8564# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8566$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008567if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008569else
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 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 +00008571
Martin v. Löwis11437992002-04-12 09:54:03 +00008572else
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 if test "$ac_cv_type_float" = yes; then
8574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008576as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008577See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578 else
8579 ac_cv_sizeof_float=0
8580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8585$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586
8587
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008590#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008591_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008592
8593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594# The cast to long int works around a bug in the HP C Compiler
8595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8597# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8599$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008600if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008602else
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 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 +00008604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605else
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 if test "$ac_cv_type_double" = yes; then
8607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008609as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008610See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611 else
8612 ac_cv_sizeof_double=0
8613 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615
Martin v. Löwis11437992002-04-12 09:54:03 +00008616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8618$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619
8620
8621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008623#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008624_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008625
8626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627# The cast to long int works around a bug in the HP C Compiler
8628# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8629# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8630# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8632$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008633if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008635else
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 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 +00008637
Martin v. Löwis11437992002-04-12 09:54:03 +00008638else
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 if test "$ac_cv_type_fpos_t" = yes; then
8640 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8641$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008642as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008643See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644 else
8645 ac_cv_sizeof_fpos_t=0
8646 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648
Martin v. Löwis11437992002-04-12 09:54:03 +00008649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8651$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652
8653
8654
Martin v. Löwis11437992002-04-12 09:54:03 +00008655cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008656#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008657_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008658
Michael W. Hudson54241132001-12-07 15:38:26 +00008659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660# The cast to long int works around a bug in the HP C Compiler
8661# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8662# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8663# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8665$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008666if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008668else
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 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 +00008670
Martin v. Löwis18e16552006-02-15 17:27:45 +00008671else
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 if test "$ac_cv_type_size_t" = yes; then
8673 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008675as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008676See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677 else
8678 ac_cv_sizeof_size_t=0
8679 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681
Martin v. Löwis18e16552006-02-15 17:27:45 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8684$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685
8686
8687
Martin v. Löwis18e16552006-02-15 17:27:45 +00008688cat >>confdefs.h <<_ACEOF
8689#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8690_ACEOF
8691
8692
Christian Heimes400adb02008-02-01 08:12:03 +00008693# The cast to long int works around a bug in the HP C Compiler
8694# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8695# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8696# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8698$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008699if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008701else
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 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 +00008703
Christian Heimes400adb02008-02-01 08:12:03 +00008704else
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 if test "$ac_cv_type_pid_t" = yes; then
8706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008708as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008709See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008710 else
8711 ac_cv_sizeof_pid_t=0
8712 fi
8713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008714
Christian Heimes400adb02008-02-01 08:12:03 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8717$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008718
8719
8720
8721cat >>confdefs.h <<_ACEOF
8722#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8723_ACEOF
8724
8725
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008726# The cast to long int works around a bug in the HP C Compiler
8727# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8728# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8729# This bug is HP SR number 8606223364.
8730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8731$as_echo_n "checking size of uintptr_t... " >&6; }
8732if ${ac_cv_sizeof_uintptr_t+:} false; then :
8733 $as_echo_n "(cached) " >&6
8734else
8735 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8736
8737else
8738 if test "$ac_cv_type_uintptr_t" = yes; then
8739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8741as_fn_error 77 "cannot compute sizeof (uintptr_t)
8742See \`config.log' for more details" "$LINENO" 5; }
8743 else
8744 ac_cv_sizeof_uintptr_t=0
8745 fi
8746fi
8747
8748fi
8749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8750$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8751
8752
8753
8754cat >>confdefs.h <<_ACEOF
8755#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8756_ACEOF
8757
8758
Michael W. Hudson54241132001-12-07 15:38:26 +00008759
Matthias Kloseb9621712010-04-24 17:59:49 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8761$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008762have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008764/* end confdefs.h. */
8765
8766int
8767main ()
8768{
8769long double x; x = (long double)0;
8770 ;
8771 return 0;
8772}
8773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008774if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008775
8776
Matthias Kloseb9621712010-04-24 17:59:49 +00008777$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008778
8779 have_long_double=yes
8780
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008781fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8784$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008785if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008786# The cast to long int works around a bug in the HP C Compiler
8787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8789# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8791$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008792if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 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 +00008796
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008797else
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 if test "$ac_cv_type_long_double" = yes; then
8799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008801as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008802See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008803 else
8804 ac_cv_sizeof_long_double=0
8805 fi
8806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008807
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8810$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008811
8812
8813
8814cat >>confdefs.h <<_ACEOF
8815#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8816_ACEOF
8817
8818
8819fi
8820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821# The cast to long int works around a bug in the HP C Compiler
8822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8826$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008827if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008829else
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 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 +00008831
Thomas Woutersb2137042007-02-01 18:02:27 +00008832else
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 if test "$ac_cv_type__Bool" = yes; then
8834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008836as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008837See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838 else
8839 ac_cv_sizeof__Bool=0
8840 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008842
Thomas Woutersb2137042007-02-01 18:02:27 +00008843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8845$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008846
8847
8848
Thomas Woutersb2137042007-02-01 18:02:27 +00008849cat >>confdefs.h <<_ACEOF
8850#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8851_ACEOF
8852
8853
Thomas Woutersb2137042007-02-01 18:02:27 +00008854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855# The cast to long int works around a bug in the HP C Compiler
8856# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8857# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8858# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8860$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008861if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863else
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008865#ifdef HAVE_SYS_TYPES_H
8866#include <sys/types.h>
8867#endif
8868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 if test "$ac_cv_type_off_t" = yes; then
8873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008875as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008876See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008877 else
8878 ac_cv_sizeof_off_t=0
8879 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8884$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008886
8887
Martin v. Löwis11437992002-04-12 09:54:03 +00008888cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008889#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008890_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008891
Michael W. Hudson54241132001-12-07 15:38:26 +00008892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008893
Matthias Kloseb9621712010-04-24 17:59:49 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8895$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008896if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008897 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008898
Matthias Kloseb9621712010-04-24 17:59:49 +00008899$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008900
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8902$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8905$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008906fi
8907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908# The cast to long int works around a bug in the HP C Compiler
8909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8911# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8913$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008914if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008916else
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008918#ifdef HAVE_SYS_TYPES_H
8919#include <sys/types.h>
8920#endif
8921#ifdef HAVE_TIME_H
8922#include <time.h>
8923#endif
8924
Matthias Kloseb9621712010-04-24 17:59:49 +00008925"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008927else
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 if test "$ac_cv_type_time_t" = yes; then
8929 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008931as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008932See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008933 else
8934 ac_cv_sizeof_time_t=0
8935 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008937
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8940$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008941
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008942
8943
Martin v. Löwis11437992002-04-12 09:54:03 +00008944cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008945#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008946_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008947
Michael W. Hudson54241132001-12-07 15:38:26 +00008948
8949
Trent Mick635f6fb2000-08-23 21:33:05 +00008950# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008951ac_save_cc="$CC"
8952if test "$ac_cv_kpthread" = "yes"
8953then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008954elif test "$ac_cv_kthread" = "yes"
8955then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008956elif test "$ac_cv_pthread" = "yes"
8957then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008958fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008959
Matthias Kloseb9621712010-04-24 17:59:49 +00008960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8961$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008962have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008964/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008965
8966 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008967int
8968main ()
8969{
Guido van Rossum12580492000-09-24 16:47:19 +00008970pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ;
8972 return 0;
8973}
Matthias Kloseb159a552010-04-25 21:00:44 +00008974
Martin v. Löwis11437992002-04-12 09:54:03 +00008975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008976if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008977 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8981$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008982if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8988$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008989if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991else
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008993#ifdef HAVE_PTHREAD_H
8994#include <pthread.h>
8995#endif
8996
Matthias Kloseb9621712010-04-24 17:59:49 +00008997"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 if test "$ac_cv_type_pthread_t" = yes; then
9001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009003as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009004See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005 else
9006 ac_cv_sizeof_pthread_t=0
9007 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009
Trent Mick635f6fb2000-08-23 21:33:05 +00009010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9012$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009014
9015
Martin v. Löwis11437992002-04-12 09:54:03 +00009016cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009017#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009019
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020
Trent Mick635f6fb2000-08-23 21:33:05 +00009021fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009022CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009023
Michael W. Hudson54241132001-12-07 15:38:26 +00009024
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009025case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009026 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009027 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9028 ;;
9029 Darwin/*)
9030 OTHER_LIBTOOL_OPT=""
9031 ;;
9032esac
9033
9034
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009035
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009036case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009037 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009038 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9039 if test "${enable_universalsdk}"; then
9040 :
9041 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009042 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009043 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009044 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009045 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009046 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009047 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009048 if test ${gcc_version} '<' 4.0
9049 then
9050 LIBTOOL_CRUFT="-lcc_dynamic"
9051 else
9052 LIBTOOL_CRUFT=""
9053 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009055 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009056else
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009058/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009059
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009060 #include <unistd.h>
9061 int main(int argc, char*argv[])
9062 {
9063 if (sizeof(long) == 4) {
9064 return 0;
9065 } else {
9066 return 1;
9067 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009068 }
9069
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009071if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009072 ac_osx_32bit=yes
9073else
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9077 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009078fi
9079
9080
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009081 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009082 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009083 i386)
9084 MACOSX_DEFAULT_ARCH="i386"
9085 ;;
9086 ppc)
9087 MACOSX_DEFAULT_ARCH="ppc"
9088 ;;
9089 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009090 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009091 ;;
9092 esac
9093 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009094 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009095 i386)
9096 MACOSX_DEFAULT_ARCH="x86_64"
9097 ;;
9098 ppc)
9099 MACOSX_DEFAULT_ARCH="ppc64"
9100 ;;
9101 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009102 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009103 ;;
9104 esac
9105
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009106 fi
9107
9108 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009109 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009110 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009111esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9113$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009114if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009115then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009116 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009118 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009121
Matthias Kloseb9621712010-04-24 17:59:49 +00009122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9123$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009124 if test $enable_shared = "yes"
9125 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009126 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 +00009127 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009128else
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9130$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009131fi
9132
Matthias Kloseb9621712010-04-24 17:59:49 +00009133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9134$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009135case $ac_sys_system/$ac_sys_release in
9136 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009137
Matthias Kloseb9621712010-04-24 17:59:49 +00009138$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009139
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9141$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009142 ;;
9143 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9145$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009146 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009147esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009148
Guido van Rossum0a516c91994-09-12 10:58:40 +00009149# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009150
Michael W. Hudson54241132001-12-07 15:38:26 +00009151
9152
9153
9154
Benjamin Peterson99f03762010-04-11 22:15:28 +00009155
Thomas Wouters477c8d52006-05-27 19:21:47 +00009156
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009157# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9158# -- usually .so, .sl on HP-UX, .dll on Cygwin
9159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9160$as_echo_n "checking the extension of shared libraries... " >&6; }
9161if test -z "$SHLIB_SUFFIX"; then
9162 case $ac_sys_system in
9163 hp*|HP*)
9164 case `uname -m` in
9165 ia64) SHLIB_SUFFIX=.so;;
9166 *) SHLIB_SUFFIX=.sl;;
9167 esac
9168 ;;
9169 CYGWIN*) SHLIB_SUFFIX=.dll;;
9170 *) SHLIB_SUFFIX=.so;;
9171 esac
9172fi
9173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9174$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009175
Guido van Rossum0a516c91994-09-12 10:58:40 +00009176# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009177# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009178# (Shared libraries in this instance are shared modules to be loaded into
9179# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9181$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009182if test -z "$LDSHARED"
9183then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009184 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009185 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009186 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009187 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009188 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009189 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009190 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 if test "$GCC" = "yes" ; then
9193 LDSHARED='$(CC) -shared'
9194 LDCXXSHARED='$(CXX) -shared'
9195 else
9196 LDSHARED='$(CC) -G'
9197 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009198 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009199 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009200 if test "$GCC" = "yes" ; then
9201 LDSHARED='$(CC) -shared'
9202 LDCXXSHARED='$(CXX) -shared'
9203 else
9204 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009205 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009206 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009207 LDSHARED='$(CC) -bundle'
9208 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +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 Jansena3891ea2001-09-07 14:25:12 +00009214 else
9215 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009216 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009217 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009218 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009219 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009220 LDSHARED='$(CC) -bundle'
9221 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009222 if test "$enable_framework" ; then
9223 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009224 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9225 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009226 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009227 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009228 # No framework, use the Python app as bundle-loader
9229 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009230 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009231 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009232 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009233 Darwin/*)
9234 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9235 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009236
Ned Deily36820b62014-06-25 13:44:22 -07009237 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9238 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9239 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9240 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9241 if test ${dep_target_major} -eq 10 && \
9242 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009243 then
Ned Deily36820b62014-06-25 13:44:22 -07009244 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009245 LDSHARED='$(CC) -bundle'
9246 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009247 if test "$enable_framework" ; then
9248 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009249 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9250 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009251 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009252 else
9253 # No framework, use the Python app as bundle-loader
9254 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9255 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009256 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009257 fi
Ned Deily36820b62014-06-25 13:44:22 -07009258 else
9259 # building for OS X 10.3 and later
9260 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9261 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9262 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009263 fi
9264 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009265 Linux*|GNU*|QNX*)
9266 LDSHARED='$(CC) -shared'
9267 LDCXXSHARED='$(CXX) -shared';;
9268 BSD/OS*/4*)
9269 LDSHARED="gcc -shared"
9270 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009271 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009272 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009273 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009274 LDSHARED='$(CC) -shared'
9275 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009276 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009277 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009278 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009279 OpenBSD*)
9280 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9281 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009282 LDSHARED='$(CC) -shared $(CCSHARED)'
9283 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009284 else
9285 case `uname -r` in
9286 [01].* | 2.[0-7] | 2.[0-7].*)
9287 LDSHARED="ld -Bshareable ${LDFLAGS}"
9288 ;;
9289 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009290 LDSHARED='$(CC) -shared $(CCSHARED)'
9291 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009292 ;;
9293 esac
9294 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009295 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009296 LDSHARED='$(CC) -shared'
9297 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009298 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009299 if test "$GCC" = "yes" ; then
9300 LDSHARED='$(CC) -shared'
9301 LDCXXSHARED='$(CXX) -shared'
9302 else
9303 LDSHARED='$(CC) -G'
9304 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009305 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009306 SCO_SV*)
9307 LDSHARED='$(CC) -Wl,-G,-Bexport'
9308 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9309 CYGWIN*)
9310 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9311 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009312 *) LDSHARED="ld";;
9313 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9316$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009317LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009318BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009319# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009320# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9322$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009323if test -z "$CCSHARED"
9324then
Guido van Rossum07397971997-04-29 21:49:50 +00009325 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009326 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009327 then CCSHARED="-fPIC";
9328 elif test `uname -p` = sparc;
9329 then CCSHARED="-xcode=pic32";
9330 else CCSHARED="-Kpic";
9331 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009332 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009333 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009334 else CCSHARED="+z";
9335 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009336 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009337 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009338 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009339 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009340 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009341 if test "$GCC" = "yes"
9342 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009343 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009344 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009345 SCO_SV*)
9346 if test "$GCC" = "yes"
9347 then CCSHARED="-fPIC"
9348 else CCSHARED="-Kpic -belf"
9349 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009350 IRIX*/6*) case $CC in
9351 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009352 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009353 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9357$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009358# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009359# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9361$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009362if test -z "$LINKFORSHARED"
9363then
Guido van Rossum07397971997-04-29 21:49:50 +00009364 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009365 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009366 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009367 LINKFORSHARED="-Wl,-E -Wl,+s";;
9368# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009369 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009370 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009371 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009372 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009374 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009375
9376 # Issue #18075: the default maximum stack size (8MBytes) is too
9377 # small for the default recursion limit. Increase the stack size
9378 # to ensure that tests don't crash
9379 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9380
Jack Jansene578a632001-08-15 01:27:14 +00009381 if test "$enable_framework"
9382 then
Jack Jansenda49e192005-01-07 13:08:22 +00009383 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009384 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009385 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009386 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009387 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009388 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009389 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009390 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9391 then
9392 LINKFORSHARED="-Wl,--export-dynamic"
9393 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009394 SunOS/5*) case $CC in
9395 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009396 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009397 then
9398 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009399 fi;;
9400 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009401 CYGWIN*)
9402 if test $enable_shared = "no"
9403 then
9404 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9405 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009406 QNX*)
9407 # -Wl,-E causes the symbols to be added to the dynamic
9408 # symbol table so that they can be found when a module
9409 # is loaded. -N 2048K causes the stack size to be set
9410 # to 2048 kilobytes so that the stack doesn't overflow
9411 # when running test_compile.py.
9412 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009413 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9416$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009417
Michael W. Hudson54241132001-12-07 15:38:26 +00009418
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9421$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009422if test ! "$LIBRARY" = "$LDLIBRARY"
9423then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009424 case $ac_sys_system in
9425 CYGWIN*)
9426 # Cygwin needs CCSHARED when building extension DLLs
9427 # but not when building the interpreter DLL.
9428 CFLAGSFORSHARED='';;
9429 *)
9430 CFLAGSFORSHARED='$(CCSHARED)'
9431 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9434$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009435
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009436# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9437# library (with --enable-shared).
9438# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009439# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9440# if it is not required, since it creates a dependency of the shared library
9441# to LIBS. This, in turn, means that applications linking the shared libpython
9442# don't need to link LIBS explicitly. The default should be only changed
9443# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009444
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9446$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009447case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009448 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009449 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009450esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9452$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009453
9454
Guido van Rossum627b2d71993-12-24 10:39:16 +00009455# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9457$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009458if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009459 $as_echo_n "(cached) " >&6
9460else
9461 ac_check_lib_save_LIBS=$LIBS
9462LIBS="-lsendfile $LIBS"
9463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9464/* end confdefs.h. */
9465
9466/* Override any GCC internal prototype to avoid an error.
9467 Use char because int might match the return type of a GCC
9468 builtin and then its argument prototype would still apply. */
9469#ifdef __cplusplus
9470extern "C"
9471#endif
9472char sendfile ();
9473int
9474main ()
9475{
9476return sendfile ();
9477 ;
9478 return 0;
9479}
9480_ACEOF
9481if ac_fn_c_try_link "$LINENO"; then :
9482 ac_cv_lib_sendfile_sendfile=yes
9483else
9484 ac_cv_lib_sendfile_sendfile=no
9485fi
9486rm -f core conftest.err conftest.$ac_objext \
9487 conftest$ac_exeext conftest.$ac_ext
9488LIBS=$ac_check_lib_save_LIBS
9489fi
9490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9491$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009492if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009493 cat >>confdefs.h <<_ACEOF
9494#define HAVE_LIBSENDFILE 1
9495_ACEOF
9496
9497 LIBS="-lsendfile $LIBS"
9498
9499fi
9500
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9502$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009503if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009505else
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009507LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511/* Override any GCC internal prototype to avoid an error.
9512 Use char because int might match the return type of a GCC
9513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514#ifdef __cplusplus
9515extern "C"
9516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009517char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009518int
9519main ()
9520{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 ;
9523 return 0;
9524}
9525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009528else
Matthias Kloseb9621712010-04-24 17:59:49 +00009529 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009531rm -f core conftest.err conftest.$ac_objext \
9532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009533LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9536$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009537if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 cat >>confdefs.h <<_ACEOF
9539#define HAVE_LIBDL 1
9540_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009542 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009543
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009544fi
9545 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9547$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009548if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009550else
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009552LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556/* Override any GCC internal prototype to avoid an error.
9557 Use char because int might match the return type of a GCC
9558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009559#ifdef __cplusplus
9560extern "C"
9561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009562char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009563int
9564main ()
9565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ;
9568 return 0;
9569}
9570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009573else
Matthias Kloseb9621712010-04-24 17:59:49 +00009574 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009576rm -f core conftest.err conftest.$ac_objext \
9577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009578LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9581$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009582if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 cat >>confdefs.h <<_ACEOF
9584#define HAVE_LIBDLD 1
9585_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009587 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009588
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009589fi
9590 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009591
Georg Brandlb1441c72009-01-03 22:33:39 +00009592# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009593if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9595$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009596if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009598else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009599 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603/* Override any GCC internal prototype to avoid an error.
9604 Use char because int might match the return type of a GCC
9605 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606#ifdef __cplusplus
9607extern "C"
9608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009609char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009610int
9611main ()
9612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ;
9615 return 0;
9616}
9617_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618for ac_lib in '' pthread rt posix4; do
9619 if test -z "$ac_lib"; then
9620 ac_res="none required"
9621 else
9622 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009623 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009625 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628rm -f core conftest.err conftest.$ac_objext \
9629 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009630 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633done
Victor Stinnere0be4232011-10-25 13:06:09 +02009634if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636else
9637 ac_cv_search_sem_init=no
9638fi
9639rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009640LIBS=$ac_func_search_save_LIBS
9641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9643$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009645if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009647
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009648fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009649 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009650 # posix4 on Solaris 2.6
9651 # pthread (first!) on Linux
9652fi
9653
Martin v. Löwis19d17342003-06-14 21:03:05 +00009654# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9656$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009657if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009659else
9660 ac_check_lib_save_LIBS=$LIBS
9661LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665/* Override any GCC internal prototype to avoid an error.
9666 Use char because int might match the return type of a GCC
9667 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009668#ifdef __cplusplus
9669extern "C"
9670#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009671char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672int
9673main ()
9674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009676 ;
9677 return 0;
9678}
9679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009681 ac_cv_lib_intl_textdomain=yes
9682else
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009687LIBS=$ac_check_lib_save_LIBS
9688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9690$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009691if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009692
Matthias Kloseb9621712010-04-24 17:59:49 +00009693$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009694
Brett Cannonc6d936e2009-06-07 20:09:53 +00009695 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009696fi
9697
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009698
9699# checks for system dependent C++ extensions support
9700case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9702$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009705
Georg Brandl59e87bd2011-02-15 19:48:59 +00009706 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009707int
9708main ()
9709{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009710loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 ;
9712 return 0;
9713}
Matthias Kloseb159a552010-04-25 21:00:44 +00009714
Martin v. Löwis11437992002-04-12 09:54:03 +00009715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009716if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009717
Matthias Kloseb159a552010-04-25 21:00:44 +00009718
Matthias Kloseb9621712010-04-24 17:59:49 +00009719$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009720
Matthias Kloseb159a552010-04-25 21:00:44 +00009721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009722$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009723
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009724else
Matthias Kloseb159a552010-04-25 21:00:44 +00009725
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009727$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009728
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730rm -f core conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009732 *) ;;
9733esac
9734
Christian Heimes985ecdc2013-11-20 11:46:18 +01009735# check for systems that require aligned memory access
9736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9737$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009738if ${ac_cv_aligned_required+:} false; then :
9739 $as_echo_n "(cached) " >&6
9740else
9741 if test "$cross_compiling" = yes; then :
9742 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009743else
9744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9745/* end confdefs.h. */
9746
9747int main()
9748{
9749 char s[16];
9750 int i, *p1, *p2;
9751 for (i=0; i < 16; i++)
9752 s[i] = i;
9753 p1 = (int*)(s+1);
9754 p2 = (int*)(s+2);
9755 if (*p1 == *p2)
9756 return 1;
9757 return 0;
9758}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009759_ACEOF
9760if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009761 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009762else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009763 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009764fi
9765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9766 conftest.$ac_objext conftest.beam conftest.$ac_ext
9767fi
9768
9769
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009770fi
9771
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9773$as_echo "$ac_cv_aligned_required" >&6; }
9774if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009775
9776$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9777
9778fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009779
9780# str, bytes and memoryview hash algorithm
9781
9782
9783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9784$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9785
9786# Check whether --with-hash_algorithm was given.
9787if test "${with_hash_algorithm+set}" = set; then :
9788 withval=$with_hash_algorithm;
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9790$as_echo "$withval" >&6; }
9791case "$withval" in
9792 siphash24)
9793 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9794
9795 ;;
9796 fnv)
9797 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9798
9799 ;;
9800 *)
9801 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9802 ;;
9803esac
9804
9805else
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9807$as_echo "default" >&6; }
9808fi
9809
9810
Charles-François Natalid30b0222014-05-08 23:08:51 +01009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9812$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9813
9814# Check whether --with-address_sanitizer was given.
9815if test "${with_address_sanitizer+set}" = set; then :
9816 withval=$with_address_sanitizer;
9817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9818$as_echo "$withval" >&6; }
9819BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9820LDFLAGS="-fsanitize=address $LDFLAGS"
9821
9822else
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9824$as_echo "no" >&6; }
9825fi
9826
9827
Guido van Rossum70c7f481998-03-26 18:44:10 +00009828# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9830$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009831if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009833else
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009835LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839/* Override any GCC internal prototype to avoid an error.
9840 Use char because int might match the return type of a GCC
9841 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009842#ifdef __cplusplus
9843extern "C"
9844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009845char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009846int
9847main ()
9848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ;
9851 return 0;
9852}
9853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009854if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009856else
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859rm -f core conftest.err conftest.$ac_objext \
9860 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009861LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9864$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009865if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009866 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009867fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009868 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9870$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009871if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009873else
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009875LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879/* Override any GCC internal prototype to avoid an error.
9880 Use char because int might match the return type of a GCC
9881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882#ifdef __cplusplus
9883extern "C"
9884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009885char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899rm -f core conftest.err conftest.$ac_objext \
9900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009901LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9904$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009905if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009906 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009907fi
9908 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9911$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009914if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9917$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009918LIBS="$withval $LIBS"
9919
9920else
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923fi
9924
Guido van Rossum7f43da71994-08-01 12:15:30 +00009925
Victor Stinner8291b5e2015-03-20 16:03:14 +01009926
9927
9928
9929
9930
9931
9932
9933if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9934 if test -n "$ac_tool_prefix"; then
9935 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9936set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9938$as_echo_n "checking for $ac_word... " >&6; }
9939if ${ac_cv_path_PKG_CONFIG+:} false; then :
9940 $as_echo_n "(cached) " >&6
9941else
9942 case $PKG_CONFIG in
9943 [\\/]* | ?:[\\/]*)
9944 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9945 ;;
9946 *)
9947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9948for as_dir in $PATH
9949do
9950 IFS=$as_save_IFS
9951 test -z "$as_dir" && as_dir=.
9952 for ac_exec_ext in '' $ac_executable_extensions; do
9953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9954 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9956 break 2
9957 fi
9958done
9959 done
9960IFS=$as_save_IFS
9961
9962 ;;
9963esac
9964fi
9965PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9966if test -n "$PKG_CONFIG"; then
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9968$as_echo "$PKG_CONFIG" >&6; }
9969else
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971$as_echo "no" >&6; }
9972fi
9973
9974
9975fi
9976if test -z "$ac_cv_path_PKG_CONFIG"; then
9977 ac_pt_PKG_CONFIG=$PKG_CONFIG
9978 # Extract the first word of "pkg-config", so it can be a program name with args.
9979set dummy pkg-config; ac_word=$2
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9981$as_echo_n "checking for $ac_word... " >&6; }
9982if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9983 $as_echo_n "(cached) " >&6
9984else
9985 case $ac_pt_PKG_CONFIG in
9986 [\\/]* | ?:[\\/]*)
9987 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9988 ;;
9989 *)
9990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991for as_dir in $PATH
9992do
9993 IFS=$as_save_IFS
9994 test -z "$as_dir" && as_dir=.
9995 for ac_exec_ext in '' $ac_executable_extensions; do
9996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9997 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9999 break 2
10000 fi
10001done
10002 done
10003IFS=$as_save_IFS
10004
10005 ;;
10006esac
10007fi
10008ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10009if test -n "$ac_pt_PKG_CONFIG"; then
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10011$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10012else
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
10015fi
10016
10017 if test "x$ac_pt_PKG_CONFIG" = x; then
10018 PKG_CONFIG=""
10019 else
10020 case $cross_compiling:$ac_tool_warned in
10021yes:)
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10024ac_tool_warned=yes ;;
10025esac
10026 PKG_CONFIG=$ac_pt_PKG_CONFIG
10027 fi
10028else
10029 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10030fi
10031
10032fi
10033if test -n "$PKG_CONFIG"; then
10034 _pkg_min_version=0.9.0
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10036$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10037 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10039$as_echo "yes" >&6; }
10040 else
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043 PKG_CONFIG=""
10044 fi
10045fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010046
10047# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10049$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010050
10051# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010053 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010054else
10055 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056fi
10057
10058
Matthias Kloseb9621712010-04-24 17:59:49 +000010059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10060$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010061
10062# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10064$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010065
10066# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010068 withval=$with_system_ffi;
10069fi
10070
10071
Zachary Waref40d4dd2016-09-17 01:25:24 -050010072if test "$ac_sys_system" = "Darwin"
10073then
10074 case "$with_system_ffi" in
10075 "")
10076 with_system_ffi="no"
10077 ;;
10078 yes|no)
10079 ;;
10080 *)
10081 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10082 ;;
10083 esac
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10085$as_echo "$with_system_ffi" >&6; }
10086else
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10088$as_echo "yes" >&6; }
10089 if test "$with_system_ffi" != ""
10090 then
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10092$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10093 fi
10094 with_system_ffi="yes"
10095fi
Zachary Ware935043d2016-09-09 17:01:21 -070010096
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010097if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010098 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10099else
10100 LIBFFI_INCLUDEDIR=""
10101fi
10102
10103
Stefan Krah60187b52012-03-23 19:06:27 +010010104# Check for use of the system libmpdec library
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10106$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10107
10108# Check whether --with-system_libmpdec was given.
10109if test "${with_system_libmpdec+set}" = set; then :
10110 withval=$with_system_libmpdec;
10111else
10112 with_system_libmpdec="no"
10113fi
10114
10115
10116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10117$as_echo "$with_system_libmpdec" >&6; }
10118
Benjamin Peterson076ed002010-10-31 17:11:02 +000010119# Check for support for loadable sqlite extensions
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10121$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10122# Check whether --enable-loadable-sqlite-extensions was given.
10123if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10124 enableval=$enable_loadable_sqlite_extensions;
10125else
10126 enable_loadable_sqlite_extensions="no"
10127fi
10128
10129
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10131$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10132
Ned Deilyd819b932013-09-06 01:07:05 -070010133# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10134
10135
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10137$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10138
10139# Check whether --with-tcltk-includes was given.
10140if test "${with_tcltk_includes+set}" = set; then :
10141 withval=$with_tcltk_includes;
10142else
10143 with_tcltk_includes="default"
10144fi
10145
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10147$as_echo "$with_tcltk_includes" >&6; }
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10149$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10150
10151# Check whether --with-tcltk-libs was given.
10152if test "${with_tcltk_libs+set}" = set; then :
10153 withval=$with_tcltk_libs;
10154else
10155 with_tcltk_libs="default"
10156fi
10157
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10159$as_echo "$with_tcltk_libs" >&6; }
10160if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10161then
10162 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10163 then
10164 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10165 fi
10166 TCLTK_INCLUDES=""
10167 TCLTK_LIBS=""
10168else
10169 TCLTK_INCLUDES="$with_tcltk_includes"
10170 TCLTK_LIBS="$with_tcltk_libs"
10171fi
10172
Matthias Klose55708cc2009-04-30 08:06:49 +000010173# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10175$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010176
10177# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010178if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010179 withval=$with_dbmliborder;
10180if test x$with_dbmliborder = xyes
10181then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010182as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010183else
10184 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10185 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10186 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010187 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010188 fi
10189 done
10190fi
10191fi
10192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10194$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010195
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010196# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010197
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010198USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200
Martin v. Löwis11437992002-04-12 09:54:03 +000010201
10202# Templates for things AC_DEFINEd more than once.
10203# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010204
10205
Martin v. Löwis11437992002-04-12 09:54:03 +000010206
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10208$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010211if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212 withval=$with_threads;
10213fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010214
10215
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010216# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010219if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 withval=$with_thread; with_threads=$with_thread
10221fi
10222
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010223
10224if test -z "$with_threads"
10225then with_threads="yes"
10226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10228$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010229
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010230
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010231if test "$with_threads" = "no"
10232then
10233 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010234elif test "$ac_cv_pthread_is_default" = yes
10235then
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010237
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010238 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010240
10241 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010243elif test "$ac_cv_kpthread" = "yes"
10244then
10245 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010246 if test "$ac_cv_cxx_thread" = "yes"; then
10247 CXX="$CXX -Kpthread"
10248 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010250
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010251 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010252 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010253elif test "$ac_cv_kthread" = "yes"
10254then
10255 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010256 if test "$ac_cv_cxx_thread" = "yes"; then
10257 CXX="$CXX -Kthread"
10258 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010260
10261 posix_threads=yes
10262 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010263elif test "$ac_cv_pthread" = "yes"
10264then
10265 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010266 if test "$ac_cv_cxx_thread" = "yes"; then
10267 CXX="$CXX -pthread"
10268 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010270
10271 posix_threads=yes
10272 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010273else
10274 if test ! -z "$with_threads" -a -d "$with_threads"
10275 then LDFLAGS="$LDFLAGS -L$with_threads"
10276 fi
10277 if test ! -z "$withval" -a -d "$withval"
10278 then LDFLAGS="$LDFLAGS -L$withval"
10279 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010280
10281 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010282 # define _POSIX_THREADS in unistd.h. Some apparently don't
10283 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10285$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010288
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010289#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010290#ifdef _POSIX_THREADS
10291yes
10292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010293
10294_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010297 unistd_defines_pthreads=yes
10298else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010299 unistd_defines_pthreads=no
10300fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010301rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010302
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10304$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010305
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010307
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010308 # Just looking for pthread_create in libpthread is not enough:
10309 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10310 # So we really have to include pthread.h, and then link.
10311 _libs=$LIBS
10312 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10314$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010316/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010317
10318#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010319#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010320
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010321void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010325
10326pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ;
10328 return 0;
10329}
10330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10334$as_echo "yes" >&6; }
10335 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010336
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010337 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010338 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010339else
Martin v. Löwis11437992002-04-12 09:54:03 +000010340
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010341 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010343if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010345
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010346 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010347 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010348else
Guido van Rossumad678af1998-10-02 14:42:15 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10351$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010352if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010354else
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010356LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360/* Override any GCC internal prototype to avoid an error.
10361 Use char because int might match the return type of a GCC
10362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010363#ifdef __cplusplus
10364extern "C"
10365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010366char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010367int
10368main ()
10369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ;
10372 return 0;
10373}
10374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010377else
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010380rm -f core conftest.err conftest.$ac_objext \
10381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010382LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10385$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010386if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010388
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010389 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010390 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010391 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010392else
Greg Steinadf63d62000-07-05 10:38:09 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10395$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010396if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010398else
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010400LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404/* Override any GCC internal prototype to avoid an error.
10405 Use char because int might match the return type of a GCC
10406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407#ifdef __cplusplus
10408extern "C"
10409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010410char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010411int
10412main ()
10413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010421else
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010424rm -f core conftest.err conftest.$ac_objext \
10425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010426LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10429$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010430if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010432
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010433 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010434 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010435 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010436else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010437
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10439$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010440if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010442else
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010444LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448/* Override any GCC internal prototype to avoid an error.
10449 Use char because int might match the return type of a GCC
10450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010451#ifdef __cplusplus
10452extern "C"
10453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010454char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010455int
10456main ()
10457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ;
10460 return 0;
10461}
10462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010468rm -f core conftest.err conftest.$ac_objext \
10469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010470LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10473$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010474if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010476
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010477 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010478 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010479 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010480else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010481
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10483$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010484if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010486else
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010488LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492/* Override any GCC internal prototype to avoid an error.
10493 Use char because int might match the return type of a GCC
10494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495#ifdef __cplusplus
10496extern "C"
10497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010498char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010499int
10500main ()
10501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ;
10504 return 0;
10505}
10506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010509else
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512rm -f core conftest.err conftest.$ac_objext \
10513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010514LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10517$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010518if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010521 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010522 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010523 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010524else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010525
Martin v. Löwis130fb172001-07-19 11:00:41 +000010526 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010527fi
10528
Guido van Rossum627b2d71993-12-24 10:39:16 +000010529
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010530fi
10531
Guido van Rossum0be3e491997-05-22 20:33:33 +000010532fi
10533
Guido van Rossum49545951997-12-02 19:28:29 +000010534fi
10535
Guido van Rossumb93a8621998-05-07 13:27:32 +000010536fi
10537
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010539rm -f core conftest.err conftest.$ac_objext \
10540 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010541
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10543$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010544if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010546else
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010548LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010552/* Override any GCC internal prototype to avoid an error.
10553 Use char because int might match the return type of a GCC
10554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010555#ifdef __cplusplus
10556extern "C"
10557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010558char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010559int
10560main ()
10561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 ;
10564 return 0;
10565}
10566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010569else
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010572rm -f core conftest.err conftest.$ac_objext \
10573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010574LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10577$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010578if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010580
Martin v. Löwis130fb172001-07-19 11:00:41 +000010581 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010582 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010583 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584fi
10585
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010586
Neal Norwitza978ab02002-11-02 16:58:05 +000010587 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10589$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010590if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010592else
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010594LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598/* Override any GCC internal prototype to avoid an error.
10599 Use char because int might match the return type of a GCC
10600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010601#ifdef __cplusplus
10602extern "C"
10603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010604char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010605int
10606main ()
10607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010615else
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618rm -f core conftest.err conftest.$ac_objext \
10619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010620LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10623$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010624if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010626
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010627 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010628 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010629 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630fi
10631
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010632 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010634
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635if test "$posix_threads" = "yes"; then
10636 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010637
Matthias Kloseb9621712010-04-24 17:59:49 +000010638$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639
10640 fi
10641
10642 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10643 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010644 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010646
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010647 ;;
10648 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010650
10651 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010652 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010653$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010654
10655 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010656 esac
10657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10659$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010660 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662else
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010664 ac_cv_pthread_system_supported=no
10665else
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010668
10669 #include <stdio.h>
10670 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010671 void *foo(void *parm) {
10672 return NULL;
10673 }
10674 main() {
10675 pthread_attr_t attr;
10676 pthread_t id;
10677 if (pthread_attr_init(&attr)) exit(-1);
10678 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10679 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10680 exit(0);
10681 }
10682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684 ac_cv_pthread_system_supported=yes
10685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010690fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692
Guido van Rossum627b2d71993-12-24 10:39:16 +000010693fi
10694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10696$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010697 if test "$ac_cv_pthread_system_supported" = "yes"; then
10698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010700
10701 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 for ac_func in pthread_sigmask
10703do :
10704 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010705if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010707#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010709 case $ac_sys_system in
10710 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010713
10714 ;;
10715 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010716fi
10717done
10718
Christian Heimesf77b4b22013-08-21 13:26:05 +020010719 for ac_func in pthread_atfork
10720do :
10721 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10722if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10723 cat >>confdefs.h <<_ACEOF
10724#define HAVE_PTHREAD_ATFORK 1
10725_ACEOF
10726
10727fi
10728done
10729
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010730fi
10731
10732
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10736$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010738if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010740 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743 ipv6=no
10744 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10746$as_echo "yes" >&6; }
10747 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748
10749 ipv6=yes
10750 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752else
Martin v. Löwis11437992002-04-12 09:54:03 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010755/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756 /* AF_INET6 available check */
10757#include <sys/types.h>
10758#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010759int
10760main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010762int domain = AF_INET6;
10763 ;
10764 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765}
Martin v. Löwis11437992002-04-12 09:54:03 +000010766_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010767if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10770$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010772
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773else
Matthias Kloseb159a552010-04-25 21:00:44 +000010774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010778
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010782if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10784$as_echo_n "checking if RFC2553 API is available... " >&6; }
10785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010787
10788 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010789#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010790int
10791main ()
10792{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010793struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010794 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 ;
10796 return 0;
10797}
Matthias Kloseb159a552010-04-25 21:00:44 +000010798
Martin v. Löwis11437992002-04-12 09:54:03 +000010799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010800if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010801
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010803$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010804 ipv6=yes
10805
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010806else
Matthias Kloseb159a552010-04-25 21:00:44 +000010807
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010810 ipv6=no
10811
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010814fi
10815
10816if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010818
10819fi
10820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821fi
10822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823
10824ipv6type=unknown
10825ipv6lib=none
10826ipv6trylibc=no
10827
10828if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10830$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010831 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10832 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833 case $i in
10834 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838#include <netinet/in.h>
10839#ifdef IPV6_INRIA_VERSION
10840yes
10841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010845 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010847rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848
10849 ;;
10850 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010852/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010853
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854#include <netinet/in.h>
10855#ifdef __KAME__
10856yes
10857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010858_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 ipv6type=$i;
10862 ipv6lib=inet6
10863 ipv6libdir=/usr/local/v6/lib
10864 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010866rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867
10868 ;;
10869 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010871/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873#include <features.h>
10874#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10875yes
10876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010877_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880 ipv6type=$i;
10881 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010883rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884
10885 ;;
10886 linux-inet6)
10887 if test -d /usr/inet6; then
10888 ipv6type=$i
10889 ipv6lib=inet6
10890 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010891 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892 fi
10893 ;;
10894 solaris)
10895 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010896 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897 ipv6type=$i
10898 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899 fi
10900 fi
10901 ;;
10902 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010905
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906#include <sys/param.h>
10907#ifdef _TOSHIBA_INET6
10908yes
10909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010910_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913 ipv6type=$i;
10914 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010915 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010917rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918
10919 ;;
10920 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010922/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010923
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924#include </usr/local/v6/include/sys/v6config.h>
10925#ifdef __V6D__
10926yes
10927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010928_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931 ipv6type=$i;
10932 ipv6lib=v6;
10933 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010934 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010936rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937
10938 ;;
10939 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943#include <sys/param.h>
10944#ifdef _ZETA_MINAMI_INET6
10945yes
10946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010947_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950 ipv6type=$i;
10951 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010952 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010954rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955
10956 ;;
10957 esac
10958 if test "$ipv6type" != "unknown"; then
10959 break
10960 fi
10961 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10963$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964fi
10965
10966if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10967 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10968 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10969 echo "using lib$ipv6lib"
10970 else
10971 if test $ipv6trylibc = "yes"; then
10972 echo "using libc"
10973 else
10974 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10975 echo "You need to fetch lib$ipv6lib.a from appropriate"
10976 echo 'ipv6 kit and compile beforehand.'
10977 exit 1
10978 fi
10979 fi
10980fi
10981
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10983$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10985/* end confdefs.h. */
10986 /* CAN_RAW_FD_FRAMES available check */
10987#include <linux/can/raw.h>
10988int
10989main ()
10990{
10991int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10992 ;
10993 return 0;
10994}
10995_ACEOF
10996if ac_fn_c_try_compile "$LINENO"; then :
10997
10998
10999$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11000
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11002$as_echo "yes" >&6; }
11003
11004else
11005
11006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11007$as_echo "no" >&6; }
11008
11009fi
11010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011012# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11014$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018 withval=$with_doc_strings;
11019fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011020
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011021
11022if test -z "$with_doc_strings"
11023then with_doc_strings="yes"
11024fi
11025if test "$with_doc_strings" != "no"
11026then
11027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011029
11030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11032$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011033
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011034# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11036$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011039if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040 withval=$with_pymalloc;
11041fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011042
Neil Schemenauera35c6882001-02-27 04:45:05 +000011043
Neil Schemenauer16c22972002-03-22 15:34:49 +000011044if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011045then
11046 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011047fi
11048if test "$with_pymalloc" != "no"
11049then
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011052
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011053 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11056$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011057
Nick Coghlan6ea41862017-06-11 13:16:15 +100011058# Check for --with-c-locale-coercion
11059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11060$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11061
11062# Check whether --with-c-locale-coercion was given.
11063if test "${with_c_locale_coercion+set}" = set; then :
11064 withval=$with_c_locale_coercion;
11065fi
11066
11067
11068if test -z "$with_c_locale_coercion"
11069then
11070 with_c_locale_coercion="yes"
11071fi
11072if test "$with_c_locale_coercion" != "no"
11073then
11074
11075$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11076
11077fi
11078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11079$as_echo "$with_c_locale_coercion" >&6; }
11080
11081# Check for --with-c-locale-warning
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11083$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11084
11085# Check whether --with-c-locale-warning was given.
11086if test "${with_c_locale_warning+set}" = set; then :
11087 withval=$with_c_locale_warning;
11088fi
11089
11090
11091if test -z "$with_c_locale_warning"
11092then
11093 with_c_locale_warning="yes"
11094fi
11095if test "$with_c_locale_warning" != "no"
11096then
11097
11098$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11099
11100fi
11101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11102$as_echo "$with_c_locale_warning" >&6; }
11103
Benjamin Peterson05159c42009-12-03 03:01:27 +000011104# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11106$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011107
11108# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011109if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011110 withval=$with_valgrind;
11111else
11112 with_valgrind=no
11113fi
11114
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11116$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011117if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 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 +020011119if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011122
11123else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011124 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011125
11126fi
11127
11128
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011129 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011130fi
11131
Łukasz Langaa785c872016-09-09 17:37:37 -070011132# Check for DTrace support
11133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11134$as_echo_n "checking for --with-dtrace... " >&6; }
11135
11136# Check whether --with-dtrace was given.
11137if test "${with_dtrace+set}" = set; then :
11138 withval=$with_dtrace;
11139else
11140 with_dtrace=no
11141fi
11142
11143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11144$as_echo "$with_dtrace" >&6; }
11145
11146
11147
11148
11149
11150DTRACE=
11151DFLAGS=
11152DTRACE_HEADERS=
11153DTRACE_OBJS=
11154
11155if test "$with_dtrace" = "yes"
11156then
11157 # Extract the first word of "dtrace", so it can be a program name with args.
11158set dummy dtrace; ac_word=$2
11159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11160$as_echo_n "checking for $ac_word... " >&6; }
11161if ${ac_cv_path_DTRACE+:} false; then :
11162 $as_echo_n "(cached) " >&6
11163else
11164 case $DTRACE in
11165 [\\/]* | ?:[\\/]*)
11166 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11167 ;;
11168 *)
11169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11170for as_dir in $PATH
11171do
11172 IFS=$as_save_IFS
11173 test -z "$as_dir" && as_dir=.
11174 for ac_exec_ext in '' $ac_executable_extensions; do
11175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11176 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11178 break 2
11179 fi
11180done
11181 done
11182IFS=$as_save_IFS
11183
11184 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11185 ;;
11186esac
11187fi
11188DTRACE=$ac_cv_path_DTRACE
11189if test -n "$DTRACE"; then
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11191$as_echo "$DTRACE" >&6; }
11192else
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11194$as_echo "no" >&6; }
11195fi
11196
11197
11198 if test "$DTRACE" = "not found"; then
11199 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11200 fi
11201
11202$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11203
11204 DTRACE_HEADERS="Include/pydtrace_probes.h"
11205
11206 # On OS X, DTrace providers do not need to be explicitly compiled and
11207 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11208 # generation flag '-G'. We check for presence of this flag, rather than
11209 # hardcoding support by OS, in the interest of robustness.
11210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11211$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11212if ${ac_cv_dtrace_link+:} false; then :
11213 $as_echo_n "(cached) " >&6
11214else
11215 ac_cv_dtrace_link=no
11216 echo 'BEGIN' > conftest.d
11217 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11218 ac_cv_dtrace_link=yes
11219
11220fi
11221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11222$as_echo "$ac_cv_dtrace_link" >&6; }
11223 if test "$ac_cv_dtrace_link" = "yes"; then
11224 DTRACE_OBJS="Python/pydtrace.o"
11225 fi
11226fi
11227
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011228# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011229
Guido van Rossum98935bf2001-09-05 19:13:16 +000011230DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011231
Guido van Rossume97ee181999-12-20 21:27:22 +000011232# the dlopen() function means we might want to use dynload_shlib.o. some
11233# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011234for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011235do :
11236 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011237if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011239#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011240_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011241
Guido van Rossume97ee181999-12-20 21:27:22 +000011242fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011243done
Guido van Rossume97ee181999-12-20 21:27:22 +000011244
Michael W. Hudson54241132001-12-07 15:38:26 +000011245
Guido van Rossume97ee181999-12-20 21:27:22 +000011246# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11247# loading of modules.
11248
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11250$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011251if test -z "$DYNLOADFILE"
11252then
11253 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011254 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11255 if test "$ac_cv_func_dlopen" = yes
11256 then DYNLOADFILE="dynload_shlib.o"
11257 else DYNLOADFILE="dynload_aix.o"
11258 fi
11259 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011260 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011261 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11262 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011263 *)
11264 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11265 # out any dynamic loading
11266 if test "$ac_cv_func_dlopen" = yes
11267 then DYNLOADFILE="dynload_shlib.o"
11268 else DYNLOADFILE="dynload_stub.o"
11269 fi
11270 ;;
11271 esac
11272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11274$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011275if test "$DYNLOADFILE" != "dynload_stub.o"
11276then
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011279
11280fi
11281
Neil Schemenauer4e425612001-06-19 15:44:15 +000011282# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11283
Michael W. Hudson54241132001-12-07 15:38:26 +000011284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11286$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011287if test -z "$MACHDEP_OBJS"
11288then
Jack Jansene578a632001-08-15 01:27:14 +000011289 MACHDEP_OBJS=$extra_machdep_objs
11290else
11291 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011292fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011293if test -z "$MACHDEP_OBJS"; then
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11295$as_echo "none" >&6; }
11296else
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11298$as_echo "$MACHDEP_OBJS" >&6; }
11299fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011300
Guido van Rossum627b2d71993-12-24 10:39:16 +000011301# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011302for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011303 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011304 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011305 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011306 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011307 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011308 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011309 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011310 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011311 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011312 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011313 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011314 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011315 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011316 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11317 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011318 sigaction sigaltstack siginterrupt sigpending sigrelse \
11319 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011320 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011321 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011322 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011323do :
11324 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11325ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011326if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011329_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011331fi
11332done
11333
Michael W. Hudson54241132001-12-07 15:38:26 +000011334
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011335ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11336 #include <dirent.h>
11337"
11338if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11339
11340$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11341
11342fi
11343
11344
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011345# For some functions, having a definition is not sufficient, since
11346# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11348$as_echo_n "checking for chroot... " >&6; }
11349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011350/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011351#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352int
11353main ()
11354{
11355void *x=chroot
11356 ;
11357 return 0;
11358}
11359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011361
Matthias Kloseb9621712010-04-24 17:59:49 +000011362$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011363
Matthias Kloseb159a552010-04-25 21:00:44 +000011364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011365$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011366else
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11368$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011369
11370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11373$as_echo_n "checking for link... " >&6; }
11374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011375/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011376#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011377int
11378main ()
11379{
11380void *x=link
11381 ;
11382 return 0;
11383}
11384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011386
Matthias Kloseb9621712010-04-24 17:59:49 +000011387$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011388
Matthias Kloseb159a552010-04-25 21:00:44 +000011389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011390$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011391else
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011394
11395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11398$as_echo_n "checking for symlink... " >&6; }
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011401#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011402int
11403main ()
11404{
11405void *x=symlink
11406 ;
11407 return 0;
11408}
11409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011411
Matthias Kloseb9621712010-04-24 17:59:49 +000011412$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011413
Matthias Kloseb159a552010-04-25 21:00:44 +000011414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011416else
Matthias Kloseb9621712010-04-24 17:59:49 +000011417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11418$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011419
11420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11423$as_echo_n "checking for fchdir... " >&6; }
11424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011425/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011426#include <unistd.h>
11427int
11428main ()
11429{
11430void *x=fchdir
11431 ;
11432 return 0;
11433}
11434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011436
Matthias Kloseb9621712010-04-24 17:59:49 +000011437$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011438
Matthias Kloseb159a552010-04-25 21:00:44 +000011439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011441else
Matthias Kloseb9621712010-04-24 17:59:49 +000011442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11443$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011444
11445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11448$as_echo_n "checking for fsync... " >&6; }
11449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011450/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011451#include <unistd.h>
11452int
11453main ()
11454{
11455void *x=fsync
11456 ;
11457 return 0;
11458}
11459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011463
Matthias Kloseb159a552010-04-25 21:00:44 +000011464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011465$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011466else
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11468$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011469
11470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11473$as_echo_n "checking for fdatasync... " >&6; }
11474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011475/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011476#include <unistd.h>
11477int
11478main ()
11479{
11480void *x=fdatasync
11481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011486
Matthias Kloseb9621712010-04-24 17:59:49 +000011487$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011488
Matthias Kloseb159a552010-04-25 21:00:44 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011490$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011491else
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011494
11495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11498$as_echo_n "checking for epoll... " >&6; }
11499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011500/* end confdefs.h. */
11501#include <sys/epoll.h>
11502int
11503main ()
11504{
11505void *x=epoll_create
11506 ;
11507 return 0;
11508}
11509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011511
Matthias Kloseb9621712010-04-24 17:59:49 +000011512$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011513
Matthias Kloseb159a552010-04-25 21:00:44 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011515$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011516else
Matthias Kloseb9621712010-04-24 17:59:49 +000011517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11518$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011519
11520fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11523$as_echo_n "checking for epoll_create1... " >&6; }
11524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11525/* end confdefs.h. */
11526#include <sys/epoll.h>
11527int
11528main ()
11529{
11530void *x=epoll_create1
11531 ;
11532 return 0;
11533}
11534_ACEOF
11535if ac_fn_c_try_compile "$LINENO"; then :
11536
11537$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11538
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11540$as_echo "yes" >&6; }
11541else
11542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11543$as_echo "no" >&6; }
11544
11545fi
11546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11548$as_echo_n "checking for kqueue... " >&6; }
11549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011550/* end confdefs.h. */
11551
11552#include <sys/types.h>
11553#include <sys/event.h>
11554
11555int
11556main ()
11557{
11558int x=kqueue()
11559 ;
11560 return 0;
11561}
11562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011563if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011564
Matthias Kloseb9621712010-04-24 17:59:49 +000011565$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011566
Matthias Kloseb159a552010-04-25 21:00:44 +000011567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011568$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011569else
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11571$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011572
11573fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11576$as_echo_n "checking for prlimit... " >&6; }
11577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11578/* end confdefs.h. */
11579
11580#include <sys/time.h>
11581#include <sys/resource.h>
11582
11583int
11584main ()
11585{
11586void *x=prlimit
11587 ;
11588 return 0;
11589}
11590_ACEOF
11591if ac_fn_c_try_compile "$LINENO"; then :
11592
11593$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11594
11595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11596$as_echo "yes" >&6; }
11597else
11598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
11600
11601fi
11602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11603
Martin v. Löwisd5843682002-11-21 20:41:28 +000011604# On some systems (eg. FreeBSD 5), we would find a definition of the
11605# functions ctermid_r, setgroups in the library, but no prototype
11606# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11607# address to avoid compiler warnings and potential miscompilations
11608# because of the missing prototypes.
11609
Matthias Kloseb9621712010-04-24 17:59:49 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11611$as_echo_n "checking for ctermid_r... " >&6; }
11612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011613/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011614
Martin v. Löwisd5843682002-11-21 20:41:28 +000011615#include <stdio.h>
11616
Martin v. Löwisd5843682002-11-21 20:41:28 +000011617int
11618main ()
11619{
11620void* p = ctermid_r
11621 ;
11622 return 0;
11623}
11624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011628
Matthias Kloseb159a552010-04-25 21:00:44 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011630$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011631else
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11633$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011634
11635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11637
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11639$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011640if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011641 $as_echo_n "(cached) " >&6
11642else
11643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011645#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011646int
11647main ()
11648{
11649void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011650
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011651 ;
11652 return 0;
11653}
11654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011656 ac_cv_flock_decl=yes
11657else
11658 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011659
11660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011662
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011663fi
11664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11665$as_echo "$ac_cv_flock_decl" >&6; }
11666if test "x${ac_cv_flock_decl}" = xyes; then
11667 for ac_func in flock
11668do :
11669 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011670if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011671 cat >>confdefs.h <<_ACEOF
11672#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011673_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011674
Antoine Pitroua3000072010-09-07 14:52:42 +000011675else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011677$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011678if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011679 $as_echo_n "(cached) " >&6
11680else
11681 ac_check_lib_save_LIBS=$LIBS
11682LIBS="-lbsd $LIBS"
11683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11684/* end confdefs.h. */
11685
11686/* Override any GCC internal prototype to avoid an error.
11687 Use char because int might match the return type of a GCC
11688 builtin and then its argument prototype would still apply. */
11689#ifdef __cplusplus
11690extern "C"
11691#endif
11692char flock ();
11693int
11694main ()
11695{
11696return flock ();
11697 ;
11698 return 0;
11699}
11700_ACEOF
11701if ac_fn_c_try_link "$LINENO"; then :
11702 ac_cv_lib_bsd_flock=yes
11703else
11704 ac_cv_lib_bsd_flock=no
11705fi
11706rm -f core conftest.err conftest.$ac_objext \
11707 conftest$ac_exeext conftest.$ac_ext
11708LIBS=$ac_check_lib_save_LIBS
11709fi
11710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11711$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011712if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011713 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011714
11715
11716$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11717
11718
11719fi
11720
11721
11722fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011723done
11724
Antoine Pitroua3000072010-09-07 14:52:42 +000011725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726
Matthias Kloseb9621712010-04-24 17:59:49 +000011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11728$as_echo_n "checking for getpagesize... " >&6; }
11729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011730/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011731
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011732#include <unistd.h>
11733
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011734int
11735main ()
11736{
11737void* p = getpagesize
11738 ;
11739 return 0;
11740}
11741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011745
Matthias Kloseb159a552010-04-25 21:00:44 +000011746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011747$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011748else
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011751
11752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011754
Victor Stinner984890f2011-11-24 13:53:38 +010011755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11756$as_echo_n "checking for broken unsetenv... " >&6; }
11757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11758/* end confdefs.h. */
11759
11760#include <stdlib.h>
11761
11762int
11763main ()
11764{
11765int res = unsetenv("DUMMY")
11766 ;
11767 return 0;
11768}
11769_ACEOF
11770if ac_fn_c_try_compile "$LINENO"; then :
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11772$as_echo "no" >&6; }
11773else
11774
11775$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11776
11777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11778$as_echo "yes" >&6; }
11779
11780fi
11781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11782
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011783for ac_prog in true
11784do
11785 # Extract the first word of "$ac_prog", so it can be a program name with args.
11786set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011789if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011791else
11792 if test -n "$TRUE"; then
11793 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11794else
11795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11796for as_dir in $PATH
11797do
11798 IFS=$as_save_IFS
11799 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011802 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 $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 +000011804 break 2
11805 fi
11806done
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011808IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011809
11810fi
11811fi
11812TRUE=$ac_cv_prog_TRUE
11813if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11815$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011819fi
11820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011821
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011822 test -n "$TRUE" && break
11823done
11824test -n "$TRUE" || TRUE="/bin/true"
11825
11826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11828$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011829if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831else
11832 ac_check_lib_save_LIBS=$LIBS
11833LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837/* Override any GCC internal prototype to avoid an error.
11838 Use char because int might match the return type of a GCC
11839 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840#ifdef __cplusplus
11841extern "C"
11842#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011843char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844int
11845main ()
11846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011848 ;
11849 return 0;
11850}
11851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011853 ac_cv_lib_c_inet_aton=yes
11854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011857rm -f core conftest.err conftest.$ac_objext \
11858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011859LIBS=$ac_check_lib_save_LIBS
11860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11862$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011864 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11867$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011868if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011870else
11871 ac_check_lib_save_LIBS=$LIBS
11872LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011874/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011876/* Override any GCC internal prototype to avoid an error.
11877 Use char because int might match the return type of a GCC
11878 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011879#ifdef __cplusplus
11880extern "C"
11881#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011882char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011883int
11884main ()
11885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011887 ;
11888 return 0;
11889}
11890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011892 ac_cv_lib_resolv_inet_aton=yes
11893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011896rm -f core conftest.err conftest.$ac_objext \
11897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011898LIBS=$ac_check_lib_save_LIBS
11899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11901$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011902if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011903 cat >>confdefs.h <<_ACEOF
11904#define HAVE_LIBRESOLV 1
11905_ACEOF
11906
11907 LIBS="-lresolv $LIBS"
11908
11909fi
11910
11911
11912fi
11913
11914
Christian Heimesd0764e22007-12-04 15:00:33 +000011915# On Tru64, chflags seems to be present, but calling it will
11916# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11918$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011919if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011923 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011924else
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011926/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011927
Christian Heimesd0764e22007-12-04 15:00:33 +000011928#include <sys/stat.h>
11929#include <unistd.h>
11930int main(int argc, char*argv[])
11931{
11932 if(chflags(argv[0], 0) != 0)
11933 return 1;
11934 return 0;
11935}
Ned Deily3eb67d52011-06-28 00:00:28 -070011936
Christian Heimesd0764e22007-12-04 15:00:33 +000011937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011938if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011939 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011945fi
11946
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011947
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11950$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011951if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011953if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011954 ac_cv_have_chflags="yes"
11955else
11956 ac_cv_have_chflags="no"
11957fi
11958
11959fi
11960if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011963
11964fi
11965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11967$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011968if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011972 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011975/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011976
Christian Heimesd0764e22007-12-04 15:00:33 +000011977#include <sys/stat.h>
11978#include <unistd.h>
11979int main(int argc, char*argv[])
11980{
11981 if(lchflags(argv[0], 0) != 0)
11982 return 1;
11983 return 0;
11984}
Ned Deily3eb67d52011-06-28 00:00:28 -070011985
Christian Heimesd0764e22007-12-04 15:00:33 +000011986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011987if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011988 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011989else
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011994fi
11995
11996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11999$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012000if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012002if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012003 ac_cv_have_lchflags="yes"
12004else
12005 ac_cv_have_lchflags="no"
12006fi
12007
12008fi
12009if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012012
12013fi
12014
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012015case $ac_sys_system/$ac_sys_release in
12016Darwin/*)
12017 _CUR_CFLAGS="${CFLAGS}"
12018 _CUR_LDFLAGS="${LDFLAGS}"
12019 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12020 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12021 ;;
12022esac
12023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12025$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012026if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012028else
12029 ac_check_lib_save_LIBS=$LIBS
12030LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012032/* end confdefs.h. */
12033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012034/* Override any GCC internal prototype to avoid an error.
12035 Use char because int might match the return type of a GCC
12036 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012037#ifdef __cplusplus
12038extern "C"
12039#endif
12040char inflateCopy ();
12041int
12042main ()
12043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012044return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012045 ;
12046 return 0;
12047}
12048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012049if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012050 ac_cv_lib_z_inflateCopy=yes
12051else
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012054rm -f core conftest.err conftest.$ac_objext \
12055 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012056LIBS=$ac_check_lib_save_LIBS
12057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12059$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012061
Matthias Kloseb9621712010-04-24 17:59:49 +000012062$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012063
12064fi
12065
12066
12067case $ac_sys_system/$ac_sys_release in
12068Darwin/*)
12069 CFLAGS="${_CUR_CFLAGS}"
12070 LDFLAGS="${_CUR_LDFLAGS}"
12071 ;;
12072esac
12073
Matthias Kloseb9621712010-04-24 17:59:49 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12075$as_echo_n "checking for hstrerror... " >&6; }
12076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012077/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012078
Martin v. Löwise9416172003-05-03 10:12:45 +000012079#include <netdb.h>
12080
Martin v. Löwise9416172003-05-03 10:12:45 +000012081int
12082main ()
12083{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012084void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012085 ;
12086 return 0;
12087}
12088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012090
Matthias Kloseb9621712010-04-24 17:59:49 +000012091$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012092
Matthias Kloseb159a552010-04-25 21:00:44 +000012093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012094$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012098
12099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012100rm -f core conftest.err conftest.$ac_objext \
12101 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012102
Matthias Kloseb9621712010-04-24 17:59:49 +000012103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12104$as_echo_n "checking for inet_aton... " >&6; }
12105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012106/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012107
Martin v. Löwis86d66262006-02-17 08:40:11 +000012108#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012109#include <sys/socket.h>
12110#include <netinet/in.h>
12111#include <arpa/inet.h>
12112
Martin v. Löwise9416172003-05-03 10:12:45 +000012113int
12114main ()
12115{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012116void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012117 ;
12118 return 0;
12119}
12120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012121if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012122
Matthias Kloseb9621712010-04-24 17:59:49 +000012123$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012124
Matthias Kloseb159a552010-04-25 21:00:44 +000012125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012126$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12129$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012130
12131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134
Matthias Kloseb9621712010-04-24 17:59:49 +000012135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12136$as_echo_n "checking for inet_pton... " >&6; }
12137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012138/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012139
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012140#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012141#include <sys/socket.h>
12142#include <netinet/in.h>
12143#include <arpa/inet.h>
12144
Martin v. Löwise9416172003-05-03 10:12:45 +000012145int
12146main ()
12147{
12148void* p = inet_pton
12149 ;
12150 return 0;
12151}
12152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012156
Matthias Kloseb159a552010-04-25 21:00:44 +000012157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012158$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012159else
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12161$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012162
12163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012165
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012166# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12168$as_echo_n "checking for setgroups... " >&6; }
12169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012170/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012171
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012172#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012173#ifdef HAVE_GRP_H
12174#include <grp.h>
12175#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012176
Martin v. Löwisd5843682002-11-21 20:41:28 +000012177int
12178main ()
12179{
12180void* p = setgroups
12181 ;
12182 return 0;
12183}
12184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012185if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012186
Matthias Kloseb9621712010-04-24 17:59:49 +000012187$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012188
Matthias Kloseb159a552010-04-25 21:00:44 +000012189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012190$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012191else
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12193$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012194
12195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012198# check for openpty and forkpty
12199
12200for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012201do :
12202 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012205#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012206_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012207
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012208else
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12210$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012211if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012213else
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012215LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219/* Override any GCC internal prototype to avoid an error.
12220 Use char because int might match the return type of a GCC
12221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012222#ifdef __cplusplus
12223extern "C"
12224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012225char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012226int
12227main ()
12228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 ;
12231 return 0;
12232}
12233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012236else
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012239rm -f core conftest.err conftest.$ac_objext \
12240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012241LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12244$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012245if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012247 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012248else
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12250$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012251if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012253else
12254 ac_check_lib_save_LIBS=$LIBS
12255LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012257/* end confdefs.h. */
12258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259/* Override any GCC internal prototype to avoid an error.
12260 Use char because int might match the return type of a GCC
12261 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012262#ifdef __cplusplus
12263extern "C"
12264#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012265char openpty ();
12266int
12267main ()
12268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012270 ;
12271 return 0;
12272}
12273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012275 ac_cv_lib_bsd_openpty=yes
12276else
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012279rm -f core conftest.err conftest.$ac_objext \
12280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012281LIBS=$ac_check_lib_save_LIBS
12282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12284$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012285if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012287 LIBS="$LIBS -lbsd"
12288fi
12289
12290
12291fi
12292
Fred Drake8cef4cf2000-06-28 16:40:38 +000012293
12294fi
12295done
12296
12297for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012298do :
12299 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012302#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012303_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012304
Fred Drake8cef4cf2000-06-28 16:40:38 +000012305else
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12307$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012308if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012310else
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012312LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316/* Override any GCC internal prototype to avoid an error.
12317 Use char because int might match the return type of a GCC
12318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012319#ifdef __cplusplus
12320extern "C"
12321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012322char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012323int
12324main ()
12325{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 ;
12328 return 0;
12329}
12330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012331if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012336rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012338LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12341$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012342if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012344 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12347$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012348if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012350else
12351 ac_check_lib_save_LIBS=$LIBS
12352LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012354/* end confdefs.h. */
12355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356/* Override any GCC internal prototype to avoid an error.
12357 Use char because int might match the return type of a GCC
12358 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012359#ifdef __cplusplus
12360extern "C"
12361#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012362char forkpty ();
12363int
12364main ()
12365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012367 ;
12368 return 0;
12369}
12370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012372 ac_cv_lib_bsd_forkpty=yes
12373else
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012376rm -f core conftest.err conftest.$ac_objext \
12377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012378LIBS=$ac_check_lib_save_LIBS
12379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12381$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012382if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012384 LIBS="$LIBS -lbsd"
12385fi
12386
12387
12388fi
12389
Fred Drake8cef4cf2000-06-28 16:40:38 +000012390
12391fi
12392done
12393
Jack Jansendd19cf82001-12-06 22:36:17 +000012394
Christian Heimesb186d002008-03-18 15:15:01 +000012395# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012396for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012397do :
12398 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012399if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012400 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012401#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012402_ACEOF
12403
12404fi
12405done
12406
12407
Michael W. Hudson54241132001-12-07 15:38:26 +000012408# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012409for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012410do :
12411 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12412ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012413if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012415#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012416_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012418fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012419done
12420
Michael W. Hudson54241132001-12-07 15:38:26 +000012421
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012422ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012423if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012424 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012425
Martin v. Löwis1142de32002-03-29 16:28:31 +000012426else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012428 *" dup2.$ac_objext "* ) ;;
12429 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012431esac
12432
Martin v. Löwis1142de32002-03-29 16:28:31 +000012433fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012434
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012435ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012436if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012437 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12438
12439else
12440 case " $LIBOBJS " in
12441 *" strdup.$ac_objext "* ) ;;
12442 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12443 ;;
12444esac
12445
12446fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012447
12448
12449for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012450do :
12451 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012452if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012453 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012454#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012458#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012459int
12460main ()
12461{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 ;
12464 return 0;
12465}
12466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
Matthias Kloseb9621712010-04-24 17:59:49 +000012469$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012470
Guido van Rossum627b2d71993-12-24 10:39:16 +000012471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012473
Guido van Rossum627b2d71993-12-24 10:39:16 +000012474fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012475done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012476
Jack Jansen150753c2003-03-29 22:07:47 +000012477for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012478do :
12479 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012480if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012481 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012482#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012485/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012486#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012487int
12488main ()
12489{
12490setpgrp(0,0);
12491 ;
12492 return 0;
12493}
12494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
Matthias Kloseb9621712010-04-24 17:59:49 +000012497$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012498
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012501
12502fi
12503done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012504
Thomas Wouters3a584202000-08-05 23:28:51 +000012505for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012506do :
12507 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012508if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012510#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012513/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012514#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012515int
12516main ()
12517{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012518gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 ;
12520 return 0;
12521}
12522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012523if ac_fn_c_try_compile "$LINENO"; then :
12524
Guido van Rossum627b2d71993-12-24 10:39:16 +000012525else
Skip Montanaro6dead952003-09-25 14:50:04 +000012526
Matthias Kloseb9621712010-04-24 17:59:49 +000012527$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012528
Martin v. Löwis11437992002-04-12 09:54:03 +000012529
Guido van Rossum627b2d71993-12-24 10:39:16 +000012530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012532
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012534done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012535
Michael W. Hudson54241132001-12-07 15:38:26 +000012536
Victor Stinnere0be4232011-10-25 13:06:09 +020012537for ac_func in clock_gettime
12538do :
12539 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12540if test "x$ac_cv_func_clock_gettime" = xyes; then :
12541 cat >>confdefs.h <<_ACEOF
12542#define HAVE_CLOCK_GETTIME 1
12543_ACEOF
12544
12545else
12546
12547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12548$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12549if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12550 $as_echo_n "(cached) " >&6
12551else
12552 ac_check_lib_save_LIBS=$LIBS
12553LIBS="-lrt $LIBS"
12554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12555/* end confdefs.h. */
12556
12557/* Override any GCC internal prototype to avoid an error.
12558 Use char because int might match the return type of a GCC
12559 builtin and then its argument prototype would still apply. */
12560#ifdef __cplusplus
12561extern "C"
12562#endif
12563char clock_gettime ();
12564int
12565main ()
12566{
12567return clock_gettime ();
12568 ;
12569 return 0;
12570}
12571_ACEOF
12572if ac_fn_c_try_link "$LINENO"; then :
12573 ac_cv_lib_rt_clock_gettime=yes
12574else
12575 ac_cv_lib_rt_clock_gettime=no
12576fi
12577rm -f core conftest.err conftest.$ac_objext \
12578 conftest$ac_exeext conftest.$ac_ext
12579LIBS=$ac_check_lib_save_LIBS
12580fi
12581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12582$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12583if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12584
Victor Stinner7efb8332014-08-29 15:41:08 +020012585 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012586 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12587
12588
12589$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12590
12591
12592fi
12593
12594
12595fi
12596done
12597
12598
12599for ac_func in clock_getres
12600do :
12601 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12602if test "x$ac_cv_func_clock_getres" = xyes; then :
12603 cat >>confdefs.h <<_ACEOF
12604#define HAVE_CLOCK_GETRES 1
12605_ACEOF
12606
12607else
12608
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12610$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12611if ${ac_cv_lib_rt_clock_getres+:} false; then :
12612 $as_echo_n "(cached) " >&6
12613else
12614 ac_check_lib_save_LIBS=$LIBS
12615LIBS="-lrt $LIBS"
12616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12617/* end confdefs.h. */
12618
12619/* Override any GCC internal prototype to avoid an error.
12620 Use char because int might match the return type of a GCC
12621 builtin and then its argument prototype would still apply. */
12622#ifdef __cplusplus
12623extern "C"
12624#endif
12625char clock_getres ();
12626int
12627main ()
12628{
12629return clock_getres ();
12630 ;
12631 return 0;
12632}
12633_ACEOF
12634if ac_fn_c_try_link "$LINENO"; then :
12635 ac_cv_lib_rt_clock_getres=yes
12636else
12637 ac_cv_lib_rt_clock_getres=no
12638fi
12639rm -f core conftest.err conftest.$ac_objext \
12640 conftest$ac_exeext conftest.$ac_ext
12641LIBS=$ac_check_lib_save_LIBS
12642fi
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12644$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12645if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12646
12647 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12648
12649
12650fi
12651
12652
12653fi
12654done
12655
12656
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012657for ac_func in clock_settime
12658do :
12659 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12660if test "x$ac_cv_func_clock_settime" = xyes; then :
12661 cat >>confdefs.h <<_ACEOF
12662#define HAVE_CLOCK_SETTIME 1
12663_ACEOF
12664
12665else
12666
12667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12668$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12669if ${ac_cv_lib_rt_clock_settime+:} false; then :
12670 $as_echo_n "(cached) " >&6
12671else
12672 ac_check_lib_save_LIBS=$LIBS
12673LIBS="-lrt $LIBS"
12674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12675/* end confdefs.h. */
12676
12677/* Override any GCC internal prototype to avoid an error.
12678 Use char because int might match the return type of a GCC
12679 builtin and then its argument prototype would still apply. */
12680#ifdef __cplusplus
12681extern "C"
12682#endif
12683char clock_settime ();
12684int
12685main ()
12686{
12687return clock_settime ();
12688 ;
12689 return 0;
12690}
12691_ACEOF
12692if ac_fn_c_try_link "$LINENO"; then :
12693 ac_cv_lib_rt_clock_settime=yes
12694else
12695 ac_cv_lib_rt_clock_settime=no
12696fi
12697rm -f core conftest.err conftest.$ac_objext \
12698 conftest$ac_exeext conftest.$ac_ext
12699LIBS=$ac_check_lib_save_LIBS
12700fi
12701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12702$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12703if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12704
12705 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12706
12707
12708fi
12709
12710
12711fi
12712done
12713
12714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12716$as_echo_n "checking for major... " >&6; }
12717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012719
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012720#if defined(MAJOR_IN_MKDEV)
12721#include <sys/mkdev.h>
12722#elif defined(MAJOR_IN_SYSMACROS)
12723#include <sys/sysmacros.h>
12724#else
12725#include <sys/types.h>
12726#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012727
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012728int
12729main ()
12730{
12731
12732 makedev(major(0),minor(0));
12733
12734 ;
12735 return 0;
12736}
12737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012738if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012739
12740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12744$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012745
12746else
Skip Montanaro6dead952003-09-25 14:50:04 +000012747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012750
12751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012752rm -f core conftest.err conftest.$ac_objext \
12753 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012754
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012755# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12756# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12758$as_echo_n "checking for if_nameindex... " >&6; }
12759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12760/* end confdefs.h. */
12761
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012762#include <stdio.h>
12763#ifdef STDC_HEADERS
12764# include <stdlib.h>
12765# include <stddef.h>
12766#else
12767# ifdef HAVE_STDLIB_H
12768# include <stdlib.h>
12769# endif
12770#endif
12771#ifdef HAVE_SYS_SOCKET_H
12772# include <sys/socket.h>
12773#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012774#ifdef HAVE_NET_IF_H
12775# include <net/if.h>
12776#endif
12777
12778int
12779main ()
12780{
12781struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12782 ;
12783 return 0;
12784}
12785_ACEOF
12786if ac_fn_c_try_link "$LINENO"; then :
12787
12788$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12789
12790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12791$as_echo "yes" >&6; }
12792else
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12794$as_echo "no" >&6; }
12795
12796fi
12797rm -f core conftest.err conftest.$ac_objext \
12798 conftest$ac_exeext conftest.$ac_ext
12799
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012800# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12801# macro is not defined in android-ndk-r13.
12802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12803$as_echo_n "checking for lockf... " >&6; }
12804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12805/* end confdefs.h. */
12806#include <unistd.h>
12807int
12808main ()
12809{
12810lockf(0, F_LOCK, 0);
12811 ;
12812 return 0;
12813}
12814_ACEOF
12815if ac_fn_c_try_link "$LINENO"; then :
12816
12817$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12818
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12820$as_echo "yes" >&6; }
12821else
12822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12823$as_echo "no" >&6; }
12824
12825fi
12826rm -f core conftest.err conftest.$ac_objext \
12827 conftest$ac_exeext conftest.$ac_ext
12828
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012829# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012830# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12832$as_echo_n "checking for getaddrinfo... " >&6; }
12833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012834/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012835
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012836#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012837#include <sys/socket.h>
12838#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012839#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012840
Martin v. Löwis11437992002-04-12 09:54:03 +000012841int
12842main ()
12843{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012844getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 ;
12846 return 0;
12847}
12848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012849if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012850 have_getaddrinfo=yes
12851else
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012854rm -f core conftest.err conftest.$ac_objext \
12855 conftest$ac_exeext conftest.$ac_ext
12856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12857$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012858if test $have_getaddrinfo = yes
12859then
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12861$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012862 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012864else
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012866
12867if test "${enable_ipv6+set}" = set; then
12868 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12869else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012870 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012871fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012872else
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012874/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012875
Stefan Krah19c21392012-11-22 23:47:32 +010012876#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012877#include <sys/types.h>
12878#include <netdb.h>
12879#include <string.h>
12880#include <sys/socket.h>
12881#include <netinet/in.h>
12882
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012883int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012884{
12885 int passive, gaierr, inet4 = 0, inet6 = 0;
12886 struct addrinfo hints, *ai, *aitop;
12887 char straddr[INET6_ADDRSTRLEN], strport[16];
12888
12889 for (passive = 0; passive <= 1; passive++) {
12890 memset(&hints, 0, sizeof(hints));
12891 hints.ai_family = AF_UNSPEC;
12892 hints.ai_flags = passive ? AI_PASSIVE : 0;
12893 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012894 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012895 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12896 (void)gai_strerror(gaierr);
12897 goto bad;
12898 }
12899 for (ai = aitop; ai; ai = ai->ai_next) {
12900 if (ai->ai_addr == NULL ||
12901 ai->ai_addrlen == 0 ||
12902 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12903 straddr, sizeof(straddr), strport, sizeof(strport),
12904 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12905 goto bad;
12906 }
12907 switch (ai->ai_family) {
12908 case AF_INET:
12909 if (strcmp(strport, "54321") != 0) {
12910 goto bad;
12911 }
12912 if (passive) {
12913 if (strcmp(straddr, "0.0.0.0") != 0) {
12914 goto bad;
12915 }
12916 } else {
12917 if (strcmp(straddr, "127.0.0.1") != 0) {
12918 goto bad;
12919 }
12920 }
12921 inet4++;
12922 break;
12923 case AF_INET6:
12924 if (strcmp(strport, "54321") != 0) {
12925 goto bad;
12926 }
12927 if (passive) {
12928 if (strcmp(straddr, "::") != 0) {
12929 goto bad;
12930 }
12931 } else {
12932 if (strcmp(straddr, "::1") != 0) {
12933 goto bad;
12934 }
12935 }
12936 inet6++;
12937 break;
12938 case AF_UNSPEC:
12939 goto bad;
12940 break;
12941 default:
12942 /* another family support? */
12943 break;
12944 }
12945 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012946 freeaddrinfo(aitop);
12947 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012948 }
12949
12950 if (!(inet4 == 0 || inet4 == 2))
12951 goto bad;
12952 if (!(inet6 == 0 || inet6 == 2))
12953 goto bad;
12954
12955 if (aitop)
12956 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012957 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012958
12959 bad:
12960 if (aitop)
12961 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012962 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012963}
12964
Martin v. Löwis11437992002-04-12 09:54:03 +000012965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012966if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012967 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012975fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012976
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12980$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12981
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012982if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012983then
12984 if test $ipv6 = yes
12985 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986 echo 'Fatal: You must get working getaddrinfo() function.'
12987 echo ' or you can specify "--disable-ipv6"'.
12988 exit 1
12989 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012990else
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012993
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012994fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012995
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012996for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012997do :
12998 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012999if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013002_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013003
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004fi
13005done
13006
Michael W. Hudson54241132001-12-07 15:38:26 +000013007
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013008# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13010$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013011if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013013else
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013015/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013016#include <sys/types.h>
13017#include <sys/time.h>
13018#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013019
Martin v. Löwis11437992002-04-12 09:54:03 +000013020int
13021main ()
13022{
13023if ((struct tm *) 0)
13024return 0;
13025 ;
13026 return 0;
13027}
13028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013029if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013030 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13037$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013038if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013041
13042fi
13043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13045$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013046if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048else
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013050/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013051#include <sys/types.h>
13052#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
Martin v. Löwis11437992002-04-12 09:54:03 +000013054int
13055main ()
13056{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013057struct tm tm;
13058 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 ;
13061 return 0;
13062}
13063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013064if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013065 ac_cv_struct_tm=time.h
13066else
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13072$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013073if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076
13077fi
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079ac_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 +000013080#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082"
Victor Stinnere0be4232011-10-25 13:06:09 +020013083if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013084
13085cat >>confdefs.h <<_ACEOF
13086#define HAVE_STRUCT_TM_TM_ZONE 1
13087_ACEOF
13088
13089
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013091
Martin v. Löwis11437992002-04-12 09:54:03 +000013092if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013095
13096else
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13098"
Victor Stinnere0be4232011-10-25 13:06:09 +020013099if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013101else
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013103fi
13104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013105cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013106#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013107_ACEOF
13108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13110$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013111if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113else
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013115/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013116#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117#if !HAVE_DECL_TZNAME
13118extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013120
Martin v. Löwis11437992002-04-12 09:54:03 +000013121int
13122main ()
13123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013124return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ;
13126 return 0;
13127}
13128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013129if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130 ac_cv_var_tzname=yes
13131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013134rm -f core conftest.err conftest.$ac_objext \
13135 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13138$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013139 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013142
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013143 fi
13144fi
13145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146ac_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 +020013147if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
13149cat >>confdefs.h <<_ACEOF
13150#define HAVE_STRUCT_STAT_ST_RDEV 1
13151_ACEOF
13152
13153
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013154fi
13155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156ac_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 +020013157if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013158
Martin v. Löwis11437992002-04-12 09:54:03 +000013159cat >>confdefs.h <<_ACEOF
13160#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13161_ACEOF
13162
13163
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013164fi
13165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166ac_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 +020013167if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013168
13169cat >>confdefs.h <<_ACEOF
13170#define HAVE_STRUCT_STAT_ST_FLAGS 1
13171_ACEOF
13172
13173
13174fi
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176ac_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 +020013177if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013178
13179cat >>confdefs.h <<_ACEOF
13180#define HAVE_STRUCT_STAT_ST_GEN 1
13181_ACEOF
13182
13183
13184fi
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186ac_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 +020013187if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013188
13189cat >>confdefs.h <<_ACEOF
13190#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13191_ACEOF
13192
13193
13194fi
13195
Matthias Kloseb9621712010-04-24 17:59:49 +000013196ac_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 +020013197if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013198
Martin v. Löwis11437992002-04-12 09:54:03 +000013199cat >>confdefs.h <<_ACEOF
13200#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13201_ACEOF
13202
13203
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013204fi
13205
Stefan Krah267b6392016-04-26 01:09:18 +020013206ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13207 #include <sys/types.h>
13208 #include <pwd.h>
13209
13210"
13211if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13212
13213cat >>confdefs.h <<_ACEOF
13214#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13215_ACEOF
13216
13217
13218fi
13219ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13220 #include <sys/types.h>
13221 #include <pwd.h>
13222
13223"
13224if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13225
13226cat >>confdefs.h <<_ACEOF
13227#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13228_ACEOF
13229
13230
13231fi
13232
Zachary Ware6a6967e2016-10-01 00:47:27 -050013233# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13234ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13235"
13236if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13237
13238cat >>confdefs.h <<_ACEOF
13239#define HAVE_SIGINFO_T_SI_BAND 1
13240_ACEOF
13241
13242
13243fi
13244
Michael W. Hudson54241132001-12-07 15:38:26 +000013245
Matthias Kloseb9621712010-04-24 17:59:49 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13247$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013248if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013250else
Matthias Kloseb159a552010-04-25 21:00:44 +000013251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013253/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013254#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013255int
13256main ()
13257{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013258return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 ;
13260 return 0;
13261}
13262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013263if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264 ac_cv_header_time_altzone=yes
13265else
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270fi
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13273$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
Matthias Kloseb9621712010-04-24 17:59:49 +000013276$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013277
13278fi
13279
Guido van Rossumda88dad1995-01-26 00:46:29 +000013280was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13282$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013284/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013285
13286#include <sys/types.h>
13287#include <sys/select.h>
13288#include <sys/time.h>
13289
Martin v. Löwis11437992002-04-12 09:54:03 +000013290int
13291main ()
13292{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293;
Martin v. Löwis11437992002-04-12 09:54:03 +000013294 ;
13295 return 0;
13296}
13297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
13300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013303 was_it_defined=yes
13304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13308$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13311$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013312if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +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. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013317#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013318int
13319main ()
13320{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013321struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 ;
13323 return 0;
13324}
13325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327 ac_cv_struct_addrinfo=yes
13328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13332fi
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13335$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013336if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013339
13340fi
13341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13343$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013344if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013348/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013349
13350# include <sys/types.h>
13351# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013352int
13353main ()
13354{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013355struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013356 ;
13357 return 0;
13358}
13359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013361 ac_cv_struct_sockaddr_storage=yes
13362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13366fi
13367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13369$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013370if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013373
13374fi
13375
Christian Heimesdffa3942016-09-05 23:54:41 +020013376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13377$as_echo_n "checking for sockaddr_alg... " >&6; }
13378if ${ac_cv_struct_sockaddr_alg+:} false; then :
13379 $as_echo_n "(cached) " >&6
13380else
13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382/* end confdefs.h. */
13383
13384# include <sys/types.h>
13385# include <sys/socket.h>
13386# include <linux/if_alg.h>
13387int
13388main ()
13389{
13390struct sockaddr_alg s
13391 ;
13392 return 0;
13393}
13394_ACEOF
13395if ac_fn_c_try_compile "$LINENO"; then :
13396 ac_cv_struct_sockaddr_alg=yes
13397else
13398 ac_cv_struct_sockaddr_alg=no
13399fi
13400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13401fi
13402
13403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13404$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13405if test $ac_cv_struct_sockaddr_alg = yes; then
13406
13407$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13408
13409fi
13410
Guido van Rossum627b2d71993-12-24 10:39:16 +000013411# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13414$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013415if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013420$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013421int
13422main ()
13423{
13424static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013425test_array [0] = 0;
13426return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
13428 ;
13429 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013430}
Martin v. Löwis11437992002-04-12 09:54:03 +000013431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013432if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013433 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13440$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013441if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013443
13444fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13447$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013448if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013450else
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013452/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454int
13455main ()
13456{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013457
Martin v. Löwis11437992002-04-12 09:54:03 +000013458#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013459 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013461 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463 char const *const *pcpcc;
13464 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 /* NEC SVR4.0.2 mips cc rejects this. */
13466 struct point {int x, y;};
13467 static struct point const zero = {0,0};
13468 /* AIX XL C 1.02.0.0 rejects this.
13469 It does not let you subtract one const X* pointer from another in
13470 an arm of an if-expression whose if-part is not a constant
13471 expression */
13472 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013473 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013474 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475 ++pcpcc;
13476 ppc = (char**) pcpcc;
13477 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013478 { /* SCO 3.2v4 cc rejects this sort of thing. */
13479 char tx;
13480 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 }
13486 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13487 int x[] = {25, 17};
13488 const int *foo = &x[0];
13489 ++foo;
13490 }
13491 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13492 typedef const int *iptr;
13493 iptr p = 0;
13494 ++p;
13495 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013496 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013498 struct s { int j; const int *ap[3]; } bx;
13499 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 }
13501 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13502 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013503 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013504 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013505 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013506#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013507
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 ;
13509 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013510}
Martin v. Löwis11437992002-04-12 09:54:03 +000013511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013513 ac_cv_c_const=yes
13514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13520$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013524
13525fi
13526
Michael W. Hudson54241132001-12-07 15:38:26 +000013527
Guido van Rossumda88dad1995-01-26 00:46:29 +000013528works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13530$as_echo_n "checking for working volatile... " >&6; }
13531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013532/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013533
Martin v. Löwis11437992002-04-12 09:54:03 +000013534int
13535main ()
13536{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013537volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 ;
13539 return 0;
13540}
13541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013543 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013544else
Skip Montanaro6dead952003-09-25 14:50:04 +000013545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013547
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013548
Guido van Rossum627b2d71993-12-24 10:39:16 +000013549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13552$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013553
Guido van Rossumda88dad1995-01-26 00:46:29 +000013554works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13556$as_echo_n "checking for working signed char... " >&6; }
13557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013558/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013559
Martin v. Löwis11437992002-04-12 09:54:03 +000013560int
13561main ()
13562{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 ;
13565 return 0;
13566}
13567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013568if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013569 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013570else
Skip Montanaro6dead952003-09-25 14:50:04 +000013571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013573
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013574
Guido van Rossum7f43da71994-08-01 12:15:30 +000013575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13578$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013579
Guido van Rossumda88dad1995-01-26 00:46:29 +000013580have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13582$as_echo_n "checking for prototypes... " >&6; }
13583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013584/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013585int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013586int
13587main ()
13588{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013589return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013590 ;
13591 return 0;
13592}
13593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
Matthias Kloseb159a552010-04-25 21:00:44 +000013598 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13602$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013603
Guido van Rossumda88dad1995-01-26 00:46:29 +000013604works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13606$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013608/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013609
13610#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013611int foo(int x, ...) {
13612 va_list va;
13613 va_start(va, x);
13614 va_arg(va, int);
13615 va_arg(va, char *);
13616 va_arg(va, double);
13617 return 0;
13618}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013619
Martin v. Löwis11437992002-04-12 09:54:03 +000013620int
13621main ()
13622{
Guido van Rossum90eea071996-08-30 20:58:57 +000013623return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 ;
13625 return 0;
13626}
13627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013632
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013633 works=yes
13634
Guido van Rossum627b2d71993-12-24 10:39:16 +000013635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13638$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013639
Martin v. Löwisd6320502004-08-12 13:45:08 +000013640# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13642$as_echo_n "checking for socketpair... " >&6; }
13643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013644/* end confdefs.h. */
13645
13646#include <sys/types.h>
13647#include <sys/socket.h>
13648
13649int
13650main ()
13651{
13652void *x=socketpair
13653 ;
13654 return 0;
13655}
13656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013660
Matthias Kloseb159a552010-04-25 21:00:44 +000013661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013662$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013663else
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13665$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013666
13667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013669
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013670# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13672$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013674/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013675#include <sys/types.h>
13676#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013677int
13678main ()
13679{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013680struct sockaddr x;
13681x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013682 ;
13683 return 0;
13684}
13685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013686if ac_fn_c_try_compile "$LINENO"; then :
13687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13688$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013691
13692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13694$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013695
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013698
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013699# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
13701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013703if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13708$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013709 OLD_CFLAGS=$CFLAGS
13710 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013712/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013713
13714# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013715
Martin v. Löwis11437992002-04-12 09:54:03 +000013716int
13717main ()
13718{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013719
13720 char *name;
13721 struct hostent *he, *res;
13722 char buffer[2048];
13723 int buflen = 2048;
13724 int h_errnop;
13725
13726 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013727
13728 ;
13729 return 0;
13730}
13731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013735
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13740$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013742else
Skip Montanaro6dead952003-09-25 14:50:04 +000013743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13745$as_echo "no" >&6; }
13746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13747$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013749/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013750
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013751# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
Martin v. Löwis11437992002-04-12 09:54:03 +000013753int
13754main ()
13755{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013756
13757 char *name;
13758 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013759 char buffer[2048];
13760 int buflen = 2048;
13761 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013762
Matthias Kloseb159a552010-04-25 21:00:44 +000013763 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013764
13765 ;
13766 return 0;
13767}
13768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013769if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013772
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
Matthias Kloseb159a552010-04-25 21:00:44 +000013774$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13777$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013778
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013779else
Skip Montanaro6dead952003-09-25 14:50:04 +000013780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13782$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13784$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13786/* end confdefs.h. */
13787
13788# include <netdb.h>
13789
13790int
13791main ()
13792{
13793
13794 char *name;
13795 struct hostent *he;
13796 struct hostent_data data;
13797
13798 (void) gethostbyname_r(name, he, &data);
13799
13800 ;
13801 return 0;
13802}
13803_ACEOF
13804if ac_fn_c_try_compile "$LINENO"; then :
13805
13806 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13807
13808
13809$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13810
13811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13812$as_echo "yes" >&6; }
13813
13814else
13815
13816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13817$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013818
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013821
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013824
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013827 CFLAGS=$OLD_CFLAGS
13828
13829else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 for ac_func in gethostbyname
13832do :
13833 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013834if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013836#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013837_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013838
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013839fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013840done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013841
Michael W. Hudson54241132001-12-07 15:38:26 +000013842
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013843fi
13844
Michael W. Hudson54241132001-12-07 15:38:26 +000013845
13846
13847
13848
13849
13850
Guido van Rossum627b2d71993-12-24 10:39:16 +000013851# checks for system services
13852# (none yet)
13853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013854# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013855ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013856if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013857
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13860$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013861if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863else
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013865LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869/* Override any GCC internal prototype to avoid an error.
13870 Use char because int might match the return type of a GCC
13871 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013872#ifdef __cplusplus
13873extern "C"
13874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013875char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013876int
13877main ()
13878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 ;
13881 return 0;
13882}
13883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013884if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013886else
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013889rm -f core conftest.err conftest.$ac_objext \
13890 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013891LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13894$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013895if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 cat >>confdefs.h <<_ACEOF
13897#define HAVE_LIBIEEE 1
13898_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013899
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013900 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013901
Guido van Rossum627b2d71993-12-24 10:39:16 +000013902fi
13903
Michael W. Hudson54241132001-12-07 15:38:26 +000013904
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013905fi
13906
Michael W. Hudson54241132001-12-07 15:38:26 +000013907
Guido van Rossum7f253911997-05-09 02:42:48 +000013908# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13910$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013913if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013915if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013916then
13917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13921$as_echo "yes" >&6; }
13922else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13923$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013924fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013925else
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13927$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928fi
13929
Guido van Rossum7f253911997-05-09 02:42:48 +000013930
Guido van Rossum7f43da71994-08-01 12:15:30 +000013931# check for --with-libm=...
13932
Guido van Rossum563e7081996-09-10 18:20:48 +000013933case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013934Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013935*) LIBM=-lm
13936esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13938$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013943if test "$withval" = no
13944then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13946$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013947elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013948then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13950$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013951else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013952fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13955$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956fi
13957
Guido van Rossum7f43da71994-08-01 12:15:30 +000013958
13959# check for --with-libc=...
13960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13962$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013964# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013965if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013966 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013967if test "$withval" = no
13968then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13970$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013971elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013972then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13974$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013975else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013976fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013977else
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13979$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980fi
13981
Guido van Rossum7f43da71994-08-01 12:15:30 +000013982
Stefan Krah1919b7e2012-03-21 18:25:23 +010013983# **************************************
13984# * Check for gcc x64 inline assembler *
13985# **************************************
13986
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13988$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13990/* end confdefs.h. */
13991
13992int
13993main ()
13994{
13995
13996 __asm__ __volatile__ ("movq %rcx, %rax");
13997
13998 ;
13999 return 0;
14000}
14001_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014002if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014003 have_gcc_asm_for_x64=yes
14004else
14005 have_gcc_asm_for_x64=no
14006fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014007rm -f core conftest.err conftest.$ac_objext \
14008 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14010$as_echo "$have_gcc_asm_for_x64" >&6; }
14011if test "$have_gcc_asm_for_x64" = yes
14012then
14013
14014$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14015
14016fi
14017
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014018# **************************************************
14019# * Check for various properties of floating point *
14020# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
14023$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014024if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026else
14027
Matthias Kloseb9621712010-04-24 17:59:49 +000014028if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014029 ac_cv_little_endian_double=no
14030else
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014032/* end confdefs.h. */
14033
14034#include <string.h>
14035int main() {
14036 double x = 9006104071832581.0;
14037 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
14038 return 0;
14039 else
14040 return 1;
14041}
14042
14043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014044if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014045 ac_cv_little_endian_double=yes
14046else
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014051fi
14052
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014053fi
14054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14056$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014057if test "$ac_cv_little_endian_double" = yes
14058then
14059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014061
14062fi
14063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14065$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014066if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014068else
14069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014071 ac_cv_big_endian_double=no
14072else
Matthias Kloseb9621712010-04-24 17:59:49 +000014073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014074/* end confdefs.h. */
14075
14076#include <string.h>
14077int main() {
14078 double x = 9006104071832581.0;
14079 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14080 return 0;
14081 else
14082 return 1;
14083}
14084
14085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014086if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087 ac_cv_big_endian_double=yes
14088else
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014093fi
14094
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014095fi
14096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14098$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014099if test "$ac_cv_big_endian_double" = yes
14100then
14101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014103
14104fi
14105
14106# Some ARM platforms use a mixed-endian representation for doubles.
14107# While Python doesn't currently have full support for these platforms
14108# (see e.g., issue 1762561), we can at least make sure that float <-> string
14109# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14111$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014112if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014114else
14115
Matthias Kloseb9621712010-04-24 17:59:49 +000014116if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014117 ac_cv_mixed_endian_double=no
14118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014120/* end confdefs.h. */
14121
14122#include <string.h>
14123int main() {
14124 double x = 9006104071832581.0;
14125 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14126 return 0;
14127 else
14128 return 1;
14129}
14130
14131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014132if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014133 ac_cv_mixed_endian_double=yes
14134else
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014139fi
14140
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014141fi
14142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14144$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014145if test "$ac_cv_mixed_endian_double" = yes
14146then
14147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014149
14150fi
14151
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014152# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014153# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014154# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014155# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014156# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014157# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014158
14159# This inline assembler syntax may also work for suncc and icc,
14160# so we try it on all platforms.
14161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14163$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014165/* end confdefs.h. */
14166
14167int
14168main ()
14169{
14170
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014171 unsigned short cw;
14172 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14173 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014174
14175 ;
14176 return 0;
14177}
14178_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014179if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014180 have_gcc_asm_for_x87=yes
14181else
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014183fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014184rm -f core conftest.err conftest.$ac_objext \
14185 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14187$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014188if test "$have_gcc_asm_for_x87" = yes
14189then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014190
Matthias Kloseb9621712010-04-24 17:59:49 +000014191$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014192
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014194
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14196$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14198/* end confdefs.h. */
14199
14200int
14201main ()
14202{
14203
14204 unsigned int fpcr;
14205 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14206 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14207
14208 ;
14209 return 0;
14210}
14211_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014212if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014213 have_gcc_asm_for_mc68881=yes
14214else
14215 have_gcc_asm_for_mc68881=no
14216fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014217rm -f core conftest.err conftest.$ac_objext \
14218 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14220$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14221if test "$have_gcc_asm_for_mc68881" = yes
14222then
14223
14224$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14225
14226fi
14227
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014228# Detect whether system arithmetic is subject to x87-style double
14229# rounding issues. The result of this test has little meaning on non
14230# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14231# mode is round-to-nearest and double rounding issues are present, and
14232# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14234$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014235# $BASECFLAGS may affect the result
14236ac_save_cc="$CC"
14237CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014238if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014239 ac_cv_x87_double_rounding=no
14240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014242/* end confdefs.h. */
14243
14244#include <stdlib.h>
14245#include <math.h>
14246int main() {
14247 volatile double x, y, z;
14248 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14249 x = 0.99999999999999989; /* 1-2**-53 */
14250 y = 1./x;
14251 if (y != 1.)
14252 exit(0);
14253 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14254 x = 1e16;
14255 y = 2.99999;
14256 z = x + y;
14257 if (z != 1e16+4.)
14258 exit(0);
14259 /* both tests show evidence of double rounding */
14260 exit(1);
14261}
14262
14263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014264if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014265 ac_cv_x87_double_rounding=no
14266else
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14270 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014271fi
14272
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014273CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14275$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014276if test "$ac_cv_x87_double_rounding" = yes
14277then
14278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014280
14281fi
14282
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014283# ************************************
14284# * Check for mathematical functions *
14285# ************************************
14286
14287LIBS_SAVE=$LIBS
14288LIBS="$LIBS $LIBM"
14289
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014290for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14291do :
14292 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14293ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014294if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014295 cat >>confdefs.h <<_ACEOF
14296#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14297_ACEOF
14298
14299fi
14300done
14301
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014302for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014303do :
14304 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14305ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014306if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014307 cat >>confdefs.h <<_ACEOF
14308#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14309_ACEOF
14310
14311fi
14312done
14313
14314ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14315"
Victor Stinnere0be4232011-10-25 13:06:09 +020014316if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014317 ac_have_decl=1
14318else
14319 ac_have_decl=0
14320fi
14321
14322cat >>confdefs.h <<_ACEOF
14323#define HAVE_DECL_ISINF $ac_have_decl
14324_ACEOF
14325ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14326"
Victor Stinnere0be4232011-10-25 13:06:09 +020014327if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014328 ac_have_decl=1
14329else
14330 ac_have_decl=0
14331fi
14332
14333cat >>confdefs.h <<_ACEOF
14334#define HAVE_DECL_ISNAN $ac_have_decl
14335_ACEOF
14336ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14337"
Victor Stinnere0be4232011-10-25 13:06:09 +020014338if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014339 ac_have_decl=1
14340else
14341 ac_have_decl=0
14342fi
14343
14344cat >>confdefs.h <<_ACEOF
14345#define HAVE_DECL_ISFINITE $ac_have_decl
14346_ACEOF
14347
14348
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014349# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14350# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14352$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014353if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014355else
14356
Matthias Kloseb9621712010-04-24 17:59:49 +000014357if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014358 ac_cv_tanh_preserves_zero_sign=no
14359else
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014361/* end confdefs.h. */
14362
14363#include <math.h>
14364#include <stdlib.h>
14365int main() {
14366 /* return 0 if either negative zeros don't exist
14367 on this platform or if negative zeros exist
14368 and tanh(-0.) == -0. */
14369 if (atan2(0., -1.) == atan2(-0., -1.) ||
14370 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14371 else exit(1);
14372}
14373
14374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014375if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014376 ac_cv_tanh_preserves_zero_sign=yes
14377else
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14381 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014382fi
14383
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014384fi
14385
Matthias Kloseb9621712010-04-24 17:59:49 +000014386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14387$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014388if test "$ac_cv_tanh_preserves_zero_sign" = yes
14389then
14390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014392
14393fi
14394
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014395if test "$ac_cv_func_log1p" = yes
14396then
14397 # On some versions of AIX, log1p(-0.) returns 0. instead of
14398 # -0. See issue #9920.
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14400$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014401 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014402 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014403else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014404
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014405 if test "$cross_compiling" = yes; then :
14406 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014407else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14409/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014410
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014411 #include <math.h>
14412 #include <stdlib.h>
14413 int main() {
14414 /* Fail if the signs of log1p(-0.) and -0. can be
14415 distinguished. */
14416 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14417 return 0;
14418 else
14419 return 1;
14420 }
14421
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014422_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014423if ac_fn_c_try_run "$LINENO"; then :
14424 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014425else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014426 ac_cv_log1p_drops_zero_sign=yes
14427fi
14428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014430fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014431
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014432fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014433
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14435$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14436fi
14437if test "$ac_cv_log1p_drops_zero_sign" = yes
14438then
14439
14440$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14441
14442fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014443
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014444LIBS=$LIBS_SAVE
14445
Mark Dickinsona614f042009-11-28 12:48:43 +000014446# For multiprocessing module, check that sem_open
14447# actually works. For FreeBSD versions <= 7.2,
14448# the kernel module that provides POSIX semaphores
14449# isn't loaded by default, so an attempt to call
14450# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14452$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014453if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014455else
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014457 ac_cv_posix_semaphores_enabled=yes
14458else
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014460/* end confdefs.h. */
14461
14462#include <unistd.h>
14463#include <fcntl.h>
14464#include <stdio.h>
14465#include <semaphore.h>
14466#include <sys/stat.h>
14467
14468int main(void) {
14469 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14470 if (a == SEM_FAILED) {
14471 perror("sem_open");
14472 return 1;
14473 }
14474 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014475 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014476 return 0;
14477}
14478
14479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014480if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014481 ac_cv_posix_semaphores_enabled=yes
14482else
Matthias Kloseb9621712010-04-24 17:59:49 +000014483 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14486 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014487fi
14488
14489
Mark Dickinsona614f042009-11-28 12:48:43 +000014490fi
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14493$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014494if test $ac_cv_posix_semaphores_enabled = no
14495then
14496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014498
14499fi
14500
Mark Dickinson10683072009-04-18 21:18:19 +000014501# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14503$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014504if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014508 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014509else
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014511/* end confdefs.h. */
14512
14513#include <unistd.h>
14514#include <fcntl.h>
14515#include <stdio.h>
14516#include <semaphore.h>
14517#include <sys/stat.h>
14518
14519int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014520 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014521 int count;
14522 int res;
14523 if(a==SEM_FAILED){
14524 perror("sem_open");
14525 return 1;
14526
14527 }
14528 res = sem_getvalue(a, &count);
14529 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014530 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014531 return res==-1 ? 1 : 0;
14532}
14533
Mark Dickinson10683072009-04-18 21:18:19 +000014534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014535if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014536 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014537else
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14541 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014542fi
14543
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014544
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014545fi
14546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14548$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014549if test $ac_cv_broken_sem_getvalue = yes
14550then
14551
Matthias Kloseb9621712010-04-24 17:59:49 +000014552$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014553
14554fi
14555
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014556ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14557"
14558if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14559 ac_have_decl=1
14560else
14561 ac_have_decl=0
14562fi
14563
14564cat >>confdefs.h <<_ACEOF
14565#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14566_ACEOF
14567ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14568"
14569if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14570 ac_have_decl=1
14571else
14572 ac_have_decl=0
14573fi
14574
14575cat >>confdefs.h <<_ACEOF
14576#define HAVE_DECL_RTLD_NOW $ac_have_decl
14577_ACEOF
14578ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14579"
14580if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14581 ac_have_decl=1
14582else
14583 ac_have_decl=0
14584fi
14585
14586cat >>confdefs.h <<_ACEOF
14587#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14588_ACEOF
14589ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14590"
14591if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14592 ac_have_decl=1
14593else
14594 ac_have_decl=0
14595fi
14596
14597cat >>confdefs.h <<_ACEOF
14598#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14599_ACEOF
14600ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14601"
14602if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14603 ac_have_decl=1
14604else
14605 ac_have_decl=0
14606fi
14607
14608cat >>confdefs.h <<_ACEOF
14609#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14610_ACEOF
14611ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14612"
14613if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14614 ac_have_decl=1
14615else
14616 ac_have_decl=0
14617fi
14618
14619cat >>confdefs.h <<_ACEOF
14620#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14621_ACEOF
14622ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14623"
14624if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14625 ac_have_decl=1
14626else
14627 ac_have_decl=0
14628fi
14629
14630cat >>confdefs.h <<_ACEOF
14631#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14632_ACEOF
14633
14634
Mark Dickinsonbd792642009-03-18 20:06:12 +000014635# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14637$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014638# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014639if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014640 enableval=$enable_big_digits; case $enable_big_digits in
14641yes)
14642 enable_big_digits=30 ;;
14643no)
14644 enable_big_digits=15 ;;
1464515|30)
14646 ;;
14647*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014648 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 +000014649esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14651$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014652
14653cat >>confdefs.h <<_ACEOF
14654#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14655_ACEOF
14656
14657
14658else
Matthias Kloseb9621712010-04-24 17:59:49 +000014659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14660$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014661fi
14662
14663
Guido van Rossumef2255b2000-03-10 22:30:29 +000014664# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014665ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014666if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014667
14668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014670
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014671 wchar_h="yes"
14672
Guido van Rossumef2255b2000-03-10 22:30:29 +000014673else
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014675
14676fi
14677
Michael W. Hudson54241132001-12-07 15:38:26 +000014678
Martin v. Löwis11437992002-04-12 09:54:03 +000014679
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014680# determine wchar_t size
14681if test "$wchar_h" = yes
14682then
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14688$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014689if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014691else
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14693"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014694
Martin v. Löwis11437992002-04-12 09:54:03 +000014695else
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 if test "$ac_cv_type_wchar_t" = yes; then
14697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014699as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014700See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701 else
14702 ac_cv_sizeof_wchar_t=0
14703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014705
Martin v. Löwis11437992002-04-12 09:54:03 +000014706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14708$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709
14710
14711
Martin v. Löwis11437992002-04-12 09:54:03 +000014712cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014713#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014714_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014715
Michael W. Hudson54241132001-12-07 15:38:26 +000014716
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014717fi
14718
Matthias Kloseb9621712010-04-24 17:59:49 +000014719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14720$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014721have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014723/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014724
14725#include <tcl.h>
14726#if TCL_UTF_MAX != 6
14727# error "NOT UCS4_TCL"
14728#endif
14729int
14730main ()
14731{
14732
14733 ;
14734 return 0;
14735}
14736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014738
14739
Matthias Kloseb9621712010-04-24 17:59:49 +000014740$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014741
14742 have_ucs4_tcl=yes
14743
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14747$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014748
Skip Montanaro6dead952003-09-25 14:50:04 +000014749# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014750if test "$wchar_h" = yes
14751then
14752 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14754$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014755 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014757else
14758
Matthias Kloseb9621712010-04-24 17:59:49 +000014759 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014760 ac_cv_wchar_t_signed=yes
14761else
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. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014764
14765 #include <wchar.h>
14766 int main()
14767 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014768 /* Success: exit code 0 */
14769 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014770 }
14771
14772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014773if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014774 ac_cv_wchar_t_signed=yes
14775else
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014780fi
14781
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014782fi
14783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14785$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786fi
14787
Georg Brandl52d168a2008-01-07 18:10:24 +000014788# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014789if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014790 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014791then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014792 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Georg Brandl52d168a2008-01-07 18:10:24 +000014796else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014797 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014798fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14800$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014801
14802# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14804$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014805if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 ac_cv_c_bigendian=unknown
14809 # See if we're dealing with a universal compiler.
14810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14811/* end confdefs.h. */
14812#ifndef __APPLE_CC__
14813 not a universal capable compiler
14814 #endif
14815 typedef int dummy;
14816
Skip Montanaro6dead952003-09-25 14:50:04 +000014817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014818if ac_fn_c_try_compile "$LINENO"; then :
14819
14820 # Check for potential -arch flags. It is not universal unless
14821 # there are at least two -arch flags with different values.
14822 ac_arch=
14823 ac_prev=
14824 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14825 if test -n "$ac_prev"; then
14826 case $ac_word in
14827 i?86 | x86_64 | ppc | ppc64)
14828 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14829 ac_arch=$ac_word
14830 else
14831 ac_cv_c_bigendian=universal
14832 break
14833 fi
14834 ;;
14835 esac
14836 ac_prev=
14837 elif test "x$ac_word" = "x-arch"; then
14838 ac_prev=arch
14839 fi
14840 done
14841fi
14842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14843 if test $ac_cv_c_bigendian = unknown; then
14844 # See if sys/param.h defines the BYTE_ORDER macro.
14845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014846/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014847#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014849
Martin v. Löwis11437992002-04-12 09:54:03 +000014850int
14851main ()
14852{
Matthias Kloseb9621712010-04-24 17:59:49 +000014853#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14854 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14855 && LITTLE_ENDIAN)
14856 bogus endian macros
14857 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014858
14859 ;
14860 return 0;
14861}
14862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014863if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014864 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014866/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014867#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014869
Martin v. Löwis11437992002-04-12 09:54:03 +000014870int
14871main ()
14872{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014873#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 not big endian
14875 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014876
14877 ;
14878 return 0;
14879}
14880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014881if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014882 ac_cv_c_bigendian=yes
14883else
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014887fi
14888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14889 fi
14890 if test $ac_cv_c_bigendian = unknown; then
14891 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014893/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014894#include <limits.h>
14895
Martin v. Löwis11437992002-04-12 09:54:03 +000014896int
14897main ()
14898{
Matthias Kloseb9621712010-04-24 17:59:49 +000014899#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14900 bogus endian macros
14901 #endif
14902
Martin v. Löwis11437992002-04-12 09:54:03 +000014903 ;
14904 return 0;
14905}
14906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014907if ac_fn_c_try_compile "$LINENO"; then :
14908 # It does; now see whether it defined to _BIG_ENDIAN or not.
14909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14910/* end confdefs.h. */
14911#include <limits.h>
14912
14913int
14914main ()
14915{
14916#ifndef _BIG_ENDIAN
14917 not big endian
14918 #endif
14919
14920 ;
14921 return 0;
14922}
14923_ACEOF
14924if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014925 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014926else
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14930fi
14931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14932 fi
14933 if test $ac_cv_c_bigendian = unknown; then
14934 # Compile a test program.
14935 if test "$cross_compiling" = yes; then :
14936 # Try to guess by grepping values from an object file.
14937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14938/* end confdefs.h. */
14939short int ascii_mm[] =
14940 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14941 short int ascii_ii[] =
14942 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14943 int use_ascii (int i) {
14944 return ascii_mm[i] + ascii_ii[i];
14945 }
14946 short int ebcdic_ii[] =
14947 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14948 short int ebcdic_mm[] =
14949 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14950 int use_ebcdic (int i) {
14951 return ebcdic_mm[i] + ebcdic_ii[i];
14952 }
14953 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954
Matthias Kloseb9621712010-04-24 17:59:49 +000014955int
14956main ()
14957{
14958return use_ascii (foo) == use_ebcdic (foo);
14959 ;
14960 return 0;
14961}
14962_ACEOF
14963if ac_fn_c_try_compile "$LINENO"; then :
14964 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14965 ac_cv_c_bigendian=yes
14966 fi
14967 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14968 if test "$ac_cv_c_bigendian" = unknown; then
14969 ac_cv_c_bigendian=no
14970 else
14971 # finding both strings is unlikely to happen, but who knows?
14972 ac_cv_c_bigendian=unknown
14973 fi
14974 fi
14975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014977else
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014979/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014981int
14982main ()
14983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984
Matthias Kloseb9621712010-04-24 17:59:49 +000014985 /* Are we little or big endian? From Harbison&Steele. */
14986 union
14987 {
14988 long int l;
14989 char c[sizeof (long int)];
14990 } u;
14991 u.l = 1;
14992 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993
14994 ;
14995 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014996}
Martin v. Löwis11437992002-04-12 09:54:03 +000014997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014998if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014999 ac_cv_c_bigendian=no
15000else
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15010$as_echo "$ac_cv_c_bigendian" >&6; }
15011 case $ac_cv_c_bigendian in #(
15012 yes)
15013 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15014;; #(
15015 no)
15016 ;; #(
15017 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015020
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 ;; #(
15022 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015023 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015024 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015026
Michael W. Hudson54241132001-12-07 15:38:26 +000015027
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015028# ABI version string for Python extension modules. This appears between the
15029# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15030# from the following attributes which affect the ABI of this Python build (in
15031# this order):
15032#
15033# * The Python implementation (always 'cpython-' for us)
15034# * The major and minor version numbers
15035# * --with-pydebug (adds a 'd')
15036# * --with-pymalloc (adds a 'm')
15037# * --with-wide-unicode (adds a 'u')
15038#
15039# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015040# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15041# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015042
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15044$as_echo_n "checking ABIFLAGS... " >&6; }
15045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15046$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15048$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015049SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15051$as_echo "$SOABI" >&6; }
15052
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015053
15054case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015055 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015056 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15057 *)
15058 EXT_SUFFIX=${SHLIB_SUFFIX};;
15059esac
15060
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15062$as_echo_n "checking LDVERSION... " >&6; }
15063LDVERSION='$(VERSION)$(ABIFLAGS)'
15064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15065$as_echo "$LDVERSION" >&6; }
15066
doko@python.org87421192013-01-26 11:39:31 +010015067
doko@ubuntu.com55532312016-06-14 08:55:19 +020015068if test x$PLATFORM_TRIPLET = x; then
15069 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15070else
15071 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15072fi
doko@python.org87421192013-01-26 11:39:31 +010015073
15074
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015075# Check whether right shifting a negative integer extends the sign bit
15076# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15078$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015079if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015080 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015081else
Martin v. Löwis11437992002-04-12 09:54:03 +000015082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015084 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015088
15089int main()
15090{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015091 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015092}
15093
Martin v. Löwis11437992002-04-12 09:54:03 +000015094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015095if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015096 ac_cv_rshift_extends_sign=yes
15097else
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015102fi
15103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104fi
15105
Matthias Kloseb9621712010-04-24 17:59:49 +000015106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15107$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015108if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015109then
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
Matthias Kloseb9621712010-04-24 17:59:49 +000015111$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015112
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015113fi
15114
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015115# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15117$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015118if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015120else
Martin v. Löwis11437992002-04-12 09:54:03 +000015121
Matthias Kloseb9621712010-04-24 17:59:49 +000015122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015123/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015124#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015125int
15126main ()
15127{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015128
15129 FILE *f = fopen("/dev/null", "r");
15130 flockfile(f);
15131 getc_unlocked(f);
15132 funlockfile(f);
15133
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 ;
15135 return 0;
15136}
15137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015138if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015139 ac_cv_have_getc_unlocked=yes
15140else
Matthias Kloseb9621712010-04-24 17:59:49 +000015141 ac_cv_have_getc_unlocked=no
15142fi
15143rm -f core conftest.err conftest.$ac_objext \
15144 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015146
Matthias Kloseb9621712010-04-24 17:59:49 +000015147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15148$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015149if test "$ac_cv_have_getc_unlocked" = yes
15150then
Martin v. Löwis11437992002-04-12 09:54:03 +000015151
Matthias Kloseb9621712010-04-24 17:59:49 +000015152$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015153
15154fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015155
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015156# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015157# save the value of LIBS so we don't actually link Python with readline
15158LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015159
Gregory P. Smith18820942008-09-07 06:24:49 +000015160# On some systems we need to link readline to a termcap compatible
15161# library. NOTE: Keep the precedence of listed libraries synchronised
15162# with setup.py.
15163py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15165$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015166for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015167 if test -z "$py_libtermcap"; then
15168 READLINE_LIBS="-lreadline"
15169 else
15170 READLINE_LIBS="-lreadline -l$py_libtermcap"
15171 fi
15172 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015174/* end confdefs.h. */
15175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176/* Override any GCC internal prototype to avoid an error.
15177 Use char because int might match the return type of a GCC
15178 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015179#ifdef __cplusplus
15180extern "C"
15181#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015182char readline ();
15183int
15184main ()
15185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015187 ;
15188 return 0;
15189}
15190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015191if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015192 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015194rm -f core conftest.err conftest.$ac_objext \
15195 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015196 if test $py_cv_lib_readline = yes; then
15197 break
15198 fi
15199done
15200# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15201#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015202if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15204$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015205else
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15207$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015210
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015211fi
15212
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015213# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15215$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015216if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015218else
15219 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015220LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015222/* end confdefs.h. */
15223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224/* Override any GCC internal prototype to avoid an error.
15225 Use char because int might match the return type of a GCC
15226 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015227#ifdef __cplusplus
15228extern "C"
15229#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015230char rl_callback_handler_install ();
15231int
15232main ()
15233{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015235 ;
15236 return 0;
15237}
15238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015239if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015240 ac_cv_lib_readline_rl_callback_handler_install=yes
15241else
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015244rm -f core conftest.err conftest.$ac_objext \
15245 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015246LIBS=$ac_check_lib_save_LIBS
15247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15249$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015250if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015251
Matthias Kloseb9621712010-04-24 17:59:49 +000015252$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015253
15254fi
15255
15256
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015257# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015259/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015260#include <readline/readline.h>
15261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015262if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015263 have_readline=yes
15264else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015265 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015266
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015267fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015268rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015269if test $have_readline = yes
15270then
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015272/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015273#include <readline/readline.h>
15274
15275_ACEOF
15276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015278
Matthias Kloseb9621712010-04-24 17:59:49 +000015279$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015280
15281fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015282rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015283
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015285/* end confdefs.h. */
15286#include <readline/readline.h>
15287
15288_ACEOF
15289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015291
Matthias Kloseb9621712010-04-24 17:59:49 +000015292$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015293
15294fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015295rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015296
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015297fi
15298
Martin v. Löwis0daad592001-09-30 21:09:59 +000015299# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15301$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015302if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015304else
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015306LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310/* Override any GCC internal prototype to avoid an error.
15311 Use char because int might match the return type of a GCC
15312 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015313#ifdef __cplusplus
15314extern "C"
15315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015316char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015317int
15318main ()
15319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 ;
15322 return 0;
15323}
15324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015325if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015327else
Matthias Kloseb9621712010-04-24 17:59:49 +000015328 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015330rm -f core conftest.err conftest.$ac_objext \
15331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015332LIBS=$ac_check_lib_save_LIBS
15333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15335$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015336if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015339
Martin v. Löwis0daad592001-09-30 21:09:59 +000015340fi
15341
Michael W. Hudson54241132001-12-07 15:38:26 +000015342
Thomas Wouters89d996e2007-09-08 17:39:28 +000015343# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15345$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015346if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015348else
15349 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015350LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015352/* end confdefs.h. */
15353
15354/* Override any GCC internal prototype to avoid an error.
15355 Use char because int might match the return type of a GCC
15356 builtin and then its argument prototype would still apply. */
15357#ifdef __cplusplus
15358extern "C"
15359#endif
15360char rl_completion_display_matches_hook ();
15361int
15362main ()
15363{
15364return rl_completion_display_matches_hook ();
15365 ;
15366 return 0;
15367}
15368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015369if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015370 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15371else
Matthias Kloseb9621712010-04-24 17:59:49 +000015372 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015374rm -f core conftest.err conftest.$ac_objext \
15375 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015376LIBS=$ac_check_lib_save_LIBS
15377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15379$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015380if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015381
Matthias Kloseb9621712010-04-24 17:59:49 +000015382$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015383
15384fi
15385
15386
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015387# also in 4.0, but not in editline
15388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15389$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15390if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15391 $as_echo_n "(cached) " >&6
15392else
15393 ac_check_lib_save_LIBS=$LIBS
15394LIBS="-lreadline $READLINE_LIBS $LIBS"
15395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15396/* end confdefs.h. */
15397
15398/* Override any GCC internal prototype to avoid an error.
15399 Use char because int might match the return type of a GCC
15400 builtin and then its argument prototype would still apply. */
15401#ifdef __cplusplus
15402extern "C"
15403#endif
15404char rl_resize_terminal ();
15405int
15406main ()
15407{
15408return rl_resize_terminal ();
15409 ;
15410 return 0;
15411}
15412_ACEOF
15413if ac_fn_c_try_link "$LINENO"; then :
15414 ac_cv_lib_readline_rl_resize_terminal=yes
15415else
15416 ac_cv_lib_readline_rl_resize_terminal=no
15417fi
15418rm -f core conftest.err conftest.$ac_objext \
15419 conftest$ac_exeext conftest.$ac_ext
15420LIBS=$ac_check_lib_save_LIBS
15421fi
15422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15423$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15424if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15425
15426$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15427
15428fi
15429
15430
Martin v. Löwis0daad592001-09-30 21:09:59 +000015431# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15433$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015434if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015435 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015436else
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015438LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442/* Override any GCC internal prototype to avoid an error.
15443 Use char because int might match the return type of a GCC
15444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015445#ifdef __cplusplus
15446extern "C"
15447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015448char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015449int
15450main ()
15451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015452return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 ;
15454 return 0;
15455}
15456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015459else
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015462rm -f core conftest.err conftest.$ac_objext \
15463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015464LIBS=$ac_check_lib_save_LIBS
15465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15467$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015468if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015469
Matthias Kloseb9621712010-04-24 17:59:49 +000015470$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015471
Guido van Rossum353ae582001-07-10 16:45:32 +000015472fi
15473
Jack Jansendd19cf82001-12-06 22:36:17 +000015474
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015475# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015477/* end confdefs.h. */
15478#include <readline/readline.h>
15479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015480if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015481 have_readline=yes
15482else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015483 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015484
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015485fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015486rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015487if test $have_readline = yes
15488then
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015490/* end confdefs.h. */
15491#include <readline/readline.h>
15492
15493_ACEOF
15494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015498
15499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015500rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015501
15502fi
15503
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15505$as_echo_n "checking for append_history in -lreadline... " >&6; }
15506if ${ac_cv_lib_readline_append_history+:} false; then :
15507 $as_echo_n "(cached) " >&6
15508else
15509 ac_check_lib_save_LIBS=$LIBS
15510LIBS="-lreadline $READLINE_LIBS $LIBS"
15511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15512/* end confdefs.h. */
15513
15514/* Override any GCC internal prototype to avoid an error.
15515 Use char because int might match the return type of a GCC
15516 builtin and then its argument prototype would still apply. */
15517#ifdef __cplusplus
15518extern "C"
15519#endif
15520char append_history ();
15521int
15522main ()
15523{
15524return append_history ();
15525 ;
15526 return 0;
15527}
15528_ACEOF
15529if ac_fn_c_try_link "$LINENO"; then :
15530 ac_cv_lib_readline_append_history=yes
15531else
15532 ac_cv_lib_readline_append_history=no
15533fi
15534rm -f core conftest.err conftest.$ac_objext \
15535 conftest$ac_exeext conftest.$ac_ext
15536LIBS=$ac_check_lib_save_LIBS
15537fi
15538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15539$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15540if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15541
15542$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15543
15544fi
15545
15546
Martin v. Löwis82bca632006-02-10 20:49:30 +000015547# End of readline checks: restore LIBS
15548LIBS=$LIBS_no_readline
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15551$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015552if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015554else
Martin v. Löwis11437992002-04-12 09:54:03 +000015555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015557 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015558else
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015560/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015561
15562int main()
15563{
15564 int val1 = nice(1);
15565 if (val1 != -1 && val1 == nice(2))
15566 exit(0);
15567 exit(1);
15568}
15569
Martin v. Löwis11437992002-04-12 09:54:03 +000015570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015571if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015572 ac_cv_broken_nice=yes
15573else
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015578fi
15579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015580fi
15581
Matthias Kloseb9621712010-04-24 17:59:49 +000015582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15583$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015584if test "$ac_cv_broken_nice" = yes
15585then
Martin v. Löwis11437992002-04-12 09:54:03 +000015586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015588
15589fi
15590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15592$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015593if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015594 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015595else
Matthias Kloseb9621712010-04-24 17:59:49 +000015596 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015597 ac_cv_broken_poll=no
15598else
Matthias Kloseb9621712010-04-24 17:59:49 +000015599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015600/* end confdefs.h. */
15601
15602#include <poll.h>
15603
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015604int main()
15605{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015606 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015607 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015608
15609 close (42);
15610
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015611 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015612 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015613 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015614 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015615 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015616 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015617 return 1;
15618}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015619
15620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015621if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015622 ac_cv_broken_poll=yes
15623else
Matthias Kloseb9621712010-04-24 17:59:49 +000015624 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15627 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015629
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015630fi
15631
Matthias Kloseb9621712010-04-24 17:59:49 +000015632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15633$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015634if test "$ac_cv_broken_poll" = yes
15635then
15636
Matthias Kloseb9621712010-04-24 17:59:49 +000015637$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015638
15639fi
15640
Brett Cannon43802422005-02-10 20:48:03 +000015641# 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 +000015642# (which is not required by ISO C or UNIX spec) and/or if we support
15643# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015644ac_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 +000015645#include <$ac_cv_struct_tm>
15646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647"
Victor Stinnere0be4232011-10-25 13:06:09 +020015648if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015649
15650cat >>confdefs.h <<_ACEOF
15651#define HAVE_STRUCT_TM_TM_ZONE 1
15652_ACEOF
15653
15654
15655fi
15656
15657if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15658
Matthias Kloseb9621712010-04-24 17:59:49 +000015659$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015660
15661else
Matthias Kloseb9621712010-04-24 17:59:49 +000015662 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15663"
Victor Stinnere0be4232011-10-25 13:06:09 +020015664if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015665 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666else
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015668fi
15669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015670cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015671#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672_ACEOF
15673
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15675$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015676if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015677 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015678else
Matthias Kloseb9621712010-04-24 17:59:49 +000015679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015680/* end confdefs.h. */
15681#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682#if !HAVE_DECL_TZNAME
15683extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015684#endif
15685
15686int
15687main ()
15688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015689return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015690 ;
15691 return 0;
15692}
15693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015694if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015695 ac_cv_var_tzname=yes
15696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015699rm -f core conftest.err conftest.$ac_objext \
15700 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15703$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015704 if test $ac_cv_var_tzname = yes; then
15705
Matthias Kloseb9621712010-04-24 17:59:49 +000015706$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015707
15708 fi
15709fi
15710
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015711
Martin v. Löwis1d459062005-03-14 21:23:33 +000015712# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15714$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015715if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015716 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015717else
15718
Matthias Kloseb9621712010-04-24 17:59:49 +000015719if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015720 ac_cv_working_tzset=no
15721else
Matthias Kloseb9621712010-04-24 17:59:49 +000015722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015723/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015724
15725#include <stdlib.h>
15726#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015727#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015728
15729#if HAVE_TZNAME
15730extern char *tzname[];
15731#endif
15732
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015733int main()
15734{
Brett Cannon18367812003-09-19 00:59:16 +000015735 /* Note that we need to ensure that not only does tzset(3)
15736 do 'something' with localtime, but it works as documented
15737 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015738 This includes making sure that tzname is set properly if
15739 tm->tm_zone does not exist since it is the alternative way
15740 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015741
15742 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015743 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015744 */
15745
Martin v. Löwis1d459062005-03-14 21:23:33 +000015746 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015747 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15748
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015749 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015750 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015751 if (localtime(&groundhogday)->tm_hour != 0)
15752 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015753#if HAVE_TZNAME
15754 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15755 if (strcmp(tzname[0], "UTC") ||
15756 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15757 exit(1);
15758#endif
Brett Cannon18367812003-09-19 00:59:16 +000015759
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015760 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015761 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015762 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015763 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015764#if HAVE_TZNAME
15765 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15766 exit(1);
15767#endif
Brett Cannon18367812003-09-19 00:59:16 +000015768
15769 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15770 tzset();
15771 if (localtime(&groundhogday)->tm_hour != 11)
15772 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015773#if HAVE_TZNAME
15774 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15775 exit(1);
15776#endif
15777
15778#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015779 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15780 exit(1);
15781 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15782 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015783#endif
Brett Cannon18367812003-09-19 00:59:16 +000015784
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015785 exit(0);
15786}
15787
15788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015789if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015790 ac_cv_working_tzset=yes
15791else
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015796fi
15797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015798fi
15799
Matthias Kloseb9621712010-04-24 17:59:49 +000015800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15801$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015802if test "$ac_cv_working_tzset" = yes
15803then
15804
Matthias Kloseb9621712010-04-24 17:59:49 +000015805$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015806
15807fi
15808
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015809# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15811$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015812if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015813 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015814else
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015816/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015817#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015818int
15819main ()
15820{
15821
15822struct stat st;
15823st.st_mtim.tv_nsec = 1;
15824
15825 ;
15826 return 0;
15827}
15828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015830 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015831else
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15835fi
15836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15838$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015839if test "$ac_cv_stat_tv_nsec" = yes
15840then
15841
Matthias Kloseb9621712010-04-24 17:59:49 +000015842$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015843
15844fi
15845
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015846# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15848$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015849if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015851else
Matthias Kloseb9621712010-04-24 17:59:49 +000015852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015853/* end confdefs.h. */
15854#include <sys/stat.h>
15855int
15856main ()
15857{
15858
15859struct stat st;
15860st.st_mtimespec.tv_nsec = 1;
15861
15862 ;
15863 return 0;
15864}
15865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015867 ac_cv_stat_tv_nsec2=yes
15868else
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15872fi
15873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15875$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015876if test "$ac_cv_stat_tv_nsec2" = yes
15877then
15878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015880
15881fi
15882
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015883# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015884ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015885if test "$cross_compiling" = no; then
15886 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15887fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015888
15889for ac_header in curses.h ncurses.h
15890do :
15891 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15892ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15893if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15894 cat >>confdefs.h <<_ACEOF
15895#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15896_ACEOF
15897
15898fi
15899
15900done
15901
15902
15903# On Solaris, term.h requires curses.h
15904for ac_header in term.h
15905do :
15906 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15907#ifdef HAVE_CURSES_H
15908#include <curses.h>
15909#endif
15910
15911"
15912if test "x$ac_cv_header_term_h" = xyes; then :
15913 cat >>confdefs.h <<_ACEOF
15914#define HAVE_TERM_H 1
15915_ACEOF
15916
15917fi
15918
15919done
15920
15921
Jack Jansen666b1e72001-10-31 12:11:48 +000015922# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15924$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015925if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015926 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015927else
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015929/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015930#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015931int
15932main ()
15933{
Jack Jansen666b1e72001-10-31 12:11:48 +000015934
15935 int rtn;
15936 rtn = mvwdelch(0,0,0);
15937
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 ;
15939 return 0;
15940}
15941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015942if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015943 ac_cv_mvwdelch_is_expression=yes
15944else
Matthias Kloseb9621712010-04-24 17:59:49 +000015945 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15948fi
15949
Matthias Kloseb9621712010-04-24 17:59:49 +000015950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15951$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015952
15953if test "$ac_cv_mvwdelch_is_expression" = yes
15954then
Martin v. Löwis11437992002-04-12 09:54:03 +000015955
Matthias Kloseb9621712010-04-24 17:59:49 +000015956$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015957
15958fi
15959
Matthias Kloseb9621712010-04-24 17:59:49 +000015960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15961$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015962if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015964else
Matthias Kloseb9621712010-04-24 17:59:49 +000015965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015966/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015967#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015968int
15969main ()
15970{
Jack Jansen666b1e72001-10-31 12:11:48 +000015971
15972 WINDOW *w;
15973 w->_flags = 0;
15974
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 ;
15976 return 0;
15977}
15978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015979if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015980 ac_cv_window_has_flags=yes
15981else
Matthias Kloseb9621712010-04-24 17:59:49 +000015982 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15985fi
15986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15988$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015989
Jack Jansen666b1e72001-10-31 12:11:48 +000015990
15991if test "$ac_cv_window_has_flags" = yes
15992then
Martin v. Löwis11437992002-04-12 09:54:03 +000015993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015995
15996fi
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15999$as_echo_n "checking for is_term_resized... " >&6; }
16000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016001/* end confdefs.h. */
16002#include <curses.h>
16003int
16004main ()
16005{
16006void *x=is_term_resized
16007 ;
16008 return 0;
16009}
16010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016011if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016012
Matthias Kloseb9621712010-04-24 17:59:49 +000016013$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016014
Matthias Kloseb159a552010-04-25 21:00:44 +000016015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016016$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016017else
Matthias Kloseb9621712010-04-24 17:59:49 +000016018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16019$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016020
16021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16023
Matthias Kloseb9621712010-04-24 17:59:49 +000016024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16025$as_echo_n "checking for resize_term... " >&6; }
16026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016027/* end confdefs.h. */
16028#include <curses.h>
16029int
16030main ()
16031{
16032void *x=resize_term
16033 ;
16034 return 0;
16035}
16036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016037if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016038
Matthias Kloseb9621712010-04-24 17:59:49 +000016039$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016040
Matthias Kloseb159a552010-04-25 21:00:44 +000016041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016042$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016043else
Matthias Kloseb9621712010-04-24 17:59:49 +000016044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16045$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016046
16047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16049
Matthias Kloseb9621712010-04-24 17:59:49 +000016050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16051$as_echo_n "checking for resizeterm... " >&6; }
16052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016053/* end confdefs.h. */
16054#include <curses.h>
16055int
16056main ()
16057{
16058void *x=resizeterm
16059 ;
16060 return 0;
16061}
16062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016063if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016066
Matthias Kloseb159a552010-04-25 21:00:44 +000016067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016068$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016069else
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16071$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016072
16073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016075# last curses configure check
16076CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016077
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16079$as_echo "$as_me: checking for device files" >&6;}
16080
16081if test "x$cross_compiling" = xyes; then
16082 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16084$as_echo_n "checking for /dev/ptmx... " >&6; }
16085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16086$as_echo "not set" >&6; }
16087 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16088 fi
16089 if test "${ac_cv_file__dev_ptc+set}" != set; then
16090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16091$as_echo_n "checking for /dev/ptc... " >&6; }
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16093$as_echo "not set" >&6; }
16094 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16095 fi
16096fi
16097
Matthias Kloseb9621712010-04-24 17:59:49 +000016098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16099$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016100if ${ac_cv_file__dev_ptmx+:} false; then :
16101 $as_echo_n "(cached) " >&6
16102else
16103 test "$cross_compiling" = yes &&
16104 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16105if test -r "/dev/ptmx"; then
16106 ac_cv_file__dev_ptmx=yes
16107else
16108 ac_cv_file__dev_ptmx=no
16109fi
16110fi
16111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16112$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16113if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016114
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016115fi
16116
16117if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016118
Matthias Kloseb9621712010-04-24 17:59:49 +000016119$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016120
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16123$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016124if ${ac_cv_file__dev_ptc+:} false; then :
16125 $as_echo_n "(cached) " >&6
16126else
16127 test "$cross_compiling" = yes &&
16128 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16129if test -r "/dev/ptc"; then
16130 ac_cv_file__dev_ptc=yes
16131else
16132 ac_cv_file__dev_ptc=no
16133fi
16134fi
16135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16136$as_echo "$ac_cv_file__dev_ptc" >&6; }
16137if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016138
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016139fi
16140
16141if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016142
Matthias Kloseb9621712010-04-24 17:59:49 +000016143$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016144
Neal Norwitz865400f2003-03-21 01:42:58 +000016145fi
16146
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016147if test $ac_sys_system = Darwin
16148then
16149 LIBS="$LIBS -framework CoreFoundation"
16150fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016151
Matthias Kloseb9621712010-04-24 17:59:49 +000016152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16153$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016154if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016155 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016156else
Matthias Kloseb9621712010-04-24 17:59:49 +000016157 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016158 ac_cv_have_size_t_format="cross -- assuming yes"
16159
Thomas Wouters477c8d52006-05-27 19:21:47 +000016160else
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016162/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016163
Thomas Wouters477c8d52006-05-27 19:21:47 +000016164#include <stdio.h>
16165#include <stddef.h>
16166#include <string.h>
16167
Christian Heimes2c181612007-12-17 20:04:13 +000016168#ifdef HAVE_SYS_TYPES_H
16169#include <sys/types.h>
16170#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016171
16172#ifdef HAVE_SSIZE_T
16173typedef ssize_t Py_ssize_t;
16174#elif SIZEOF_VOID_P == SIZEOF_LONG
16175typedef long Py_ssize_t;
16176#else
16177typedef int Py_ssize_t;
16178#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016179
Christian Heimes2c181612007-12-17 20:04:13 +000016180int main()
16181{
16182 char buffer[256];
16183
Thomas Wouters477c8d52006-05-27 19:21:47 +000016184 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16185 return 1;
16186
Thomas Wouters89f507f2006-12-13 04:49:30 +000016187 if (strcmp(buffer, "123"))
16188 return 1;
16189
16190 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16191 return 1;
16192
16193 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016194 return 1;
16195
16196 return 0;
16197}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016198
Thomas Wouters477c8d52006-05-27 19:21:47 +000016199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016200if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016201 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016202else
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016207fi
16208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16211$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016212if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016213
Matthias Kloseb9621712010-04-24 17:59:49 +000016214$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016215
16216fi
16217
Matthias Kloseb9621712010-04-24 17:59:49 +000016218ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016219#ifdef HAVE_SYS_TYPES_H
16220#include <sys/types.h>
16221#endif
16222#ifdef HAVE_SYS_SOCKET_H
16223#include <sys/socket.h>
16224#endif
16225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226"
Victor Stinnere0be4232011-10-25 13:06:09 +020016227if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016228
Martin v. Löwis11437992002-04-12 09:54:03 +000016229else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016230
Matthias Kloseb9621712010-04-24 17:59:49 +000016231$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016232
16233fi
16234
Michael W. Hudson54241132001-12-07 15:38:26 +000016235
Matthias Kloseb9621712010-04-24 17:59:49 +000016236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16237$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016238if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016239 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016240else
Matthias Kloseb9621712010-04-24 17:59:49 +000016241 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016242 ac_cv_broken_mbstowcs=no
16243else
Matthias Kloseb9621712010-04-24 17:59:49 +000016244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016245/* end confdefs.h. */
16246
Stefan Krah19c21392012-11-22 23:47:32 +010016247#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016248#include<stdlib.h>
16249int main() {
16250 size_t len = -1;
16251 const char *str = "text";
16252 len = mbstowcs(NULL, str, 0);
16253 return (len != 4);
16254}
16255
16256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016257if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016258 ac_cv_broken_mbstowcs=no
16259else
Matthias Kloseb9621712010-04-24 17:59:49 +000016260 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016264fi
16265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016266fi
16267
Matthias Kloseb9621712010-04-24 17:59:49 +000016268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16269$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016270if test "$ac_cv_broken_mbstowcs" = yes
16271then
16272
Matthias Kloseb9621712010-04-24 17:59:49 +000016273$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016274
16275fi
16276
Antoine Pitroub52ec782009-01-25 16:34:23 +000016277# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16279$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016280
16281# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016282if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016283 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016284if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016285then
16286
Matthias Kloseb9621712010-04-24 17:59:49 +000016287$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016288
Matthias Kloseb9621712010-04-24 17:59:49 +000016289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16290$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016291fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016292if test "$withval" = no
16293then
16294
16295$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16296
Matthias Kloseb9621712010-04-24 17:59:49 +000016297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16298$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016299fi
16300
Antoine Pitrou042b1282010-08-13 21:15:58 +000016301else
16302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16303$as_echo "no value specified" >&6; }
16304fi
16305
Antoine Pitroub52ec782009-01-25 16:34:23 +000016306
Matthias Kloseb17289e2012-03-15 19:51:34 +010016307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16308$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16309if ${ac_cv_computed_gotos+:} false; then :
16310 $as_echo_n "(cached) " >&6
16311else
16312 if test "$cross_compiling" = yes; then :
16313 if test "${with_computed_gotos+set}" = set; then
16314 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16315 else
16316 ac_cv_computed_gotos=no
16317 fi
16318else
16319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320/* end confdefs.h. */
16321
16322int main(int argc, char **argv)
16323{
16324 static void *targets[1] = { &&LABEL1 };
16325 goto LABEL2;
16326LABEL1:
16327 return 0;
16328LABEL2:
16329 goto *targets[0];
16330 return 1;
16331}
16332
16333_ACEOF
16334if ac_fn_c_try_run "$LINENO"; then :
16335 ac_cv_computed_gotos=yes
16336else
16337 ac_cv_computed_gotos=no
16338fi
16339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16340 conftest.$ac_objext conftest.beam conftest.$ac_ext
16341fi
16342
16343fi
16344
16345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16346$as_echo "$ac_cv_computed_gotos" >&6; }
16347case "$ac_cv_computed_gotos" in yes*)
16348
16349$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16350
16351esac
16352
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016353case $ac_sys_system in
16354AIX*)
16355
16356$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16357 ;;
16358esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016359
Michael W. Hudson54241132001-12-07 15:38:26 +000016360
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016361
16362
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016363for h in `(cd $srcdir;echo Python/thread_*.h)`
16364do
16365 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16366done
16367
Michael W. Hudson54241132001-12-07 15:38:26 +000016368
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016369SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16371$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016372for dir in $SRCDIRS; do
16373 if test ! -d $dir; then
16374 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016375 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016376done
Matthias Kloseb9621712010-04-24 17:59:49 +000016377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16378$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016379
Stefan Krah1919b7e2012-03-21 18:25:23 +010016380# Availability of -O2:
16381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16382$as_echo_n "checking for -O2... " >&6; }
16383saved_cflags="$CFLAGS"
16384CFLAGS="-O2"
16385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16386/* end confdefs.h. */
16387
16388int
16389main ()
16390{
16391
16392
16393 ;
16394 return 0;
16395}
16396_ACEOF
16397if ac_fn_c_try_compile "$LINENO"; then :
16398 have_O2=yes
16399else
16400 have_O2=no
16401fi
16402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16404$as_echo "$have_O2" >&6; }
16405CFLAGS="$saved_cflags"
16406
16407# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16408# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16410$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16411saved_cflags="$CFLAGS"
16412CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16413if test "$have_O2" = no; then
16414 CFLAGS=""
16415fi
16416if test "$cross_compiling" = yes; then :
16417 have_glibc_memmove_bug=undefined
16418else
16419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16420/* end confdefs.h. */
16421
16422#include <stdio.h>
16423#include <stdlib.h>
16424#include <string.h>
16425void foo(void *p, void *q) { memmove(p, q, 19); }
16426int main() {
16427 char a[32] = "123456789000000000";
16428 foo(&a[9], a);
16429 if (strcmp(a, "123456789123456789000000000") != 0)
16430 return 1;
16431 foo(a, &a[9]);
16432 if (strcmp(a, "123456789000000000") != 0)
16433 return 1;
16434 return 0;
16435}
16436
16437_ACEOF
16438if ac_fn_c_try_run "$LINENO"; then :
16439 have_glibc_memmove_bug=no
16440else
16441 have_glibc_memmove_bug=yes
16442fi
16443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16444 conftest.$ac_objext conftest.beam conftest.$ac_ext
16445fi
16446
16447CFLAGS="$saved_cflags"
16448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16449$as_echo "$have_glibc_memmove_bug" >&6; }
16450if test "$have_glibc_memmove_bug" = yes; then
16451
16452$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16453
16454fi
16455
16456if test "$have_gcc_asm_for_x87" = yes; then
16457 # Some versions of gcc miscompile inline asm:
16458 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16459 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16460 case $CC in
16461 *gcc*)
16462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16463$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16464 saved_cflags="$CFLAGS"
16465 CFLAGS="-O2"
16466 if test "$cross_compiling" = yes; then :
16467 have_ipa_pure_const_bug=undefined
16468else
16469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16470/* end confdefs.h. */
16471
16472 __attribute__((noinline)) int
16473 foo(int *p) {
16474 int r;
16475 asm ( "movl \$6, (%1)\n\t"
16476 "xorl %0, %0\n\t"
16477 : "=r" (r) : "r" (p) : "memory"
16478 );
16479 return r;
16480 }
16481 int main() {
16482 int p = 8;
16483 if ((foo(&p) ? : p) != 6)
16484 return 1;
16485 return 0;
16486 }
16487
16488_ACEOF
16489if ac_fn_c_try_run "$LINENO"; then :
16490 have_ipa_pure_const_bug=no
16491else
16492 have_ipa_pure_const_bug=yes
16493fi
16494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16495 conftest.$ac_objext conftest.beam conftest.$ac_ext
16496fi
16497
16498 CFLAGS="$saved_cflags"
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16500$as_echo "$have_ipa_pure_const_bug" >&6; }
16501 if test "$have_ipa_pure_const_bug" = yes; then
16502
16503$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16504
16505 fi
16506 ;;
16507 esac
16508fi
16509
Victor Stinner4f5366e2015-01-09 02:13:19 +010016510# Check for stdatomic.h
16511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16512$as_echo_n "checking for stdatomic.h... " >&6; }
16513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16514/* end confdefs.h. */
16515
16516
16517 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016518 atomic_int value = ATOMIC_VAR_INIT(1);
16519 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016520 int main() {
16521 int loaded_value = atomic_load(&value);
16522 return 0;
16523 }
16524
16525
16526_ACEOF
16527if ac_fn_c_try_link "$LINENO"; then :
16528 have_stdatomic_h=yes
16529else
16530 have_stdatomic_h=no
16531fi
16532rm -f core conftest.err conftest.$ac_objext \
16533 conftest$ac_exeext conftest.$ac_ext
16534
16535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16536$as_echo "$have_stdatomic_h" >&6; }
16537
16538if test "$have_stdatomic_h" = yes; then
16539
16540$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16541
16542fi
16543
16544# Check for GCC >= 4.7 __atomic builtins
16545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16546$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16548/* end confdefs.h. */
16549
16550
16551 volatile int val = 1;
16552 int main() {
16553 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16554 return 0;
16555 }
16556
16557
16558_ACEOF
16559if ac_fn_c_try_link "$LINENO"; then :
16560 have_builtin_atomic=yes
16561else
16562 have_builtin_atomic=no
16563fi
16564rm -f core conftest.err conftest.$ac_objext \
16565 conftest$ac_exeext conftest.$ac_ext
16566
16567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16568$as_echo "$have_builtin_atomic" >&6; }
16569
16570if test "$have_builtin_atomic" = yes; then
16571
16572$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16573
16574fi
16575
Ned Deily322f5ba2013-11-21 23:01:59 -080016576# ensurepip option
16577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16578$as_echo_n "checking for ensurepip... " >&6; }
16579
16580# Check whether --with-ensurepip was given.
16581if test "${with_ensurepip+set}" = set; then :
16582 withval=$with_ensurepip;
16583else
16584 with_ensurepip=upgrade
16585fi
16586
16587case $with_ensurepip in #(
16588 yes|upgrade) :
16589 ENSUREPIP=upgrade ;; #(
16590 install) :
16591 ENSUREPIP=install ;; #(
16592 no) :
16593 ENSUREPIP=no ;; #(
16594 *) :
16595 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16596esac
16597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16598$as_echo "$ENSUREPIP" >&6; }
16599
16600
Victor Stinner35a97c02015-03-08 02:59:09 +010016601# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16603$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16605/* end confdefs.h. */
16606
16607
16608 #include <dirent.h>
16609
16610 int main() {
16611 struct dirent entry;
16612 return entry.d_type == DT_UNKNOWN;
16613 }
16614
16615
16616_ACEOF
16617if ac_fn_c_try_link "$LINENO"; then :
16618 have_dirent_d_type=yes
16619else
16620 have_dirent_d_type=no
16621fi
16622rm -f core conftest.err conftest.$ac_objext \
16623 conftest$ac_exeext conftest.$ac_ext
16624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16625$as_echo "$have_dirent_d_type" >&6; }
16626
16627if test "$have_dirent_d_type" = yes; then
16628
16629$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16630
16631fi
16632
Victor Stinner9eb57c52015-03-19 22:21:49 +010016633# check if the Linux getrandom() syscall is available
16634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16635$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16637/* end confdefs.h. */
16638
16639
Victor Stinner1b80b242016-04-12 22:34:58 +020016640 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016641 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016642 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016643
16644 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016645 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016646 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016647 const int flags = GRND_NONBLOCK;
16648 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016649 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016650 return 0;
16651 }
16652
16653
16654_ACEOF
16655if ac_fn_c_try_link "$LINENO"; then :
16656 have_getrandom_syscall=yes
16657else
16658 have_getrandom_syscall=no
16659fi
16660rm -f core conftest.err conftest.$ac_objext \
16661 conftest$ac_exeext conftest.$ac_ext
16662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16663$as_echo "$have_getrandom_syscall" >&6; }
16664
16665if test "$have_getrandom_syscall" = yes; then
16666
16667$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16668
16669fi
16670
Victor Stinner3abf44e2015-09-18 15:38:37 +020016671# check if the getrandom() function is available
16672# the test was written for the Solaris function of <sys/random.h>
16673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16674$as_echo_n "checking for the getrandom() function... " >&6; }
16675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16676/* end confdefs.h. */
16677
16678
16679 #include <sys/random.h>
16680
16681 int main() {
16682 char buffer[1];
16683 const size_t buflen = sizeof(buffer);
16684 const int flags = 0;
16685 /* ignore the result, Python checks for ENOSYS at runtime */
16686 (void)getrandom(buffer, buflen, flags);
16687 return 0;
16688 }
16689
16690
16691_ACEOF
16692if ac_fn_c_try_link "$LINENO"; then :
16693 have_getrandom=yes
16694else
16695 have_getrandom=no
16696fi
16697rm -f core conftest.err conftest.$ac_objext \
16698 conftest$ac_exeext conftest.$ac_ext
16699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16700$as_echo "$have_getrandom" >&6; }
16701
16702if test "$have_getrandom" = yes; then
16703
16704$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16705
16706fi
16707
Guido van Rossum627b2d71993-12-24 10:39:16 +000016708# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016709ac_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 +000016710
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016711ac_config_files="$ac_config_files Modules/ld_so_aix"
16712
Martin v. Löwis11437992002-04-12 09:54:03 +000016713cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016714# This file is a shell script that caches the results of configure
16715# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016716# scripts and configure runs, see configure's option --config-cache.
16717# It is not useful on other systems. If it contains results you don't
16718# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016719#
Martin v. Löwis11437992002-04-12 09:54:03 +000016720# config.status only pays attention to the cache file if you give it
16721# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016722#
Skip Montanaro6dead952003-09-25 14:50:04 +000016723# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016724# loading this file, other *unset* `ac_cv_foo' will be assigned the
16725# following values.
16726
16727_ACEOF
16728
Guido van Rossumf78abae1997-01-21 22:02:36 +000016729# The following way of writing the cache mishandles newlines in values,
16730# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016732# Ultrix sh set writes to stderr and can't be redirected directly,
16733# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734(
16735 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16736 eval ac_val=\$$ac_var
16737 case $ac_val in #(
16738 *${as_nl}*)
16739 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016740 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16741$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742 esac
16743 case $ac_var in #(
16744 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016745 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16746 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747 esac ;;
16748 esac
16749 done
16750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16753 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016754 # `set' does not quote correctly, so add quotes: double-quote
16755 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016756 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016757 "s/'/'\\\\''/g;
16758 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 *)
16761 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016764 esac |
16765 sort
16766) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016771 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16772 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16774 :end' >>confcache
16775if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16776 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016777 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016778 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16779$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016780 if test ! -f "$cache_file" || test -h "$cache_file"; then
16781 cat confcache >"$cache_file"
16782 else
16783 case $cache_file in #(
16784 */* | ?:*)
16785 mv -f confcache "$cache_file"$$ &&
16786 mv -f "$cache_file"$$ "$cache_file" ;; #(
16787 *)
16788 mv -f confcache "$cache_file" ;;
16789 esac
16790 fi
16791 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016792 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016793 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16794$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016795 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016796fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016797rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016799test "x$prefix" = xNONE && prefix=$ac_default_prefix
16800# Let make expand exec_prefix.
16801test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016802
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016803DEFS=-DHAVE_CONFIG_H
16804
Skip Montanaro6dead952003-09-25 14:50:04 +000016805ac_libobjs=
16806ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016807U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016808for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16809 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016811 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16813 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016814 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16815 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016816done
16817LIBOBJS=$ac_libobjs
16818
16819LTLIBOBJS=$ac_ltlibobjs
16820
16821
Martin v. Löwis11437992002-04-12 09:54:03 +000016822
Matthias Kloseb9621712010-04-24 17:59:49 +000016823
Victor Stinnere0be4232011-10-25 13:06:09 +020016824: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016825ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016826ac_clean_files_save=$ac_clean_files
16827ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016828{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16829$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16830as_write_fail=0
16831cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016832#! $SHELL
16833# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016834# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016835# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016836# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016837
Martin v. Löwis11437992002-04-12 09:54:03 +000016838debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016839ac_cs_recheck=false
16840ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016841
Matthias Kloseb9621712010-04-24 17:59:49 +000016842SHELL=\${CONFIG_SHELL-$SHELL}
16843export SHELL
16844_ASEOF
16845cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16846## -------------------- ##
16847## M4sh Initialization. ##
16848## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850# Be more Bourne compatible
16851DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016852if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016853 emulate sh
16854 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016855 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016856 # is contrary to our usage. Disable this feature.
16857 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016859else
Matthias Kloseb9621712010-04-24 17:59:49 +000016860 case `(set -o) 2>/dev/null` in #(
16861 *posix*) :
16862 set -o posix ;; #(
16863 *) :
16864 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016866fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016867
16868
Matthias Kloseb9621712010-04-24 17:59:49 +000016869as_nl='
16870'
16871export as_nl
16872# Printing a long string crashes Solaris 7 /usr/bin/printf.
16873as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16874as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16875as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16876# Prefer a ksh shell builtin over an external printf program on Solaris,
16877# but without wasting forks for bash or zsh.
16878if test -z "$BASH_VERSION$ZSH_VERSION" \
16879 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16880 as_echo='print -r --'
16881 as_echo_n='print -rn --'
16882elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16883 as_echo='printf %s\n'
16884 as_echo_n='printf %s'
16885else
16886 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16887 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16888 as_echo_n='/usr/ucb/echo -n'
16889 else
16890 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16891 as_echo_n_body='eval
16892 arg=$1;
16893 case $arg in #(
16894 *"$as_nl"*)
16895 expr "X$arg" : "X\\(.*\\)$as_nl";
16896 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16897 esac;
16898 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16899 '
16900 export as_echo_n_body
16901 as_echo_n='sh -c $as_echo_n_body as_echo'
16902 fi
16903 export as_echo_body
16904 as_echo='sh -c $as_echo_body as_echo'
16905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016906
16907# The user is always right.
16908if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016909 PATH_SEPARATOR=:
16910 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16911 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16912 PATH_SEPARATOR=';'
16913 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916
16917# IFS
16918# We need space, tab and new line, in precisely that order. Quoting is
16919# there to prevent editors from complaining about space-tab.
16920# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16921# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922IFS=" "" $as_nl"
16923
16924# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016925as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016926case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927 *[\\/]* ) as_myself=$0 ;;
16928 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016929for as_dir in $PATH
16930do
16931 IFS=$as_save_IFS
16932 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016933 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16934 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016937 ;;
16938esac
16939# We did not find ourselves, most probably we were run as `sh COMMAND'
16940# in which case we are not to be found in the path.
16941if test "x$as_myself" = x; then
16942 as_myself=$0
16943fi
16944if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016945 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16946 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947fi
16948
Matthias Kloseb9621712010-04-24 17:59:49 +000016949# Unset variables that we do not need and which cause bugs (e.g. in
16950# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16951# suppresses any "Segmentation fault" message there. '((' could
16952# trigger a bug in pdksh 5.2.14.
16953for as_var in BASH_ENV ENV MAIL MAILPATH
16954do eval test x\${$as_var+set} = xset \
16955 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016956done
16957PS1='$ '
16958PS2='> '
16959PS4='+ '
16960
16961# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016962LC_ALL=C
16963export LC_ALL
16964LANGUAGE=C
16965export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966
Matthias Kloseb9621712010-04-24 17:59:49 +000016967# CDPATH.
16968(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16969
16970
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016971# as_fn_error STATUS ERROR [LINENO LOG_FD]
16972# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016973# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16974# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016975# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016976as_fn_error ()
16977{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016978 as_status=$1; test $as_status -eq 0 && as_status=1
16979 if test "$4"; then
16980 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16981 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016982 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016983 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016984 as_fn_exit $as_status
16985} # as_fn_error
16986
16987
16988# as_fn_set_status STATUS
16989# -----------------------
16990# Set $? to STATUS, without forking.
16991as_fn_set_status ()
16992{
16993 return $1
16994} # as_fn_set_status
16995
16996# as_fn_exit STATUS
16997# -----------------
16998# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16999as_fn_exit ()
17000{
17001 set +e
17002 as_fn_set_status $1
17003 exit $1
17004} # as_fn_exit
17005
17006# as_fn_unset VAR
17007# ---------------
17008# Portably unset VAR.
17009as_fn_unset ()
17010{
17011 { eval $1=; unset $1;}
17012}
17013as_unset=as_fn_unset
17014# as_fn_append VAR VALUE
17015# ----------------------
17016# Append the text in VALUE to the end of the definition contained in VAR. Take
17017# advantage of any shell optimizations that allow amortized linear growth over
17018# repeated appends, instead of the typical quadratic growth present in naive
17019# implementations.
17020if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17021 eval 'as_fn_append ()
17022 {
17023 eval $1+=\$2
17024 }'
17025else
17026 as_fn_append ()
17027 {
17028 eval $1=\$$1\$2
17029 }
17030fi # as_fn_append
17031
17032# as_fn_arith ARG...
17033# ------------------
17034# Perform arithmetic evaluation on the ARGs, and store the result in the
17035# global $as_val. Take advantage of shells that can avoid forks. The arguments
17036# must be portable across $(()) and expr.
17037if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17038 eval 'as_fn_arith ()
17039 {
17040 as_val=$(( $* ))
17041 }'
17042else
17043 as_fn_arith ()
17044 {
17045 as_val=`expr "$@" || test $? -eq 1`
17046 }
17047fi # as_fn_arith
17048
17049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050if expr a : '\(a\)' >/dev/null 2>&1 &&
17051 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17052 as_expr=expr
17053else
17054 as_expr=false
17055fi
17056
17057if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17058 as_basename=basename
17059else
17060 as_basename=false
17061fi
17062
Matthias Kloseb9621712010-04-24 17:59:49 +000017063if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17064 as_dirname=dirname
17065else
17066 as_dirname=false
17067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069as_me=`$as_basename -- "$0" ||
17070$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17071 X"$0" : 'X\(//\)$' \| \
17072 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017073$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074 sed '/^.*\/\([^/][^/]*\)\/*$/{
17075 s//\1/
17076 q
17077 }
17078 /^X\/\(\/\/\)$/{
17079 s//\1/
17080 q
17081 }
17082 /^X\/\(\/\).*/{
17083 s//\1/
17084 q
17085 }
17086 s/.*/./; q'`
17087
Matthias Kloseb9621712010-04-24 17:59:49 +000017088# Avoid depending upon Character Ranges.
17089as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17090as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17091as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17092as_cr_digits='0123456789'
17093as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094
17095ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017096case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017098 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017100 xy) ECHO_C='\c';;
17101 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17102 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103 esac;;
17104*)
17105 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017107
Martin v. Löwis11437992002-04-12 09:54:03 +000017108rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109if test -d conf$$.dir; then
17110 rm -f conf$$.dir/conf$$.file
17111else
17112 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017113 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017115if (echo >conf$$.file) 2>/dev/null; then
17116 if ln -s conf$$.file conf$$ 2>/dev/null; then
17117 as_ln_s='ln -s'
17118 # ... but there are two gotchas:
17119 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17120 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017121 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017122 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017123 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017124 elif ln conf$$.file conf$$ 2>/dev/null; then
17125 as_ln_s=ln
17126 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017127 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017128 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017129else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017130 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17133rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135
17136# as_fn_mkdir_p
17137# -------------
17138# Create "$as_dir" as a directory, including parents if necessary.
17139as_fn_mkdir_p ()
17140{
17141
17142 case $as_dir in #(
17143 -*) as_dir=./$as_dir;;
17144 esac
17145 test -d "$as_dir" || eval $as_mkdir_p || {
17146 as_dirs=
17147 while :; do
17148 case $as_dir in #(
17149 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17150 *) as_qdir=$as_dir;;
17151 esac
17152 as_dirs="'$as_qdir' $as_dirs"
17153 as_dir=`$as_dirname -- "$as_dir" ||
17154$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17155 X"$as_dir" : 'X\(//\)[^/]' \| \
17156 X"$as_dir" : 'X\(//\)$' \| \
17157 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17158$as_echo X"$as_dir" |
17159 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17160 s//\1/
17161 q
17162 }
17163 /^X\(\/\/\)[^/].*/{
17164 s//\1/
17165 q
17166 }
17167 /^X\(\/\/\)$/{
17168 s//\1/
17169 q
17170 }
17171 /^X\(\/\).*/{
17172 s//\1/
17173 q
17174 }
17175 s/.*/./; q'`
17176 test -d "$as_dir" && break
17177 done
17178 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017179 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017180
17181
17182} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017183if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017184 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017185else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017186 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017187 as_mkdir_p=false
17188fi
17189
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017190
17191# as_fn_executable_p FILE
17192# -----------------------
17193# Test if FILE is an executable regular file.
17194as_fn_executable_p ()
17195{
17196 test -f "$1" && test -x "$1"
17197} # as_fn_executable_p
17198as_test_x='test -x'
17199as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017200
17201# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017202as_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 +000017203
17204# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017205as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017206
17207
Martin v. Löwis11437992002-04-12 09:54:03 +000017208exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017209## ----------------------------------- ##
17210## Main body of $CONFIG_STATUS script. ##
17211## ----------------------------------- ##
17212_ASEOF
17213test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017214
Matthias Kloseb9621712010-04-24 17:59:49 +000017215cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17216# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017217# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218# values after options handling.
17219ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017220This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017221generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017222
17223 CONFIG_FILES = $CONFIG_FILES
17224 CONFIG_HEADERS = $CONFIG_HEADERS
17225 CONFIG_LINKS = $CONFIG_LINKS
17226 CONFIG_COMMANDS = $CONFIG_COMMANDS
17227 $ $0 $@
17228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229on `(hostname || uname -n) 2>/dev/null | sed 1q`
17230"
17231
Martin v. Löwis11437992002-04-12 09:54:03 +000017232_ACEOF
17233
Matthias Kloseb9621712010-04-24 17:59:49 +000017234case $ac_config_files in *"
17235"*) set x $ac_config_files; shift; ac_config_files=$*;;
17236esac
17237
17238case $ac_config_headers in *"
17239"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17240esac
17241
17242
17243cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017244# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017245config_files="$ac_config_files"
17246config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017249
Matthias Kloseb9621712010-04-24 17:59:49 +000017250cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017251ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017252\`$as_me' instantiates files and other configuration actions
17253from templates according to the current configuration. Unless the files
17254and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017255
Matthias Kloseb9621712010-04-24 17:59:49 +000017256Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017257
17258 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017260 --config print configuration, then exit
17261 -q, --quiet, --silent
17262 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 -d, --debug don't remove temporary files
17264 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017265 --file=FILE[:TEMPLATE]
17266 instantiate the configuration file FILE
17267 --header=FILE[:TEMPLATE]
17268 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017269
17270Configuration files:
17271$config_files
17272
17273Configuration headers:
17274$config_headers
17275
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017276Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17280ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017281ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017282python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017283configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017284 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017285
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017286Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017287This config.status script is free software; the Free Software Foundation
17288gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289
17290ac_pwd='$ac_pwd'
17291srcdir='$srcdir'
17292INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017293MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017294test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017295_ACEOF
17296
Matthias Kloseb9621712010-04-24 17:59:49 +000017297cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17298# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017299ac_need_defaults=:
17300while test $# != 0
17301do
17302 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017303 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017304 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17305 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017306 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017307 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017308 --*=)
17309 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17310 ac_optarg=
17311 ac_shift=:
17312 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017314 ac_option=$1
17315 ac_optarg=$2
17316 ac_shift=shift
17317 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017318 esac
17319
Skip Montanaro6dead952003-09-25 14:50:04 +000017320 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017321 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017322 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17323 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017325 $as_echo "$ac_cs_version"; exit ;;
17326 --config | --confi | --conf | --con | --co | --c )
17327 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 debug=: ;;
17330 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017331 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017332 case $ac_optarg in
17333 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017334 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017335 esac
17336 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017337 ac_need_defaults=false;;
17338 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017339 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017340 case $ac_optarg in
17341 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17342 esac
17343 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017344 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345 --he | --h)
17346 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017347 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017348Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017351 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17352 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17353 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017354
17355 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017356 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017357Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017358
Matthias Kloseb9621712010-04-24 17:59:49 +000017359 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017361
17362 esac
17363 shift
17364done
17365
Skip Montanaro6dead952003-09-25 14:50:04 +000017366ac_configure_extra_args=
17367
17368if $ac_cs_silent; then
17369 exec 6>/dev/null
17370 ac_configure_extra_args="$ac_configure_extra_args --silent"
17371fi
17372
17373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017374cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017375if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017376 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017377 shift
17378 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17379 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017381 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017382fi
17383
Martin v. Löwis11437992002-04-12 09:54:03 +000017384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386exec 5>>config.log
17387{
17388 echo
17389 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17390## Running $as_me. ##
17391_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017392 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017396cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017398
Matthias Kloseb9621712010-04-24 17:59:49 +000017399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400
17401# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017402for ac_config_target in $ac_config_targets
17403do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 case $ac_config_target in
17405 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17406 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17407 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017408 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17409 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17411 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017412 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017413 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017414 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415
Victor Stinnere0be4232011-10-25 13:06:09 +020017416 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017417 esac
17418done
17419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420
Martin v. Löwis11437992002-04-12 09:54:03 +000017421# If the user did not use the arguments to specify the items to instantiate,
17422# then the envvar interface is used. Set only those that are not.
17423# We use the long form for the default assignment because of an extremely
17424# bizarre bug on SunOS 4.1.3.
17425if $ac_need_defaults; then
17426 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17427 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17428fi
17429
Skip Montanaro6dead952003-09-25 14:50:04 +000017430# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017432# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433# Hook for its removal unless debugging.
17434# Note that there is a small window in which the directory will not be cleaned:
17435# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017436$debug ||
17437{
Victor Stinnere0be4232011-10-25 13:06:09 +020017438 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017440 : "${ac_tmp:=$tmp}"
17441 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017443 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017444}
Martin v. Löwis11437992002-04-12 09:54:03 +000017445# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017446
Martin v. Löwis11437992002-04-12 09:54:03 +000017447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017449 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017450} ||
17451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452 tmp=./conf$$-$RANDOM
17453 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017454} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017455ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017456
Matthias Kloseb9621712010-04-24 17:59:49 +000017457# Set up the scripts for CONFIG_FILES section.
17458# No need to generate them if there are no CONFIG_FILES.
17459# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017461
Matthias Kloseb9621712010-04-24 17:59:49 +000017462
17463ac_cr=`echo X | tr X '\015'`
17464# On cygwin, bash can eat \r inside `` if the user requested igncr.
17465# But we know of no other shell where ac_cr would be empty at this
17466# point, so we can use a bashism as a fallback.
17467if test "x$ac_cr" = x; then
17468 eval ac_cr=\$\'\\r\'
17469fi
17470ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17471if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017472 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017473else
17474 ac_cs_awk_cr=$ac_cr
17475fi
17476
Victor Stinnere0be4232011-10-25 13:06:09 +020017477echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017478_ACEOF
17479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480
Matthias Kloseb9621712010-04-24 17:59:49 +000017481{
17482 echo "cat >conf$$subs.awk <<_ACEOF" &&
17483 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17484 echo "_ACEOF"
17485} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017486 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17487ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017488ac_delim='%!_!# '
17489for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017490 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017491 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492
Matthias Kloseb9621712010-04-24 17:59:49 +000017493 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17494 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495 break
17496 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017497 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498 else
17499 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017500 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501done
Matthias Kloseb9621712010-04-24 17:59:49 +000017502rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503
Matthias Kloseb9621712010-04-24 17:59:49 +000017504cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017505cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017507sed -n '
17508h
17509s/^/S["/; s/!.*/"]=/
17510p
17511g
17512s/^[^!]*!//
17513:repl
17514t repl
17515s/'"$ac_delim"'$//
17516t delim
17517:nl
17518h
17519s/\(.\{148\}\)..*/\1/
17520t more1
17521s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17522p
17523n
17524b repl
17525:more1
17526s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17527p
17528g
17529s/.\{148\}//
17530t nl
17531:delim
17532h
17533s/\(.\{148\}\)..*/\1/
17534t more2
17535s/["\\]/\\&/g; s/^/"/; s/$/"/
17536p
17537b
17538:more2
17539s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17540p
17541g
17542s/.\{148\}//
17543t delim
17544' <conf$$subs.awk | sed '
17545/^[^""]/{
17546 N
17547 s/\n//
17548}
17549' >>$CONFIG_STATUS || ac_write_fail=1
17550rm -f conf$$subs.awk
17551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17552_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017553cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017554 for (key in S) S_is_set[key] = 1
17555 FS = ""
17556
17557}
17558{
17559 line = $ 0
17560 nfields = split(line, field, "@")
17561 substed = 0
17562 len = length(field[1])
17563 for (i = 2; i < nfields; i++) {
17564 key = field[i]
17565 keylen = length(key)
17566 if (S_is_set[key]) {
17567 value = S[key]
17568 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17569 len += length(value) + length(field[++i])
17570 substed = 1
17571 } else
17572 len += 1 + keylen
17573 }
17574
17575 print line
17576}
17577
17578_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017580cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17581if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17582 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17583else
17584 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017585fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017586 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017587_ACEOF
17588
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017589# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17590# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591# trailing colons and then remove the whole line if VPATH becomes empty
17592# (actually we leave an empty line to preserve line numbers).
17593if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017594 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17595h
17596s///
17597s/^/:/
17598s/[ ]*$/:/
17599s/:\$(srcdir):/:/g
17600s/:\${srcdir}:/:/g
17601s/:@srcdir@:/:/g
17602s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017604x
17605s/\(=[ ]*\).*/\1/
17606G
17607s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608s/^[^=]*=[ ]*$//
17609}'
17610fi
17611
Matthias Kloseb9621712010-04-24 17:59:49 +000017612cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017613fi # test -n "$CONFIG_FILES"
17614
Matthias Kloseb9621712010-04-24 17:59:49 +000017615# Set up the scripts for CONFIG_HEADERS section.
17616# No need to generate them if there are no CONFIG_HEADERS.
17617# This happens for instance with `./config.status Makefile'.
17618if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017619cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017620BEGIN {
17621_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622
Matthias Kloseb9621712010-04-24 17:59:49 +000017623# Transform confdefs.h into an awk script `defines.awk', embedded as
17624# here-document in config.status, that substitutes the proper values into
17625# config.h.in to produce config.h.
17626
17627# Create a delimiter string that does not exist in confdefs.h, to ease
17628# handling of long lines.
17629ac_delim='%!_!# '
17630for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017631 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17632 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017633 break
17634 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017635 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017636 else
17637 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17638 fi
17639done
17640
17641# For the awk script, D is an array of macro values keyed by name,
17642# likewise P contains macro parameters if any. Preserve backslash
17643# newline sequences.
17644
17645ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17646sed -n '
17647s/.\{148\}/&'"$ac_delim"'/g
17648t rset
17649:rset
17650s/^[ ]*#[ ]*define[ ][ ]*/ /
17651t def
17652d
17653:def
17654s/\\$//
17655t bsnl
17656s/["\\]/\\&/g
17657s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17658D["\1"]=" \3"/p
17659s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17660d
17661:bsnl
17662s/["\\]/\\&/g
17663s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17664D["\1"]=" \3\\\\\\n"\\/p
17665t cont
17666s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17667t cont
17668d
17669:cont
17670n
17671s/.\{148\}/&'"$ac_delim"'/g
17672t clear
17673:clear
17674s/\\$//
17675t bsnlc
17676s/["\\]/\\&/g; s/^/"/; s/$/"/p
17677d
17678:bsnlc
17679s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17680b cont
17681' <confdefs.h | sed '
17682s/'"$ac_delim"'/"\\\
17683"/g' >>$CONFIG_STATUS || ac_write_fail=1
17684
17685cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17686 for (key in D) D_is_set[key] = 1
17687 FS = ""
17688}
17689/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17690 line = \$ 0
17691 split(line, arg, " ")
17692 if (arg[1] == "#") {
17693 defundef = arg[2]
17694 mac1 = arg[3]
17695 } else {
17696 defundef = substr(arg[1], 2)
17697 mac1 = arg[2]
17698 }
17699 split(mac1, mac2, "(") #)
17700 macro = mac2[1]
17701 prefix = substr(line, 1, index(line, defundef) - 1)
17702 if (D_is_set[macro]) {
17703 # Preserve the white space surrounding the "#".
17704 print prefix "define", macro P[macro] D[macro]
17705 next
17706 } else {
17707 # Replace #undef with comments. This is necessary, for example,
17708 # in the case of _POSIX_SOURCE, which is predefined and required
17709 # on some systems where configure will not decide to define it.
17710 if (defundef == "undef") {
17711 print "/*", prefix defundef, macro, "*/"
17712 next
17713 }
17714 }
17715}
17716{ print }
17717_ACAWK
17718_ACEOF
17719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017720 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017721fi # test -n "$CONFIG_HEADERS"
17722
17723
17724eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17725shift
17726for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727do
17728 case $ac_tag in
17729 :[FHLC]) ac_mode=$ac_tag; continue;;
17730 esac
17731 case $ac_mode$ac_tag in
17732 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017733 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 :[FH]-) ac_tag=-:-;;
17735 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17736 esac
17737 ac_save_IFS=$IFS
17738 IFS=:
17739 set x $ac_tag
17740 IFS=$ac_save_IFS
17741 shift
17742 ac_file=$1
17743 shift
17744
17745 case $ac_mode in
17746 :L) ac_source=$1;;
17747 :[FH])
17748 ac_file_inputs=
17749 for ac_f
17750 do
17751 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017752 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753 *) # Look for the file first in the build tree, then in the source tree
17754 # (if the path is not absolute). The absolute path cannot be DOS-style,
17755 # because $ac_f cannot contain `:'.
17756 test -f "$ac_f" ||
17757 case $ac_f in
17758 [\\/$]*) false;;
17759 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17760 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017761 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17764 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765 done
17766
17767 # Let's still pretend it is `configure' which instantiates (i.e., don't
17768 # use $as_me), people would be surprised to read:
17769 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017770 configure_input='Generated from '`
17771 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17772 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773 if test x"$ac_file" != x-; then
17774 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017775 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17776$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017778 # Neutralize special characters interpreted by sed in replacement strings.
17779 case $configure_input in #(
17780 *\&* | *\|* | *\\* )
17781 ac_sed_conf_input=`$as_echo "$configure_input" |
17782 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17783 *) ac_sed_conf_input=$configure_input;;
17784 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785
17786 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017787 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17788 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017789 esac
17790 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017791 esac
17792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017794$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017795 X"$ac_file" : 'X\(//\)[^/]' \| \
17796 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017798$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17800 s//\1/
17801 q
17802 }
17803 /^X\(\/\/\)[^/].*/{
17804 s//\1/
17805 q
17806 }
17807 /^X\(\/\/\)$/{
17808 s//\1/
17809 q
17810 }
17811 /^X\(\/\).*/{
17812 s//\1/
17813 q
17814 }
17815 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017816 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017817 ac_builddir=.
17818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819case "$ac_dir" in
17820.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17821*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017822 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017824 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825 case $ac_top_builddir_sub in
17826 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17827 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17828 esac ;;
17829esac
17830ac_abs_top_builddir=$ac_pwd
17831ac_abs_builddir=$ac_pwd$ac_dir_suffix
17832# for backward compatibility:
17833ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017834
17835case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017837 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838 ac_top_srcdir=$ac_top_builddir_sub
17839 ac_abs_top_srcdir=$ac_pwd ;;
17840 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842 ac_top_srcdir=$srcdir
17843 ac_abs_top_srcdir=$srcdir ;;
17844 *) # Relative name.
17845 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17846 ac_top_srcdir=$ac_top_build_prefix$srcdir
17847 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017848esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017850
Martin v. Löwis11437992002-04-12 09:54:03 +000017851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017852 case $ac_mode in
17853 :F)
17854 #
17855 # CONFIG_FILE
17856 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017857
17858 case $INSTALL in
17859 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017861 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017862 ac_MKDIR_P=$MKDIR_P
17863 case $MKDIR_P in
17864 [\\/$]* | ?:[\\/]* ) ;;
17865 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17866 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017867_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868
Matthias Kloseb9621712010-04-24 17:59:49 +000017869cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870# If the template does not know about datarootdir, expand it.
17871# FIXME: This hack should be removed a few years after 2.60.
17872ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017873ac_sed_dataroot='
17874/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017875 p
17876 q
17877}
17878/@datadir@/p
17879/@docdir@/p
17880/@infodir@/p
17881/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017882/@mandir@/p'
17883case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884*datarootdir*) ac_datarootdir_seen=yes;;
17885*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017886 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17887$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017889cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890 ac_datarootdir_hack='
17891 s&@datadir@&$datadir&g
17892 s&@docdir@&$docdir&g
17893 s&@infodir@&$infodir&g
17894 s&@localedir@&$localedir&g
17895 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017896 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897esac
17898_ACEOF
17899
17900# Neutralize VPATH when `$srcdir' = `.'.
17901# Shell code in configure.ac might set extrasub.
17902# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017903cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17904ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017905$extrasub
17906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017907cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017908:t
17909/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017910s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017911s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017912s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913s&@srcdir@&$ac_srcdir&;t t
17914s&@abs_srcdir@&$ac_abs_srcdir&;t t
17915s&@top_srcdir@&$ac_top_srcdir&;t t
17916s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17917s&@builddir@&$ac_builddir&;t t
17918s&@abs_builddir@&$ac_abs_builddir&;t t
17919s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17920s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017921s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017923"
Victor Stinnere0be4232011-10-25 13:06:09 +020017924eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17925 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017927test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017928 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17929 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17930 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017932which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017933$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017934which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017935
Victor Stinnere0be4232011-10-25 13:06:09 +020017936 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017937 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017938 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17939 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017940 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017941 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942 ;;
17943 :H)
17944 #
17945 # CONFIG_HEADER
17946 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017947 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017948 {
17949 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017950 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17951 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017952 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017953 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017954 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17955$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017956 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017957 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017958 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017959 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 fi
17961 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017962 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017963 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017964 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017965 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017968
17969 esac
17970
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017971
17972 case $ac_file$ac_mode in
17973 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17974
17975 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976done # for ac_tag
17977
Guido van Rossum627b2d71993-12-24 10:39:16 +000017978
Matthias Kloseb9621712010-04-24 17:59:49 +000017979as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017980_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017981ac_clean_files=$ac_clean_files_save
17982
Matthias Kloseb9621712010-04-24 17:59:49 +000017983test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017984 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017985
Martin v. Löwis11437992002-04-12 09:54:03 +000017986
17987# configure is writing to config.log, and then calls config.status.
17988# config.status does its own redirection, appending to config.log.
17989# Unfortunately, on DOS this fails, as config.log is still kept open
17990# by configure, so config.status won't be able to write to it; its
17991# output is simply discarded. So we exec the FD to /dev/null,
17992# effectively closing config.log, so it can be properly (re)opened and
17993# appended to by config.status. When coming back to configure, we
17994# need to make the FD available again.
17995if test "$no_create" != yes; then
17996 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017997 ac_config_status_args=
17998 test "$silent" = yes &&
17999 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018000 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018001 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 exec 5>>config.log
18003 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18004 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018005 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018006fi
18007if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18008 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18009$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018010fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018011
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018012
Christian Heimes75ed8902013-11-20 01:11:18 +010018013echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018014if test ! -f Modules/Setup
18015then
18016 cp $srcdir/Modules/Setup.dist Modules/Setup
18017fi
18018
Christian Heimes75ed8902013-11-20 01:11:18 +010018019echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018020if test ! -f Modules/Setup.local
18021then
18022 echo "# Edit this file for local setup changes" >Modules/Setup.local
18023fi
18024
Christian Heimes75ed8902013-11-20 01:11:18 +010018025echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018026$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18027 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018028 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018029mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018030
18031if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18032 echo "" >&6
18033 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018034 echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000018035 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018036 echo "" >&6
18037 echo "" >&6
18038fi
18039