blob: 3a28cad9678a355870019396e653165517b5cf0e [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
INADA Naokia8f8d5b2017-06-29 00:31:53 +0900786runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_threads
834with_thread
835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000838with_c_locale_coercion
839with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700841with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_fpectl
843with_libm
844with_libc
845enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000846with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800847with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000848'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 ac_precious_vars='build_alias
850host_alias
851target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100852MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853CC
854CFLAGS
855LDFLAGS
856LIBS
857CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100858CPP
859PKG_CONFIG
860PKG_CONFIG_PATH
861PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865ac_init_help=
866ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000867ac_unrecognized_opts=
868ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# The variables have the same names as the options, with
870# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874no_recursion=
875prefix=NONE
876program_prefix=NONE
877program_suffix=NONE
878program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883x_includes=NONE
884x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886# Installation directory options.
887# These are left unexpanded so users can "make install exec_prefix=/foo"
888# and all the variables that are supposed to be based on exec_prefix
889# by default will actually change.
890# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892bindir='${exec_prefix}/bin'
893sbindir='${exec_prefix}/sbin'
894libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895datarootdir='${prefix}/share'
896datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897sysconfdir='${prefix}/etc'
898sharedstatedir='${prefix}/com'
899localstatedir='${prefix}/var'
INADA Naokia8f8d5b2017-06-29 00:31:53 +0900900runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901includedir='${prefix}/include'
902oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
904infodir='${datarootdir}/info'
905htmldir='${docdir}'
906dvidir='${docdir}'
907pdfdir='${docdir}'
908psdir='${docdir}'
909libdir='${exec_prefix}/lib'
910localedir='${datarootdir}/locale'
911mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 # If the previous option needs an argument, assign it.
918 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 ac_prev=
921 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200925 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
926 *=) ac_optarg= ;;
927 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Accept the important Cygnus configure options, so we can diagnose typos.
931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 case $ac_dashdash$ac_option in
933 --)
934 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -bindir | --bindir | --bindi | --bind | --bin | --bi)
937 ac_prev=bindir ;;
938 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940
941 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 -cache-file | --cache-file | --cache-fil | --cache-fi \
947 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
948 ac_prev=cache_file ;;
949 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
950 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 cache_file=$ac_optarg ;;
952
953 --config-cache | -C)
954 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
962 | --dataroo | --dataro | --datar)
963 ac_prev=datarootdir ;;
964 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
965 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
966 datarootdir=$ac_optarg ;;
967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983
984 -docdir | --docdir | --docdi | --doc | --do)
985 ac_prev=docdir ;;
986 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
987 docdir=$ac_optarg ;;
988
989 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
990 ac_prev=dvidir ;;
991 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
992 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200998 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000999 ac_useropt_orig=$ac_useropt
1000 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1001 case $ac_user_opts in
1002 *"
1003"enable_$ac_useropt"
1004"*) ;;
1005 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1006 ac_unrecognized_sep=', ';;
1007 esac
1008 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1011 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1012 | --exec | --exe | --ex)
1013 ac_prev=exec_prefix ;;
1014 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1015 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1016 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 # Obsolete; use --with-gas.
1021 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 -help | --help | --hel | --he | -h)
1024 ac_init_help=long ;;
1025 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1026 ac_init_help=recursive ;;
1027 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1028 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1036 ac_prev=htmldir ;;
1037 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1038 | --ht=*)
1039 htmldir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -includedir | --includedir | --includedi | --included | --include \
1042 | --includ | --inclu | --incl | --inc)
1043 ac_prev=includedir ;;
1044 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1045 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -infodir | --infodir | --infodi | --infod | --info | --inf)
1049 ac_prev=infodir ;;
1050 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libdir | --libdir | --libdi | --libd)
1054 ac_prev=libdir ;;
1055 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
1058 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1059 | --libexe | --libex | --libe)
1060 ac_prev=libexecdir ;;
1061 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1062 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 -localedir | --localedir | --localedi | --localed | --locale)
1066 ac_prev=localedir ;;
1067 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1068 localedir=$ac_optarg ;;
1069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 ac_prev=localstatedir ;;
1073 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1078 ac_prev=mandir ;;
1079 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Obsolete; use --without-fp.
1084 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 no_create=yes ;;
1089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1091 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1092 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1095 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1096 | --oldin | --oldi | --old | --ol | --o)
1097 ac_prev=oldincludedir ;;
1098 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1099 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1100 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1104 ac_prev=prefix ;;
1105 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1109 | --program-pre | --program-pr | --program-p)
1110 ac_prev=program_prefix ;;
1111 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1112 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1116 | --program-suf | --program-su | --program-s)
1117 ac_prev=program_suffix ;;
1118 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1119 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -program-transform-name | --program-transform-name \
1123 | --program-transform-nam | --program-transform-na \
1124 | --program-transform-n | --program-transform- \
1125 | --program-transform | --program-transfor \
1126 | --program-transfo | --program-transf \
1127 | --program-trans | --program-tran \
1128 | --progr-tra | --program-tr | --program-t)
1129 ac_prev=program_transform_name ;;
1130 -program-transform-name=* | --program-transform-name=* \
1131 | --program-transform-nam=* | --program-transform-na=* \
1132 | --program-transform-n=* | --program-transform-=* \
1133 | --program-transform=* | --program-transfor=* \
1134 | --program-transfo=* | --program-transf=* \
1135 | --program-trans=* | --program-tran=* \
1136 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1140 ac_prev=pdfdir ;;
1141 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1142 pdfdir=$ac_optarg ;;
1143
1144 -psdir | --psdir | --psdi | --psd | --ps)
1145 ac_prev=psdir ;;
1146 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1147 psdir=$ac_optarg ;;
1148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1150 | -silent | --silent | --silen | --sile | --sil)
1151 silent=yes ;;
1152
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001153 -runstatedir | --runstatedir | --runstatedi | --runstated \
1154 | --runstate | --runstat | --runsta | --runst | --runs \
1155 | --run | --ru | --r)
1156 ac_prev=runstatedir ;;
1157 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1158 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1159 | --run=* | --ru=* | --r=*)
1160 runstatedir=$ac_optarg ;;
1161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1163 ac_prev=sbindir ;;
1164 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1165 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
1168 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1169 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1170 | --sharedst | --shareds | --shared | --share | --shar \
1171 | --sha | --sh)
1172 ac_prev=sharedstatedir ;;
1173 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1174 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1175 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1176 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179 -site | --site | --sit)
1180 ac_prev=site ;;
1181 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1185 ac_prev=srcdir ;;
1186 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1190 | --syscon | --sysco | --sysc | --sys | --sy)
1191 ac_prev=sysconfdir ;;
1192 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1193 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001195
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1202 verbose=yes ;;
1203
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 -version | --version | --versio | --versi | --vers | -V)
1205 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 ac_useropt_orig=$ac_useropt
1229 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1230 case $ac_user_opts in
1231 *"
1232"with_$ac_useropt"
1233"*) ;;
1234 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1235 ac_unrecognized_sep=', ';;
1236 esac
1237 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239 --x)
1240 # Obsolete; use --with-x.
1241 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1244 | --x-incl | --x-inc | --x-in | --x-i)
1245 ac_prev=x_includes ;;
1246 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1247 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
1250 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1251 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1252 ac_prev=x_libraries ;;
1253 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1254 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1258Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ;;
1260
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 *=*)
1262 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1263 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 case $ac_envvar in #(
1265 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 export $ac_envvar ;;
1270
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001271 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001276 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 ;;
1278
1279 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280done
1281
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285fi
1286
Matthias Kloseb9621712010-04-24 17:59:49 +00001287if test -n "$ac_unrecognized_opts"; then
1288 case $enable_option_checking in
1289 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1292 esac
1293fi
1294
1295# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1297 datadir sysconfdir sharedstatedir localstatedir includedir \
1298 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001299 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001302 # Remove trailing slashes.
1303 case $ac_val in
1304 */ )
1305 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1306 eval $ac_var=\$ac_val;;
1307 esac
1308 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001309 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 [\\/$]* | ?:[\\/]* ) continue;;
1311 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001313 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001314done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# There might be people who depend on the old broken behavior: `$host'
1317# used to hold the argument of --host etc.
1318# FIXME: To remove some day.
1319build=$build_alias
1320host=$host_alias
1321target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Martin v. Löwis11437992002-04-12 09:54:03 +00001323# FIXME: To remove some day.
1324if test "x$host_alias" != x; then
1325 if test "x$build_alias" = x; then
1326 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001327 elif test "x$build_alias" != "x$host_alias"; then
1328 cross_compiling=yes
1329 fi
1330fi
1331
1332ac_tool_prefix=
1333test -n "$host_alias" && ac_tool_prefix=$host_alias-
1334
1335test "$silent" = yes && exec 6>/dev/null
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338ac_pwd=`pwd` && test -n "$ac_pwd" &&
1339ac_ls_di=`ls -di .` &&
1340ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344
1345
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346# Find the source files, if location was not specified.
1347if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001348 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 ac_confdir=`$as_dirname -- "$as_myself" ||
1351$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1352 X"$as_myself" : 'X\(//\)[^/]' \| \
1353 X"$as_myself" : 'X\(//\)$' \| \
1354 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1355$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)[^/].*/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\/\)$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\).*/{
1369 s//\1/
1370 q
1371 }
1372 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001373 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375 srcdir=..
1376 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377else
1378 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380if test ! -r "$srcdir/$ac_unique_file"; then
1381 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387 pwd)`
1388# When building in place, set srcdir=.
1389if test "$ac_abs_confdir" = "$ac_pwd"; then
1390 srcdir=.
1391fi
1392# Remove unnecessary trailing slashes from srcdir.
1393# Double slashes in file names in object file debugging info
1394# mess up M-x gdb in Emacs.
1395case $srcdir in
1396*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397esac
1398for ac_var in $ac_precious_vars; do
1399 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_env_${ac_var}_value=\$${ac_var}
1401 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1402 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1403done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001404
Martin v. Löwis11437992002-04-12 09:54:03 +00001405#
1406# Report the --help message.
1407#
1408if test "$ac_init_help" = "long"; then
1409 # Omit some internal or obsolete options to make the list less imposing.
1410 # This message is too long to be a string in the A/UX 3.1 sh.
1411 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001412\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
1414Usage: $0 [OPTION]... [VAR=VALUE]...
1415
1416To assign environment variables (e.g., CC, CFLAGS...), specify them as
1417VAR=VALUE. See below for descriptions of some of the useful variables.
1418
1419Defaults for the options are specified in brackets.
1420
1421Configuration:
1422 -h, --help display this help and exit
1423 --help=short display options specific to this package
1424 --help=recursive display the short help of all the included packages
1425 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001426 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --cache-file=FILE cache test results in FILE [disabled]
1428 -C, --config-cache alias for \`--cache-file=config.cache'
1429 -n, --no-create do not create output files
1430 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432Installation directories:
1433 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438By default, \`make install' will install all the files in
1439\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1440an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1441for instance \`--prefix=\$HOME'.
1442
1443For better control, use the options below.
1444
1445Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --bindir=DIR user executables [EPREFIX/bin]
1447 --sbindir=DIR system admin executables [EPREFIX/sbin]
1448 --libexecdir=DIR program executables [EPREFIX/libexec]
1449 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1450 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1451 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001452 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001453 --libdir=DIR object code libraries [EPREFIX/lib]
1454 --includedir=DIR C header files [PREFIX/include]
1455 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1456 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1457 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1458 --infodir=DIR info documentation [DATAROOTDIR/info]
1459 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1460 --mandir=DIR man documentation [DATAROOTDIR/man]
1461 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1462 --htmldir=DIR html documentation [DOCDIR]
1463 --dvidir=DIR dvi documentation [DOCDIR]
1464 --pdfdir=DIR pdf documentation [DOCDIR]
1465 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466_ACEOF
1467
1468 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001469
1470System types:
1471 --build=BUILD configure for building on BUILD [guessed]
1472 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001473 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001474_ACEOF
1475fi
1476
1477if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001479 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001480 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 cat <<\_ACEOF
1482
1483Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1486 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001487 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001488 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --enable-framework[=INSTALLDIR]
1490 Build (MacOSX|Darwin) framework
1491 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001492 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001493 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1494 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001495 --enable-loadable-sqlite-extensions
1496 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --enable-ipv6 Enable ipv6 (with ipv4) support
1498 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001499 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001500 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001501
1502Optional Packages:
1503 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1504 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001505 --with-universal-archs=ARCH
1506 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001507 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001508 --with-framework-name=FRAMEWORK
1509 specify an alternate name of the framework built
1510 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001512 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-cxx-main=<compiler>
1514 compile main() and link python executable with C++
1515 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with-suffix=.exe set executable suffix
1517 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001518 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001519 --with-lto Enable Link Time Optimization in PGO builds.
1520 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001521 --with-hash-algorithm=[fnv|siphash24]
1522 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001523 --with-address-sanitizer
1524 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001526 --with-system-expat build pyexpat module using an installed expat
1527 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001528 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001529 --with-system-libmpdec build _decimal module using an installed libmpdec
1530 library
Ned Deilyd819b932013-09-06 01:07:05 -07001531 --with-tcltk-includes='-I...'
1532 override search for Tcl and Tk include files
1533 --with-tcltk-libs='-L...'
1534 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001535 --with-dbmliborder=db1:db2:...
1536 order to check db backends for dbm. Valid value is a
1537 colon separated string with the backend names
1538 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with(out)-threads[=DIRECTORY]
1540 disable/enable thread support
1541 --with(out)-thread[=DIRECTORY]
1542 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001543 --with(out)-doc-strings disable/enable documentation strings
1544 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001545 --with(out)-c-locale-coercion
1546 disable/enable C locale coercion to a UTF-8 based
1547 locale
1548 --with(out)-c-locale-warning
1549 disable/enable locale compatibility warning in the C
1550 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001551 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001552 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001553 --with-fpectl enable SIGFPE catching
1554 --with-libm=STRING math library
1555 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001556 --with(out)-computed-gotos
1557 Use computed gotos in evaluation loop (enabled by
1558 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001559 --with(out)-ensurepip=[=upgrade]
1560 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001561
1562Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001563 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 CC C compiler command
1565 CFLAGS C compiler flags
1566 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1567 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001572 PKG_CONFIG path to pkg-config utility
1573 PKG_CONFIG_PATH
1574 directories to add to pkg-config's search path
1575 PKG_CONFIG_LIBDIR
1576 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
1578Use these variables to override the choices made by `configure' or to help
1579it to find libraries and programs with nonstandard names/locations.
1580
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001581Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001582_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001584fi
1585
1586if test "$ac_init_help" = "recursive"; then
1587 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 test -d "$ac_dir" ||
1590 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1591 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_builddir=.
1593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594case "$ac_dir" in
1595.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1596*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001597 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001599 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 case $ac_top_builddir_sub in
1601 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1602 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1603 esac ;;
1604esac
1605ac_abs_top_builddir=$ac_pwd
1606ac_abs_builddir=$ac_pwd$ac_dir_suffix
1607# for backward compatibility:
1608ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001609
1610case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001612 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 ac_top_srcdir=$ac_top_builddir_sub
1614 ac_abs_top_srcdir=$ac_pwd ;;
1615 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001616 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 ac_top_srcdir=$srcdir
1618 ac_abs_top_srcdir=$srcdir ;;
1619 *) # Relative name.
1620 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1621 ac_top_srcdir=$ac_top_build_prefix$srcdir
1622 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001623esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 cd "$ac_dir" || { ac_status=$?; continue; }
1627 # Check for guested configure.
1628 if test -f "$ac_srcdir/configure.gnu"; then
1629 echo &&
1630 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1631 elif test -f "$ac_srcdir/configure"; then
1632 echo &&
1633 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 fi || ac_status=$?
1637 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001638 done
1639fi
1640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001642if $ac_init_version; then
1643 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001644python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001645generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001646
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001647Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001648This configure script is free software; the Free Software Foundation
1649gives unlimited permission to copy, distribute and modify it.
1650_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001653
1654## ------------------------ ##
1655## Autoconf initialization. ##
1656## ------------------------ ##
1657
1658# ac_fn_c_try_compile LINENO
1659# --------------------------
1660# Try to compile conftest.$ac_ext, and return whether this succeeded.
1661ac_fn_c_try_compile ()
1662{
1663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664 rm -f conftest.$ac_objext
1665 if { { ac_try="$ac_compile"
1666case "(($ac_try" in
1667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668 *) ac_try_echo=$ac_try;;
1669esac
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672 (eval "$ac_compile") 2>conftest.err
1673 ac_status=$?
1674 if test -s conftest.err; then
1675 grep -v '^ *+' conftest.err >conftest.er1
1676 cat conftest.er1 >&5
1677 mv -f conftest.er1 conftest.err
1678 fi
1679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1680 test $ac_status = 0; } && {
1681 test -z "$ac_c_werror_flag" ||
1682 test ! -s conftest.err
1683 } && test -s conftest.$ac_objext; then :
1684 ac_retval=0
1685else
1686 $as_echo "$as_me: failed program was:" >&5
1687sed 's/^/| /' conftest.$ac_ext >&5
1688
1689 ac_retval=1
1690fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001691 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 as_fn_set_status $ac_retval
1693
1694} # ac_fn_c_try_compile
1695
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001696# ac_fn_c_try_cpp LINENO
1697# ----------------------
1698# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1699ac_fn_c_try_cpp ()
1700{
1701 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1702 if { { ac_try="$ac_cpp conftest.$ac_ext"
1703case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1710 ac_status=$?
1711 if test -s conftest.err; then
1712 grep -v '^ *+' conftest.err >conftest.er1
1713 cat conftest.er1 >&5
1714 mv -f conftest.er1 conftest.err
1715 fi
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717 test $ac_status = 0; } > conftest.i && {
1718 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1719 test ! -s conftest.err
1720 }; then :
1721 ac_retval=0
1722else
1723 $as_echo "$as_me: failed program was:" >&5
1724sed 's/^/| /' conftest.$ac_ext >&5
1725
1726 ac_retval=1
1727fi
1728 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1729 as_fn_set_status $ac_retval
1730
1731} # ac_fn_c_try_cpp
1732
Matthias Kloseb9621712010-04-24 17:59:49 +00001733# ac_fn_c_try_link LINENO
1734# -----------------------
1735# Try to link conftest.$ac_ext, and return whether this succeeded.
1736ac_fn_c_try_link ()
1737{
1738 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739 rm -f conftest.$ac_objext conftest$ac_exeext
1740 if { { ac_try="$ac_link"
1741case "(($ac_try" in
1742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1743 *) ac_try_echo=$ac_try;;
1744esac
1745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1746$as_echo "$ac_try_echo"; } >&5
1747 (eval "$ac_link") 2>conftest.err
1748 ac_status=$?
1749 if test -s conftest.err; then
1750 grep -v '^ *+' conftest.err >conftest.er1
1751 cat conftest.er1 >&5
1752 mv -f conftest.er1 conftest.err
1753 fi
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } && {
1756 test -z "$ac_c_werror_flag" ||
1757 test ! -s conftest.err
1758 } && test -s conftest$ac_exeext && {
1759 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001760 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 }; then :
1762 ac_retval=0
1763else
1764 $as_echo "$as_me: failed program was:" >&5
1765sed 's/^/| /' conftest.$ac_ext >&5
1766
1767 ac_retval=1
1768fi
1769 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1770 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1771 # interfere with the next link command; also delete a directory that is
1772 # left behind by Apple's compiler. We do this before executing the actions.
1773 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001774 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 as_fn_set_status $ac_retval
1776
1777} # ac_fn_c_try_link
1778
Matthias Kloseb9621712010-04-24 17:59:49 +00001779# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1780# -------------------------------------------------------
1781# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1782# the include files in INCLUDES and setting the cache variable VAR
1783# accordingly.
1784ac_fn_c_check_header_mongrel ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001787 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1789$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001790if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001791 $as_echo_n "(cached) " >&6
1792fi
1793eval ac_res=\$$3
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795$as_echo "$ac_res" >&6; }
1796else
1797 # Is the header compilable?
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1799$as_echo_n "checking $2 usability... " >&6; }
1800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801/* end confdefs.h. */
1802$4
1803#include <$2>
1804_ACEOF
1805if ac_fn_c_try_compile "$LINENO"; then :
1806 ac_header_compiler=yes
1807else
1808 ac_header_compiler=no
1809fi
1810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1812$as_echo "$ac_header_compiler" >&6; }
1813
1814# Is the header present?
1815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1816$as_echo_n "checking $2 presence... " >&6; }
1817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1818/* end confdefs.h. */
1819#include <$2>
1820_ACEOF
1821if ac_fn_c_try_cpp "$LINENO"; then :
1822 ac_header_preproc=yes
1823else
1824 ac_header_preproc=no
1825fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001826rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1828$as_echo "$ac_header_preproc" >&6; }
1829
1830# So? What about this header?
1831case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1832 yes:no: )
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1834$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1837 ;;
1838 no:yes:* )
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1840$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1842$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1844$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1846$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1848$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001849( $as_echo "## --------------------------------------- ##
1850## Report this to https://bugs.python.org/ ##
1851## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 ) | sed "s/^/$as_me: WARNING: /" >&2
1853 ;;
1854esac
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001857if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001858 $as_echo_n "(cached) " >&6
1859else
1860 eval "$3=\$ac_header_compiler"
1861fi
1862eval ac_res=\$$3
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1864$as_echo "$ac_res" >&6; }
1865fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001866 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001867
1868} # ac_fn_c_check_header_mongrel
1869
1870# ac_fn_c_try_run LINENO
1871# ----------------------
1872# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1873# that executables *can* be run.
1874ac_fn_c_try_run ()
1875{
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 if { { ac_try="$ac_link"
1878case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_link") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1888 { { case "(($ac_try" in
1889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1890 *) ac_try_echo=$ac_try;;
1891esac
1892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1893$as_echo "$ac_try_echo"; } >&5
1894 (eval "$ac_try") 2>&5
1895 ac_status=$?
1896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897 test $ac_status = 0; }; }; then :
1898 ac_retval=0
1899else
1900 $as_echo "$as_me: program exited with status $ac_status" >&5
1901 $as_echo "$as_me: failed program was:" >&5
1902sed 's/^/| /' conftest.$ac_ext >&5
1903
1904 ac_retval=$ac_status
1905fi
1906 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001908 as_fn_set_status $ac_retval
1909
1910} # ac_fn_c_try_run
1911
1912# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1913# -------------------------------------------------------
1914# Tests whether HEADER exists and can be compiled using the include files in
1915# INCLUDES, setting the cache variable VAR accordingly.
1916ac_fn_c_check_header_compile ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001921if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001922 $as_echo_n "(cached) " >&6
1923else
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927#include <$2>
1928_ACEOF
1929if ac_fn_c_try_compile "$LINENO"; then :
1930 eval "$3=yes"
1931else
1932 eval "$3=no"
1933fi
1934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1935fi
1936eval ac_res=\$$3
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1938$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001939 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001940
1941} # ac_fn_c_check_header_compile
1942
Matthias Kloseb9621712010-04-24 17:59:49 +00001943# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1944# -------------------------------------------
1945# Tests whether TYPE exists after having included INCLUDES, setting cache
1946# variable VAR accordingly.
1947ac_fn_c_check_type ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001952if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 $as_echo_n "(cached) " >&6
1954else
1955 eval "$3=no"
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$4
1959int
1960main ()
1961{
1962if (sizeof ($2))
1963 return 0;
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1970/* end confdefs.h. */
1971$4
1972int
1973main ()
1974{
1975if (sizeof (($2)))
1976 return 0;
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982
1983else
1984 eval "$3=yes"
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1989fi
1990eval ac_res=\$$3
1991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1992$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001993 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001994
1995} # ac_fn_c_check_type
1996
Matthias Kloseb9621712010-04-24 17:59:49 +00001997# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1998# --------------------------------------------
1999# Tries to find the compile-time value of EXPR in a program that includes
2000# INCLUDES, setting VAR accordingly. Returns whether the value could be
2001# computed
2002ac_fn_c_compute_int ()
2003{
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 if test "$cross_compiling" = yes; then
2006 # Depending upon the size, compute the lo and hi bounds.
2007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002014test_array [0] = 0;
2015return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 ac_lo=0 ac_mid=0
2023 while :; do
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
2028main ()
2029{
2030static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002031test_array [0] = 0;
2032return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 ac_hi=$ac_mid; break
2040else
2041 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2042 if test $ac_lo -le $ac_mid; then
2043 ac_lo= ac_hi=
2044 break
2045 fi
2046 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2047fi
2048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049 done
2050else
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_hi=-1 ac_mid=-1
2067 while :; do
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=$ac_mid; break
2084else
2085 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2086 if test $ac_mid -le $ac_hi; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 ac_lo= ac_hi=
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100# Binary search between lo and hi bounds.
2101while test "x$ac_lo" != "x$ac_hi"; do
2102 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002110test_array [0] = 0;
2111return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002188if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002244
2245} # ac_fn_c_check_func
2246
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002247# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2248# ---------------------------------------------
2249# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2250# accordingly.
2251ac_fn_c_check_decl ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 as_decl_name=`echo $2|sed 's/ *(.*//'`
2255 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2257$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2258if eval \${$3+:} false; then :
2259 $as_echo_n "(cached) " >&6
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$4
2264int
2265main ()
2266{
2267#ifndef $as_decl_name
2268#ifdef __cplusplus
2269 (void) $as_decl_use;
2270#else
2271 (void) $as_decl_name;
2272#endif
2273#endif
2274
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 eval "$3=yes"
2281else
2282 eval "$3=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286eval ac_res=\$$3
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2288$as_echo "$ac_res" >&6; }
2289 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290
2291} # ac_fn_c_check_decl
2292
Matthias Kloseb9621712010-04-24 17:59:49 +00002293# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2294# ----------------------------------------------------
2295# Tries to find if the field MEMBER exists in type AGGR, after including
2296# INCLUDES, setting cache variable VAR accordingly.
2297ac_fn_c_check_member ()
2298{
2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2301$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002302if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002303 $as_echo_n "(cached) " >&6
2304else
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h. */
2307$5
2308int
2309main ()
2310{
2311static $2 ac_aggr;
2312if (ac_aggr.$3)
2313return 0;
2314 ;
2315 return 0;
2316}
2317_ACEOF
2318if ac_fn_c_try_compile "$LINENO"; then :
2319 eval "$4=yes"
2320else
2321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h. */
2323$5
2324int
2325main ()
2326{
2327static $2 ac_aggr;
2328if (sizeof ac_aggr.$3)
2329return 0;
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 eval "$4=yes"
2336else
2337 eval "$4=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$4
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002347
2348} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Ned Deily4829bc62016-09-12 17:29:04 -04002353It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002354generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002390 $as_echo "PATH: $as_dir"
2391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Kloseb9621712010-04-24 17:59:49 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# 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 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Kloseb9621712010-04-24 17:59:49 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Kloseb9621712010-04-24 17:59:49 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597else
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602do
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$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 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Trent Nelson4d4ec652012-10-16 08:51:24 -04002702
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002703if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002704 # If we're building out-of-tree, we need to make sure the following
2705 # resources get picked up before their $srcdir counterparts.
2706 # Objects/ -> typeslots.inc
2707 # Include/ -> Python-ast.h, graminit.h
2708 # Python/ -> importlib.h
2709 # (A side effect of this is that these resources will automatically be
2710 # regenerated when building out-of-tree, regardless of whether or not
2711 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2712 # off.)
2713 BASECPPFLAGS="-IObjects -IInclude -IPython"
2714else
2715 BASECPPFLAGS=""
2716fi
2717
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718
2719
2720
2721
Victor Stinner9ed34a82017-05-02 22:35:58 +02002722if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724# Extract the first word of "git", so it can be a program name with args.
2725set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2727$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo_n "(cached) " >&6
2730else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 if test -n "$HAS_GIT"; then
2732 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733else
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
2746 done
2747IFS=$as_save_IFS
2748
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750fi
2751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752HAS_GIT=$ac_cv_prog_HAS_GIT
2753if test -n "$HAS_GIT"; then
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2755$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756else
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2758$as_echo "no" >&6; }
2759fi
2760
2761
2762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766then
Ned Deily554626a2017-03-20 23:41:52 -04002767 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2768 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002769 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002771 GITVERSION=""
2772 GITTAG=""
2773 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774fi
2775
2776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
2779
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002780ac_aux_dir=
2781for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2782 if test -f "$ac_dir/install-sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install-sh -c"
2785 break
2786 elif test -f "$ac_dir/install.sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install.sh -c"
2789 break
2790 elif test -f "$ac_dir/shtool"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/shtool install -c"
2793 break
2794 fi
2795done
2796if test -z "$ac_aux_dir"; then
2797 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2798fi
2799
2800# These three variables are undocumented and unsupported,
2801# and are intended to be withdrawn in a future Autoconf release.
2802# They can cause serious problems if a builder's source tree is in a directory
2803# whose full name contains unusual characters.
2804ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2805ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2806ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2807
2808
2809# Make sure we can run config.sub.
2810$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2811 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2812
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2814$as_echo_n "checking build system type... " >&6; }
2815if ${ac_cv_build+:} false; then :
2816 $as_echo_n "(cached) " >&6
2817else
2818 ac_build_alias=$build_alias
2819test "x$ac_build_alias" = x &&
2820 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2821test "x$ac_build_alias" = x &&
2822 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2823ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2824 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2825
2826fi
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2828$as_echo "$ac_cv_build" >&6; }
2829case $ac_cv_build in
2830*-*-*) ;;
2831*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2832esac
2833build=$ac_cv_build
2834ac_save_IFS=$IFS; IFS='-'
2835set x $ac_cv_build
2836shift
2837build_cpu=$1
2838build_vendor=$2
2839shift; shift
2840# Remember, the first character of IFS is used to create $*,
2841# except with old shells:
2842build_os=$*
2843IFS=$ac_save_IFS
2844case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2845
2846
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2848$as_echo_n "checking host system type... " >&6; }
2849if ${ac_cv_host+:} false; then :
2850 $as_echo_n "(cached) " >&6
2851else
2852 if test "x$host_alias" = x; then
2853 ac_cv_host=$ac_cv_build
2854else
2855 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2857fi
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2861$as_echo "$ac_cv_host" >&6; }
2862case $ac_cv_host in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2865esac
2866host=$ac_cv_host
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_host
2869shift
2870host_cpu=$1
2871host_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875host_os=$*
2876IFS=$ac_save_IFS
2877case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2878
2879
2880
doko@python.orga10e4a92013-01-25 18:45:12 +01002881
2882
Ned Deilyfcbc2462014-08-22 13:32:49 -07002883# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2884rm -f pybuilddir.txt
2885
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886for ac_prog in python$PACKAGE_VERSION python3 python
2887do
2888 # Extract the first word of "$ac_prog", so it can be a program name with args.
2889set dummy $ac_prog; ac_word=$2
2890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2891$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo_n "(cached) " >&6
2894else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895 if test -n "$PYTHON_FOR_REGEN"; then
2896 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002897else
2898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2899for as_dir in $PATH
2900do
2901 IFS=$as_save_IFS
2902 test -z "$as_dir" && as_dir=.
2903 for ac_exec_ext in '' $ac_executable_extensions; do
2904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2907 break 2
2908 fi
2909done
2910 done
2911IFS=$as_save_IFS
2912
2913fi
2914fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2916if test -n "$PYTHON_FOR_REGEN"; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2918$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919else
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2921$as_echo "no" >&6; }
2922fi
2923
2924
Victor Stinnera5c62a82017-05-03 18:21:48 +02002925 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002927test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929
2930
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002931if test "$cross_compiling" = yes; then
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2933$as_echo_n "checking for python interpreter for cross build... " >&6; }
2934 if test -z "$PYTHON_FOR_BUILD"; then
2935 for interp in python$PACKAGE_VERSION python3 python; do
2936 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002937 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 +02002938 break
2939 fi
2940 interp=
2941 done
2942 if test x$interp = x; then
2943 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2944 fi
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2946$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002947 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 +02002948 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002949elif test "$cross_compiling" = maybe; then
2950 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951else
2952 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Ned Deily4829bc62016-09-12 17:29:04 -04002971VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001
3002
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
3009
3010
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003011define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003013# Arguments passed to configure.
3014
3015CONFIG_ARGS="$ac_configure_args"
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3018$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003020if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 case $enableval in
3023 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 # Locate the best usable SDK, see Mac/README.txt for more
3025 # information
3026 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003027 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003029 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3030 if test ! -d "${enableval}"
3031 then
3032 enableval=/
3033 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
3037 case $enableval in
3038 no)
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041 ;;
3042 *)
3043 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 if test ! -d "${UNIVERSALSDK}"
3045 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003046 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052else
3053
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059if test -n "${UNIVERSALSDK}"
3060then
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3062$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063else
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003069
Ned Deily87adb6e2013-10-18 21:09:56 -07003070ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072# For backward compatibility reasons we prefer to select '32-bit' if available,
3073# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003075if test "`uname -s`" = "Darwin"
3076then
3077 if test -n "${UNIVERSALSDK}"
3078 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003079 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003080 then
3081 UNIVERSAL_ARCHS="intel"
3082 fi
3083 fi
3084fi
3085
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3088$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
3090# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 UNIVERSAL_ARCHS="$withval"
3094
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095fi
3096
Ned Deily87adb6e2013-10-18 21:09:56 -07003097if test -n "${UNIVERSALSDK}"
3098then
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3100$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3101else
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3103$as_echo "no" >&6; }
3104fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106
3107# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109 withval=$with_framework_name;
3110 PYTHONFRAMEWORK=${withval}
3111 PYTHONFRAMEWORKDIR=${withval}.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3113
3114else
3115
3116 PYTHONFRAMEWORK=Python
3117 PYTHONFRAMEWORKDIR=Python.framework
3118 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3119
3120fi
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003125 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003126 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003127 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 esac
3129 case $enableval in
3130 no)
3131 PYTHONFRAMEWORK=
3132 PYTHONFRAMEWORKDIR=no-framework
3133 PYTHONFRAMEWORKPREFIX=
3134 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST=
3136 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 FRAMEWORKALTINSTALLFIRST=
3138 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE"; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003146 ;;
3147 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003151 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003152 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3153 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003154 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE" ; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 else
3161 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3162 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163
3164 case "${enableval}" in
3165 /System*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 if test "${prefix}" = "NONE" ; then
3168 # See below
3169 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3170 fi
3171 ;;
3172
3173 /Library*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176
3177 */Library/Frameworks)
3178 MDIR="`dirname "${enableval}"`"
3179 MDIR="`dirname "${MDIR}"`"
3180 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3181
3182 if test "${prefix}" = "NONE"; then
3183 # User hasn't specified the
3184 # --prefix option, but wants to install
3185 # the framework in a non-default location,
3186 # ensure that the compatibility links get
3187 # installed relative to that prefix as well
3188 # instead of in /usr/local.
3189 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3190 fi
3191 ;;
3192
3193 *)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 ;;
3196 esac
3197
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003206 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3207
3208 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Guido van Rossum563e7081996-09-10 18:20:48 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORKPREFIX=
3217 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST=
3219 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 FRAMEWORKALTINSTALLFIRST=
3221 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223 if test "x${prefix}" = "xNONE" ; then
3224 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3225 else
3226 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3227 fi
Jack Jansene578a632001-08-15 01:27:14 +00003228 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
3234
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
3236
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240
3241
3242
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003243
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003244
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003246
3247cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003248#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003249_ACEOF
3250
3251
Jack Jansene578a632001-08-15 01:27:14 +00003252##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003253## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003254## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003255##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003256# Set name for machine-dependent library files
3257
Matthias Kloseb9621712010-04-24 17:59:49 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3259$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003260if test -z "$MACHDEP"
3261then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 # avoid using uname for cross builds
3263 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003264 # ac_sys_system and ac_sys_release are used for setting
3265 # a lot of different things including 'define_xopen_source'
3266 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003267 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003268 *-*-linux-android*)
3269 ac_sys_system=Linux-android
3270 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003271 *-*-linux*)
3272 ac_sys_system=Linux
3273 ;;
3274 *-*-cygwin*)
3275 ac_sys_system=Cygwin
3276 ;;
3277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003299 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003300 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003301 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003302 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
Guido van Rossum91922671997-10-09 20:24:13 +00003306
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003307
3308if test "$cross_compiling" = yes; then
3309 case "$host" in
3310 *-*-linux*)
3311 case "$host_cpu" in
3312 arm*)
3313 _host_cpu=arm
3314 ;;
3315 *)
3316 _host_cpu=$host_cpu
3317 esac
3318 ;;
3319 *-*-cygwin*)
3320 _host_cpu=
3321 ;;
3322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3326 esac
3327 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3328fi
3329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3331# disable features if it is defined, without any means to access these
3332# features as extensions. For these systems, we skip the definition of
3333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3334# some feature, make sure there is no alternative way to access this
3335# feature. Also, when using wildcards, make sure you have verified the
3336# need for not defining _XOPEN_SOURCE on all systems matching the
3337# wildcard, and that the wildcard does not include future systems
3338# (which may remove their limitations).
3339case $ac_sys_system/$ac_sys_release in
3340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3341 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003342 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003343 # In addition, Stefan Krah confirms that issue #1244610 exists through
3344 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346 define_xopen_source=no
3347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003352
3353 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003354 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003355 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3356 # also defined. This can be overridden by defining _BSD_SOURCE
3357 # As this has a different meaning on Linux, only define it on OpenBSD
3358
Matthias Kloseb9621712010-04-24 17:59:49 +00003359$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360
3361 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003362 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3363 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3364 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003365 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 +00003366 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003367 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3368 # request to enable features supported by the standard as a request
3369 # to disable features not supported by the standard. The best way
3370 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3371 # entirely and define __EXTENSIONS__ instead.
3372 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003373 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3375 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003376 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003377 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003378 define_xopen_source=no;;
3379 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003381 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003382 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003383 # On FreeBSD 4, the math functions C89 does not cover are never defined
3384 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3385 FreeBSD/4.*)
3386 define_xopen_source=no;;
3387 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3388 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3389 # identifies itself as Darwin/7.*
3390 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3391 # disables platform specific features beyond repair.
3392 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3393 # has no effect, don't bother defining them
3394 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003395 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003396 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003397 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003398 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3399 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3400 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003401 AIX/4)
3402 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003403 AIX/5)
3404 if test `uname -r` -eq 1; then
3405 define_xopen_source=no
3406 fi
3407 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003408 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3409 # defining NI_NUMERICHOST.
3410 QNX/6.3.2)
3411 define_xopen_source=no
3412 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414esac
3415
3416if test $define_xopen_source = yes
3417then
Victor Stinner14d098d2011-09-07 22:29:43 +02003418 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Victor Stinner14d098d2011-09-07 22:29:43 +02003420$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003421
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3424 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3425 # several APIs are not declared. Since this is also needed in some
3426 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Matthias Kloseb9621712010-04-24 17:59:49 +00003428$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003429
3430
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003431
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003432$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434fi
3435
Christian Heimes647cd872013-12-07 23:39:33 +01003436# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3437case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003438 hp*|HP*)
3439 define_stdc_a1=yes;;
3440 *)
3441 define_stdc_a1=no;;
3442esac
3443
3444if test $define_stdc_a1 = yes
3445then
Christian Heimes647cd872013-12-07 23:39:33 +01003446
3447$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3448
Christian Heimesb02bcae2013-12-08 15:21:08 +01003449fi
Christian Heimes647cd872013-12-07 23:39:33 +01003450
Guido van Rossum91922671997-10-09 20:24:13 +00003451#
3452# SGI compilers allow the specification of the both the ABI and the
3453# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003454# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003455#
3456# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3457# thus supply support for various ABI/ISA combinations. The MACHDEP
3458# variable is also adjusted.
3459#
3460
3461if test ! -z "$SGI_ABI"
3462then
3463 CC="cc $SGI_ABI"
3464 LDFLAGS="$SGI_ABI $LDFLAGS"
3465 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3468$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003469
Jack Jansen6b08a402004-06-03 12:41:45 +00003470# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3471# it may influence the way we can build extensions, so distutils
3472# needs to check it
3473
Thomas Wouters477c8d52006-05-27 19:21:47 +00003474
Jack Jansen6b08a402004-06-03 12:41:45 +00003475CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003476EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003477
Guido van Rossum627b2d71993-12-24 10:39:16 +00003478# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003479
3480# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3481# for debug/optimization stuff. BASECFLAGS is for flags that are required
3482# just to get things to compile and link. Users are free to override OPT
3483# when running configure or make. The build should not break if they do.
3484# BASECFLAGS should generally not be messed with, however.
3485
3486# XXX shouldn't some/most/all of this code be merged with the stuff later
3487# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3489$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003490
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003492if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003493 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003494 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003495 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003496 without_gcc=yes;;
3497 yes) CC=gcc
3498 without_gcc=no;;
3499 *) CC=$withval
3500 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003501 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003502else
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003504 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003505 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003506 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003507 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003508 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509fi
3510
Matthias Kloseb9621712010-04-24 17:59:49 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3512$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003513
Zachary Ware5af85642015-12-21 12:09:17 -06003514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3515$as_echo_n "checking for --with-icc... " >&6; }
3516
3517# Check whether --with-icc was given.
3518if test "${with_icc+set}" = set; then :
3519 withval=$with_icc;
3520 case $withval in
3521 no) CC=${CC:-cc}
3522 with_icc=no;;
3523 yes) CC=icc
3524 CXX=icpc
3525 with_icc=yes;;
3526 *) CC=$withval
3527 with_icc=$withval;;
3528 esac
3529else
3530
3531 with_icc=no
3532fi
3533
3534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3535$as_echo "$with_icc" >&6; }
3536
Guido van Rossum8b131c51995-03-09 14:10:13 +00003537# If the user switches compilers, we can't believe the cache
3538if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3539then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003540 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003541(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003542fi
3543
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003544# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3545# when the compiler supports them, but we don't always want -O2, and
3546# we set -g later.
3547if test -z "$CFLAGS"; then
3548 CFLAGS=
3549fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003550
3551if test "$ac_sys_system" = "Darwin"
3552then
3553 # Compiler selection on MacOSX is more complicated than
3554 # AC_PROG_CC can handle, see Mac/README.txt for more
3555 # information
3556 if test -z "${CC}"
3557 then
3558 found_gcc=
3559 found_clang=
3560 as_save_IFS=$IFS; IFS=:
3561 for as_dir in $PATH
3562 do
3563 IFS=$as_save_IFS
3564 if test -x $as_dir/gcc; then
3565 if test -z "${found_gcc}"; then
3566 found_gcc=$as_dir/gcc
3567 fi
3568 fi
3569 if test -x $as_dir/clang; then
3570 if test -z "${found_clang}"; then
3571 found_clang=$as_dir/clang
3572 fi
3573 fi
3574 done
3575 IFS=$as_save_IFS
3576
3577 if test -n "$found_gcc" -a -n "$found_clang"
3578 then
3579 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3580 then
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3582$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3583 CC="$found_clang"
3584 CXX="$found_clang++"
3585 fi
3586
3587
3588 elif test -z "$found_gcc" -a -n "$found_clang"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3591$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3592 CC="$found_clang"
3593 CXX="$found_clang++"
3594
3595 elif test -z "$found_gcc" -a -z "$found_clang"
3596 then
3597 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3598 if test -n "${found_clang}"
3599 then
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3601$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3602 CC="${found_clang}"
3603 CXX="`/usr/bin/xcrun -find clang++`"
3604
3605 # else: use default behaviour
3606 fi
3607 fi
3608 fi
3609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615if test -n "$ac_tool_prefix"; then
3616 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3617set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3619$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003620if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003622else
3623 if test -n "$CC"; then
3624 ac_cv_prog_CC="$CC" # Let the user override the test.
3625else
Martin v. Löwis11437992002-04-12 09:54:03 +00003626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3627for as_dir in $PATH
3628do
3629 IFS=$as_save_IFS
3630 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 $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 +00003635 break 2
3636 fi
3637done
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003640
Jack Jansendd19cf82001-12-06 22:36:17 +00003641fi
3642fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003643CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003644if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3646$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003647else
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3649$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654if test -z "$ac_cv_prog_CC"; then
3655 ac_ct_CC=$CC
3656 # Extract the first word of "gcc", so it can be a program name with args.
3657set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003660if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
3663 if test -n "$ac_ct_CC"; then
3664 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3665else
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 $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 +00003675 break 2
3676 fi
3677done
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
3681fi
3682fi
3683ac_ct_CC=$ac_cv_prog_ac_ct_CC
3684if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3686$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687else
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3689$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692 if test "x$ac_ct_CC" = x; then
3693 CC=""
3694 else
3695 case $cross_compiling:$ac_tool_warned in
3696yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699ac_tool_warned=yes ;;
3700esac
3701 CC=$ac_ct_CC
3702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003703else
3704 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003705fi
3706
Jack Jansendd19cf82001-12-06 22:36:17 +00003707if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708 if test -n "$ac_tool_prefix"; then
3709 # 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 +00003710set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003713if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $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 +00003728 break 2
3729 fi
3730done
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
3734fi
3735fi
3736CC=$ac_cv_prog_CC
3737if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3739$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
3744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
3748if test -z "$CC"; then
3749 # Extract the first word of "cc", so it can be a program name with args.
3750set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003753if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003755else
3756 if test -n "$CC"; then
3757 ac_cv_prog_CC="$CC" # Let the user override the test.
3758else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3761for as_dir in $PATH
3762do
3763 IFS=$as_save_IFS
3764 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3768 ac_prog_rejected=yes
3769 continue
3770 fi
3771 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $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 +00003773 break 2
3774 fi
3775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779if test $ac_prog_rejected = yes; then
3780 # We found a bogon in the path, so make sure we never use it.
3781 set dummy $ac_cv_prog_CC
3782 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784 # We chose a different compiler from the bogus one.
3785 # However, it has the same basename, so the bogon will be chosen
3786 # first if we set CC to just the basename; use the full file name.
3787 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003788 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003789 fi
3790fi
3791fi
3792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3796$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803fi
3804if test -z "$CC"; then
3805 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 do
3808 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3809set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003812if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
Martin v. Löwis11437992002-04-12 09:54:03 +00003818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3819for as_dir in $PATH
3820do
3821 IFS=$as_save_IFS
3822 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 $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 +00003827 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003828 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003829done
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003832
3833fi
3834fi
3835CC=$ac_cv_prog_CC
3836if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3838$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003839else
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3841$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003842fi
3843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 test -n "$CC" && break
3846 done
3847fi
3848if test -z "$CC"; then
3849 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003851do
3852 # Extract the first word of "$ac_prog", so it can be a program name with args.
3853set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3855$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003856if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003858else
3859 if test -n "$ac_ct_CC"; then
3860 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3861else
3862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3863for as_dir in $PATH
3864do
3865 IFS=$as_save_IFS
3866 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 $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 +00003871 break 2
3872 fi
3873done
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
3878fi
3879ac_ct_CC=$ac_cv_prog_ac_ct_CC
3880if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3882$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883else
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3885$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 test -n "$ac_ct_CC" && break
3890done
Michael W. Hudson54241132001-12-07 15:38:26 +00003891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892 if test "x$ac_ct_CC" = x; then
3893 CC=""
3894 else
3895 case $cross_compiling:$ac_tool_warned in
3896yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899ac_tool_warned=yes ;;
3900esac
3901 CC=$ac_ct_CC
3902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903fi
3904
3905fi
3906
3907
Matthias Kloseb9621712010-04-24 17:59:49 +00003908test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003910as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003911See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003912
3913# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003914$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3915set X $ac_compile
3916ac_compiler=$2
3917for ac_option in --version -v -V -qversion; do
3918 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919case "(($ac_try" in
3920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921 *) ac_try_echo=$ac_try;;
3922esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3924$as_echo "$ac_try_echo"; } >&5
3925 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 if test -s conftest.err; then
3928 sed '10a\
3929... rest of stderr output deleted ...
3930 10q' conftest.err >conftest.er1
3931 cat conftest.er1 >&5
3932 fi
3933 rm -f conftest.er1 conftest.err
3934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3935 test $ac_status = 0; }
3936done
Martin v. Löwis11437992002-04-12 09:54:03 +00003937
Matthias Kloseb9621712010-04-24 17:59:49 +00003938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003939/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003940
Martin v. Löwis11437992002-04-12 09:54:03 +00003941int
3942main ()
3943{
3944
3945 ;
3946 return 0;
3947}
3948_ACEOF
3949ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003950ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003951# Try to create an executable without -o first, disregard a.out.
3952# It will help us diagnose broken compilers, and finding out an intuition
3953# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3955$as_echo_n "checking whether the C compiler works... " >&6; }
3956ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3957
3958# The possible output files:
3959ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961ac_rmfiles=
3962for ac_file in $ac_files
3963do
3964 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3967 esac
3968done
3969rm -f $ac_rmfiles
3970
Matthias Kloseb9621712010-04-24 17:59:49 +00003971if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972case "(($ac_try" in
3973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3974 *) ac_try_echo=$ac_try;;
3975esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3977$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3981 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3983# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3984# in a Makefile. We should not override ac_cv_exeext if it was cached,
3985# so that the user can short-circuit this test for compilers unknown to
3986# Autoconf.
3987for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003988do
3989 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992 ;;
3993 [ab].out )
3994 # We found the default executable, but exeext='' is most
3995 # certainly right.
3996 break;;
3997 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003998 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 then :; else
4000 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4001 fi
4002 # We set ac_cv_exeext here because the later test for it is not
4003 # safe: cross compilers may not add the suffix if given an `-o'
4004 # argument, so we may need to know it at that point already.
4005 # Even if this section looks crufty: it has the advantage of
4006 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007 break;;
4008 * )
4009 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004010 esac
4011done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012test "$ac_cv_exeext" = no && ac_cv_exeext=
4013
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004014else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015 ac_file=''
4016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004017if test -z "$ac_file"; then :
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4019$as_echo "no" >&6; }
4020$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004021sed 's/^/| /' conftest.$ac_ext >&5
4022
Matthias Kloseb9621712010-04-24 17:59:49 +00004023{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004025as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004026See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004027else
4028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4029$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4032$as_echo_n "checking for C compiler default output file name... " >&6; }
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4034$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036
Matthias Kloseb9621712010-04-24 17:59:49 +00004037rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4040$as_echo_n "checking for suffix of executables... " >&6; }
4041if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004048 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4051 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004052 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4053# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4054# work properly (i.e., refer to `conftest.exe'), while it won't with
4055# `rm'.
4056for ac_file in conftest.exe conftest conftest.*; do
4057 test -f "$ac_file" || continue
4058 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004060 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4061 break;;
4062 * ) break;;
4063 esac
4064done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065else
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004068as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004069See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004071rm -f conftest conftest$ac_cv_exeext
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4073$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004074
4075rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004076EXEEXT=$ac_cv_exeext
4077ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4079/* end confdefs.h. */
4080#include <stdio.h>
4081int
4082main ()
4083{
4084FILE *f = fopen ("conftest.out", "w");
4085 return ferror (f) || fclose (f) != 0;
4086
4087 ;
4088 return 0;
4089}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004091ac_clean_files="$ac_clean_files conftest.out"
4092# Check that the compiler produces executables we can run. If not, either
4093# the compiler is broken, or we cross compile.
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4095$as_echo_n "checking whether we are cross compiling... " >&6; }
4096if test "$cross_compiling" != yes; then
4097 { { ac_try="$ac_link"
4098case "(($ac_try" in
4099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4100 *) ac_try_echo=$ac_try;;
4101esac
4102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4103$as_echo "$ac_try_echo"; } >&5
4104 (eval "$ac_link") 2>&5
4105 ac_status=$?
4106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4107 test $ac_status = 0; }
4108 if { ac_try='./conftest$ac_cv_exeext'
4109 { { case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
4113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4114$as_echo "$ac_try_echo"; } >&5
4115 (eval "$ac_try") 2>&5
4116 ac_status=$?
4117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4118 test $ac_status = 0; }; }; then
4119 cross_compiling=no
4120 else
4121 if test "$cross_compiling" = maybe; then
4122 cross_compiling=yes
4123 else
4124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004126as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004127If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004128See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 fi
4130 fi
4131fi
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4133$as_echo "$cross_compiling" >&6; }
4134
4135rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4136ac_clean_files=$ac_clean_files_save
4137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4138$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004139if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 $as_echo_n "(cached) " >&6
4141else
4142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004143/* end confdefs.h. */
4144
4145int
4146main ()
4147{
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004154if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155case "(($ac_try" in
4156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4157 *) ac_try_echo=$ac_try;;
4158esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004159eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4160$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004161 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4164 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004165 for ac_file in conftest.o conftest.obj conftest.*; do
4166 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4170 break;;
4171 esac
4172done
4173else
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004175sed 's/^/| /' conftest.$ac_ext >&5
4176
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004179as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004180See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004181fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004182rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4185$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004186OBJEXT=$ac_cv_objext
4187ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4189$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004190if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004192else
Matthias Kloseb9621712010-04-24 17:59:49 +00004193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Martin v. Löwis11437992002-04-12 09:54:03 +00004196int
4197main ()
4198{
4199#ifndef __GNUC__
4200 choke me
4201#endif
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 ac_compiler_gnu=yes
4209else
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004213ac_cv_c_compiler_gnu=$ac_compiler_gnu
4214
4215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4217$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4218if test $ac_compiler_gnu = yes; then
4219 GCC=yes
4220else
4221 GCC=
4222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004223ac_test_CFLAGS=${CFLAGS+set}
4224ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4226$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004227if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004229else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230 ac_save_c_werror_flag=$ac_c_werror_flag
4231 ac_c_werror_flag=yes
4232 ac_cv_prog_cc_g=no
4233 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004236
Martin v. Löwis11437992002-04-12 09:54:03 +00004237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004246 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247else
Matthias Kloseb9621712010-04-24 17:59:49 +00004248 CFLAGS=""
4249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250/* end confdefs.h. */
4251
4252int
4253main ()
4254{
4255
4256 ;
4257 return 0;
4258}
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261
Matthias Kloseb9621712010-04-24 17:59:49 +00004262else
4263 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266/* end confdefs.h. */
4267
4268int
4269main ()
4270{
4271
4272 ;
4273 return 0;
4274}
4275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004276if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4284 ac_c_werror_flag=$ac_save_c_werror_flag
4285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4287$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004289 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290elif test $ac_cv_prog_cc_g = yes; then
4291 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004292 CFLAGS="-g -O2"
4293 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004294 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295 fi
4296else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297 if test "$GCC" = yes; then
4298 CFLAGS="-O2"
4299 else
4300 CFLAGS=
4301 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4304$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004305if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004307else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004309ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004311/* end confdefs.h. */
4312#include <stdarg.h>
4313#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004314struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004315/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4316struct buf { int x; };
4317FILE * (*rcsopen) (struct buf *, struct stat *, int);
4318static char *e (p, i)
4319 char **p;
4320 int i;
4321{
4322 return p[i];
4323}
4324static char *f (char * (*g) (char **, int), char **p, ...)
4325{
4326 char *s;
4327 va_list v;
4328 va_start (v,p);
4329 s = g (p, va_arg (v,int));
4330 va_end (v);
4331 return s;
4332}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004333
4334/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4335 function prototypes and stuff, but not '\xHH' hex character constants.
4336 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004338 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4339 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004341int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4342
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4344 inside strings and character constants. */
4345#define FOO(x) 'x'
4346int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4347
Skip Montanaro6dead952003-09-25 14:50:04 +00004348int test (int i, double x);
4349struct s1 {int (*f) (int a);};
4350struct s2 {int (*f) (double a);};
4351int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4352int argc;
4353char **argv;
4354int
4355main ()
4356{
4357return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4358 ;
4359 return 0;
4360}
4361_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4363 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004364do
4365 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369rm -f core conftest.err conftest.$ac_objext
4370 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004371done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004373CC=$ac_save_CC
4374
4375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376# AC_CACHE_VAL
4377case "x$ac_cv_prog_cc_c89" in
4378 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4380$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4383$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004384 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4387$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004388esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004389if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004390
Matthias Kloseb9621712010-04-24 17:59:49 +00004391fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004392
Martin v. Löwis11437992002-04-12 09:54:03 +00004393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004399ac_ext=c
4400ac_cpp='$CPP $CPPFLAGS'
4401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4403ac_compiler_gnu=$ac_cv_c_compiler_gnu
4404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4405$as_echo_n "checking how to run the C preprocessor... " >&6; }
4406# On Suns, sometimes $CPP names a directory.
4407if test -n "$CPP" && test -d "$CPP"; then
4408 CPP=
4409fi
4410if test -z "$CPP"; then
4411 if ${ac_cv_prog_CPP+:} false; then :
4412 $as_echo_n "(cached) " >&6
4413else
4414 # Double quotes because CPP needs to be expanded
4415 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4416 do
4417 ac_preproc_ok=false
4418for ac_c_preproc_warn_flag in '' yes
4419do
4420 # Use a header file that comes with gcc, so configuring glibc
4421 # with a fresh cross-compiler works.
4422 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4423 # <limits.h> exists even on freestanding compilers.
4424 # On the NeXT, cc -E runs the code through the compiler's parser,
4425 # not just through cpp. "Syntax error" is here to catch this case.
4426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4427/* end confdefs.h. */
4428#ifdef __STDC__
4429# include <limits.h>
4430#else
4431# include <assert.h>
4432#endif
4433 Syntax error
4434_ACEOF
4435if ac_fn_c_try_cpp "$LINENO"; then :
4436
4437else
4438 # Broken: fails on valid input.
4439continue
4440fi
4441rm -f conftest.err conftest.i conftest.$ac_ext
4442
4443 # OK, works on sane cases. Now check whether nonexistent headers
4444 # can be detected and how.
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4446/* end confdefs.h. */
4447#include <ac_nonexistent.h>
4448_ACEOF
4449if ac_fn_c_try_cpp "$LINENO"; then :
4450 # Broken: success on invalid input.
4451continue
4452else
4453 # Passes both tests.
4454ac_preproc_ok=:
4455break
4456fi
4457rm -f conftest.err conftest.i conftest.$ac_ext
4458
4459done
4460# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4461rm -f conftest.i conftest.err conftest.$ac_ext
4462if $ac_preproc_ok; then :
4463 break
4464fi
4465
4466 done
4467 ac_cv_prog_CPP=$CPP
4468
4469fi
4470 CPP=$ac_cv_prog_CPP
4471else
4472 ac_cv_prog_CPP=$CPP
4473fi
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4475$as_echo "$CPP" >&6; }
4476ac_preproc_ok=false
4477for ac_c_preproc_warn_flag in '' yes
4478do
4479 # Use a header file that comes with gcc, so configuring glibc
4480 # with a fresh cross-compiler works.
4481 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4482 # <limits.h> exists even on freestanding compilers.
4483 # On the NeXT, cc -E runs the code through the compiler's parser,
4484 # not just through cpp. "Syntax error" is here to catch this case.
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#ifdef __STDC__
4488# include <limits.h>
4489#else
4490# include <assert.h>
4491#endif
4492 Syntax error
4493_ACEOF
4494if ac_fn_c_try_cpp "$LINENO"; then :
4495
4496else
4497 # Broken: fails on valid input.
4498continue
4499fi
4500rm -f conftest.err conftest.i conftest.$ac_ext
4501
4502 # OK, works on sane cases. Now check whether nonexistent headers
4503 # can be detected and how.
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505/* end confdefs.h. */
4506#include <ac_nonexistent.h>
4507_ACEOF
4508if ac_fn_c_try_cpp "$LINENO"; then :
4509 # Broken: success on invalid input.
4510continue
4511else
4512 # Passes both tests.
4513ac_preproc_ok=:
4514break
4515fi
4516rm -f conftest.err conftest.i conftest.$ac_ext
4517
4518done
4519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4520rm -f conftest.i conftest.err conftest.$ac_ext
4521if $ac_preproc_ok; then :
4522
4523else
4524 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4526as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4527See \`config.log' for more details" "$LINENO" 5; }
4528fi
4529
4530ac_ext=c
4531ac_cpp='$CPP $CPPFLAGS'
4532ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4533ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4534ac_compiler_gnu=$ac_cv_c_compiler_gnu
4535
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4537$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4538if ${ac_cv_path_GREP+:} false; then :
4539 $as_echo_n "(cached) " >&6
4540else
4541 if test -z "$GREP"; then
4542 ac_path_GREP_found=false
4543 # Loop through the user's path and test for each of PROGNAME-LIST
4544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4545for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4546do
4547 IFS=$as_save_IFS
4548 test -z "$as_dir" && as_dir=.
4549 for ac_prog in grep ggrep; do
4550 for ac_exec_ext in '' $ac_executable_extensions; do
4551 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4552 as_fn_executable_p "$ac_path_GREP" || continue
4553# Check for GNU ac_path_GREP and select it if it is found.
4554 # Check for GNU $ac_path_GREP
4555case `"$ac_path_GREP" --version 2>&1` in
4556*GNU*)
4557 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4558*)
4559 ac_count=0
4560 $as_echo_n 0123456789 >"conftest.in"
4561 while :
4562 do
4563 cat "conftest.in" "conftest.in" >"conftest.tmp"
4564 mv "conftest.tmp" "conftest.in"
4565 cp "conftest.in" "conftest.nl"
4566 $as_echo 'GREP' >> "conftest.nl"
4567 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4568 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4569 as_fn_arith $ac_count + 1 && ac_count=$as_val
4570 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4571 # Best one so far, save it but keep looking for a better one
4572 ac_cv_path_GREP="$ac_path_GREP"
4573 ac_path_GREP_max=$ac_count
4574 fi
4575 # 10*(2^10) chars as input seems more than enough
4576 test $ac_count -gt 10 && break
4577 done
4578 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4579esac
4580
4581 $ac_path_GREP_found && break 3
4582 done
4583 done
4584 done
4585IFS=$as_save_IFS
4586 if test -z "$ac_cv_path_GREP"; then
4587 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4588 fi
4589else
4590 ac_cv_path_GREP=$GREP
4591fi
4592
4593fi
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4595$as_echo "$ac_cv_path_GREP" >&6; }
4596 GREP="$ac_cv_path_GREP"
4597
4598
Łukasz Langaa785c872016-09-09 17:37:37 -07004599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4600$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4601if ${ac_cv_path_SED+:} false; then :
4602 $as_echo_n "(cached) " >&6
4603else
4604 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4605 for ac_i in 1 2 3 4 5 6 7; do
4606 ac_script="$ac_script$as_nl$ac_script"
4607 done
4608 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4609 { ac_script=; unset ac_script;}
4610 if test -z "$SED"; then
4611 ac_path_SED_found=false
4612 # Loop through the user's path and test for each of PROGNAME-LIST
4613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4614for as_dir in $PATH
4615do
4616 IFS=$as_save_IFS
4617 test -z "$as_dir" && as_dir=.
4618 for ac_prog in sed gsed; do
4619 for ac_exec_ext in '' $ac_executable_extensions; do
4620 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4621 as_fn_executable_p "$ac_path_SED" || continue
4622# Check for GNU ac_path_SED and select it if it is found.
4623 # Check for GNU $ac_path_SED
4624case `"$ac_path_SED" --version 2>&1` in
4625*GNU*)
4626 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4627*)
4628 ac_count=0
4629 $as_echo_n 0123456789 >"conftest.in"
4630 while :
4631 do
4632 cat "conftest.in" "conftest.in" >"conftest.tmp"
4633 mv "conftest.tmp" "conftest.in"
4634 cp "conftest.in" "conftest.nl"
4635 $as_echo '' >> "conftest.nl"
4636 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4637 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4638 as_fn_arith $ac_count + 1 && ac_count=$as_val
4639 if test $ac_count -gt ${ac_path_SED_max-0}; then
4640 # Best one so far, save it but keep looking for a better one
4641 ac_cv_path_SED="$ac_path_SED"
4642 ac_path_SED_max=$ac_count
4643 fi
4644 # 10*(2^10) chars as input seems more than enough
4645 test $ac_count -gt 10 && break
4646 done
4647 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4648esac
4649
4650 $ac_path_SED_found && break 3
4651 done
4652 done
4653 done
4654IFS=$as_save_IFS
4655 if test -z "$ac_cv_path_SED"; then
4656 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4657 fi
4658else
4659 ac_cv_path_SED=$SED
4660fi
4661
4662fi
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4664$as_echo "$ac_cv_path_SED" >&6; }
4665 SED="$ac_cv_path_SED"
4666 rm -f conftest.sed
4667
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004668
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004669
4670
Matthias Kloseb9621712010-04-24 17:59:49 +00004671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4672$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004674# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004675if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004676 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004677
4678 case $withval in
4679 no) with_cxx_main=no
4680 MAINCC='$(CC)';;
4681 yes) with_cxx_main=yes
4682 MAINCC='$(CXX)';;
4683 *) with_cxx_main=yes
4684 MAINCC=$withval
4685 if test -z "$CXX"
4686 then
4687 CXX=$withval
4688 fi;;
4689 esac
4690else
4691
4692 with_cxx_main=no
4693 MAINCC='$(CC)'
4694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004695fi
4696
Matthias Kloseb9621712010-04-24 17:59:49 +00004697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4698$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004699
4700preset_cxx="$CXX"
4701if test -z "$CXX"
4702then
4703 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004704 gcc) if test -n "$ac_tool_prefix"; then
4705 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4706set dummy ${ac_tool_prefix}g++; ac_word=$2
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
4709if ${ac_cv_path_CXX+:} false; then :
4710 $as_echo_n "(cached) " >&6
4711else
4712 case $CXX in
4713 [\\/]* | ?:[\\/]*)
4714 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4715 ;;
4716 *)
4717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718for as_dir in notfound
4719do
4720 IFS=$as_save_IFS
4721 test -z "$as_dir" && as_dir=.
4722 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004724 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726 break 2
4727 fi
4728done
4729 done
4730IFS=$as_save_IFS
4731
4732 ;;
4733esac
4734fi
4735CXX=$ac_cv_path_CXX
4736if test -n "$CXX"; then
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4738$as_echo "$CXX" >&6; }
4739else
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744
4745fi
4746if test -z "$ac_cv_path_CXX"; then
4747 ac_pt_CXX=$CXX
4748 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004752if ${ac_cv_path_ac_pt_CXX+:} false; then :
4753 $as_echo_n "(cached) " >&6
4754else
4755 case $ac_pt_CXX in
4756 [\\/]* | ?:[\\/]*)
4757 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4758 ;;
4759 *)
4760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in notfound
4762do
4763 IFS=$as_save_IFS
4764 test -z "$as_dir" && as_dir=.
4765 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769 break 2
4770 fi
4771done
4772 done
4773IFS=$as_save_IFS
4774
4775 ;;
4776esac
4777fi
4778ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4779if test -n "$ac_pt_CXX"; then
4780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4781$as_echo "$ac_pt_CXX" >&6; }
4782else
4783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
4785fi
4786
4787 if test "x$ac_pt_CXX" = x; then
4788 CXX="g++"
4789 else
4790 case $cross_compiling:$ac_tool_warned in
4791yes:)
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4793$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4794ac_tool_warned=yes ;;
4795esac
4796 CXX=$ac_pt_CXX
4797 fi
4798else
4799 CXX="$ac_cv_path_CXX"
4800fi
4801 ;;
4802 cc) if test -n "$ac_tool_prefix"; then
4803 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4804set dummy ${ac_tool_prefix}c++; ac_word=$2
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004807if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004808 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809else
4810 case $CXX in
4811 [\\/]* | ?:[\\/]*)
4812 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4813 ;;
4814 *)
4815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4816for as_dir in notfound
4817do
4818 IFS=$as_save_IFS
4819 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004823 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 break 2
4825 fi
4826done
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004828IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 ;;
4831esac
4832fi
4833CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004834if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4836$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004837else
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4839$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004841
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004842
4843fi
4844if test -z "$ac_cv_path_CXX"; then
4845 ac_pt_CXX=$CXX
4846 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004850if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004851 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004853 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855 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 +00004856 ;;
4857 *)
4858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859for as_dir in notfound
4860do
4861 IFS=$as_save_IFS
4862 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004865 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004867 break 2
4868 fi
4869done
Matthias Kloseb9621712010-04-24 17:59:49 +00004870 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004871IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004872
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004873 ;;
4874esac
4875fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4877if test -n "$ac_pt_CXX"; then
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4879$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004880else
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004884
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004885 if test "x$ac_pt_CXX" = x; then
4886 CXX="c++"
4887 else
4888 case $cross_compiling:$ac_tool_warned in
4889yes:)
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4892ac_tool_warned=yes ;;
4893esac
4894 CXX=$ac_pt_CXX
4895 fi
4896else
4897 CXX="$ac_cv_path_CXX"
4898fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004899 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004900 clang|*/clang) if test -n "$ac_tool_prefix"; then
4901 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4902set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904$as_echo_n "checking for $ac_word... " >&6; }
4905if ${ac_cv_path_CXX+:} false; then :
4906 $as_echo_n "(cached) " >&6
4907else
4908 case $CXX in
4909 [\\/]* | ?:[\\/]*)
4910 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4911 ;;
4912 *)
4913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in notfound
4915do
4916 IFS=$as_save_IFS
4917 test -z "$as_dir" && as_dir=.
4918 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004920 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922 break 2
4923 fi
4924done
4925 done
4926IFS=$as_save_IFS
4927
Ned Deilycbfb9a52012-06-23 16:02:19 -07004928 ;;
4929esac
4930fi
4931CXX=$ac_cv_path_CXX
4932if test -n "$CXX"; then
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4934$as_echo "$CXX" >&6; }
4935else
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937$as_echo "no" >&6; }
4938fi
4939
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004940
4941fi
4942if test -z "$ac_cv_path_CXX"; then
4943 ac_pt_CXX=$CXX
4944 # Extract the first word of "clang++", so it can be a program name with args.
4945set dummy clang++; ac_word=$2
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947$as_echo_n "checking for $ac_word... " >&6; }
4948if ${ac_cv_path_ac_pt_CXX+:} false; then :
4949 $as_echo_n "(cached) " >&6
4950else
4951 case $ac_pt_CXX in
4952 [\\/]* | ?:[\\/]*)
4953 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4954 ;;
4955 *)
4956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4957for as_dir in notfound
4958do
4959 IFS=$as_save_IFS
4960 test -z "$as_dir" && as_dir=.
4961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004963 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4965 break 2
4966 fi
4967done
4968 done
4969IFS=$as_save_IFS
4970
4971 ;;
4972esac
4973fi
4974ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4975if test -n "$ac_pt_CXX"; then
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4977$as_echo "$ac_pt_CXX" >&6; }
4978else
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4980$as_echo "no" >&6; }
4981fi
4982
4983 if test "x$ac_pt_CXX" = x; then
4984 CXX="clang++"
4985 else
4986 case $cross_compiling:$ac_tool_warned in
4987yes:)
4988{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4989$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4990ac_tool_warned=yes ;;
4991esac
4992 CXX=$ac_pt_CXX
4993 fi
4994else
4995 CXX="$ac_cv_path_CXX"
4996fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004997 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004998 icc|*/icc) if test -n "$ac_tool_prefix"; then
4999 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5000set dummy ${ac_tool_prefix}icpc; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if ${ac_cv_path_CXX+:} false; then :
5004 $as_echo_n "(cached) " >&6
5005else
5006 case $CXX in
5007 [\\/]* | ?:[\\/]*)
5008 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5009 ;;
5010 *)
5011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in notfound
5013do
5014 IFS=$as_save_IFS
5015 test -z "$as_dir" && as_dir=.
5016 for ac_exec_ext in '' $ac_executable_extensions; do
5017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5018 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020 break 2
5021 fi
5022done
5023 done
5024IFS=$as_save_IFS
5025
5026 ;;
5027esac
5028fi
5029CXX=$ac_cv_path_CXX
5030if test -n "$CXX"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5032$as_echo "$CXX" >&6; }
5033else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039fi
5040if test -z "$ac_cv_path_CXX"; then
5041 ac_pt_CXX=$CXX
5042 # Extract the first word of "icpc", so it can be a program name with args.
5043set dummy icpc; ac_word=$2
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045$as_echo_n "checking for $ac_word... " >&6; }
5046if ${ac_cv_path_ac_pt_CXX+:} false; then :
5047 $as_echo_n "(cached) " >&6
5048else
5049 case $ac_pt_CXX in
5050 [\\/]* | ?:[\\/]*)
5051 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5052 ;;
5053 *)
5054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055for as_dir in notfound
5056do
5057 IFS=$as_save_IFS
5058 test -z "$as_dir" && as_dir=.
5059 for ac_exec_ext in '' $ac_executable_extensions; do
5060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5061 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063 break 2
5064 fi
5065done
5066 done
5067IFS=$as_save_IFS
5068
5069 ;;
5070esac
5071fi
5072ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5073if test -n "$ac_pt_CXX"; then
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5075$as_echo "$ac_pt_CXX" >&6; }
5076else
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078$as_echo "no" >&6; }
5079fi
5080
5081 if test "x$ac_pt_CXX" = x; then
5082 CXX="icpc"
5083 else
5084 case $cross_compiling:$ac_tool_warned in
5085yes:)
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5087$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5088ac_tool_warned=yes ;;
5089esac
5090 CXX=$ac_pt_CXX
5091 fi
5092else
5093 CXX="$ac_cv_path_CXX"
5094fi
5095 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096 esac
5097 if test "$CXX" = "notfound"
5098 then
5099 CXX=""
5100 fi
5101fi
5102if test -z "$CXX"
5103then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 if test -n "$ac_tool_prefix"; then
5105 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5106 do
5107 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5108set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005111if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113else
5114 if test -n "$CXX"; then
5115 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5116else
5117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005123 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005124 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005126 break 2
5127 fi
5128done
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005130IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131
5132fi
5133fi
5134CXX=$ac_cv_prog_CXX
5135if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5137$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005141fi
5142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005144 test -n "$CXX" && break
5145 done
5146fi
5147if test -z "$CXX"; then
5148 ac_ct_CXX=$CXX
5149 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5150do
5151 # Extract the first word of "$ac_prog", so it can be a program name with args.
5152set dummy $ac_prog; ac_word=$2
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5154$as_echo_n "checking for $ac_word... " >&6; }
5155if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5156 $as_echo_n "(cached) " >&6
5157else
5158 if test -n "$ac_ct_CXX"; then
5159 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5160else
5161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5162for as_dir in $PATH
5163do
5164 IFS=$as_save_IFS
5165 test -z "$as_dir" && as_dir=.
5166 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005167 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005168 ac_cv_prog_ac_ct_CXX="$ac_prog"
5169 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5170 break 2
5171 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005173 done
5174IFS=$as_save_IFS
5175
5176fi
5177fi
5178ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5179if test -n "$ac_ct_CXX"; then
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5181$as_echo "$ac_ct_CXX" >&6; }
5182else
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5184$as_echo "no" >&6; }
5185fi
5186
5187
5188 test -n "$ac_ct_CXX" && break
5189done
5190
5191 if test "x$ac_ct_CXX" = x; then
5192 CXX="notfound"
5193 else
5194 case $cross_compiling:$ac_tool_warned in
5195yes:)
5196{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5197$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5198ac_tool_warned=yes ;;
5199esac
5200 CXX=$ac_ct_CXX
5201 fi
5202fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203
5204 if test "$CXX" = "notfound"
5205 then
5206 CXX=""
5207 fi
5208fi
5209if test "$preset_cxx" != "$CXX"
5210then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005211 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005212
5213 By default, distutils will build C++ extension modules with \"$CXX\".
5214 If this is not intended, then set CXX on the configure command line.
5215 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005216$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005217
5218 By default, distutils will build C++ extension modules with \"$CXX\".
5219 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005220 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005221fi
5222
5223
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005224MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5225
5226
5227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5228$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5229cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef bfin
5231#undef cris
5232#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005233#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005234#undef hppa
5235#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005236#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005237#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005238#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005239#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005240#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005241#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005242 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005243#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005244# if defined(__x86_64__) && defined(__LP64__)
5245 x86_64-linux-gnu
5246# elif defined(__x86_64__) && defined(__ILP32__)
5247 x86_64-linux-gnux32
5248# elif defined(__i386__)
5249 i386-linux-gnu
5250# elif defined(__aarch64__) && defined(__AARCH64EL__)
5251# if defined(__ILP32__)
5252 aarch64_ilp32-linux-gnu
5253# else
5254 aarch64-linux-gnu
5255# endif
5256# elif defined(__aarch64__) && defined(__AARCH64EB__)
5257# if defined(__ILP32__)
5258 aarch64_be_ilp32-linux-gnu
5259# else
5260 aarch64_be-linux-gnu
5261# endif
5262# elif defined(__alpha__)
5263 alpha-linux-gnu
5264# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5265# if defined(__ARMEL__)
5266 arm-linux-gnueabihf
5267# else
5268 armeb-linux-gnueabihf
5269# endif
5270# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5271# if defined(__ARMEL__)
5272 arm-linux-gnueabi
5273# else
5274 armeb-linux-gnueabi
5275# endif
5276# elif defined(__hppa__)
5277 hppa-linux-gnu
5278# elif defined(__ia64__)
5279 ia64-linux-gnu
5280# elif defined(__m68k__) && !defined(__mcoldfire__)
5281 m68k-linux-gnu
5282# elif defined(__mips_hard_float) && defined(_MIPSEL)
5283# if _MIPS_SIM == _ABIO32
5284 mipsel-linux-gnu
5285# elif _MIPS_SIM == _ABIN32
5286 mips64el-linux-gnuabin32
5287# elif _MIPS_SIM == _ABI64
5288 mips64el-linux-gnuabi64
5289# else
5290# error unknown platform triplet
5291# endif
5292# elif defined(__mips_hard_float)
5293# if _MIPS_SIM == _ABIO32
5294 mips-linux-gnu
5295# elif _MIPS_SIM == _ABIN32
5296 mips64-linux-gnuabin32
5297# elif _MIPS_SIM == _ABI64
5298 mips64-linux-gnuabi64
5299# else
5300# error unknown platform triplet
5301# endif
5302# elif defined(__or1k__)
5303 or1k-linux-gnu
5304# elif defined(__powerpc__) && defined(__SPE__)
5305 powerpc-linux-gnuspe
5306# elif defined(__powerpc64__)
5307# if defined(__LITTLE_ENDIAN__)
5308 powerpc64le-linux-gnu
5309# else
5310 powerpc64-linux-gnu
5311# endif
5312# elif defined(__powerpc__)
5313 powerpc-linux-gnu
5314# elif defined(__s390x__)
5315 s390x-linux-gnu
5316# elif defined(__s390__)
5317 s390-linux-gnu
5318# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5319 sh4-linux-gnu
5320# elif defined(__sparc__) && defined(__arch64__)
5321 sparc64-linux-gnu
5322# elif defined(__sparc__)
5323 sparc-linux-gnu
5324# else
5325# error unknown platform triplet
5326# endif
5327#elif defined(__FreeBSD_kernel__)
5328# if defined(__LP64__)
5329 x86_64-kfreebsd-gnu
5330# elif defined(__i386__)
5331 i386-kfreebsd-gnu
5332# else
5333# error unknown platform triplet
5334# endif
5335#elif defined(__gnu_hurd__)
5336 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005337#elif defined(__APPLE__)
5338 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005339#else
5340# error unknown platform triplet
5341#endif
5342
5343EOF
5344
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005345if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005346 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5348$as_echo "$PLATFORM_TRIPLET" >&6; }
5349else
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5351$as_echo "none" >&6; }
5352fi
5353rm -f conftest.c conftest.out
5354
5355if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5356 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5357 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5358 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005359elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5360 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005361fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005362
doko@ubuntu.com55532312016-06-14 08:55:19 +02005363if test x$MULTIARCH != x; then
5364 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5365fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005366
5367
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5369$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5370save_LDFLAGS="$LDFLAGS"
5371LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005372
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374/* end confdefs.h. */
5375
5376int
5377main ()
5378{
5379
5380 ;
5381 return 0;
5382}
5383_ACEOF
5384if ac_fn_c_try_link "$LINENO"; then :
5385 NO_AS_NEEDED="-Wl,--no-as-needed"
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5387$as_echo "yes" >&6; }
5388else
5389 NO_AS_NEEDED=""
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391$as_echo "no" >&6; }
5392fi
5393rm -f core conftest.err conftest.$ac_objext \
5394 conftest$ac_exeext conftest.$ac_ext
5395LDFLAGS="$save_LDFLAGS"
5396
5397
5398
5399# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400
Matthias Kloseb9621712010-04-24 17:59:49 +00005401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5402$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005403if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405else
5406 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5407 then ac_cv_path_EGREP="$GREP -E"
5408 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 # Loop through the user's path and test for each of PROGNAME-LIST
5412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5414do
5415 IFS=$as_save_IFS
5416 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 for ac_prog in egrep; do
5418 for ac_exec_ext in '' $ac_executable_extensions; do
5419 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005420 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005421# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 # Check for GNU $ac_path_EGREP
5423case `"$ac_path_EGREP" --version 2>&1` in
5424*GNU*)
5425 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5426*)
5427 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 while :
5430 do
5431 cat "conftest.in" "conftest.in" >"conftest.tmp"
5432 mv "conftest.tmp" "conftest.in"
5433 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5436 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5439 # Best one so far, save it but keep looking for a better one
5440 ac_cv_path_EGREP="$ac_path_EGREP"
5441 ac_path_EGREP_max=$ac_count
5442 fi
5443 # 10*(2^10) chars as input seems more than enough
5444 test $ac_count -gt 10 && break
5445 done
5446 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5447esac
5448
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 $ac_path_EGREP_found && break 3
5450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005455 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 +00005456 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457else
5458 ac_cv_path_EGREP=$EGREP
5459fi
5460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461 fi
5462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5464$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005466
5467
Matthias Kloseb9621712010-04-24 17:59:49 +00005468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5469$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005470if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005471 $as_echo_n "(cached) " >&6
5472else
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005474/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005475#include <stdlib.h>
5476#include <stdarg.h>
5477#include <string.h>
5478#include <float.h>
5479
5480int
5481main ()
5482{
5483
5484 ;
5485 return 0;
5486}
5487_ACEOF
5488if ac_fn_c_try_compile "$LINENO"; then :
5489 ac_cv_header_stdc=yes
5490else
5491 ac_cv_header_stdc=no
5492fi
5493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5498/* end confdefs.h. */
5499#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005500
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005501_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505else
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005507fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005508rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509
Matthias Kloseb9621712010-04-24 17:59:49 +00005510fi
5511
5512if test $ac_cv_header_stdc = yes; then
5513 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h. */
5516#include <stdlib.h>
5517
5518_ACEOF
5519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5520 $EGREP "free" >/dev/null 2>&1; then :
5521
5522else
5523 ac_cv_header_stdc=no
5524fi
5525rm -f conftest*
5526
5527fi
5528
5529if test $ac_cv_header_stdc = yes; then
5530 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5531 if test "$cross_compiling" = yes; then :
5532 :
5533else
5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5535/* end confdefs.h. */
5536#include <ctype.h>
5537#include <stdlib.h>
5538#if ((' ' & 0x0FF) == 0x020)
5539# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5540# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5541#else
5542# define ISLOWER(c) \
5543 (('a' <= (c) && (c) <= 'i') \
5544 || ('j' <= (c) && (c) <= 'r') \
5545 || ('s' <= (c) && (c) <= 'z'))
5546# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5547#endif
5548
5549#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5550int
5551main ()
5552{
5553 int i;
5554 for (i = 0; i < 256; i++)
5555 if (XOR (islower (i), ISLOWER (i))
5556 || toupper (i) != TOUPPER (i))
5557 return 2;
5558 return 0;
5559}
5560_ACEOF
5561if ac_fn_c_try_run "$LINENO"; then :
5562
5563else
5564 ac_cv_header_stdc=no
5565fi
5566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5567 conftest.$ac_objext conftest.beam conftest.$ac_ext
5568fi
5569
5570fi
5571fi
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5573$as_echo "$ac_cv_header_stdc" >&6; }
5574if test $ac_cv_header_stdc = yes; then
5575
5576$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5577
5578fi
5579
5580# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5581for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5582 inttypes.h stdint.h unistd.h
5583do :
5584 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5585ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5586"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005587if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 cat >>confdefs.h <<_ACEOF
5589#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5590_ACEOF
5591
5592fi
5593
5594done
5595
5596
5597
5598 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 +02005599if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005600 MINIX=yes
5601else
5602 MINIX=
5603fi
5604
5605
5606 if test "$MINIX" = yes; then
5607
5608$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5609
5610
5611$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5612
5613
5614$as_echo "#define _MINIX 1" >>confdefs.h
5615
5616 fi
5617
5618
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5620$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005621if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005622 $as_echo_n "(cached) " >&6
5623else
5624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5625/* end confdefs.h. */
5626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005627# define __EXTENSIONS__ 1
5628 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005629int
5630main ()
5631{
5632
5633 ;
5634 return 0;
5635}
5636_ACEOF
5637if ac_fn_c_try_compile "$LINENO"; then :
5638 ac_cv_safe_to_define___extensions__=yes
5639else
5640 ac_cv_safe_to_define___extensions__=no
5641fi
5642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5643fi
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5645$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5646 test $ac_cv_safe_to_define___extensions__ = yes &&
5647 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5648
5649 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5650
5651 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5652
5653 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5654
5655 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5656
5657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5660$as_echo_n "checking for the Android API level... " >&6; }
5661cat >> conftest.c <<EOF
5662#ifdef __ANDROID__
5663#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005664android_api = __ANDROID_API__
5665arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005666#else
5667#error not Android
5668#endif
5669EOF
5670
5671if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005672 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5673 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5675$as_echo "$ANDROID_API_LEVEL" >&6; }
5676
5677cat >>confdefs.h <<_ACEOF
5678#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5679_ACEOF
5680
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005681
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5683$as_echo_n "checking for the Android arm ABI... " >&6; }
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5685$as_echo "$_arm_arch" >&6; }
5686 if test "$_arm_arch" = 7; then
5687 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5688 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5689 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005690else
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5692$as_echo "not Android" >&6; }
5693fi
5694rm -f conftest.c conftest.out
5695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696# Check for unsupported systems
5697case $ac_sys_system/$ac_sys_release in
5698atheos*|Linux*/1*)
5699 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5700 echo See README for details.
5701 exit 1;;
5702esac
5703
5704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5706$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005709if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 withval=$with_suffix;
5711 case $withval in
5712 no) EXEEXT=;;
5713 yes) EXEEXT=.exe;;
5714 *) EXEEXT=$withval;;
5715 esac
5716fi
5717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5719$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
5721# Test whether we're running on a non-case-sensitive system, in which
5722# case we give a warning if no ext is given
5723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5725$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726if test ! -d CaseSensitiveTestDir; then
5727mkdir CaseSensitiveTestDir
5728fi
5729
5730if test -d casesensitivetestdir
5731then
Matthias Kloseb9621712010-04-24 17:59:49 +00005732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5733$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734 BUILDEXEEXT=.exe
5735else
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738 BUILDEXEEXT=$EXEEXT
5739fi
5740rmdir CaseSensitiveTestDir
5741
5742case $MACHDEP in
5743bsdos*)
5744 case $CC in
5745 gcc) CC="$CC -D_HAVE_BSDI";;
5746 esac;;
5747esac
5748
5749case $ac_sys_system in
5750hp*|HP*)
5751 case $CC in
5752 cc|*/cc) CC="$CC -Ae";;
5753 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754esac
5755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5758$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759if test -z "$LIBRARY"
5760then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005761 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5764$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766# LDLIBRARY is the name of the library to link against (as opposed to the
5767# name of the library into which to insert object files). BLDLIBRARY is also
5768# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5769# is blank as the main program is not linked directly against LDLIBRARY.
5770# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5771# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5772# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5773# DLLLIBRARY is the shared (i.e., DLL) library.
5774#
5775# RUNSHARED is used to run shared python without installed libraries
5776#
5777# INSTSONAME is the name of the shared library that will be use to install
5778# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005779#
5780# LDVERSION is the shared library version number, normally the Python version
5781# with the ABI build flags appended.
5782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784
5785
5786
5787
5788
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790LDLIBRARY="$LIBRARY"
5791BLDLIBRARY='$(LDLIBRARY)'
5792INSTSONAME='$(LDLIBRARY)'
5793DLLLIBRARY=''
5794LDLIBRARYDIR=''
5795RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005796LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
5798# LINKCC is the command that links the python executable -- default is $(CC).
5799# If CXX is set, and if it is needed to link a main function that was
5800# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5801# python might then depend on the C++ runtime
5802# This is altered for AIX in order to build the export list before
5803# linking.
5804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5806$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807if test -z "$LINKCC"
5808then
5809 LINKCC='$(PURIFY) $(MAINCC)'
5810 case $ac_sys_system in
5811 AIX*)
5812 exp_extra="\"\""
5813 if test $ac_sys_release -ge 5 -o \
5814 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5815 exp_extra="."
5816 fi
5817 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 QNX*)
5819 # qcc must be used because the other compilers do not
5820 # support -N.
5821 LINKCC=qcc;;
5822 esac
5823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5825$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826
5827# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5828# make sure we default having it set to "no": this is used by
5829# distutils.unixccompiler to know if it should add --enable-new-dtags
5830# to linker command lines, and failing to detect GNU ld simply results
5831# in the same bahaviour as before.
5832
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5834$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835ac_prog=ld
5836if test "$GCC" = yes; then
5837 ac_prog=`$CC -print-prog-name=ld`
5838fi
5839case `"$ac_prog" -V 2>&1 < /dev/null` in
5840 *GNU*)
5841 GNULD=yes;;
5842 *)
5843 GNULD=no;;
5844esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5846$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5849$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005851if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852 enableval=$enable_shared;
5853fi
5854
5855
5856if test -z "$enable_shared"
5857then
5858 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005859 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 enable_shared="yes";;
5861 *)
5862 enable_shared="no";;
5863 esac
5864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5866$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
Matthias Kloseb9621712010-04-24 17:59:49 +00005868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5869$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005871if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872 enableval=$enable_profiling;
5873fi
5874
5875if test "x$enable_profiling" = xyes; then
5876 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005877 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879/* end confdefs.h. */
5880int main() { return 0; }
5881_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882if ac_fn_c_try_link "$LINENO"; then :
5883
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005885 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887rm -f core conftest.err conftest.$ac_objext \
5888 conftest$ac_exeext conftest.$ac_ext
5889 CC="$ac_save_cc"
5890else
5891 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5894$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896if test "x$enable_profiling" = xyes; then
5897 BASECFLAGS="-pg $BASECFLAGS"
5898 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899fi
5900
Matthias Kloseb9621712010-04-24 17:59:49 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5902$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903
5904# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5905# library that we build, but we do not want to link against it (we
5906# will find it with a -framework option). For this reason there is an
5907# extra variable BLDLIBRARY against which Python and the extension
5908# modules are linked, BLDLIBRARY. This is normally the same as
5909# LDLIBRARY, but empty for MacOSX framework builds.
5910if test "$enable_framework"
5911then
5912 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005913 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 BLDLIBRARY=''
5915else
5916 BLDLIBRARY='$(LDLIBRARY)'
5917fi
5918
5919# Other platforms follow
5920if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005921 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922
Matthias Kloseb9621712010-04-24 17:59:49 +00005923$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924
5925 case $ac_sys_system in
5926 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).dll.a'
5928 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
5930 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
5932 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005933 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005935 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005936 then
5937 PY3LIBRARY=libpython3.so
5938 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005940 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).so'
5942 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005945 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005946 then
5947 PY3LIBRARY=libpython3.so
5948 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
5950 hp*|HP*)
5951 case `uname -m` in
5952 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
5955 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
5958 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).dylib'
5964 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005967 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005969 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005970 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971
5972 esac
5973else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005974 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 case $ac_sys_system in
5976 CYGWIN*)
5977 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005978 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 ;;
5980 esac
5981fi
5982
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005983if test "$cross_compiling" = yes; then
5984 RUNSHARED=
5985fi
5986
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5988$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989
5990if test -n "$ac_tool_prefix"; then
5991 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5992set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005995if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997else
5998 if test -n "$RANLIB"; then
5999 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6000else
6001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6002for as_dir in $PATH
6003do
6004 IFS=$as_save_IFS
6005 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010 break 2
6011 fi
6012done
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014IFS=$as_save_IFS
6015
6016fi
6017fi
6018RANLIB=$ac_cv_prog_RANLIB
6019if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6021$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022else
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6024$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025fi
6026
6027
6028fi
6029if test -z "$ac_cv_prog_RANLIB"; then
6030 ac_ct_RANLIB=$RANLIB
6031 # Extract the first word of "ranlib", so it can be a program name with args.
6032set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006035if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037else
6038 if test -n "$ac_ct_RANLIB"; then
6039 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6040else
6041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044 IFS=$as_save_IFS
6045 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 break 2
6051 fi
6052done
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054IFS=$as_save_IFS
6055
6056fi
6057fi
6058ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6059if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6061$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062else
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065fi
6066
6067 if test "x$ac_ct_RANLIB" = x; then
6068 RANLIB=":"
6069 else
6070 case $cross_compiling:$ac_tool_warned in
6071yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006072{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6073$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074ac_tool_warned=yes ;;
6075esac
6076 RANLIB=$ac_ct_RANLIB
6077 fi
6078else
6079 RANLIB="$ac_cv_prog_RANLIB"
6080fi
6081
6082
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006083if test -n "$ac_tool_prefix"; then
6084 for ac_prog in ar aal
6085 do
6086 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6087set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6089$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006090if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092else
6093 if test -n "$AR"; then
6094 ac_cv_prog_AR="$AR" # Let the user override the test.
6095else
6096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6097for as_dir in $PATH
6098do
6099 IFS=$as_save_IFS
6100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006103 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105 break 2
6106 fi
6107done
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109IFS=$as_save_IFS
6110
6111fi
6112fi
6113AR=$ac_cv_prog_AR
6114if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6116$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117else
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120fi
6121
6122
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006123 test -n "$AR" && break
6124 done
6125fi
6126if test -z "$AR"; then
6127 ac_ct_AR=$AR
6128 for ac_prog in ar aal
6129do
6130 # Extract the first word of "$ac_prog", so it can be a program name with args.
6131set dummy $ac_prog; ac_word=$2
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6133$as_echo_n "checking for $ac_word... " >&6; }
6134if ${ac_cv_prog_ac_ct_AR+:} false; then :
6135 $as_echo_n "(cached) " >&6
6136else
6137 if test -n "$ac_ct_AR"; then
6138 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6139else
6140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141for as_dir in $PATH
6142do
6143 IFS=$as_save_IFS
6144 test -z "$as_dir" && as_dir=.
6145 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006147 ac_cv_prog_ac_ct_AR="$ac_prog"
6148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149 break 2
6150 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006152 done
6153IFS=$as_save_IFS
6154
6155fi
6156fi
6157ac_ct_AR=$ac_cv_prog_ac_ct_AR
6158if test -n "$ac_ct_AR"; then
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6160$as_echo "$ac_ct_AR" >&6; }
6161else
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163$as_echo "no" >&6; }
6164fi
6165
6166
6167 test -n "$ac_ct_AR" && break
6168done
6169
6170 if test "x$ac_ct_AR" = x; then
6171 AR="ar"
6172 else
6173 case $cross_compiling:$ac_tool_warned in
6174yes:)
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6177ac_tool_warned=yes ;;
6178esac
6179 AR=$ac_ct_AR
6180 fi
6181fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182
6183
6184# tweak ARFLAGS only if the user didn't set it on the command line
6185
6186if test -z "$ARFLAGS"
6187then
6188 ARFLAGS="rc"
6189fi
6190
doko@ubuntu.com58844492012-06-30 18:25:32 +02006191if test -n "$ac_tool_prefix"; then
6192 for ac_prog in readelf
6193 do
6194 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197$as_echo_n "checking for $ac_word... " >&6; }
6198if ${ac_cv_prog_READELF+:} false; then :
6199 $as_echo_n "(cached) " >&6
6200else
6201 if test -n "$READELF"; then
6202 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6203else
6204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205for as_dir in $PATH
6206do
6207 IFS=$as_save_IFS
6208 test -z "$as_dir" && as_dir=.
6209 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006211 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6213 break 2
6214 fi
6215done
6216 done
6217IFS=$as_save_IFS
6218
6219fi
6220fi
6221READELF=$ac_cv_prog_READELF
6222if test -n "$READELF"; then
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6224$as_echo "$READELF" >&6; }
6225else
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6227$as_echo "no" >&6; }
6228fi
6229
6230
6231 test -n "$READELF" && break
6232 done
6233fi
6234if test -z "$READELF"; then
6235 ac_ct_READELF=$READELF
6236 for ac_prog in readelf
6237do
6238 # Extract the first word of "$ac_prog", so it can be a program name with args.
6239set dummy $ac_prog; ac_word=$2
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6241$as_echo_n "checking for $ac_word... " >&6; }
6242if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6243 $as_echo_n "(cached) " >&6
6244else
6245 if test -n "$ac_ct_READELF"; then
6246 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6247else
6248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249for as_dir in $PATH
6250do
6251 IFS=$as_save_IFS
6252 test -z "$as_dir" && as_dir=.
6253 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006255 ac_cv_prog_ac_ct_READELF="$ac_prog"
6256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6257 break 2
6258 fi
6259done
6260 done
6261IFS=$as_save_IFS
6262
6263fi
6264fi
6265ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6266if test -n "$ac_ct_READELF"; then
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6268$as_echo "$ac_ct_READELF" >&6; }
6269else
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271$as_echo "no" >&6; }
6272fi
6273
6274
6275 test -n "$ac_ct_READELF" && break
6276done
6277
6278 if test "x$ac_ct_READELF" = x; then
6279 READELF=":"
6280 else
6281 case $cross_compiling:$ac_tool_warned in
6282yes:)
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6285ac_tool_warned=yes ;;
6286esac
6287 READELF=$ac_ct_READELF
6288 fi
6289fi
6290
6291if test "$cross_compiling" = yes; then
6292 case "$READELF" in
6293 readelf|:)
6294 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6295 ;;
6296 esac
6297fi
6298
6299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301case $MACHDEP in
6302bsdos*|hp*|HP*)
6303 # install -d does not work on BSDI or HP-UX
6304 if test -z "$INSTALL"
6305 then
6306 INSTALL="${srcdir}/install-sh -c"
6307 fi
6308esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309# Find a good install program. We prefer a C program (faster),
6310# so one script is as good as another. But avoid the broken or
6311# incompatible versions:
6312# SysV /etc/install, /usr/sbin/install
6313# SunOS /usr/etc/install
6314# IRIX /sbin/install
6315# AIX /bin/install
6316# AmigaOS /C/install, which installs bootblocks on floppy discs
6317# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6318# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6319# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6320# OS/2's system install, which has a completely different semantic
6321# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006322# Reject install programs that cannot install multiple files.
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6324$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006326if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328else
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332 IFS=$as_save_IFS
6333 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 # Account for people who put trailing slashes in PATH elements.
6335case $as_dir/ in #((
6336 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 /usr/ucb/* ) ;;
6340 *)
6341 # OSF1 and SCO ODT 3.0 have their own names for install.
6342 # Don't use installbsd from OSF since it installs stuff as root
6343 # by default.
6344 for ac_prog in ginstall scoinst install; do
6345 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006346 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347 if test $ac_prog = install &&
6348 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6349 # AIX install. It has an incompatible calling convention.
6350 :
6351 elif test $ac_prog = install &&
6352 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6353 # program-specific install script used by HP pwplus--don't use.
6354 :
6355 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006356 rm -rf conftest.one conftest.two conftest.dir
6357 echo one > conftest.one
6358 echo two > conftest.two
6359 mkdir conftest.dir
6360 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6361 test -s conftest.one && test -s conftest.two &&
6362 test -s conftest.dir/conftest.one &&
6363 test -s conftest.dir/conftest.two
6364 then
6365 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6366 break 3
6367 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368 fi
6369 fi
6370 done
6371 done
6372 ;;
6373esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006374
6375 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376IFS=$as_save_IFS
6377
Matthias Kloseb9621712010-04-24 17:59:49 +00006378rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379
6380fi
6381 if test "${ac_cv_path_install+set}" = set; then
6382 INSTALL=$ac_cv_path_install
6383 else
6384 # As a last resort, use the slow shell script. Don't cache a
6385 # value for INSTALL within a source directory, because that will
6386 # break other packages using the cache if that directory is
6387 # removed, or if the value is a relative name.
6388 INSTALL=$ac_install_sh
6389 fi
6390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6392$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393
6394# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6395# It thinks the first close brace ends the variable substitution.
6396test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6397
6398test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6399
6400test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6401
Matthias Klose93a0ef12012-03-15 18:08:34 +01006402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6403$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6404if test -z "$MKDIR_P"; then
6405 if ${ac_cv_path_mkdir+:} false; then :
6406 $as_echo_n "(cached) " >&6
6407else
6408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6409for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6410do
6411 IFS=$as_save_IFS
6412 test -z "$as_dir" && as_dir=.
6413 for ac_prog in mkdir gmkdir; do
6414 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006415 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006416 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6417 'mkdir (GNU coreutils) '* | \
6418 'mkdir (coreutils) '* | \
6419 'mkdir (fileutils) '4.1*)
6420 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6421 break 3;;
6422 esac
6423 done
6424 done
6425 done
6426IFS=$as_save_IFS
6427
6428fi
6429
6430 test -d ./--version && rmdir ./--version
6431 if test "${ac_cv_path_mkdir+set}" = set; then
6432 MKDIR_P="$ac_cv_path_mkdir -p"
6433 else
6434 # As a last resort, use the slow shell script. Don't cache a
6435 # value for MKDIR_P within a source directory, because that will
6436 # break other packages using the cache if that directory is
6437 # removed, or if the value is a relative name.
6438 MKDIR_P="$ac_install_sh -d"
6439 fi
6440fi
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6442$as_echo "$MKDIR_P" >&6; }
6443
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444
6445# Not every filesystem supports hard links
6446
6447if test -z "$LN" ; then
6448 case $ac_sys_system in
6449 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450 *) LN=ln;;
6451 esac
6452fi
6453
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006454# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006455
6456ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006457
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6460$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006461
6462# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006463if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464 withval=$with_pydebug;
6465if test "$withval" != no
6466then
6467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469
Matthias Kloseb9621712010-04-24 17:59:49 +00006470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6471$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006472 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006473 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006474else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476fi
6477else
Matthias Kloseb9621712010-04-24 17:59:49 +00006478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006480fi
6481
6482
T. Woutersddbfa2c2017-05-23 01:30:49 +02006483# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6484# the ABI. This allows enabling assertions without changing the ABI.
6485assertions='false'
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6487$as_echo_n "checking for --with-assertions... " >&6; }
6488
6489# Check whether --with-assertions was given.
6490if test "${with_assertions+set}" = set; then :
6491 withval=$with_assertions;
6492if test "$withval" != no
6493then
6494 assertions='true'
6495fi
6496fi
6497
6498if test "$assertions" = 'true'; then
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6500$as_echo "yes" >&6; }
6501elif test "$Py_DEBUG" = 'true'; then
6502 assertions='true'
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6504$as_echo "implied by --with-pydebug" >&6; }
6505else
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; }
6508fi
6509
Brett Cannon63d98bc2016-09-06 17:12:40 -07006510# Enable optimization flags
6511
6512
6513Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6515$as_echo_n "checking for --enable-optimizations... " >&6; }
6516# Check whether --enable-optimizations was given.
6517if test "${enable_optimizations+set}" = set; then :
6518 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006519if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006520then
6521 Py_OPT='true'
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6523$as_echo "yes" >&6; };
6524else
6525 Py_OPT='false'
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6527$as_echo "no" >&6; };
6528fi
6529else
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006535 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6536 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006537 # 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 +00006538 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006539 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006540 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006541 DEF_MAKE_RULE="build_all"
6542else
6543 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006544 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006545 DEF_MAKE_RULE="all"
6546fi
6547
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006548# Enable LTO flags
6549
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6551$as_echo_n "checking for --with-lto... " >&6; }
6552
6553# Check whether --with-lto was given.
6554if test "${with_lto+set}" = set; then :
6555 withval=$with_lto;
6556if test "$withval" != no
6557then
6558 Py_LTO='true'
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6560$as_echo "yes" >&6; };
6561else
6562 Py_LTO='false'
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; };
6565fi
6566else
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6568$as_echo "no" >&6; }
6569fi
6570
6571if test "$Py_LTO" = 'true' ; then
6572 case $CC in
6573 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006574 case $ac_sys_system in
6575 Darwin*)
6576 # Any changes made here should be reflected in the GCC+Darwin case below
6577 LTOFLAGS="-flto -Wl,-export_dynamic"
6578 ;;
6579 *)
6580 LTOFLAGS="-flto"
6581 ;;
6582 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006583 ;;
6584 *gcc*)
6585 case $ac_sys_system in
6586 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006587 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006588 ;;
6589 *)
6590 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6591 ;;
6592 esac
6593 ;;
6594 esac
6595fi
6596
Brett Cannon7188a3e2015-09-18 15:13:44 -07006597# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006598
6599
6600
6601
6602
Gregory P. Smith799520c2016-09-07 16:10:00 -07006603# Make this work on systems where llvm tools are not installed with their
6604# normal names in the default $PATH (ie: Ubuntu). They exist under the
6605# non-suffixed name in their versioned llvm directory.
6606llvm_bin_dir=''
6607llvm_path="${PATH}"
6608if test "${CC}" = "clang"
6609then
6610 clang_bin=`which clang`
6611 # Some systems install clang elsewhere as a symlink to the real path
6612 # which is where the related llvm tools are located.
6613 if test -L "${clang_bin}"
6614 then
6615 clang_dir=`dirname "${clang_bin}"`
6616 clang_bin=`readlink "${clang_bin}"`
6617 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6618 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6619 fi
6620fi
Zachary Ware5af85642015-12-21 12:09:17 -06006621
Gregory P. Smith799520c2016-09-07 16:10:00 -07006622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6623$as_echo_n "checking target system type... " >&6; }
6624if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006625 $as_echo_n "(cached) " >&6
6626else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006627 if test "x$target_alias" = x; then
6628 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006629else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006630 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6631 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6632fi
6633
6634fi
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6636$as_echo "$ac_cv_target" >&6; }
6637case $ac_cv_target in
6638*-*-*) ;;
6639*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6640esac
6641target=$ac_cv_target
6642ac_save_IFS=$IFS; IFS='-'
6643set x $ac_cv_target
6644shift
6645target_cpu=$1
6646target_vendor=$2
6647shift; shift
6648# Remember, the first character of IFS is used to create $*,
6649# except with old shells:
6650target_os=$*
6651IFS=$ac_save_IFS
6652case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6653
6654
6655# The aliases save the names the user supplied, while $host etc.
6656# will get canonicalized.
6657test -n "$target_alias" &&
6658 test "$program_prefix$program_suffix$program_transform_name" = \
6659 NONENONEs,x,x, &&
6660 program_prefix=${target_alias}-
6661# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6662set dummy $target_alias-llvm-profdata; ac_word=$2
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006680 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ;;
6689esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006690fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6692if test -n "$LLVM_PROFDATA"; then
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6694$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695else
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697$as_echo "no" >&6; }
6698fi
6699
6700
Gregory P. Smith799520c2016-09-07 16:10:00 -07006701if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6702 if test "$build" = "$target"; then
6703 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6704 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6705set dummy llvm-profdata; ac_word=$2
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6709 $as_echo_n "(cached) " >&6
6710else
6711 case $ac_pt_LLVM_PROFDATA in
6712 [\\/]* | ?:[\\/]*)
6713 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6714 ;;
6715 *)
6716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in ${llvm_path}
6718do
6719 IFS=$as_save_IFS
6720 test -z "$as_dir" && as_dir=.
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725 break 2
6726 fi
6727done
6728 done
6729IFS=$as_save_IFS
6730
6731 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6732 ;;
6733esac
6734fi
6735ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6736if test -n "$ac_pt_LLVM_PROFDATA"; then
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6738$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6739else
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6741$as_echo "no" >&6; }
6742fi
6743
6744 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6745 else
6746 LLVM_PROFDATA="''"
6747 fi
6748else
6749 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6750fi
6751
6752
6753if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6754then
6755 LLVM_PROF_FOUND="found"
6756else
6757 LLVM_PROF_FOUND="not-found"
6758fi
6759if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6760then
6761 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6762 if test -n "${found_llvm_profdata}"
6763 then
6764 # llvm-profdata isn't directly in $PATH in some cases.
6765 # https://apple.stackexchange.com/questions/197053/
6766 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6767 LLVM_PROF_FOUND=found
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6769$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6770 fi
6771fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006772LLVM_PROF_ERR=no
6773case $CC in
6774 *clang*)
6775 # Any changes made here should be reflected in the GCC+Darwin case below
6776 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6777 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006779 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6780 if test $LLVM_PROF_FOUND = not-found
6781 then
6782 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006783 if test "${REQUIRE_PGO}" = "yes"
6784 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006785 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 -07006786 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006787 fi
6788 ;;
6789 *gcc*)
6790 case $ac_sys_system in
6791 Darwin*)
6792 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6793 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006794 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006795 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006796 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006797 then
6798 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006799 if test "${REQUIRE_PGO}" = "yes"
6800 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006801 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 -07006802 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 fi
6804 ;;
6805 *)
6806 PGO_PROF_GEN_FLAG="-fprofile-generate"
6807 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6808 LLVM_PROF_MERGER="true"
6809 LLVM_PROF_FILE=""
6810 ;;
6811 esac
6812 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006813 *icc*)
6814 PGO_PROF_GEN_FLAG="-prof-gen"
6815 PGO_PROF_USE_FLAG="-prof-use"
6816 LLVM_PROF_MERGER="true"
6817 LLVM_PROF_FILE=""
6818 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819esac
6820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6822# merged with this chunk of code?
6823
6824# Optimizer/debugger flags
6825# ------------------------
6826# (The following bit of code is complicated enough - please keep things
6827# indented properly. Just pretend you're editing Python code. ;-)
6828
6829# There are two parallel sets of case statements below, one that checks to
6830# see if OPT was set and one that does BASECFLAGS setting based upon
6831# compiler and platform. BASECFLAGS tweaks need to be made even if the
6832# user set OPT.
6833
6834# tweak OPT based on compiler and platform, only if the user didn't set
6835# it on the command line
6836
Victor Stinner9ed34a82017-05-02 22:35:58 +02006837
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006838if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839then
6840 case $GCC in
6841 yes)
6842 if test "$CC" != 'g++' ; then
6843 STRICT_PROTO="-Wstrict-prototypes"
6844 fi
6845 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6846 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6847 WRAP="-fwrapv"
6848 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006849
Stefan Krahaf04ff22011-12-08 22:20:31 +01006850 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006851 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006852 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006853 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006854 *)
6855 if $CC --version 2>&1 | grep -q clang
6856 then
6857 cc_is_clang=1
6858 else
6859 cc_is_clang=
6860 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006861 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006862
Victor Stinner35f3d242017-04-21 12:35:24 +02006863 if test -n "${cc_is_clang}"
6864 then
6865 # Clang also needs -fwrapv
6866 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006867 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6868 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006869 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006870 fi
6871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872 case $ac_cv_prog_cc_g in
6873 yes)
6874 if test "$Py_DEBUG" = 'true' ; then
6875 # Optimization messes up debuggers, so turn it off for
6876 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006877 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006878 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006879 else
Victor Stinner28205b22017-04-21 11:24:34 +02006880 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006881 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882 else
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884 fi
6885 ;;
6886 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006887 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888 ;;
6889 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006890
Victor Stinner826f83f2017-04-28 15:07:10 +02006891 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 case $ac_sys_system in
6894 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6895 ;;
6896 esac
6897 ;;
6898
6899 *)
6900 OPT="-O"
6901 ;;
6902 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903fi
6904
6905
6906
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908# The -arch flags for universal builds on OSX
6909UNIVERSAL_ARCH_FLAGS=
6910
6911
6912# tweak BASECFLAGS based on compiler and platform
6913case $GCC in
6914yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006915 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006916
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6918$as_echo_n "checking for -Wextra... " >&6; }
6919 ac_save_cc="$CC"
6920 CC="$CC -Wextra -Werror"
6921 if ${ac_cv_extra_warnings+:} false; then :
6922 $as_echo_n "(cached) " >&6
6923else
6924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6925/* end confdefs.h. */
6926
6927
6928int
6929main ()
6930{
6931
6932 ;
6933 return 0;
6934}
6935
6936_ACEOF
6937if ac_fn_c_try_compile "$LINENO"; then :
6938
6939 ac_cv_extra_warnings=yes
6940
6941else
6942
6943 ac_cv_extra_warnings=no
6944
6945fi
6946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6947fi
6948
6949 CC="$ac_save_cc"
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6951$as_echo "$ac_cv_extra_warnings" >&6; }
6952
6953 if test $ac_cv_extra_warnings = yes
6954 then
6955 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6956 fi
6957
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006958 # Python doesn't violate C99 aliasing rules, but older versions of
6959 # GCC produce warnings for legal Python code. Enable
6960 # -fno-strict-aliasing on versions of GCC that support but produce
6961 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6963$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964 ac_save_cc="$CC"
6965 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006966 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006967 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006971/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006972
Matthias Kloseb159a552010-04-25 21:00:44 +00006973
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006974int
6975main ()
6976{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006977
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006978 ;
6979 return 0;
6980}
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006983if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006984
6985 CC="$ac_save_cc -fstrict-aliasing"
6986 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988/* end confdefs.h. */
6989
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006990 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006991int
6992main ()
6993{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006994double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006995 ;
6996 return 0;
6997}
Matthias Kloseb159a552010-04-25 21:00:44 +00006998
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007000if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007001
7002 ac_cv_no_strict_aliasing=no
7003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004else
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
7006 ac_cv_no_strict_aliasing=yes
7007
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007010
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011else
Matthias Kloseb159a552010-04-25 21:00:44 +00007012
7013 ac_cv_no_strict_aliasing=no
7014
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007015fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007017fi
7018
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7022$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007024 then
7025 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7026 fi
7027
Zachary Ware5af85642015-12-21 12:09:17 -06007028 # ICC doesn't recognize the option, but only emits a warning
7029 ## XXX does it emit an unused result warning and can it be disabled?
7030 case "$CC" in
7031 *icc*)
7032 ac_cv_disable_unused_result_warning=no
7033 ;;
7034 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7036$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7037 ac_save_cc="$CC"
7038 CC="$CC -Wunused-result -Werror"
7039 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007040 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007041 $as_echo_n "(cached) " >&6
7042else
7043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7044/* end confdefs.h. */
7045
7046
7047int
7048main ()
7049{
7050
7051 ;
7052 return 0;
7053}
7054
7055_ACEOF
7056if ac_fn_c_try_compile "$LINENO"; then :
7057
7058 ac_cv_disable_unused_result_warning=yes
7059
7060else
7061
7062 ac_cv_disable_unused_result_warning=no
7063
7064fi
7065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7066fi
7067
7068 CFLAGS="$save_CFLAGS"
7069 CC="$ac_save_cc"
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7071$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007072 ;;
7073 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007074
7075 if test $ac_cv_disable_unused_result_warning = yes
7076 then
7077 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007078 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7079 fi
7080
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7082$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7083 ac_save_cc="$CC"
7084 CC="$CC -Wunused-parameter -Werror"
7085 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7086 $as_echo_n "(cached) " >&6
7087else
7088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7089/* end confdefs.h. */
7090
7091
7092int
7093main ()
7094{
7095
7096 ;
7097 return 0;
7098}
7099
7100_ACEOF
7101if ac_fn_c_try_compile "$LINENO"; then :
7102
7103 ac_cv_disable_unused_parameter_warning=yes
7104
7105else
7106
7107 ac_cv_disable_unused_parameter_warning=no
7108
7109fi
7110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7111fi
7112
7113 CC="$ac_save_cc"
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7115$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7116
7117 if test $ac_cv_disable_unused_parameter_warning = yes
7118 then
7119 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7120 fi
7121
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7123$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7124 ac_save_cc="$CC"
7125 CC="$CC -Wmissing-field-initializers -Werror"
7126 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7127 $as_echo_n "(cached) " >&6
7128else
7129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7130/* end confdefs.h. */
7131
7132
7133int
7134main ()
7135{
7136
7137 ;
7138 return 0;
7139}
7140
7141_ACEOF
7142if ac_fn_c_try_compile "$LINENO"; then :
7143
7144 ac_cv_disable_missing_field_initializers=yes
7145
7146else
7147
7148 ac_cv_disable_missing_field_initializers=no
7149
7150fi
7151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152fi
7153
7154 CC="$ac_save_cc"
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7156$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7157
7158 if test $ac_cv_disable_missing_field_initializers = yes
7159 then
7160 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007161 fi
7162
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7164$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7165 ac_save_cc="$CC"
7166 CC="$CC -Wsign-compare"
7167 save_CFLAGS="$CFLAGS"
7168 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7169 $as_echo_n "(cached) " >&6
7170else
7171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7172/* end confdefs.h. */
7173
7174
7175int
7176main ()
7177{
7178
7179 ;
7180 return 0;
7181}
7182
7183_ACEOF
7184if ac_fn_c_try_compile "$LINENO"; then :
7185
7186 ac_cv_enable_sign_compare_warning=yes
7187
7188else
7189
7190 ac_cv_enable_sign_compare_warning=no
7191
7192fi
7193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7194fi
7195
7196 CFLAGS="$save_CFLAGS"
7197 CC="$ac_save_cc"
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7199$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7200
7201 if test $ac_cv_enable_sign_compare_warning = yes
7202 then
7203 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7204 fi
7205
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7207$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7208 ac_save_cc="$CC"
7209 CC="$CC -Wunreachable-code"
7210 save_CFLAGS="$CFLAGS"
7211 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7212 $as_echo_n "(cached) " >&6
7213else
7214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7215/* end confdefs.h. */
7216
7217
7218int
7219main ()
7220{
7221
7222 ;
7223 return 0;
7224}
7225
7226_ACEOF
7227if ac_fn_c_try_compile "$LINENO"; then :
7228
7229 ac_cv_enable_unreachable_code_warning=yes
7230
7231else
7232
7233 ac_cv_enable_unreachable_code_warning=no
7234
7235fi
7236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7237fi
7238
7239 CFLAGS="$save_CFLAGS"
7240 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007241
7242 # Don't enable unreachable code warning in debug mode, since it usually
7243 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007244 # Issue #24324: Unfortunately, the unreachable code warning does not work
7245 # correctly on gcc and has been silently removed from the compiler.
7246 # It is supported on clang but on OS X systems gcc may be an alias
7247 # for clang. Try to determine if the compiler is not really gcc and,
7248 # if so, only then enable the warning.
7249 if test $ac_cv_enable_unreachable_code_warning = yes && \
7250 test "$Py_DEBUG" != "true" && \
7251 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007252 then
7253 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007254 else
7255 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007256 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7258$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007259
Victor Stinner193ee0a2017-02-06 14:24:00 +01007260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7261$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7262 ac_save_cc="$CC"
7263 CC="$CC -Werror=implicit-function-declaration"
7264 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7265 $as_echo_n "(cached) " >&6
7266else
7267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7268/* end confdefs.h. */
7269
7270
7271int
7272main ()
7273{
7274
7275 ;
7276 return 0;
7277}
7278
7279_ACEOF
7280if ac_fn_c_try_compile "$LINENO"; then :
7281
7282 ac_cv_enable_implicit_function_declaration_error=yes
7283
7284else
7285
7286 ac_cv_enable_implicit_function_declaration_error=no
7287
7288fi
7289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7290fi
7291
7292 CC="$ac_save_cc"
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7294$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7295
7296 if test $ac_cv_enable_implicit_function_declaration_error = yes
7297 then
7298 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7299 fi
7300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007301 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7302 # support. Without this, treatment of subnormals doesn't follow
7303 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007304 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007305 alpha*)
7306 BASECFLAGS="$BASECFLAGS -mieee"
7307 ;;
7308 esac
7309
7310 case $ac_sys_system in
7311 SCO_SV*)
7312 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7313 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007314
7315 # is there any other compiler on Darwin besides gcc?
7316 Darwin*)
7317 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7318 # used to be here, but non-Apple gcc doesn't accept them.
7319 if test "${CC}" = gcc
7320 then
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007322$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007323 case "${UNIVERSALSDK}" in
7324 */MacOSX10.4u.sdk)
7325 # Build using 10.4 SDK, force usage of gcc when the
7326 # compiler is gcc, otherwise the user will get very
7327 # confusing error messages when building on OSX 10.6
7328 CC=gcc-4.0
7329 CPP=cpp-4.0
7330 ;;
7331 esac
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007333$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007334 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335
Ned Deily87adb6e2013-10-18 21:09:56 -07007336 if test "${enable_universalsdk}"
7337 then
7338 case "$UNIVERSAL_ARCHS" in
7339 32-bit)
7340 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7341 LIPO_32BIT_FLAGS=""
7342 ARCH_RUN_32BIT=""
7343 ;;
7344 64-bit)
7345 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7346 LIPO_32BIT_FLAGS=""
7347 ARCH_RUN_32BIT="true"
7348 ;;
7349 all)
7350 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7351 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7352 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7353 ;;
7354 intel)
7355 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7356 LIPO_32BIT_FLAGS="-extract i386"
7357 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7358 ;;
7359 intel-32)
7360 UNIVERSAL_ARCH_FLAGS="-arch i386"
7361 LIPO_32BIT_FLAGS=""
7362 ARCH_RUN_32BIT=""
7363 ;;
7364 3-way)
7365 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7366 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7367 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7368 ;;
7369 *)
7370 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7371 ;;
7372 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373
Ned Deily87adb6e2013-10-18 21:09:56 -07007374 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7375 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7376 if test "${UNIVERSALSDK}" != "/"
7377 then
7378 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7379 fi
7380 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381
Ned Deily87adb6e2013-10-18 21:09:56 -07007382 # Calculate an appropriate deployment target for this build:
7383 # The deployment target value is used explicitly to enable certain
7384 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007385 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007386 # component of the string returned by distutils.get_platform().
7387 #
7388 # Use the value from:
7389 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7390 # 2. the operating system version of the build machine if >= 10.6
7391 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7392 # below to pick either 10.3, 10.4, or 10.5 as the target.
7393 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394
Ned Deily87adb6e2013-10-18 21:09:56 -07007395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7396$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007397 cur_target_major=`sw_vers -productVersion | \
7398 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7399 cur_target_minor=`sw_vers -productVersion | \
7400 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7401 cur_target="${cur_target_major}.${cur_target_minor}"
7402 if test ${cur_target_major} -eq 10 && \
7403 test ${cur_target_minor} -ge 3 && \
7404 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007405 then
Ned Deily36820b62014-06-25 13:44:22 -07007406 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007407 cur_target=10.3
7408 if test ${enable_universalsdk}
7409 then
7410 case "$UNIVERSAL_ARCHS" in
7411 all|3-way|intel|64-bit)
7412 # These configurations were first supported in 10.5
7413 cur_target='10.5'
7414 ;;
7415 esac
7416 else
7417 if test `/usr/bin/arch` = "i386"
7418 then
7419 # 10.4 was the first release to support Intel archs
7420 cur_target="10.4"
7421 fi
7422 fi
7423 fi
7424 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007425
Ned Deily87adb6e2013-10-18 21:09:56 -07007426 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7427 # environment with a value that is the same as what we'll use
7428 # in the Makefile to ensure that we'll get the same compiler
7429 # environment during configure and build time.
7430 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7431 export MACOSX_DEPLOYMENT_TARGET
7432 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7434$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007435
Ned Deily87adb6e2013-10-18 21:09:56 -07007436 # end of Darwin* tests
7437 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438 esac
7439 ;;
7440
7441*)
7442 case $ac_sys_system in
7443 OpenUNIX*|UnixWare*)
7444 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7445 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446 SCO_SV*)
7447 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7448 ;;
7449 esac
7450 ;;
7451esac
7452
Zachary Ware5af85642015-12-21 12:09:17 -06007453# ICC needs -fp-model strict or floats behave badly
7454case "$CC" in
7455*icc*)
7456 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7457 ;;
7458esac
7459
T. Woutersddbfa2c2017-05-23 01:30:49 +02007460if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461 :
7462else
7463 OPT="-DNDEBUG $OPT"
7464fi
7465
7466if test "$ac_arch_flags"
7467then
7468 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7469fi
7470
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471# On some compilers, pthreads are available without further options
7472# (e.g. MacOS X). On some of these systems, the compiler will not
7473# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7474# So we have to see first whether pthreads are available without
7475# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7477$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480else
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482 ac_cv_pthread_is_default=no
7483else
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485/* end confdefs.h. */
7486
Stefan Krah7dba5942012-11-22 22:49:11 +01007487#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488#include <pthread.h>
7489
7490void* routine(void* p){return NULL;}
7491
7492int main(){
7493 pthread_t p;
7494 if(pthread_create(&p,NULL,routine,NULL)!=0)
7495 return 1;
7496 (void)pthread_detach(p);
7497 return 0;
7498}
7499
7500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007501if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502
7503 ac_cv_pthread_is_default=yes
7504 ac_cv_kthread=no
7505 ac_cv_pthread=no
7506
7507else
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7511 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512fi
7513
7514
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515fi
7516
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7518$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519
7520
7521if test $ac_cv_pthread_is_default = yes
7522then
7523 ac_cv_kpthread=no
7524else
7525# -Kpthread, if available, provides the right #defines
7526# and linker options to make pthread_create available
7527# Some compilers won't report that they do not support -Kpthread,
7528# so we need to run a program to see whether it really made the
7529# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7531$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007532if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534else
7535 ac_save_cc="$CC"
7536CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007537if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538 ac_cv_kpthread=no
7539else
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541/* end confdefs.h. */
7542
Stefan Krah7dba5942012-11-22 22:49:11 +01007543#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544#include <pthread.h>
7545
7546void* routine(void* p){return NULL;}
7547
7548int main(){
7549 pthread_t p;
7550 if(pthread_create(&p,NULL,routine,NULL)!=0)
7551 return 1;
7552 (void)pthread_detach(p);
7553 return 0;
7554}
7555
7556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007557if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558 ac_cv_kpthread=yes
7559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7563 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564fi
7565
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566CC="$ac_save_cc"
7567fi
7568
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7570$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571fi
7572
7573if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7574then
7575# -Kthread, if available, provides the right #defines
7576# and linker options to make pthread_create available
7577# Some compilers won't report that they do not support -Kthread,
7578# so we need to run a program to see whether it really made the
7579# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7581$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007582if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584else
7585 ac_save_cc="$CC"
7586CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007587if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588 ac_cv_kthread=no
7589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591/* end confdefs.h. */
7592
Stefan Krah7dba5942012-11-22 22:49:11 +01007593#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594#include <pthread.h>
7595
7596void* routine(void* p){return NULL;}
7597
7598int main(){
7599 pthread_t p;
7600 if(pthread_create(&p,NULL,routine,NULL)!=0)
7601 return 1;
7602 (void)pthread_detach(p);
7603 return 0;
7604}
7605
7606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007607if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608 ac_cv_kthread=yes
7609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614fi
7615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616CC="$ac_save_cc"
7617fi
7618
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7620$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621fi
7622
7623if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7624then
7625# -pthread, if available, provides the right #defines
7626# and linker options to make pthread_create available
7627# Some compilers won't report that they do not support -pthread,
7628# so we need to run a program to see whether it really made the
7629# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7631$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007632if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634else
7635 ac_save_cc="$CC"
7636CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007637if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638 ac_cv_pthread=no
7639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641/* end confdefs.h. */
7642
Stefan Krah7dba5942012-11-22 22:49:11 +01007643#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644#include <pthread.h>
7645
7646void* routine(void* p){return NULL;}
7647
7648int main(){
7649 pthread_t p;
7650 if(pthread_create(&p,NULL,routine,NULL)!=0)
7651 return 1;
7652 (void)pthread_detach(p);
7653 return 0;
7654}
7655
7656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007657if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658 ac_cv_pthread=yes
7659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664fi
7665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666CC="$ac_save_cc"
7667fi
7668
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7670$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671fi
7672
7673# If we have set a CC compiler flag for thread support then
7674# check if it works for CXX, too.
7675ac_cv_cxx_thread=no
7676if test ! -z "$CXX"
7677then
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7679$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680ac_save_cxx="$CXX"
7681
7682if test "$ac_cv_kpthread" = "yes"
7683then
7684 CXX="$CXX -Kpthread"
7685 ac_cv_cxx_thread=yes
7686elif test "$ac_cv_kthread" = "yes"
7687then
7688 CXX="$CXX -Kthread"
7689 ac_cv_cxx_thread=yes
7690elif test "$ac_cv_pthread" = "yes"
7691then
7692 CXX="$CXX -pthread"
7693 ac_cv_cxx_thread=yes
7694fi
7695
7696if test $ac_cv_cxx_thread = yes
7697then
7698 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7699 $CXX -c conftest.$ac_ext 2>&5
7700 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7701 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7702 then
7703 ac_cv_cxx_thread=yes
7704 else
7705 ac_cv_cxx_thread=no
7706 fi
7707 rm -fr conftest*
7708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7710$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711fi
7712CXX="$ac_save_cxx"
7713
7714
7715# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7717$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007718if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720else
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722/* end confdefs.h. */
7723#include <stdlib.h>
7724#include <stdarg.h>
7725#include <string.h>
7726#include <float.h>
7727
7728int
7729main ()
7730{
7731
7732 ;
7733 return 0;
7734}
7735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007736if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737 ac_cv_header_stdc=yes
7738else
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007740fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7742
7743if test $ac_cv_header_stdc = yes; then
7744 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746/* end confdefs.h. */
7747#include <string.h>
7748
7749_ACEOF
7750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 $EGREP "memchr" >/dev/null 2>&1; then :
7752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753else
7754 ac_cv_header_stdc=no
7755fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007756rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757
7758fi
7759
7760if test $ac_cv_header_stdc = yes; then
7761 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763/* end confdefs.h. */
7764#include <stdlib.h>
7765
7766_ACEOF
7767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 $EGREP "free" >/dev/null 2>&1; then :
7769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770else
7771 ac_cv_header_stdc=no
7772fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007773rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774
7775fi
7776
7777if test $ac_cv_header_stdc = yes; then
7778 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780 :
7781else
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783/* end confdefs.h. */
7784#include <ctype.h>
7785#include <stdlib.h>
7786#if ((' ' & 0x0FF) == 0x020)
7787# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7788# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7789#else
7790# define ISLOWER(c) \
7791 (('a' <= (c) && (c) <= 'i') \
7792 || ('j' <= (c) && (c) <= 'r') \
7793 || ('s' <= (c) && (c) <= 'z'))
7794# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7795#endif
7796
7797#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7798int
7799main ()
7800{
7801 int i;
7802 for (i = 0; i < 256; i++)
7803 if (XOR (islower (i), ISLOWER (i))
7804 || toupper (i) != TOUPPER (i))
7805 return 2;
7806 return 0;
7807}
7808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007809if ac_fn_c_try_run "$LINENO"; then :
7810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811else
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007816fi
7817
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818fi
7819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7821$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007822if test $ac_cv_header_stdc = yes; then
7823
Matthias Kloseb9621712010-04-24 17:59:49 +00007824$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825
7826fi
7827
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007828for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007829fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007830ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007831sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007832unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007833poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007834sys/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 +01007835sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007836sys/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 +01007837sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007838sys/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 -07007839libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007840linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007841sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007842do :
7843 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7844ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007845if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007847#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007848_ACEOF
7849
7850fi
7851
Guido van Rossum627b2d71993-12-24 10:39:16 +00007852done
7853
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007854ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007855for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7858$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007859if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007861else
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007863/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007864#include <sys/types.h>
7865#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
Martin v. Löwis11437992002-04-12 09:54:03 +00007867int
7868main ()
7869{
7870if ((DIR *) 0)
7871return 0;
7872 ;
7873 return 0;
7874}
7875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007876if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007878else
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007883eval ac_res=\$$as_ac_Header
7884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7885$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007886if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007888#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007889_ACEOF
7890
7891ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007894done
7895# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7896if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7898$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007899if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007901else
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906/* Override any GCC internal prototype to avoid an error.
7907 Use char because int might match the return type of a GCC
7908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007909#ifdef __cplusplus
7910extern "C"
7911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007912char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007913int
7914main ()
7915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 ;
7918 return 0;
7919}
7920_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921for ac_lib in '' dir; do
7922 if test -z "$ac_lib"; then
7923 ac_res="none required"
7924 else
7925 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007926 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007931rm -f core conftest.err conftest.$ac_objext \
7932 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007933 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936done
Victor Stinnere0be4232011-10-25 13:06:09 +02007937if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939else
7940 ac_cv_search_opendir=no
7941fi
7942rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007943LIBS=$ac_func_search_save_LIBS
7944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7946$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007948if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007950
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007951fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007952
Michael W. Hudson54241132001-12-07 15:38:26 +00007953else
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7955$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007956if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007958else
7959 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963/* Override any GCC internal prototype to avoid an error.
7964 Use char because int might match the return type of a GCC
7965 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007966#ifdef __cplusplus
7967extern "C"
7968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007969char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007970int
7971main ()
7972{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ;
7975 return 0;
7976}
7977_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978for ac_lib in '' x; do
7979 if test -z "$ac_lib"; then
7980 ac_res="none required"
7981 else
7982 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007983 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988rm -f core conftest.err conftest.$ac_objext \
7989 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007990 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993done
Victor Stinnere0be4232011-10-25 13:06:09 +02007994if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996else
7997 ac_cv_search_opendir=no
7998fi
7999rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008000LIBS=$ac_func_search_save_LIBS
8001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8003$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008005if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008008fi
8009
8010fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8013$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008014if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008018/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008019#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008020int
8021main ()
8022{
8023return makedev(0, 0);
8024 ;
8025 return 0;
8026}
8027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008029 ac_cv_header_sys_types_h_makedev=yes
8030else
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008033rm -f core conftest.err conftest.$ac_objext \
8034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008035
8036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8038$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008039
8040if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008041ac_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 +02008042if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008045
8046fi
8047
8048
8049
8050 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 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 +02008052if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008053
Matthias Kloseb9621712010-04-24 17:59:49 +00008054$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008055
8056fi
8057
8058
8059 fi
8060fi
8061
Michael W. Hudson54241132001-12-07 15:38:26 +00008062
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008063# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8064# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8065SAVE_CFLAGS=$CFLAGS
8066CFLAGS="-std=c99 $CFLAGS"
8067for ac_header in bluetooth/bluetooth.h
8068do :
8069 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8070if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8071 cat >>confdefs.h <<_ACEOF
8072#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8073_ACEOF
8074
8075fi
8076
8077done
8078
8079CFLAGS=$SAVE_CFLAGS
8080
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008081# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8082for ac_header in net/if.h
8083do :
8084 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8085#ifdef STDC_HEADERS
8086# include <stdlib.h>
8087# include <stddef.h>
8088#else
8089# ifdef HAVE_STDLIB_H
8090# include <stdlib.h>
8091# endif
8092#endif
8093#ifdef HAVE_SYS_SOCKET_H
8094# include <sys/socket.h>
8095#endif
8096
8097"
Victor Stinnere0be4232011-10-25 13:06:09 +02008098if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008099 cat >>confdefs.h <<_ACEOF
8100#define HAVE_NET_IF_H 1
8101_ACEOF
8102
8103fi
8104
8105done
8106
8107
Martin v. Löwis11017b12006-01-14 18:12:57 +00008108# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008109for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008110do :
8111 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 +00008112#ifdef HAVE_ASM_TYPES_H
8113#include <asm/types.h>
8114#endif
8115#ifdef HAVE_SYS_SOCKET_H
8116#include <sys/socket.h>
8117#endif
8118
Matthias Kloseb9621712010-04-24 17:59:49 +00008119"
Victor Stinnere0be4232011-10-25 13:06:09 +02008120if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008121 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008122#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008123_ACEOF
8124
8125fi
8126
8127done
8128
8129
Charles-François Natali47413c12011-10-06 19:47:44 +02008130# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008131for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008132do :
8133 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8134ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8135#ifdef HAVE_SYS_SOCKET_H
8136#include <sys/socket.h>
8137#endif
8138
8139"
8140if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8141 cat >>confdefs.h <<_ACEOF
8142#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8143_ACEOF
8144
8145fi
8146
8147done
8148
8149
Guido van Rossum627b2d71993-12-24 10:39:16 +00008150# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008151was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8153$as_echo_n "checking for clock_t in time.h... " >&6; }
8154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008155/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008157
8158_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008161 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008162else
Martin v. Löwis11437992002-04-12 09:54:03 +00008163
8164
Matthias Kloseb9621712010-04-24 17:59:49 +00008165$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008166
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008167
Guido van Rossum627b2d71993-12-24 10:39:16 +00008168fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008169rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8172$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008173
Matthias Kloseb9621712010-04-24 17:59:49 +00008174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8175$as_echo_n "checking for makedev... " >&6; }
8176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008177/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008178
Jesus Cea740f53a2010-04-28 11:35:30 +00008179#if defined(MAJOR_IN_MKDEV)
8180#include <sys/mkdev.h>
8181#elif defined(MAJOR_IN_SYSMACROS)
8182#include <sys/sysmacros.h>
8183#else
8184#include <sys/types.h>
8185#endif
8186
Neal Norwitz11690112002-07-30 01:08:28 +00008187int
8188main ()
8189{
Jesus Cea740f53a2010-04-28 11:35:30 +00008190
8191 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008192 ;
8193 return 0;
8194}
Matthias Kloseb159a552010-04-25 21:00:44 +00008195
Neal Norwitz11690112002-07-30 01:08:28 +00008196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008197if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008198 ac_cv_has_makedev=yes
8199else
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008202rm -f core conftest.err conftest.$ac_objext \
8203 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8205$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008206if test "$ac_cv_has_makedev" = "yes"; then
8207
Matthias Kloseb9621712010-04-24 17:59:49 +00008208$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008209
8210fi
8211
Christian Heimes985ecdc2013-11-20 11:46:18 +01008212# byte swapping
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8214$as_echo_n "checking for le64toh... " >&6; }
8215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216/* end confdefs.h. */
8217
8218#ifdef HAVE_ENDIAN_H
8219#include <endian.h>
8220#elif defined(HAVE_SYS_ENDIAN_H)
8221#include <sys/endian.h>
8222#endif
8223
8224int
8225main ()
8226{
8227
8228 le64toh(1)
8229 ;
8230 return 0;
8231}
8232
8233_ACEOF
8234if ac_fn_c_try_link "$LINENO"; then :
8235 ac_cv_has_le64toh=yes
8236else
8237 ac_cv_has_le64toh=no
8238fi
8239rm -f core conftest.err conftest.$ac_objext \
8240 conftest$ac_exeext conftest.$ac_ext
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8242$as_echo "$ac_cv_has_le64toh" >&6; }
8243if test "$ac_cv_has_le64toh" = "yes"; then
8244
8245$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8246
8247fi
8248
Martin v. Löwis399a6892002-10-04 10:22:02 +00008249# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8250# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8251# defined, but the compiler does not support pragma redefine_extname,
8252# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8253# structures (such as rlimit64) without declaring them. As a
8254# work-around, disable LFS on such configurations
8255
8256use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8258$as_echo_n "checking Solaris LFS bug... " >&6; }
8259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008260/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008261
8262#define _LARGEFILE_SOURCE 1
8263#define _FILE_OFFSET_BITS 64
8264#include <sys/resource.h>
8265
Martin v. Löwis399a6892002-10-04 10:22:02 +00008266int
8267main ()
8268{
8269struct rlimit foo;
8270 ;
8271 return 0;
8272}
8273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008275 sol_lfs_bug=no
8276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8281$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008282if test "$sol_lfs_bug" = "yes"; then
8283 use_lfs=no
8284fi
8285
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008286# Don't use largefile support for GNU/Hurd
8287case $ac_sys_system in GNU*)
8288 use_lfs=no
8289esac
8290
Martin v. Löwis399a6892002-10-04 10:22:02 +00008291if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008292# Two defines needed to enable largefile support on various platforms
8293# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008294case $ac_sys_system/$ac_sys_release in
8295AIX*)
8296
8297$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8298
8299 ;;
8300esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
8304
Matthias Kloseb9621712010-04-24 17:59:49 +00008305$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008306
Martin v. Löwis399a6892002-10-04 10:22:02 +00008307fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008308
Guido van Rossum84e7b241996-08-19 21:59:00 +00008309# Add some code to confdefs.h so that the test for off_t works on SCO
8310cat >> confdefs.h <<\EOF
8311#if defined(SCO_DS)
8312#undef _OFF_T
8313#endif
8314EOF
8315
Guido van Rossumef2255b2000-03-10 22:30:29 +00008316# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008317ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008318if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008319
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008320else
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
8322cat >>confdefs.h <<_ACEOF
8323#define mode_t int
8324_ACEOF
8325
8326fi
8327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008329if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008331else
Martin v. Löwis11437992002-04-12 09:54:03 +00008332
8333cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008335_ACEOF
8336
8337fi
8338
Matthias Kloseb9621712010-04-24 17:59:49 +00008339ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008340if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008341
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008342else
Martin v. Löwis11437992002-04-12 09:54:03 +00008343
8344cat >>confdefs.h <<_ACEOF
8345#define pid_t int
8346_ACEOF
8347
8348fi
8349
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008352#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008353_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008356if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008357
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008358else
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
8360cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008362_ACEOF
8363
8364fi
8365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8367$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008372/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008373#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008374
8375_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008378 ac_cv_type_uid_t=yes
8379else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008380 ac_cv_type_uid_t=no
8381fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008382rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8386$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008387if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008390
8391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008393
8394fi
8395
Mark Dickinson983bc162012-12-02 12:11:38 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008398if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008401
8402fi
8403
Stefan Krah1919b7e2012-03-21 18:25:23 +01008404ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8405if test "x$ac_cv_type___uint128_t" = xyes; then :
8406
8407$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8408
8409fi
8410
Jack Jansendd19cf82001-12-06 22:36:17 +00008411
Michael W. Hudson54241132001-12-07 15:38:26 +00008412# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008413# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414# The cast to long int works around a bug in the HP C Compiler
8415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8417# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8419$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008420if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 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 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 if test "$ac_cv_type_int" = yes; then
8427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008429as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008430See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431 else
8432 ac_cv_sizeof_int=0
8433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8438$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439
8440
8441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008443#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008444_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008445
8446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447# The cast to long int works around a bug in the HP C Compiler
8448# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8449# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8450# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8452$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008453if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 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 +00008457
Martin v. Löwis11437992002-04-12 09:54:03 +00008458else
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 if test "$ac_cv_type_long" = yes; then
8460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008462as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008463See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464 else
8465 ac_cv_sizeof_long=0
8466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008468
Martin v. Löwis11437992002-04-12 09:54:03 +00008469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8471$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472
8473
8474
Martin v. Löwis11437992002-04-12 09:54:03 +00008475cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008476#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008477_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008478
8479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480# The cast to long int works around a bug in the HP C Compiler
8481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8483# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8485$as_echo_n "checking size of long long... " >&6; }
8486if ${ac_cv_sizeof_long_long+:} false; then :
8487 $as_echo_n "(cached) " >&6
8488else
8489 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8490
8491else
8492 if test "$ac_cv_type_long_long" = yes; then
8493 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8495as_fn_error 77 "cannot compute sizeof (long long)
8496See \`config.log' for more details" "$LINENO" 5; }
8497 else
8498 ac_cv_sizeof_long_long=0
8499 fi
8500fi
8501
8502fi
8503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8504$as_echo "$ac_cv_sizeof_long_long" >&6; }
8505
8506
8507
8508cat >>confdefs.h <<_ACEOF
8509#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8510_ACEOF
8511
8512
8513# The cast to long int works around a bug in the HP C Compiler
8514# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8515# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8516# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8518$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008519if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 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 +00008523
Martin v. Löwis11437992002-04-12 09:54:03 +00008524else
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 if test "$ac_cv_type_void_p" = yes; then
8526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008528as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008529See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530 else
8531 ac_cv_sizeof_void_p=0
8532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8537$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538
8539
8540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008542#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008544
8545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546# The cast to long int works around a bug in the HP C Compiler
8547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8549# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8551$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008552if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 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 +00008556
Martin v. Löwis11437992002-04-12 09:54:03 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 if test "$ac_cv_type_short" = yes; then
8559 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008561as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008562See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563 else
8564 ac_cv_sizeof_short=0
8565 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8570$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571
8572
8573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008577
8578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579# The cast to long int works around a bug in the HP C Compiler
8580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8584$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008585if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 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 +00008589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 if test "$ac_cv_type_float" = yes; then
8592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008594as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008595See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596 else
8597 ac_cv_sizeof_float=0
8598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8603$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604
8605
8606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008609_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008610
8611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612# The cast to long int works around a bug in the HP C Compiler
8613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8617$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008618if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 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 +00008622
Martin v. Löwis11437992002-04-12 09:54:03 +00008623else
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 if test "$ac_cv_type_double" = yes; then
8625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008627as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 else
8630 ac_cv_sizeof_double=0
8631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633
Martin v. Löwis11437992002-04-12 09:54:03 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8636$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637
8638
8639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008641#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008642_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008643
8644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645# The cast to long int works around a bug in the HP C Compiler
8646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8650$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 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 +00008655
Martin v. Löwis11437992002-04-12 09:54:03 +00008656else
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 if test "$ac_cv_type_fpos_t" = yes; then
8658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008660as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662 else
8663 ac_cv_sizeof_fpos_t=0
8664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666
Martin v. Löwis11437992002-04-12 09:54:03 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8669$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670
8671
8672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008674#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008675_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008676
Michael W. Hudson54241132001-12-07 15:38:26 +00008677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678# The cast to long int works around a bug in the HP C Compiler
8679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8683$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008684if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 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 +00008688
Martin v. Löwis18e16552006-02-15 17:27:45 +00008689else
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 if test "$ac_cv_type_size_t" = yes; then
8691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008693as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695 else
8696 ac_cv_sizeof_size_t=0
8697 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699
Martin v. Löwis18e16552006-02-15 17:27:45 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8702$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703
8704
8705
Martin v. Löwis18e16552006-02-15 17:27:45 +00008706cat >>confdefs.h <<_ACEOF
8707#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8708_ACEOF
8709
8710
Christian Heimes400adb02008-02-01 08:12:03 +00008711# The cast to long int works around a bug in the HP C Compiler
8712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8716$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008717if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008719else
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 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 +00008721
Christian Heimes400adb02008-02-01 08:12:03 +00008722else
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 if test "$ac_cv_type_pid_t" = yes; then
8724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008726as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008727See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008728 else
8729 ac_cv_sizeof_pid_t=0
8730 fi
8731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732
Christian Heimes400adb02008-02-01 08:12:03 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8735$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008736
8737
8738
8739cat >>confdefs.h <<_ACEOF
8740#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8741_ACEOF
8742
8743
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008744# The cast to long int works around a bug in the HP C Compiler
8745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8747# This bug is HP SR number 8606223364.
8748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8749$as_echo_n "checking size of uintptr_t... " >&6; }
8750if ${ac_cv_sizeof_uintptr_t+:} false; then :
8751 $as_echo_n "(cached) " >&6
8752else
8753 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8754
8755else
8756 if test "$ac_cv_type_uintptr_t" = yes; then
8757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8759as_fn_error 77 "cannot compute sizeof (uintptr_t)
8760See \`config.log' for more details" "$LINENO" 5; }
8761 else
8762 ac_cv_sizeof_uintptr_t=0
8763 fi
8764fi
8765
8766fi
8767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8768$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8769
8770
8771
8772cat >>confdefs.h <<_ACEOF
8773#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8774_ACEOF
8775
8776
Michael W. Hudson54241132001-12-07 15:38:26 +00008777
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8779$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008780have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008782/* end confdefs.h. */
8783
8784int
8785main ()
8786{
8787long double x; x = (long double)0;
8788 ;
8789 return 0;
8790}
8791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008792if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008793
8794
Matthias Kloseb9621712010-04-24 17:59:49 +00008795$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008796
8797 have_long_double=yes
8798
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008799fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8802$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008803if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008804# The cast to long int works around a bug in the HP C Compiler
8805# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8806# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8807# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8809$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008810if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 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 +00008814
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 if test "$ac_cv_type_long_double" = yes; then
8817 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008819as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008820See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008821 else
8822 ac_cv_sizeof_long_double=0
8823 fi
8824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8828$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008829
8830
8831
8832cat >>confdefs.h <<_ACEOF
8833#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8834_ACEOF
8835
8836
8837fi
8838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008839# The cast to long int works around a bug in the HP C Compiler
8840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8842# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8844$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008845if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008847else
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 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 +00008849
Thomas Woutersb2137042007-02-01 18:02:27 +00008850else
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 if test "$ac_cv_type__Bool" = yes; then
8852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008854as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008855See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856 else
8857 ac_cv_sizeof__Bool=0
8858 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860
Thomas Woutersb2137042007-02-01 18:02:27 +00008861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8863$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864
8865
8866
Thomas Woutersb2137042007-02-01 18:02:27 +00008867cat >>confdefs.h <<_ACEOF
8868#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8869_ACEOF
8870
8871
Thomas Woutersb2137042007-02-01 18:02:27 +00008872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873# The cast to long int works around a bug in the HP C Compiler
8874# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8875# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8876# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8878$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008879if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008881else
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008883#ifdef HAVE_SYS_TYPES_H
8884#include <sys/types.h>
8885#endif
8886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 if test "$ac_cv_type_off_t" = yes; then
8891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008893as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008894See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895 else
8896 ac_cv_sizeof_off_t=0
8897 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8902$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904
8905
Martin v. Löwis11437992002-04-12 09:54:03 +00008906cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008907#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008908_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008909
Michael W. Hudson54241132001-12-07 15:38:26 +00008910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8913$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008914if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008915 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008916
Matthias Kloseb9621712010-04-24 17:59:49 +00008917$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008918
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8920$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008921else
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008924fi
8925
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926# The cast to long int works around a bug in the HP C Compiler
8927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8929# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8931$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008932if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008934else
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008936#ifdef HAVE_SYS_TYPES_H
8937#include <sys/types.h>
8938#endif
8939#ifdef HAVE_TIME_H
8940#include <time.h>
8941#endif
8942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008944
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008945else
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 if test "$ac_cv_type_time_t" = yes; then
8947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008949as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008950See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008951 else
8952 ac_cv_sizeof_time_t=0
8953 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008955
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8958$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960
8961
Martin v. Löwis11437992002-04-12 09:54:03 +00008962cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008963#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008964_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008965
Michael W. Hudson54241132001-12-07 15:38:26 +00008966
8967
Trent Mick635f6fb2000-08-23 21:33:05 +00008968# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008969ac_save_cc="$CC"
8970if test "$ac_cv_kpthread" = "yes"
8971then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008972elif test "$ac_cv_kthread" = "yes"
8973then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008974elif test "$ac_cv_pthread" = "yes"
8975then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008976fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977
Matthias Kloseb9621712010-04-24 17:59:49 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8979$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008980have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008982/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008983
8984 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008985int
8986main ()
8987{
Guido van Rossum12580492000-09-24 16:47:19 +00008988pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ;
8990 return 0;
8991}
Matthias Kloseb159a552010-04-25 21:00:44 +00008992
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008994if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008995 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8999$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009000if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9004# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9006$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009007if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009009else
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009011#ifdef HAVE_PTHREAD_H
9012#include <pthread.h>
9013#endif
9014
Matthias Kloseb9621712010-04-24 17:59:49 +00009015"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009016
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017else
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 if test "$ac_cv_type_pthread_t" = yes; then
9019 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009021as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009022See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023 else
9024 ac_cv_sizeof_pthread_t=0
9025 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009027
Trent Mick635f6fb2000-08-23 21:33:05 +00009028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9030$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009032
9033
Martin v. Löwis11437992002-04-12 09:54:03 +00009034cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009035#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038
Trent Mick635f6fb2000-08-23 21:33:05 +00009039fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009040CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009041
Michael W. Hudson54241132001-12-07 15:38:26 +00009042
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009043case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009044 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009045 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9046 ;;
9047 Darwin/*)
9048 OTHER_LIBTOOL_OPT=""
9049 ;;
9050esac
9051
9052
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009054case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009055 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009056 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9057 if test "${enable_universalsdk}"; then
9058 :
9059 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009060 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009061 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009062 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009063 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009064 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009065 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009066 if test ${gcc_version} '<' 4.0
9067 then
9068 LIBTOOL_CRUFT="-lcc_dynamic"
9069 else
9070 LIBTOOL_CRUFT=""
9071 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009073 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009074else
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009076/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009077
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009078 #include <unistd.h>
9079 int main(int argc, char*argv[])
9080 {
9081 if (sizeof(long) == 4) {
9082 return 0;
9083 } else {
9084 return 1;
9085 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009086 }
9087
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009089if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009090 ac_osx_32bit=yes
9091else
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009096fi
9097
9098
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009099 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009100 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009101 i386)
9102 MACOSX_DEFAULT_ARCH="i386"
9103 ;;
9104 ppc)
9105 MACOSX_DEFAULT_ARCH="ppc"
9106 ;;
9107 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009108 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009109 ;;
9110 esac
9111 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009112 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009113 i386)
9114 MACOSX_DEFAULT_ARCH="x86_64"
9115 ;;
9116 ppc)
9117 MACOSX_DEFAULT_ARCH="ppc64"
9118 ;;
9119 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009120 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009121 ;;
9122 esac
9123
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009124 fi
9125
9126 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009127 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009128 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009129esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9131$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009132if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009133then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009134 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009136 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009137
Matthias Kloseb9621712010-04-24 17:59:49 +00009138$as_echo "#define WITH_NEXT_FRAMEWORK 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: yes" >&5
9141$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009142 if test $enable_shared = "yes"
9143 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009144 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 +00009145 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009146else
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9148$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009149fi
9150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9152$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009153case $ac_sys_system/$ac_sys_release in
9154 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009155
Matthias Kloseb9621712010-04-24 17:59:49 +00009156$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009157
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9159$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009160 ;;
9161 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009164 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009165esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009166
Guido van Rossum0a516c91994-09-12 10:58:40 +00009167# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009168
Michael W. Hudson54241132001-12-07 15:38:26 +00009169
9170
9171
9172
Benjamin Peterson99f03762010-04-11 22:15:28 +00009173
Thomas Wouters477c8d52006-05-27 19:21:47 +00009174
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009175# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9176# -- usually .so, .sl on HP-UX, .dll on Cygwin
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9178$as_echo_n "checking the extension of shared libraries... " >&6; }
9179if test -z "$SHLIB_SUFFIX"; then
9180 case $ac_sys_system in
9181 hp*|HP*)
9182 case `uname -m` in
9183 ia64) SHLIB_SUFFIX=.so;;
9184 *) SHLIB_SUFFIX=.sl;;
9185 esac
9186 ;;
9187 CYGWIN*) SHLIB_SUFFIX=.dll;;
9188 *) SHLIB_SUFFIX=.so;;
9189 esac
9190fi
9191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9192$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009193
Guido van Rossum0a516c91994-09-12 10:58:40 +00009194# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009195# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009196# (Shared libraries in this instance are shared modules to be loaded into
9197# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9199$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009200if test -z "$LDSHARED"
9201then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009202 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009203 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009204 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009205 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009206 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009207 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009208 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210 if test "$GCC" = "yes" ; then
9211 LDSHARED='$(CC) -shared'
9212 LDCXXSHARED='$(CXX) -shared'
9213 else
9214 LDSHARED='$(CC) -G'
9215 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009216 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009217 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 if test "$GCC" = "yes" ; then
9219 LDSHARED='$(CC) -shared'
9220 LDCXXSHARED='$(CXX) -shared'
9221 else
9222 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009223 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009224 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009225 LDSHARED='$(CC) -bundle'
9226 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009227 if test "$enable_framework" ; then
9228 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009229 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9230 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009231 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009232 else
9233 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009234 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009235 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009236 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009237 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009238 LDSHARED='$(CC) -bundle'
9239 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009240 if test "$enable_framework" ; then
9241 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009242 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9243 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009244 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009245 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009246 # No framework, use the Python app as bundle-loader
9247 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009248 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009249 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009250 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009251 Darwin/*)
9252 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9253 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009254
Ned Deily36820b62014-06-25 13:44:22 -07009255 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9256 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9257 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9258 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9259 if test ${dep_target_major} -eq 10 && \
9260 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009261 then
Ned Deily36820b62014-06-25 13:44:22 -07009262 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009263 LDSHARED='$(CC) -bundle'
9264 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009265 if test "$enable_framework" ; then
9266 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009267 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9268 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009269 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009270 else
9271 # No framework, use the Python app as bundle-loader
9272 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9273 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009274 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009275 fi
Ned Deily36820b62014-06-25 13:44:22 -07009276 else
9277 # building for OS X 10.3 and later
9278 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9279 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9280 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009281 fi
9282 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009283 Linux*|GNU*|QNX*)
9284 LDSHARED='$(CC) -shared'
9285 LDCXXSHARED='$(CXX) -shared';;
9286 BSD/OS*/4*)
9287 LDSHARED="gcc -shared"
9288 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009289 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009290 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009291 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009292 LDSHARED='$(CC) -shared'
9293 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009294 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009295 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009296 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009297 OpenBSD*)
9298 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9299 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009300 LDSHARED='$(CC) -shared $(CCSHARED)'
9301 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009302 else
9303 case `uname -r` in
9304 [01].* | 2.[0-7] | 2.[0-7].*)
9305 LDSHARED="ld -Bshareable ${LDFLAGS}"
9306 ;;
9307 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009308 LDSHARED='$(CC) -shared $(CCSHARED)'
9309 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009310 ;;
9311 esac
9312 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009313 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009314 LDSHARED='$(CC) -shared'
9315 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009316 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009317 if test "$GCC" = "yes" ; then
9318 LDSHARED='$(CC) -shared'
9319 LDCXXSHARED='$(CXX) -shared'
9320 else
9321 LDSHARED='$(CC) -G'
9322 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009323 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009324 SCO_SV*)
9325 LDSHARED='$(CC) -Wl,-G,-Bexport'
9326 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9327 CYGWIN*)
9328 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9329 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330 *) LDSHARED="ld";;
9331 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9334$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009335LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009336BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009338# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9340$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009341if test -z "$CCSHARED"
9342then
Guido van Rossum07397971997-04-29 21:49:50 +00009343 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009344 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009345 then CCSHARED="-fPIC";
9346 elif test `uname -p` = sparc;
9347 then CCSHARED="-xcode=pic32";
9348 else CCSHARED="-Kpic";
9349 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009350 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009351 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009352 else CCSHARED="+z";
9353 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009354 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009355 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009356 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009357 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009358 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009359 if test "$GCC" = "yes"
9360 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009361 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009362 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009363 SCO_SV*)
9364 if test "$GCC" = "yes"
9365 then CCSHARED="-fPIC"
9366 else CCSHARED="-Kpic -belf"
9367 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009368 IRIX*/6*) case $CC in
9369 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009370 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009371 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9375$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009376# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009377# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9379$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009380if test -z "$LINKFORSHARED"
9381then
Guido van Rossum07397971997-04-29 21:49:50 +00009382 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009383 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009384 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009385 LINKFORSHARED="-Wl,-E -Wl,+s";;
9386# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009387 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009388 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009389 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009390 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009392 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009393
9394 # Issue #18075: the default maximum stack size (8MBytes) is too
9395 # small for the default recursion limit. Increase the stack size
9396 # to ensure that tests don't crash
9397 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9398
Jack Jansene578a632001-08-15 01:27:14 +00009399 if test "$enable_framework"
9400 then
Jack Jansenda49e192005-01-07 13:08:22 +00009401 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009402 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009403 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009404 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009405 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009406 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009407 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009408 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9409 then
9410 LINKFORSHARED="-Wl,--export-dynamic"
9411 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009412 SunOS/5*) case $CC in
9413 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009414 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009415 then
9416 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009417 fi;;
9418 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009419 CYGWIN*)
9420 if test $enable_shared = "no"
9421 then
9422 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9423 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009424 QNX*)
9425 # -Wl,-E causes the symbols to be added to the dynamic
9426 # symbol table so that they can be found when a module
9427 # is loaded. -N 2048K causes the stack size to be set
9428 # to 2048 kilobytes so that the stack doesn't overflow
9429 # when running test_compile.py.
9430 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9434$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009435
Michael W. Hudson54241132001-12-07 15:38:26 +00009436
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009437
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9439$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009440if test ! "$LIBRARY" = "$LDLIBRARY"
9441then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009442 case $ac_sys_system in
9443 CYGWIN*)
9444 # Cygwin needs CCSHARED when building extension DLLs
9445 # but not when building the interpreter DLL.
9446 CFLAGSFORSHARED='';;
9447 *)
9448 CFLAGSFORSHARED='$(CCSHARED)'
9449 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9452$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009453
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009454# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9455# library (with --enable-shared).
9456# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009457# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9458# if it is not required, since it creates a dependency of the shared library
9459# to LIBS. This, in turn, means that applications linking the shared libpython
9460# don't need to link LIBS explicitly. The default should be only changed
9461# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9464$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009465case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009466 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009467 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009468esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9470$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009471
9472
Guido van Rossum627b2d71993-12-24 10:39:16 +00009473# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9475$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009476if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009477 $as_echo_n "(cached) " >&6
9478else
9479 ac_check_lib_save_LIBS=$LIBS
9480LIBS="-lsendfile $LIBS"
9481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9482/* end confdefs.h. */
9483
9484/* Override any GCC internal prototype to avoid an error.
9485 Use char because int might match the return type of a GCC
9486 builtin and then its argument prototype would still apply. */
9487#ifdef __cplusplus
9488extern "C"
9489#endif
9490char sendfile ();
9491int
9492main ()
9493{
9494return sendfile ();
9495 ;
9496 return 0;
9497}
9498_ACEOF
9499if ac_fn_c_try_link "$LINENO"; then :
9500 ac_cv_lib_sendfile_sendfile=yes
9501else
9502 ac_cv_lib_sendfile_sendfile=no
9503fi
9504rm -f core conftest.err conftest.$ac_objext \
9505 conftest$ac_exeext conftest.$ac_ext
9506LIBS=$ac_check_lib_save_LIBS
9507fi
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9509$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009510if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009511 cat >>confdefs.h <<_ACEOF
9512#define HAVE_LIBSENDFILE 1
9513_ACEOF
9514
9515 LIBS="-lsendfile $LIBS"
9516
9517fi
9518
Matthias Kloseb9621712010-04-24 17:59:49 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9520$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009521if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009523else
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009525LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529/* Override any GCC internal prototype to avoid an error.
9530 Use char because int might match the return type of a GCC
9531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009532#ifdef __cplusplus
9533extern "C"
9534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009535char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009536int
9537main ()
9538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ;
9541 return 0;
9542}
9543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009546else
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009549rm -f core conftest.err conftest.$ac_objext \
9550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009551LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9554$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009555if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 cat >>confdefs.h <<_ACEOF
9557#define HAVE_LIBDL 1
9558_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009559
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009560 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009561
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009562fi
9563 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9565$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009566if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009567 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009568else
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009570LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574/* Override any GCC internal prototype to avoid an error.
9575 Use char because int might match the return type of a GCC
9576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009577#ifdef __cplusplus
9578extern "C"
9579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009580char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009581int
9582main ()
9583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ;
9586 return 0;
9587}
9588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009591else
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009594rm -f core conftest.err conftest.$ac_objext \
9595 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009596LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9599$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 cat >>confdefs.h <<_ACEOF
9602#define HAVE_LIBDLD 1
9603_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009604
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009605 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009606
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009607fi
9608 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009609
Georg Brandlb1441c72009-01-03 22:33:39 +00009610# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009611if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9613$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009614if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009615 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009616else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009617 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621/* Override any GCC internal prototype to avoid an error.
9622 Use char because int might match the return type of a GCC
9623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009624#ifdef __cplusplus
9625extern "C"
9626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009627char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009628int
9629main ()
9630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 ;
9633 return 0;
9634}
9635_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636for ac_lib in '' pthread rt posix4; do
9637 if test -z "$ac_lib"; then
9638 ac_res="none required"
9639 else
9640 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009641 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009646rm -f core conftest.err conftest.$ac_objext \
9647 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009648 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651done
Victor Stinnere0be4232011-10-25 13:06:09 +02009652if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654else
9655 ac_cv_search_sem_init=no
9656fi
9657rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009658LIBS=$ac_func_search_save_LIBS
9659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9661$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009663if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009665
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009666fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009667 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009668 # posix4 on Solaris 2.6
9669 # pthread (first!) on Linux
9670fi
9671
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9674$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009675if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009677else
9678 ac_check_lib_save_LIBS=$LIBS
9679LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009686#ifdef __cplusplus
9687extern "C"
9688#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009689char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009690int
9691main ()
9692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009694 ;
9695 return 0;
9696}
9697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009699 ac_cv_lib_intl_textdomain=yes
9700else
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009703rm -f core conftest.err conftest.$ac_objext \
9704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009705LIBS=$ac_check_lib_save_LIBS
9706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9708$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009709if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009710
Matthias Kloseb9621712010-04-24 17:59:49 +00009711$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009712
Brett Cannonc6d936e2009-06-07 20:09:53 +00009713 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009714fi
9715
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009716
9717# checks for system dependent C++ extensions support
9718case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9720$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009723
Georg Brandl59e87bd2011-02-15 19:48:59 +00009724 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009728loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ;
9730 return 0;
9731}
Matthias Kloseb159a552010-04-25 21:00:44 +00009732
Martin v. Löwis11437992002-04-12 09:54:03 +00009733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009734if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009735
Matthias Kloseb159a552010-04-25 21:00:44 +00009736
Matthias Kloseb9621712010-04-24 17:59:49 +00009737$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009738
Matthias Kloseb159a552010-04-25 21:00:44 +00009739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009740$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009741
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009742else
Matthias Kloseb159a552010-04-25 21:00:44 +00009743
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009745$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009746
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009750 *) ;;
9751esac
9752
Christian Heimes985ecdc2013-11-20 11:46:18 +01009753# check for systems that require aligned memory access
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9755$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009756if ${ac_cv_aligned_required+:} false; then :
9757 $as_echo_n "(cached) " >&6
9758else
9759 if test "$cross_compiling" = yes; then :
9760 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009761else
9762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9763/* end confdefs.h. */
9764
9765int main()
9766{
9767 char s[16];
9768 int i, *p1, *p2;
9769 for (i=0; i < 16; i++)
9770 s[i] = i;
9771 p1 = (int*)(s+1);
9772 p2 = (int*)(s+2);
9773 if (*p1 == *p2)
9774 return 1;
9775 return 0;
9776}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009777_ACEOF
9778if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009779 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009780else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009781 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009782fi
9783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9784 conftest.$ac_objext conftest.beam conftest.$ac_ext
9785fi
9786
9787
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009788fi
9789
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9791$as_echo "$ac_cv_aligned_required" >&6; }
9792if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009793
9794$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9795
9796fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009797
9798# str, bytes and memoryview hash algorithm
9799
9800
9801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9802$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9803
9804# Check whether --with-hash_algorithm was given.
9805if test "${with_hash_algorithm+set}" = set; then :
9806 withval=$with_hash_algorithm;
9807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9808$as_echo "$withval" >&6; }
9809case "$withval" in
9810 siphash24)
9811 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9812
9813 ;;
9814 fnv)
9815 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9816
9817 ;;
9818 *)
9819 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9820 ;;
9821esac
9822
9823else
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9825$as_echo "default" >&6; }
9826fi
9827
9828
Charles-François Natalid30b0222014-05-08 23:08:51 +01009829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9830$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9831
9832# Check whether --with-address_sanitizer was given.
9833if test "${with_address_sanitizer+set}" = set; then :
9834 withval=$with_address_sanitizer;
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9836$as_echo "$withval" >&6; }
9837BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9838LDFLAGS="-fsanitize=address $LDFLAGS"
9839
9840else
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
9843fi
9844
9845
Guido van Rossum70c7f481998-03-26 18:44:10 +00009846# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9848$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009849if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009851else
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009853LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857/* Override any GCC internal prototype to avoid an error.
9858 Use char because int might match the return type of a GCC
9859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009860#ifdef __cplusplus
9861extern "C"
9862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009863char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009864int
9865main ()
9866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 ;
9869 return 0;
9870}
9871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009874else
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009877rm -f core conftest.err conftest.$ac_objext \
9878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009879LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9882$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009883if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009884 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009885fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009886 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9888$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009889if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009891else
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009893LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897/* Override any GCC internal prototype to avoid an error.
9898 Use char because int might match the return type of a GCC
9899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009900#ifdef __cplusplus
9901extern "C"
9902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009903char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009904int
9905main ()
9906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 ;
9909 return 0;
9910}
9911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009913 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009914else
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009917rm -f core conftest.err conftest.$ac_objext \
9918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009919LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9922$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009923if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009924 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009925fi
9926 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009927
Matthias Kloseb9621712010-04-24 17:59:49 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9929$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009932if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009933 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9935$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009936LIBS="$withval $LIBS"
9937
9938else
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9940$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941fi
9942
Guido van Rossum7f43da71994-08-01 12:15:30 +00009943
Victor Stinner8291b5e2015-03-20 16:03:14 +01009944
9945
9946
9947
9948
9949
9950
9951if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9952 if test -n "$ac_tool_prefix"; then
9953 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9954set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
9957if ${ac_cv_path_PKG_CONFIG+:} false; then :
9958 $as_echo_n "(cached) " >&6
9959else
9960 case $PKG_CONFIG in
9961 [\\/]* | ?:[\\/]*)
9962 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9963 ;;
9964 *)
9965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968 IFS=$as_save_IFS
9969 test -z "$as_dir" && as_dir=.
9970 for ac_exec_ext in '' $ac_executable_extensions; do
9971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9972 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9974 break 2
9975 fi
9976done
9977 done
9978IFS=$as_save_IFS
9979
9980 ;;
9981esac
9982fi
9983PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9984if test -n "$PKG_CONFIG"; then
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9986$as_echo "$PKG_CONFIG" >&6; }
9987else
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990fi
9991
9992
9993fi
9994if test -z "$ac_cv_path_PKG_CONFIG"; then
9995 ac_pt_PKG_CONFIG=$PKG_CONFIG
9996 # Extract the first word of "pkg-config", so it can be a program name with args.
9997set dummy pkg-config; ac_word=$2
9998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9999$as_echo_n "checking for $ac_word... " >&6; }
10000if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10001 $as_echo_n "(cached) " >&6
10002else
10003 case $ac_pt_PKG_CONFIG in
10004 [\\/]* | ?:[\\/]*)
10005 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10006 ;;
10007 *)
10008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10009for as_dir in $PATH
10010do
10011 IFS=$as_save_IFS
10012 test -z "$as_dir" && as_dir=.
10013 for ac_exec_ext in '' $ac_executable_extensions; do
10014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10015 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10017 break 2
10018 fi
10019done
10020 done
10021IFS=$as_save_IFS
10022
10023 ;;
10024esac
10025fi
10026ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10027if test -n "$ac_pt_PKG_CONFIG"; then
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10029$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10030else
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032$as_echo "no" >&6; }
10033fi
10034
10035 if test "x$ac_pt_PKG_CONFIG" = x; then
10036 PKG_CONFIG=""
10037 else
10038 case $cross_compiling:$ac_tool_warned in
10039yes:)
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10042ac_tool_warned=yes ;;
10043esac
10044 PKG_CONFIG=$ac_pt_PKG_CONFIG
10045 fi
10046else
10047 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10048fi
10049
10050fi
10051if test -n "$PKG_CONFIG"; then
10052 _pkg_min_version=0.9.0
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10054$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10055 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10057$as_echo "yes" >&6; }
10058 else
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061 PKG_CONFIG=""
10062 fi
10063fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010064
10065# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10067$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010068
10069# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010070if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010071 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010072else
10073 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010074fi
10075
10076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10078$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010079
10080# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10082$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010083
10084# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010086 withval=$with_system_ffi;
10087fi
10088
10089
Zachary Waref40d4dd2016-09-17 01:25:24 -050010090if test "$ac_sys_system" = "Darwin"
10091then
10092 case "$with_system_ffi" in
10093 "")
10094 with_system_ffi="no"
10095 ;;
10096 yes|no)
10097 ;;
10098 *)
10099 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10100 ;;
10101 esac
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10103$as_echo "$with_system_ffi" >&6; }
10104else
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10106$as_echo "yes" >&6; }
10107 if test "$with_system_ffi" != ""
10108 then
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10110$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10111 fi
10112 with_system_ffi="yes"
10113fi
Zachary Ware935043d2016-09-09 17:01:21 -070010114
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010115if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010116 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10117else
10118 LIBFFI_INCLUDEDIR=""
10119fi
10120
10121
Stefan Krah60187b52012-03-23 19:06:27 +010010122# Check for use of the system libmpdec library
10123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10124$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10125
10126# Check whether --with-system_libmpdec was given.
10127if test "${with_system_libmpdec+set}" = set; then :
10128 withval=$with_system_libmpdec;
10129else
10130 with_system_libmpdec="no"
10131fi
10132
10133
10134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10135$as_echo "$with_system_libmpdec" >&6; }
10136
Benjamin Peterson076ed002010-10-31 17:11:02 +000010137# Check for support for loadable sqlite extensions
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10139$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10140# Check whether --enable-loadable-sqlite-extensions was given.
10141if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10142 enableval=$enable_loadable_sqlite_extensions;
10143else
10144 enable_loadable_sqlite_extensions="no"
10145fi
10146
10147
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10149$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10150
Ned Deilyd819b932013-09-06 01:07:05 -070010151# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10152
10153
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10155$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10156
10157# Check whether --with-tcltk-includes was given.
10158if test "${with_tcltk_includes+set}" = set; then :
10159 withval=$with_tcltk_includes;
10160else
10161 with_tcltk_includes="default"
10162fi
10163
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10165$as_echo "$with_tcltk_includes" >&6; }
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10167$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10168
10169# Check whether --with-tcltk-libs was given.
10170if test "${with_tcltk_libs+set}" = set; then :
10171 withval=$with_tcltk_libs;
10172else
10173 with_tcltk_libs="default"
10174fi
10175
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10177$as_echo "$with_tcltk_libs" >&6; }
10178if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10179then
10180 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10181 then
10182 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10183 fi
10184 TCLTK_INCLUDES=""
10185 TCLTK_LIBS=""
10186else
10187 TCLTK_INCLUDES="$with_tcltk_includes"
10188 TCLTK_LIBS="$with_tcltk_libs"
10189fi
10190
Matthias Klose55708cc2009-04-30 08:06:49 +000010191# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10193$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010194
10195# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010197 withval=$with_dbmliborder;
10198if test x$with_dbmliborder = xyes
10199then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010200as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010201else
10202 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10203 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10204 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010205 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010206 fi
10207 done
10208fi
10209fi
10210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10212$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010213
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010214# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010215
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010216USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218
Martin v. Löwis11437992002-04-12 09:54:03 +000010219
10220# Templates for things AC_DEFINEd more than once.
10221# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010222
10223
Martin v. Löwis11437992002-04-12 09:54:03 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10226$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010229if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 withval=$with_threads;
10231fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010232
10233
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010234# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010237if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238 withval=$with_thread; with_threads=$with_thread
10239fi
10240
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010241
10242if test -z "$with_threads"
10243then with_threads="yes"
10244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10246$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010247
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010248
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010249if test "$with_threads" = "no"
10250then
10251 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010252elif test "$ac_cv_pthread_is_default" = yes
10253then
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010255
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010256 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010258
10259 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010261elif test "$ac_cv_kpthread" = "yes"
10262then
10263 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010264 if test "$ac_cv_cxx_thread" = "yes"; then
10265 CXX="$CXX -Kpthread"
10266 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010268
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010269 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010270 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010271elif test "$ac_cv_kthread" = "yes"
10272then
10273 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010274 if test "$ac_cv_cxx_thread" = "yes"; then
10275 CXX="$CXX -Kthread"
10276 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010278
10279 posix_threads=yes
10280 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010281elif test "$ac_cv_pthread" = "yes"
10282then
10283 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010284 if test "$ac_cv_cxx_thread" = "yes"; then
10285 CXX="$CXX -pthread"
10286 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010288
10289 posix_threads=yes
10290 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010291else
10292 if test ! -z "$with_threads" -a -d "$with_threads"
10293 then LDFLAGS="$LDFLAGS -L$with_threads"
10294 fi
10295 if test ! -z "$withval" -a -d "$withval"
10296 then LDFLAGS="$LDFLAGS -L$withval"
10297 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010298
10299 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010300 # define _POSIX_THREADS in unistd.h. Some apparently don't
10301 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10303$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010306
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010307#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010308#ifdef _POSIX_THREADS
10309yes
10310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010311
10312_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010315 unistd_defines_pthreads=yes
10316else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010317 unistd_defines_pthreads=no
10318fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010319rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10322$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010323
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010325
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010326 # Just looking for pthread_create in libpthread is not enough:
10327 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10328 # So we really have to include pthread.h, and then link.
10329 _libs=$LIBS
10330 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10332$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010334/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010335
10336#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010337#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010338
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010339void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010340int
10341main ()
10342{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010343
10344pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10352$as_echo "yes" >&6; }
10353 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010354
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010355 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010356 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010357else
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010359 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010361if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010363
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010364 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010365 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010366else
Guido van Rossumad678af1998-10-02 14:42:15 +000010367
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10369$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010370if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010372else
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010374LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378/* Override any GCC internal prototype to avoid an error.
10379 Use char because int might match the return type of a GCC
10380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010381#ifdef __cplusplus
10382extern "C"
10383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010384char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010385int
10386main ()
10387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010398rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010400LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10403$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010404if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010407 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010408 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010409 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010410else
Greg Steinadf63d62000-07-05 10:38:09 +000010411
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10413$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010414if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010416else
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010418LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422/* Override any GCC internal prototype to avoid an error.
10423 Use char because int might match the return type of a GCC
10424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010425#ifdef __cplusplus
10426extern "C"
10427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010428char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010429int
10430main ()
10431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ;
10434 return 0;
10435}
10436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010439else
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010442rm -f core conftest.err conftest.$ac_objext \
10443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010444LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10447$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010448if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010450
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010451 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010452 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010453 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010454else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010455
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10457$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010458if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010460else
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010462LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010466/* Override any GCC internal prototype to avoid an error.
10467 Use char because int might match the return type of a GCC
10468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010469#ifdef __cplusplus
10470extern "C"
10471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010472char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010473int
10474main ()
10475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ;
10478 return 0;
10479}
10480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010483else
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010486rm -f core conftest.err conftest.$ac_objext \
10487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010488LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10491$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010492if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010496 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010497 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010498else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10501$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010502if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010504else
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010506LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510/* Override any GCC internal prototype to avoid an error.
10511 Use char because int might match the return type of a GCC
10512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010513#ifdef __cplusplus
10514extern "C"
10515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010516char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010517int
10518main ()
10519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ;
10522 return 0;
10523}
10524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010527else
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010530rm -f core conftest.err conftest.$ac_objext \
10531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010532LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10535$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010536if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010538
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010539 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010540 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010541 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010542else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010543
Martin v. Löwis130fb172001-07-19 11:00:41 +000010544 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010545fi
10546
Guido van Rossum627b2d71993-12-24 10:39:16 +000010547
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010548fi
10549
Guido van Rossum0be3e491997-05-22 20:33:33 +000010550fi
10551
Guido van Rossum49545951997-12-02 19:28:29 +000010552fi
10553
Guido van Rossumb93a8621998-05-07 13:27:32 +000010554fi
10555
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010557rm -f core conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010559
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10561$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010562if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010564else
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010566LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570/* Override any GCC internal prototype to avoid an error.
10571 Use char because int might match the return type of a GCC
10572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010573#ifdef __cplusplus
10574extern "C"
10575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010576char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010577int
10578main ()
10579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 ;
10582 return 0;
10583}
10584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010587else
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010590rm -f core conftest.err conftest.$ac_objext \
10591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010592LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10595$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010596if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598
Martin v. Löwis130fb172001-07-19 11:00:41 +000010599 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010600 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010601 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010602fi
10603
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010604
Neal Norwitza978ab02002-11-02 16:58:05 +000010605 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10607$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010608if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610else
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010612LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616/* Override any GCC internal prototype to avoid an error.
10617 Use char because int might match the return type of a GCC
10618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010619#ifdef __cplusplus
10620extern "C"
10621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010622char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010623int
10624main ()
10625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010627 ;
10628 return 0;
10629}
10630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010633else
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010636rm -f core conftest.err conftest.$ac_objext \
10637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010638LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10641$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010642if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010644
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010645 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010646 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010647 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010648fi
10649
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010650 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010652
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010653if test "$posix_threads" = "yes"; then
10654 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010657
10658 fi
10659
10660 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10661 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010662 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010663$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010664
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665 ;;
10666 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010667$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668
10669 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010670 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010671$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010672
10673 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010674 esac
10675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10677$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010678 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010680else
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682 ac_cv_pthread_system_supported=no
10683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010686
10687 #include <stdio.h>
10688 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689 void *foo(void *parm) {
10690 return NULL;
10691 }
10692 main() {
10693 pthread_attr_t attr;
10694 pthread_t id;
10695 if (pthread_attr_init(&attr)) exit(-1);
10696 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10697 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10698 exit(0);
10699 }
10700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010701if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010702 ac_cv_pthread_system_supported=yes
10703else
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710
Guido van Rossum627b2d71993-12-24 10:39:16 +000010711fi
10712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10714$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715 if test "$ac_cv_pthread_system_supported" = "yes"; then
10716
Matthias Kloseb9621712010-04-24 17:59:49 +000010717$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010718
10719 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 for ac_func in pthread_sigmask
10721do :
10722 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010723if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010724 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010725#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010726_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010727 case $ac_sys_system in
10728 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010731
10732 ;;
10733 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010734fi
10735done
10736
Christian Heimesf77b4b22013-08-21 13:26:05 +020010737 for ac_func in pthread_atfork
10738do :
10739 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10740if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10741 cat >>confdefs.h <<_ACEOF
10742#define HAVE_PTHREAD_ATFORK 1
10743_ACEOF
10744
10745fi
10746done
10747
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010748fi
10749
10750
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10754$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010756if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10760$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761 ipv6=no
10762 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10764$as_echo "yes" >&6; }
10765 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766
10767 ipv6=yes
10768 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770else
Martin v. Löwis11437992002-04-12 09:54:03 +000010771
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010773/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774 /* AF_INET6 available check */
10775#include <sys/types.h>
10776#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010777int
10778main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010780int domain = AF_INET6;
10781 ;
10782 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783}
Martin v. Löwis11437992002-04-12 09:54:03 +000010784_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010785if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10788$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791else
Matthias Kloseb159a552010-04-25 21:00:44 +000010792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10794$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010796
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010800if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10802$as_echo_n "checking if RFC2553 API is available... " >&6; }
10803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010805
10806 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010807#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010808int
10809main ()
10810{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010811struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010812 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 ;
10814 return 0;
10815}
Matthias Kloseb159a552010-04-25 21:00:44 +000010816
Martin v. Löwis11437992002-04-12 09:54:03 +000010817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010818if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010819
10820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010821$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010822 ipv6=yes
10823
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010824else
Matthias Kloseb159a552010-04-25 21:00:44 +000010825
10826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010827$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010828 ipv6=no
10829
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010832fi
10833
10834if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010836
10837fi
10838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839fi
10840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841
10842ipv6type=unknown
10843ipv6lib=none
10844ipv6trylibc=no
10845
10846if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10848$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010849 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10850 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851 case $i in
10852 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010854/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010855
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856#include <netinet/in.h>
10857#ifdef IPV6_INRIA_VERSION
10858yes
10859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010860_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010863 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010864fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010865rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866
10867 ;;
10868 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010870/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010871
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872#include <netinet/in.h>
10873#ifdef __KAME__
10874yes
10875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010876_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879 ipv6type=$i;
10880 ipv6lib=inet6
10881 ipv6libdir=/usr/local/v6/lib
10882 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010883fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010884rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885
10886 ;;
10887 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010889/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891#include <features.h>
10892#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10893yes
10894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010895_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898 ipv6type=$i;
10899 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010901rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902
10903 ;;
10904 linux-inet6)
10905 if test -d /usr/inet6; then
10906 ipv6type=$i
10907 ipv6lib=inet6
10908 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010909 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910 fi
10911 ;;
10912 solaris)
10913 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010914 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915 ipv6type=$i
10916 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917 fi
10918 fi
10919 ;;
10920 toshiba)
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 <sys/param.h>
10925#ifdef _TOSHIBA_INET6
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=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010933 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010934fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010935rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936
10937 ;;
10938 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010941
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942#include </usr/local/v6/include/sys/v6config.h>
10943#ifdef __V6D__
10944yes
10945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010946_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949 ipv6type=$i;
10950 ipv6lib=v6;
10951 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010952 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
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 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961#include <sys/param.h>
10962#ifdef _ZETA_MINAMI_INET6
10963yes
10964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968 ipv6type=$i;
10969 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010970 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010972rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973
10974 ;;
10975 esac
10976 if test "$ipv6type" != "unknown"; then
10977 break
10978 fi
10979 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10981$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982fi
10983
10984if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10985 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10986 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10987 echo "using lib$ipv6lib"
10988 else
10989 if test $ipv6trylibc = "yes"; then
10990 echo "using libc"
10991 else
10992 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10993 echo "You need to fetch lib$ipv6lib.a from appropriate"
10994 echo 'ipv6 kit and compile beforehand.'
10995 exit 1
10996 fi
10997 fi
10998fi
10999
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11001$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11003/* end confdefs.h. */
11004 /* CAN_RAW_FD_FRAMES available check */
11005#include <linux/can/raw.h>
11006int
11007main ()
11008{
11009int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11010 ;
11011 return 0;
11012}
11013_ACEOF
11014if ac_fn_c_try_compile "$LINENO"; then :
11015
11016
11017$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11018
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11020$as_echo "yes" >&6; }
11021
11022else
11023
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026
11027fi
11028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11029
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011030# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11032$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011035if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036 withval=$with_doc_strings;
11037fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011038
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011039
11040if test -z "$with_doc_strings"
11041then with_doc_strings="yes"
11042fi
11043if test "$with_doc_strings" != "no"
11044then
11045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011047
11048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11050$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011051
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011052# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11054$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011057if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011058 withval=$with_pymalloc;
11059fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011060
Neil Schemenauera35c6882001-02-27 04:45:05 +000011061
Neil Schemenauer16c22972002-03-22 15:34:49 +000011062if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011063then
11064 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011065fi
11066if test "$with_pymalloc" != "no"
11067then
Martin v. Löwis11437992002-04-12 09:54:03 +000011068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011070
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011071 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11074$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011075
Nick Coghlan6ea41862017-06-11 13:16:15 +100011076# Check for --with-c-locale-coercion
11077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11078$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11079
11080# Check whether --with-c-locale-coercion was given.
11081if test "${with_c_locale_coercion+set}" = set; then :
11082 withval=$with_c_locale_coercion;
11083fi
11084
11085
11086if test -z "$with_c_locale_coercion"
11087then
11088 with_c_locale_coercion="yes"
11089fi
11090if test "$with_c_locale_coercion" != "no"
11091then
11092
11093$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11094
11095fi
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11097$as_echo "$with_c_locale_coercion" >&6; }
11098
11099# Check for --with-c-locale-warning
11100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11101$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11102
11103# Check whether --with-c-locale-warning was given.
11104if test "${with_c_locale_warning+set}" = set; then :
11105 withval=$with_c_locale_warning;
11106fi
11107
11108
11109if test -z "$with_c_locale_warning"
11110then
11111 with_c_locale_warning="yes"
11112fi
11113if test "$with_c_locale_warning" != "no"
11114then
11115
11116$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11117
11118fi
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11120$as_echo "$with_c_locale_warning" >&6; }
11121
Benjamin Peterson05159c42009-12-03 03:01:27 +000011122# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11124$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011125
11126# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011127if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011128 withval=$with_valgrind;
11129else
11130 with_valgrind=no
11131fi
11132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11134$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011135if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 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 +020011137if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011140
11141else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011142 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011143
11144fi
11145
11146
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011147 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011148fi
11149
Łukasz Langaa785c872016-09-09 17:37:37 -070011150# Check for DTrace support
11151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11152$as_echo_n "checking for --with-dtrace... " >&6; }
11153
11154# Check whether --with-dtrace was given.
11155if test "${with_dtrace+set}" = set; then :
11156 withval=$with_dtrace;
11157else
11158 with_dtrace=no
11159fi
11160
11161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11162$as_echo "$with_dtrace" >&6; }
11163
11164
11165
11166
11167
11168DTRACE=
11169DFLAGS=
11170DTRACE_HEADERS=
11171DTRACE_OBJS=
11172
11173if test "$with_dtrace" = "yes"
11174then
11175 # Extract the first word of "dtrace", so it can be a program name with args.
11176set dummy dtrace; ac_word=$2
11177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11178$as_echo_n "checking for $ac_word... " >&6; }
11179if ${ac_cv_path_DTRACE+:} false; then :
11180 $as_echo_n "(cached) " >&6
11181else
11182 case $DTRACE in
11183 [\\/]* | ?:[\\/]*)
11184 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11185 ;;
11186 *)
11187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11188for as_dir in $PATH
11189do
11190 IFS=$as_save_IFS
11191 test -z "$as_dir" && as_dir=.
11192 for ac_exec_ext in '' $ac_executable_extensions; do
11193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11194 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11196 break 2
11197 fi
11198done
11199 done
11200IFS=$as_save_IFS
11201
11202 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11203 ;;
11204esac
11205fi
11206DTRACE=$ac_cv_path_DTRACE
11207if test -n "$DTRACE"; then
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11209$as_echo "$DTRACE" >&6; }
11210else
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11212$as_echo "no" >&6; }
11213fi
11214
11215
11216 if test "$DTRACE" = "not found"; then
11217 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11218 fi
11219
11220$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11221
11222 DTRACE_HEADERS="Include/pydtrace_probes.h"
11223
11224 # On OS X, DTrace providers do not need to be explicitly compiled and
11225 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11226 # generation flag '-G'. We check for presence of this flag, rather than
11227 # hardcoding support by OS, in the interest of robustness.
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11229$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11230if ${ac_cv_dtrace_link+:} false; then :
11231 $as_echo_n "(cached) " >&6
11232else
11233 ac_cv_dtrace_link=no
11234 echo 'BEGIN' > conftest.d
11235 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11236 ac_cv_dtrace_link=yes
11237
11238fi
11239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11240$as_echo "$ac_cv_dtrace_link" >&6; }
11241 if test "$ac_cv_dtrace_link" = "yes"; then
11242 DTRACE_OBJS="Python/pydtrace.o"
11243 fi
11244fi
11245
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011246# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011247
Guido van Rossum98935bf2001-09-05 19:13:16 +000011248DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011249
Guido van Rossume97ee181999-12-20 21:27:22 +000011250# the dlopen() function means we might want to use dynload_shlib.o. some
11251# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011252for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011253do :
11254 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011255if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011258_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011259
Guido van Rossume97ee181999-12-20 21:27:22 +000011260fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011261done
Guido van Rossume97ee181999-12-20 21:27:22 +000011262
Michael W. Hudson54241132001-12-07 15:38:26 +000011263
Guido van Rossume97ee181999-12-20 21:27:22 +000011264# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11265# loading of modules.
11266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11268$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011269if test -z "$DYNLOADFILE"
11270then
11271 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011272 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11273 if test "$ac_cv_func_dlopen" = yes
11274 then DYNLOADFILE="dynload_shlib.o"
11275 else DYNLOADFILE="dynload_aix.o"
11276 fi
11277 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011278 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011279 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11280 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011281 *)
11282 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11283 # out any dynamic loading
11284 if test "$ac_cv_func_dlopen" = yes
11285 then DYNLOADFILE="dynload_shlib.o"
11286 else DYNLOADFILE="dynload_stub.o"
11287 fi
11288 ;;
11289 esac
11290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11292$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011293if test "$DYNLOADFILE" != "dynload_stub.o"
11294then
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011297
11298fi
11299
Neil Schemenauer4e425612001-06-19 15:44:15 +000011300# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11301
Michael W. Hudson54241132001-12-07 15:38:26 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11304$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011305if test -z "$MACHDEP_OBJS"
11306then
Jack Jansene578a632001-08-15 01:27:14 +000011307 MACHDEP_OBJS=$extra_machdep_objs
11308else
11309 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011310fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011311if test -z "$MACHDEP_OBJS"; then
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11313$as_echo "none" >&6; }
11314else
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11316$as_echo "$MACHDEP_OBJS" >&6; }
11317fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011318
Guido van Rossum627b2d71993-12-24 10:39:16 +000011319# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011320for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011321 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011322 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011323 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011324 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011325 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011326 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011327 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011328 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011329 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011330 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011331 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011332 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011333 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011334 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11335 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011336 sigaction sigaltstack siginterrupt sigpending sigrelse \
11337 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011338 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011339 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011340 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011341do :
11342 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11343ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011344if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011346#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011347_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011348
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011349fi
11350done
11351
Michael W. Hudson54241132001-12-07 15:38:26 +000011352
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011353ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11354 #include <dirent.h>
11355"
11356if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11357
11358$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11359
11360fi
11361
11362
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011363# For some functions, having a definition is not sufficient, since
11364# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11366$as_echo_n "checking for chroot... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011369#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011370int
11371main ()
11372{
11373void *x=chroot
11374 ;
11375 return 0;
11376}
11377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011381
Matthias Kloseb159a552010-04-25 21:00:44 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011384else
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011387
11388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11391$as_echo_n "checking for link... " >&6; }
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011394#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011395int
11396main ()
11397{
11398void *x=link
11399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011406
Matthias Kloseb159a552010-04-25 21:00:44 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011409else
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011412
11413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11416$as_echo_n "checking for symlink... " >&6; }
11417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011418/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011419#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011420int
11421main ()
11422{
11423void *x=symlink
11424 ;
11425 return 0;
11426}
11427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011431
Matthias Kloseb159a552010-04-25 21:00:44 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011434else
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011437
11438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11441$as_echo_n "checking for fchdir... " >&6; }
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011443/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011444#include <unistd.h>
11445int
11446main ()
11447{
11448void *x=fchdir
11449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011456
Matthias Kloseb159a552010-04-25 21:00:44 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011459else
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011462
11463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11466$as_echo_n "checking for fsync... " >&6; }
11467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011468/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011469#include <unistd.h>
11470int
11471main ()
11472{
11473void *x=fsync
11474 ;
11475 return 0;
11476}
11477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011479
Matthias Kloseb9621712010-04-24 17:59:49 +000011480$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011481
Matthias Kloseb159a552010-04-25 21:00:44 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011483$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011484else
Matthias Kloseb9621712010-04-24 17:59:49 +000011485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11486$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011487
11488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11491$as_echo_n "checking for fdatasync... " >&6; }
11492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011493/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011494#include <unistd.h>
11495int
11496main ()
11497{
11498void *x=fdatasync
11499 ;
11500 return 0;
11501}
11502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011506
Matthias Kloseb159a552010-04-25 21:00:44 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011508$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011509else
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11511$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011512
11513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11516$as_echo_n "checking for epoll... " >&6; }
11517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011518/* end confdefs.h. */
11519#include <sys/epoll.h>
11520int
11521main ()
11522{
11523void *x=epoll_create
11524 ;
11525 return 0;
11526}
11527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011529
Matthias Kloseb9621712010-04-24 17:59:49 +000011530$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011531
Matthias Kloseb159a552010-04-25 21:00:44 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011533$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011534else
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11536$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011537
11538fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11541$as_echo_n "checking for epoll_create1... " >&6; }
11542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11543/* end confdefs.h. */
11544#include <sys/epoll.h>
11545int
11546main ()
11547{
11548void *x=epoll_create1
11549 ;
11550 return 0;
11551}
11552_ACEOF
11553if ac_fn_c_try_compile "$LINENO"; then :
11554
11555$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11556
11557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11558$as_echo "yes" >&6; }
11559else
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
11562
11563fi
11564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11566$as_echo_n "checking for kqueue... " >&6; }
11567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011568/* end confdefs.h. */
11569
11570#include <sys/types.h>
11571#include <sys/event.h>
11572
11573int
11574main ()
11575{
11576int x=kqueue()
11577 ;
11578 return 0;
11579}
11580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011581if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011584
Matthias Kloseb159a552010-04-25 21:00:44 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11589$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011590
11591fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11594$as_echo_n "checking for prlimit... " >&6; }
11595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11596/* end confdefs.h. */
11597
11598#include <sys/time.h>
11599#include <sys/resource.h>
11600
11601int
11602main ()
11603{
11604void *x=prlimit
11605 ;
11606 return 0;
11607}
11608_ACEOF
11609if ac_fn_c_try_compile "$LINENO"; then :
11610
11611$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11612
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11614$as_echo "yes" >&6; }
11615else
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
11618
11619fi
11620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11621
Martin v. Löwisd5843682002-11-21 20:41:28 +000011622# On some systems (eg. FreeBSD 5), we would find a definition of the
11623# functions ctermid_r, setgroups in the library, but no prototype
11624# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11625# address to avoid compiler warnings and potential miscompilations
11626# because of the missing prototypes.
11627
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11629$as_echo_n "checking for ctermid_r... " >&6; }
11630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011631/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011632
Martin v. Löwisd5843682002-11-21 20:41:28 +000011633#include <stdio.h>
11634
Martin v. Löwisd5843682002-11-21 20:41:28 +000011635int
11636main ()
11637{
11638void* p = ctermid_r
11639 ;
11640 return 0;
11641}
11642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011646
Matthias Kloseb159a552010-04-25 21:00:44 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011648$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011652
11653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11655
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11657$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011658if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011659 $as_echo_n "(cached) " >&6
11660else
11661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011662/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011663#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011664int
11665main ()
11666{
11667void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011668
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011674 ac_cv_flock_decl=yes
11675else
11676 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011677
11678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011680
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011681fi
11682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11683$as_echo "$ac_cv_flock_decl" >&6; }
11684if test "x${ac_cv_flock_decl}" = xyes; then
11685 for ac_func in flock
11686do :
11687 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011688if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011689 cat >>confdefs.h <<_ACEOF
11690#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011691_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011692
Antoine Pitroua3000072010-09-07 14:52:42 +000011693else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011695$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011696if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011697 $as_echo_n "(cached) " >&6
11698else
11699 ac_check_lib_save_LIBS=$LIBS
11700LIBS="-lbsd $LIBS"
11701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11702/* end confdefs.h. */
11703
11704/* Override any GCC internal prototype to avoid an error.
11705 Use char because int might match the return type of a GCC
11706 builtin and then its argument prototype would still apply. */
11707#ifdef __cplusplus
11708extern "C"
11709#endif
11710char flock ();
11711int
11712main ()
11713{
11714return flock ();
11715 ;
11716 return 0;
11717}
11718_ACEOF
11719if ac_fn_c_try_link "$LINENO"; then :
11720 ac_cv_lib_bsd_flock=yes
11721else
11722 ac_cv_lib_bsd_flock=no
11723fi
11724rm -f core conftest.err conftest.$ac_objext \
11725 conftest$ac_exeext conftest.$ac_ext
11726LIBS=$ac_check_lib_save_LIBS
11727fi
11728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11729$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011730if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011731 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011732
11733
11734$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11735
11736
11737fi
11738
11739
11740fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011741done
11742
Antoine Pitroua3000072010-09-07 14:52:42 +000011743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11746$as_echo_n "checking for getpagesize... " >&6; }
11747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011748/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011749
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011750#include <unistd.h>
11751
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011752int
11753main ()
11754{
11755void* p = getpagesize
11756 ;
11757 return 0;
11758}
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011761
Matthias Kloseb9621712010-04-24 17:59:49 +000011762$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011763
Matthias Kloseb159a552010-04-25 21:00:44 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011765$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11768$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011769
11770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011772
Victor Stinner984890f2011-11-24 13:53:38 +010011773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11774$as_echo_n "checking for broken unsetenv... " >&6; }
11775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11776/* end confdefs.h. */
11777
11778#include <stdlib.h>
11779
11780int
11781main ()
11782{
11783int res = unsetenv("DUMMY")
11784 ;
11785 return 0;
11786}
11787_ACEOF
11788if ac_fn_c_try_compile "$LINENO"; then :
11789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
11791else
11792
11793$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11794
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11796$as_echo "yes" >&6; }
11797
11798fi
11799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11800
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011801for ac_prog in true
11802do
11803 # Extract the first word of "$ac_prog", so it can be a program name with args.
11804set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011807if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011809else
11810 if test -n "$TRUE"; then
11811 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11812else
11813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11814for as_dir in $PATH
11815do
11816 IFS=$as_save_IFS
11817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011820 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 $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 +000011822 break 2
11823 fi
11824done
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011827
11828fi
11829fi
11830TRUE=$ac_cv_prog_TRUE
11831if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11833$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11836$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011837fi
11838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011840 test -n "$TRUE" && break
11841done
11842test -n "$TRUE" || TRUE="/bin/true"
11843
11844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11846$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011847if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011849else
11850 ac_check_lib_save_LIBS=$LIBS
11851LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011853/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011855/* Override any GCC internal prototype to avoid an error.
11856 Use char because int might match the return type of a GCC
11857 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011858#ifdef __cplusplus
11859extern "C"
11860#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011861char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011862int
11863main ()
11864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011866 ;
11867 return 0;
11868}
11869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011870if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011871 ac_cv_lib_c_inet_aton=yes
11872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011875rm -f core conftest.err conftest.$ac_objext \
11876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011877LIBS=$ac_check_lib_save_LIBS
11878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11880$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011881if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011882 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11885$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011888else
11889 ac_check_lib_save_LIBS=$LIBS
11890LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011892/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011894/* Override any GCC internal prototype to avoid an error.
11895 Use char because int might match the return type of a GCC
11896 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011897#ifdef __cplusplus
11898extern "C"
11899#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011900char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011901int
11902main ()
11903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011905 ;
11906 return 0;
11907}
11908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011910 ac_cv_lib_resolv_inet_aton=yes
11911else
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011914rm -f core conftest.err conftest.$ac_objext \
11915 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011916LIBS=$ac_check_lib_save_LIBS
11917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11919$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011920if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011921 cat >>confdefs.h <<_ACEOF
11922#define HAVE_LIBRESOLV 1
11923_ACEOF
11924
11925 LIBS="-lresolv $LIBS"
11926
11927fi
11928
11929
11930fi
11931
11932
Christian Heimesd0764e22007-12-04 15:00:33 +000011933# On Tru64, chflags seems to be present, but calling it will
11934# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11936$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011937if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011939else
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011941 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011944/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011945
Christian Heimesd0764e22007-12-04 15:00:33 +000011946#include <sys/stat.h>
11947#include <unistd.h>
11948int main(int argc, char*argv[])
11949{
11950 if(chflags(argv[0], 0) != 0)
11951 return 1;
11952 return 0;
11953}
Ned Deily3eb67d52011-06-28 00:00:28 -070011954
Christian Heimesd0764e22007-12-04 15:00:33 +000011955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011957 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011958else
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011963fi
11964
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11968$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011969if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011971if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011972 ac_cv_have_chflags="yes"
11973else
11974 ac_cv_have_chflags="no"
11975fi
11976
11977fi
11978if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011981
11982fi
11983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11985$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011986if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011990 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011993/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011994
Christian Heimesd0764e22007-12-04 15:00:33 +000011995#include <sys/stat.h>
11996#include <unistd.h>
11997int main(int argc, char*argv[])
11998{
11999 if(lchflags(argv[0], 0) != 0)
12000 return 1;
12001 return 0;
12002}
Ned Deily3eb67d52011-06-28 00:00:28 -070012003
Christian Heimesd0764e22007-12-04 15:00:33 +000012004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012006 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012012fi
12013
12014
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12017$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012018if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012020if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012021 ac_cv_have_lchflags="yes"
12022else
12023 ac_cv_have_lchflags="no"
12024fi
12025
12026fi
12027if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012030
12031fi
12032
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012033case $ac_sys_system/$ac_sys_release in
12034Darwin/*)
12035 _CUR_CFLAGS="${CFLAGS}"
12036 _CUR_LDFLAGS="${LDFLAGS}"
12037 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12038 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12039 ;;
12040esac
12041
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12043$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012044if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012046else
12047 ac_check_lib_save_LIBS=$LIBS
12048LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012050/* end confdefs.h. */
12051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052/* Override any GCC internal prototype to avoid an error.
12053 Use char because int might match the return type of a GCC
12054 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012055#ifdef __cplusplus
12056extern "C"
12057#endif
12058char inflateCopy ();
12059int
12060main ()
12061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012063 ;
12064 return 0;
12065}
12066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012068 ac_cv_lib_z_inflateCopy=yes
12069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012072rm -f core conftest.err conftest.$ac_objext \
12073 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012074LIBS=$ac_check_lib_save_LIBS
12075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12077$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012078if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012081
12082fi
12083
12084
12085case $ac_sys_system/$ac_sys_release in
12086Darwin/*)
12087 CFLAGS="${_CUR_CFLAGS}"
12088 LDFLAGS="${_CUR_LDFLAGS}"
12089 ;;
12090esac
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12093$as_echo_n "checking for hstrerror... " >&6; }
12094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012095/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012096
Martin v. Löwise9416172003-05-03 10:12:45 +000012097#include <netdb.h>
12098
Martin v. Löwise9416172003-05-03 10:12:45 +000012099int
12100main ()
12101{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012102void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012103 ;
12104 return 0;
12105}
12106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012108
Matthias Kloseb9621712010-04-24 17:59:49 +000012109$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012110
Matthias Kloseb159a552010-04-25 21:00:44 +000012111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012113else
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012116
12117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118rm -f core conftest.err conftest.$ac_objext \
12119 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12122$as_echo_n "checking for inet_aton... " >&6; }
12123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012124/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012125
Martin v. Löwis86d66262006-02-17 08:40:11 +000012126#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012127#include <sys/socket.h>
12128#include <netinet/in.h>
12129#include <arpa/inet.h>
12130
Martin v. Löwise9416172003-05-03 10:12:45 +000012131int
12132main ()
12133{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012134void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012135 ;
12136 return 0;
12137}
12138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012139if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012142
Matthias Kloseb159a552010-04-25 21:00:44 +000012143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12147$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012148
12149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012150rm -f core conftest.err conftest.$ac_objext \
12151 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12154$as_echo_n "checking for inet_pton... " >&6; }
12155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012156/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012157
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012158#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012159#include <sys/socket.h>
12160#include <netinet/in.h>
12161#include <arpa/inet.h>
12162
Martin v. Löwise9416172003-05-03 10:12:45 +000012163int
12164main ()
12165{
12166void* p = inet_pton
12167 ;
12168 return 0;
12169}
12170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012174
Matthias Kloseb159a552010-04-25 21:00:44 +000012175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012176$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12179$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012180
12181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012183
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012184# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12186$as_echo_n "checking for setgroups... " >&6; }
12187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012189
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012190#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012191#ifdef HAVE_GRP_H
12192#include <grp.h>
12193#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012194
Martin v. Löwisd5843682002-11-21 20:41:28 +000012195int
12196main ()
12197{
12198void* p = setgroups
12199 ;
12200 return 0;
12201}
12202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012204
Matthias Kloseb9621712010-04-24 17:59:49 +000012205$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012206
Matthias Kloseb159a552010-04-25 21:00:44 +000012207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012208$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012209else
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12211$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012212
12213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012215
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012216# check for openpty and forkpty
12217
12218for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012219do :
12220 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012224_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012225
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12228$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012229if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012231else
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237/* Override any GCC internal prototype to avoid an error.
12238 Use char because int might match the return type of a GCC
12239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012240#ifdef __cplusplus
12241extern "C"
12242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012243char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012244int
12245main ()
12246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012248 ;
12249 return 0;
12250}
12251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012252if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012253 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012254else
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012257rm -f core conftest.err conftest.$ac_objext \
12258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012259LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12262$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012263if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012265 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012266else
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12268$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012271else
12272 ac_check_lib_save_LIBS=$LIBS
12273LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012275/* end confdefs.h. */
12276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012277/* Override any GCC internal prototype to avoid an error.
12278 Use char because int might match the return type of a GCC
12279 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012280#ifdef __cplusplus
12281extern "C"
12282#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012283char openpty ();
12284int
12285main ()
12286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012288 ;
12289 return 0;
12290}
12291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012292if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012293 ac_cv_lib_bsd_openpty=yes
12294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012297rm -f core conftest.err conftest.$ac_objext \
12298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012299LIBS=$ac_check_lib_save_LIBS
12300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12302$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012303if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012305 LIBS="$LIBS -lbsd"
12306fi
12307
12308
12309fi
12310
Fred Drake8cef4cf2000-06-28 16:40:38 +000012311
12312fi
12313done
12314
12315for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012316do :
12317 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012318if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012320#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012321_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012322
Fred Drake8cef4cf2000-06-28 16:40:38 +000012323else
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12325$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012326if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012328else
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012330LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334/* Override any GCC internal prototype to avoid an error.
12335 Use char because int might match the return type of a GCC
12336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012337#ifdef __cplusplus
12338extern "C"
12339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012340char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012341int
12342main ()
12343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 ;
12346 return 0;
12347}
12348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012350 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012351else
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012354rm -f core conftest.err conftest.$ac_objext \
12355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012356LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12359$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012360if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012362 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012363else
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12365$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012366if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012368else
12369 ac_check_lib_save_LIBS=$LIBS
12370LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012372/* end confdefs.h. */
12373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374/* Override any GCC internal prototype to avoid an error.
12375 Use char because int might match the return type of a GCC
12376 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012377#ifdef __cplusplus
12378extern "C"
12379#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012380char forkpty ();
12381int
12382main ()
12383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012385 ;
12386 return 0;
12387}
12388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012389if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012390 ac_cv_lib_bsd_forkpty=yes
12391else
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012394rm -f core conftest.err conftest.$ac_objext \
12395 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012396LIBS=$ac_check_lib_save_LIBS
12397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12399$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012400if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012402 LIBS="$LIBS -lbsd"
12403fi
12404
12405
12406fi
12407
Fred Drake8cef4cf2000-06-28 16:40:38 +000012408
12409fi
12410done
12411
Jack Jansendd19cf82001-12-06 22:36:17 +000012412
Christian Heimesb186d002008-03-18 15:15:01 +000012413# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012414for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012415do :
12416 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012419#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012420_ACEOF
12421
12422fi
12423done
12424
12425
Michael W. Hudson54241132001-12-07 15:38:26 +000012426# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012427for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012428do :
12429 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12430ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012431if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012433#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012434_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012435
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012437done
12438
Michael W. Hudson54241132001-12-07 15:38:26 +000012439
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012440ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012441if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012442 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012443
Martin v. Löwis1142de32002-03-29 16:28:31 +000012444else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012446 *" dup2.$ac_objext "* ) ;;
12447 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012449esac
12450
Martin v. Löwis1142de32002-03-29 16:28:31 +000012451fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012452
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012453ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012454if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012455 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12456
12457else
12458 case " $LIBOBJS " in
12459 *" strdup.$ac_objext "* ) ;;
12460 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12461 ;;
12462esac
12463
12464fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012465
12466
12467for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012468do :
12469 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012475/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012488
Guido van Rossum627b2d71993-12-24 10:39:16 +000012489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012491
Guido van Rossum627b2d71993-12-24 10:39:16 +000012492fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012493done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012494
Jack Jansen150753c2003-03-29 22:07:47 +000012495for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012496do :
12497 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012498if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012499 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012500#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012503/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012504#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012505int
12506main ()
12507{
12508setpgrp(0,0);
12509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012514
Matthias Kloseb9621712010-04-24 17:59:49 +000012515$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012516
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012519
12520fi
12521done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012522
Thomas Wouters3a584202000-08-05 23:28:51 +000012523for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012524do :
12525 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012526if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012531/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012532#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012533int
12534main ()
12535{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 ;
12538 return 0;
12539}
12540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012541if ac_fn_c_try_compile "$LINENO"; then :
12542
Guido van Rossum627b2d71993-12-24 10:39:16 +000012543else
Skip Montanaro6dead952003-09-25 14:50:04 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012546
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
Guido van Rossum627b2d71993-12-24 10:39:16 +000012548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012550
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012551fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012552done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553
Michael W. Hudson54241132001-12-07 15:38:26 +000012554
Victor Stinnere0be4232011-10-25 13:06:09 +020012555for ac_func in clock_gettime
12556do :
12557 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12558if test "x$ac_cv_func_clock_gettime" = xyes; then :
12559 cat >>confdefs.h <<_ACEOF
12560#define HAVE_CLOCK_GETTIME 1
12561_ACEOF
12562
12563else
12564
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12566$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12567if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12568 $as_echo_n "(cached) " >&6
12569else
12570 ac_check_lib_save_LIBS=$LIBS
12571LIBS="-lrt $LIBS"
12572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12573/* end confdefs.h. */
12574
12575/* Override any GCC internal prototype to avoid an error.
12576 Use char because int might match the return type of a GCC
12577 builtin and then its argument prototype would still apply. */
12578#ifdef __cplusplus
12579extern "C"
12580#endif
12581char clock_gettime ();
12582int
12583main ()
12584{
12585return clock_gettime ();
12586 ;
12587 return 0;
12588}
12589_ACEOF
12590if ac_fn_c_try_link "$LINENO"; then :
12591 ac_cv_lib_rt_clock_gettime=yes
12592else
12593 ac_cv_lib_rt_clock_gettime=no
12594fi
12595rm -f core conftest.err conftest.$ac_objext \
12596 conftest$ac_exeext conftest.$ac_ext
12597LIBS=$ac_check_lib_save_LIBS
12598fi
12599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12600$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12601if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12602
Victor Stinner7efb8332014-08-29 15:41:08 +020012603 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012604 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12605
12606
12607$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12608
12609
12610fi
12611
12612
12613fi
12614done
12615
12616
12617for ac_func in clock_getres
12618do :
12619 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12620if test "x$ac_cv_func_clock_getres" = xyes; then :
12621 cat >>confdefs.h <<_ACEOF
12622#define HAVE_CLOCK_GETRES 1
12623_ACEOF
12624
12625else
12626
12627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12628$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12629if ${ac_cv_lib_rt_clock_getres+:} false; then :
12630 $as_echo_n "(cached) " >&6
12631else
12632 ac_check_lib_save_LIBS=$LIBS
12633LIBS="-lrt $LIBS"
12634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12635/* end confdefs.h. */
12636
12637/* Override any GCC internal prototype to avoid an error.
12638 Use char because int might match the return type of a GCC
12639 builtin and then its argument prototype would still apply. */
12640#ifdef __cplusplus
12641extern "C"
12642#endif
12643char clock_getres ();
12644int
12645main ()
12646{
12647return clock_getres ();
12648 ;
12649 return 0;
12650}
12651_ACEOF
12652if ac_fn_c_try_link "$LINENO"; then :
12653 ac_cv_lib_rt_clock_getres=yes
12654else
12655 ac_cv_lib_rt_clock_getres=no
12656fi
12657rm -f core conftest.err conftest.$ac_objext \
12658 conftest$ac_exeext conftest.$ac_ext
12659LIBS=$ac_check_lib_save_LIBS
12660fi
12661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12662$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12663if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12664
12665 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12666
12667
12668fi
12669
12670
12671fi
12672done
12673
12674
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012675for ac_func in clock_settime
12676do :
12677 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12678if test "x$ac_cv_func_clock_settime" = xyes; then :
12679 cat >>confdefs.h <<_ACEOF
12680#define HAVE_CLOCK_SETTIME 1
12681_ACEOF
12682
12683else
12684
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12686$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12687if ${ac_cv_lib_rt_clock_settime+:} false; then :
12688 $as_echo_n "(cached) " >&6
12689else
12690 ac_check_lib_save_LIBS=$LIBS
12691LIBS="-lrt $LIBS"
12692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693/* end confdefs.h. */
12694
12695/* Override any GCC internal prototype to avoid an error.
12696 Use char because int might match the return type of a GCC
12697 builtin and then its argument prototype would still apply. */
12698#ifdef __cplusplus
12699extern "C"
12700#endif
12701char clock_settime ();
12702int
12703main ()
12704{
12705return clock_settime ();
12706 ;
12707 return 0;
12708}
12709_ACEOF
12710if ac_fn_c_try_link "$LINENO"; then :
12711 ac_cv_lib_rt_clock_settime=yes
12712else
12713 ac_cv_lib_rt_clock_settime=no
12714fi
12715rm -f core conftest.err conftest.$ac_objext \
12716 conftest$ac_exeext conftest.$ac_ext
12717LIBS=$ac_check_lib_save_LIBS
12718fi
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12720$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12721if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12722
12723 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12724
12725
12726fi
12727
12728
12729fi
12730done
12731
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12734$as_echo_n "checking for major... " >&6; }
12735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012736/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012737
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012738#if defined(MAJOR_IN_MKDEV)
12739#include <sys/mkdev.h>
12740#elif defined(MAJOR_IN_SYSMACROS)
12741#include <sys/sysmacros.h>
12742#else
12743#include <sys/types.h>
12744#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012745
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012746int
12747main ()
12748{
12749
12750 makedev(major(0),minor(0));
12751
12752 ;
12753 return 0;
12754}
12755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012756if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012757
12758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12762$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012763
12764else
Skip Montanaro6dead952003-09-25 14:50:04 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12767$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012768
12769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012770rm -f core conftest.err conftest.$ac_objext \
12771 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012772
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012773# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12774# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12776$as_echo_n "checking for if_nameindex... " >&6; }
12777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12778/* end confdefs.h. */
12779
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012780#include <stdio.h>
12781#ifdef STDC_HEADERS
12782# include <stdlib.h>
12783# include <stddef.h>
12784#else
12785# ifdef HAVE_STDLIB_H
12786# include <stdlib.h>
12787# endif
12788#endif
12789#ifdef HAVE_SYS_SOCKET_H
12790# include <sys/socket.h>
12791#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012792#ifdef HAVE_NET_IF_H
12793# include <net/if.h>
12794#endif
12795
12796int
12797main ()
12798{
12799struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12800 ;
12801 return 0;
12802}
12803_ACEOF
12804if ac_fn_c_try_link "$LINENO"; then :
12805
12806$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12807
12808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12809$as_echo "yes" >&6; }
12810else
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12812$as_echo "no" >&6; }
12813
12814fi
12815rm -f core conftest.err conftest.$ac_objext \
12816 conftest$ac_exeext conftest.$ac_ext
12817
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012818# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12819# macro is not defined in android-ndk-r13.
12820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12821$as_echo_n "checking for lockf... " >&6; }
12822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12823/* end confdefs.h. */
12824#include <unistd.h>
12825int
12826main ()
12827{
12828lockf(0, F_LOCK, 0);
12829 ;
12830 return 0;
12831}
12832_ACEOF
12833if ac_fn_c_try_link "$LINENO"; then :
12834
12835$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12836
12837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12838$as_echo "yes" >&6; }
12839else
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12841$as_echo "no" >&6; }
12842
12843fi
12844rm -f core conftest.err conftest.$ac_objext \
12845 conftest$ac_exeext conftest.$ac_ext
12846
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012847# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012848# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12850$as_echo_n "checking for getaddrinfo... " >&6; }
12851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012852/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012853
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012854#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012855#include <sys/socket.h>
12856#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012857#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012858
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012862getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 ;
12864 return 0;
12865}
12866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012868 have_getaddrinfo=yes
12869else
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012872rm -f core conftest.err conftest.$ac_objext \
12873 conftest$ac_exeext conftest.$ac_ext
12874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12875$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012876if test $have_getaddrinfo = yes
12877then
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12879$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012880 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012882else
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012884
12885if test "${enable_ipv6+set}" = set; then
12886 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12887else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012888 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012889fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012892/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012893
Stefan Krah19c21392012-11-22 23:47:32 +010012894#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012895#include <sys/types.h>
12896#include <netdb.h>
12897#include <string.h>
12898#include <sys/socket.h>
12899#include <netinet/in.h>
12900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012901int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012902{
12903 int passive, gaierr, inet4 = 0, inet6 = 0;
12904 struct addrinfo hints, *ai, *aitop;
12905 char straddr[INET6_ADDRSTRLEN], strport[16];
12906
12907 for (passive = 0; passive <= 1; passive++) {
12908 memset(&hints, 0, sizeof(hints));
12909 hints.ai_family = AF_UNSPEC;
12910 hints.ai_flags = passive ? AI_PASSIVE : 0;
12911 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012912 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012913 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12914 (void)gai_strerror(gaierr);
12915 goto bad;
12916 }
12917 for (ai = aitop; ai; ai = ai->ai_next) {
12918 if (ai->ai_addr == NULL ||
12919 ai->ai_addrlen == 0 ||
12920 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12921 straddr, sizeof(straddr), strport, sizeof(strport),
12922 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12923 goto bad;
12924 }
12925 switch (ai->ai_family) {
12926 case AF_INET:
12927 if (strcmp(strport, "54321") != 0) {
12928 goto bad;
12929 }
12930 if (passive) {
12931 if (strcmp(straddr, "0.0.0.0") != 0) {
12932 goto bad;
12933 }
12934 } else {
12935 if (strcmp(straddr, "127.0.0.1") != 0) {
12936 goto bad;
12937 }
12938 }
12939 inet4++;
12940 break;
12941 case AF_INET6:
12942 if (strcmp(strport, "54321") != 0) {
12943 goto bad;
12944 }
12945 if (passive) {
12946 if (strcmp(straddr, "::") != 0) {
12947 goto bad;
12948 }
12949 } else {
12950 if (strcmp(straddr, "::1") != 0) {
12951 goto bad;
12952 }
12953 }
12954 inet6++;
12955 break;
12956 case AF_UNSPEC:
12957 goto bad;
12958 break;
12959 default:
12960 /* another family support? */
12961 break;
12962 }
12963 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012964 freeaddrinfo(aitop);
12965 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012966 }
12967
12968 if (!(inet4 == 0 || inet4 == 2))
12969 goto bad;
12970 if (!(inet6 == 0 || inet6 == 2))
12971 goto bad;
12972
12973 if (aitop)
12974 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012975 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012976
12977 bad:
12978 if (aitop)
12979 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012980 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012981}
12982
Martin v. Löwis11437992002-04-12 09:54:03 +000012983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012984if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012985 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986else
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012992
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012993fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012994
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12998$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12999
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013000if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013001then
13002 if test $ipv6 = yes
13003 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004 echo 'Fatal: You must get working getaddrinfo() function.'
13005 echo ' or you can specify "--disable-ipv6"'.
13006 exit 1
13007 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013008else
Martin v. Löwis11437992002-04-12 09:54:03 +000013009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013011
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013012fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013013
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013014for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013015do :
13016 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013017if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013019#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013020_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013022fi
13023done
13024
Michael W. Hudson54241132001-12-07 15:38:26 +000013025
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013026# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13028$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013029if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013033/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013034#include <sys/types.h>
13035#include <sys/time.h>
13036#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
Martin v. Löwis11437992002-04-12 09:54:03 +000013038int
13039main ()
13040{
13041if ((struct tm *) 0)
13042return 0;
13043 ;
13044 return 0;
13045}
13046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13055$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013056if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059
13060fi
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13063$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013064if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013066else
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013068/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069#include <sys/types.h>
13070#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072int
13073main ()
13074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075struct tm tm;
13076 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 ;
13079 return 0;
13080}
13081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013082if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083 ac_cv_struct_tm=time.h
13084else
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13090$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013091if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013094
13095fi
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097ac_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 +000013098#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100"
Victor Stinnere0be4232011-10-25 13:06:09 +020013101if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013102
13103cat >>confdefs.h <<_ACEOF
13104#define HAVE_STRUCT_TM_TM_ZONE 1
13105_ACEOF
13106
13107
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113
13114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13116"
Victor Stinnere0be4232011-10-25 13:06:09 +020013117if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013119else
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121fi
13122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013125_ACEOF
13126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13128$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013129if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013134#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135#if !HAVE_DECL_TZNAME
13136extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013138
Martin v. Löwis11437992002-04-12 09:54:03 +000013139int
13140main ()
13141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 ;
13144 return 0;
13145}
13146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013147if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148 ac_cv_var_tzname=yes
13149else
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013152rm -f core conftest.err conftest.$ac_objext \
13153 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13156$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013157 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013160
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013161 fi
13162fi
13163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164ac_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 +020013165if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013166
13167cat >>confdefs.h <<_ACEOF
13168#define HAVE_STRUCT_STAT_ST_RDEV 1
13169_ACEOF
13170
13171
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013172fi
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174ac_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 +020013175if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013176
Martin v. Löwis11437992002-04-12 09:54:03 +000013177cat >>confdefs.h <<_ACEOF
13178#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13179_ACEOF
13180
13181
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013182fi
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184ac_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 +020013185if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013186
13187cat >>confdefs.h <<_ACEOF
13188#define HAVE_STRUCT_STAT_ST_FLAGS 1
13189_ACEOF
13190
13191
13192fi
13193
Matthias Kloseb9621712010-04-24 17:59:49 +000013194ac_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 +020013195if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013196
13197cat >>confdefs.h <<_ACEOF
13198#define HAVE_STRUCT_STAT_ST_GEN 1
13199_ACEOF
13200
13201
13202fi
13203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204ac_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 +020013205if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013206
13207cat >>confdefs.h <<_ACEOF
13208#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13209_ACEOF
13210
13211
13212fi
13213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214ac_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 +020013215if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013216
Martin v. Löwis11437992002-04-12 09:54:03 +000013217cat >>confdefs.h <<_ACEOF
13218#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13219_ACEOF
13220
13221
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013222fi
13223
Stefan Krah267b6392016-04-26 01:09:18 +020013224ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13225 #include <sys/types.h>
13226 #include <pwd.h>
13227
13228"
13229if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13230
13231cat >>confdefs.h <<_ACEOF
13232#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13233_ACEOF
13234
13235
13236fi
13237ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13238 #include <sys/types.h>
13239 #include <pwd.h>
13240
13241"
13242if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13243
13244cat >>confdefs.h <<_ACEOF
13245#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13246_ACEOF
13247
13248
13249fi
13250
Zachary Ware6a6967e2016-10-01 00:47:27 -050013251# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13252ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13253"
13254if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13255
13256cat >>confdefs.h <<_ACEOF
13257#define HAVE_SIGINFO_T_SI_BAND 1
13258_ACEOF
13259
13260
13261fi
13262
Michael W. Hudson54241132001-12-07 15:38:26 +000013263
Matthias Kloseb9621712010-04-24 17:59:49 +000013264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13265$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013266if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268else
Matthias Kloseb159a552010-04-25 21:00:44 +000013269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013271/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013272#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013273int
13274main ()
13275{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 ;
13278 return 0;
13279}
13280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013282 ac_cv_header_time_altzone=yes
13283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288fi
13289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13291$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013292if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013295
13296fi
13297
Guido van Rossumda88dad1995-01-26 00:46:29 +000013298was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13300$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013302/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013303
13304#include <sys/types.h>
13305#include <sys/select.h>
13306#include <sys/time.h>
13307
Martin v. Löwis11437992002-04-12 09:54:03 +000013308int
13309main ()
13310{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 ;
13313 return 0;
13314}
13315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013321 was_it_defined=yes
13322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13326$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13329$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013330if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013334/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013335#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013336int
13337main ()
13338{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013339struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 ;
13341 return 0;
13342}
13343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013345 ac_cv_struct_addrinfo=yes
13346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13350fi
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13353$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013354if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013357
13358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13361$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013367
13368# include <sys/types.h>
13369# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013370int
13371main ()
13372{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013373struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013379 ac_cv_struct_sockaddr_storage=yes
13380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13384fi
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13387$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013388if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013391
13392fi
13393
Christian Heimesdffa3942016-09-05 23:54:41 +020013394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13395$as_echo_n "checking for sockaddr_alg... " >&6; }
13396if ${ac_cv_struct_sockaddr_alg+:} false; then :
13397 $as_echo_n "(cached) " >&6
13398else
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400/* end confdefs.h. */
13401
13402# include <sys/types.h>
13403# include <sys/socket.h>
13404# include <linux/if_alg.h>
13405int
13406main ()
13407{
13408struct sockaddr_alg s
13409 ;
13410 return 0;
13411}
13412_ACEOF
13413if ac_fn_c_try_compile "$LINENO"; then :
13414 ac_cv_struct_sockaddr_alg=yes
13415else
13416 ac_cv_struct_sockaddr_alg=no
13417fi
13418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13419fi
13420
13421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13422$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13423if test $ac_cv_struct_sockaddr_alg = yes; then
13424
13425$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13426
13427fi
13428
Guido van Rossum627b2d71993-12-24 10:39:16 +000013429# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13432$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013433if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013435else
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
13442static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013443test_array [0] = 0;
13444return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
13446 ;
13447 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013448}
Martin v. Löwis11437992002-04-12 09:54:03 +000013449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013450if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013451 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13458$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013461
13462fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13465$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013466if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013470/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472int
13473main ()
13474{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013475
Martin v. Löwis11437992002-04-12 09:54:03 +000013476#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013477 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013478 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013479 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481 char const *const *pcpcc;
13482 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 /* NEC SVR4.0.2 mips cc rejects this. */
13484 struct point {int x, y;};
13485 static struct point const zero = {0,0};
13486 /* AIX XL C 1.02.0.0 rejects this.
13487 It does not let you subtract one const X* pointer from another in
13488 an arm of an if-expression whose if-part is not a constant
13489 expression */
13490 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013491 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013493 ++pcpcc;
13494 ppc = (char**) pcpcc;
13495 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013496 { /* SCO 3.2v4 cc rejects this sort of thing. */
13497 char tx;
13498 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 }
13504 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13505 int x[] = {25, 17};
13506 const int *foo = &x[0];
13507 ++foo;
13508 }
13509 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13510 typedef const int *iptr;
13511 iptr p = 0;
13512 ++p;
13513 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013514 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013516 struct s { int j; const int *ap[3]; } bx;
13517 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 }
13519 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13520 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013521 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013523 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013524#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013528}
Martin v. Löwis11437992002-04-12 09:54:03 +000013529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531 ac_cv_c_const=yes
13532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13538$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542
13543fi
13544
Michael W. Hudson54241132001-12-07 15:38:26 +000013545
Guido van Rossumda88dad1995-01-26 00:46:29 +000013546works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13548$as_echo_n "checking for working volatile... " >&6; }
13549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013550/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552int
13553main ()
13554{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013555volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 ;
13557 return 0;
13558}
13559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013560if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013561 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013562else
Skip Montanaro6dead952003-09-25 14:50:04 +000013563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013565
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013566
Guido van Rossum627b2d71993-12-24 10:39:16 +000013567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13570$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013571
Guido van Rossumda88dad1995-01-26 00:46:29 +000013572works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13574$as_echo_n "checking for working signed char... " >&6; }
13575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013576/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013577
Martin v. Löwis11437992002-04-12 09:54:03 +000013578int
13579main ()
13580{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013581signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
13584}
13585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013587 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013588else
Skip Montanaro6dead952003-09-25 14:50:04 +000013589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013591
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013592
Guido van Rossum7f43da71994-08-01 12:15:30 +000013593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13596$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013597
Guido van Rossumda88dad1995-01-26 00:46:29 +000013598have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13600$as_echo_n "checking for prototypes... " >&6; }
13601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013602/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013603int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013604int
13605main ()
13606{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013607return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 ;
13609 return 0;
13610}
13611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Matthias Kloseb159a552010-04-25 21:00:44 +000013616 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13620$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621
Guido van Rossumda88dad1995-01-26 00:46:29 +000013622works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13624$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013626/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013627
13628#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013629int foo(int x, ...) {
13630 va_list va;
13631 va_start(va, x);
13632 va_arg(va, int);
13633 va_arg(va, char *);
13634 va_arg(va, double);
13635 return 0;
13636}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013637
Martin v. Löwis11437992002-04-12 09:54:03 +000013638int
13639main ()
13640{
Guido van Rossum90eea071996-08-30 20:58:57 +000013641return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013642 ;
13643 return 0;
13644}
13645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013647
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013651 works=yes
13652
Guido van Rossum627b2d71993-12-24 10:39:16 +000013653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13656$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013657
Martin v. Löwisd6320502004-08-12 13:45:08 +000013658# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13660$as_echo_n "checking for socketpair... " >&6; }
13661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013662/* end confdefs.h. */
13663
13664#include <sys/types.h>
13665#include <sys/socket.h>
13666
13667int
13668main ()
13669{
13670void *x=socketpair
13671 ;
13672 return 0;
13673}
13674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013676
Matthias Kloseb9621712010-04-24 17:59:49 +000013677$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013678
Matthias Kloseb159a552010-04-25 21:00:44 +000013679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013680$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013681else
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13683$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013684
13685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013687
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013688# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13690$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013692/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013693#include <sys/types.h>
13694#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013695int
13696main ()
13697{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013698struct sockaddr x;
13699x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 ;
13701 return 0;
13702}
13703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if ac_fn_c_try_compile "$LINENO"; then :
13705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13706$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013709
13710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13712$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013713
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013716
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013717# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
13719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013721if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13726$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013727 OLD_CFLAGS=$CFLAGS
13728 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013730/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013731
13732# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Martin v. Löwis11437992002-04-12 09:54:03 +000013734int
13735main ()
13736{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013737
13738 char *name;
13739 struct hostent *he, *res;
13740 char buffer[2048];
13741 int buflen = 2048;
13742 int h_errnop;
13743
13744 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013745
13746 ;
13747 return 0;
13748}
13749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013750if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013751
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013753
Martin v. Löwis11437992002-04-12 09:54:03 +000013754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13758$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013760else
Skip Montanaro6dead952003-09-25 14:50:04 +000013761
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13763$as_echo "no" >&6; }
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13765$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013767/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013768
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013769# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Martin v. Löwis11437992002-04-12 09:54:03 +000013771int
13772main ()
13773{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013774
13775 char *name;
13776 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013777 char buffer[2048];
13778 int buflen = 2048;
13779 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013780
Matthias Kloseb159a552010-04-25 21:00:44 +000013781 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013782
13783 ;
13784 return 0;
13785}
13786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013790
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
Matthias Kloseb159a552010-04-25 21:00:44 +000013792$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13795$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013796
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013797else
Skip Montanaro6dead952003-09-25 14:50:04 +000013798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13800$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13802$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804/* end confdefs.h. */
13805
13806# include <netdb.h>
13807
13808int
13809main ()
13810{
13811
13812 char *name;
13813 struct hostent *he;
13814 struct hostent_data data;
13815
13816 (void) gethostbyname_r(name, he, &data);
13817
13818 ;
13819 return 0;
13820}
13821_ACEOF
13822if ac_fn_c_try_compile "$LINENO"; then :
13823
13824 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13825
13826
13827$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13828
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13830$as_echo "yes" >&6; }
13831
13832else
13833
13834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13835$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013839
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013842
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013845 CFLAGS=$OLD_CFLAGS
13846
13847else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 for ac_func in gethostbyname
13850do :
13851 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013852if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013853 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013854#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013855_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013857fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013858done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013859
Michael W. Hudson54241132001-12-07 15:38:26 +000013860
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013861fi
13862
Michael W. Hudson54241132001-12-07 15:38:26 +000013863
13864
13865
13866
13867
13868
Guido van Rossum627b2d71993-12-24 10:39:16 +000013869# checks for system services
13870# (none yet)
13871
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013872# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013873ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013874if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013875
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013876else
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13878$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013879if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881else
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013883LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887/* Override any GCC internal prototype to avoid an error.
13888 Use char because int might match the return type of a GCC
13889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013890#ifdef __cplusplus
13891extern "C"
13892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013893char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013894int
13895main ()
13896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013898 ;
13899 return 0;
13900}
13901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013904else
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013907rm -f core conftest.err conftest.$ac_objext \
13908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013909LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13912$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013913if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 cat >>confdefs.h <<_ACEOF
13915#define HAVE_LIBIEEE 1
13916_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013917
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013918 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013919
Guido van Rossum627b2d71993-12-24 10:39:16 +000013920fi
13921
Michael W. Hudson54241132001-12-07 15:38:26 +000013922
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013923fi
13924
Michael W. Hudson54241132001-12-07 15:38:26 +000013925
Guido van Rossum7f253911997-05-09 02:42:48 +000013926# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13928$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013931if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013933if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013934then
13935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13939$as_echo "yes" >&6; }
13940else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13941$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013942fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13945$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946fi
13947
Guido van Rossum7f253911997-05-09 02:42:48 +000013948
Guido van Rossum7f43da71994-08-01 12:15:30 +000013949# check for --with-libm=...
13950
Guido van Rossum563e7081996-09-10 18:20:48 +000013951case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013952Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013953*) LIBM=-lm
13954esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13956$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013959if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013961if test "$withval" = no
13962then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13964$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013965elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013966then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13968$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013969else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013970fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013971else
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13973$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974fi
13975
Guido van Rossum7f43da71994-08-01 12:15:30 +000013976
13977# check for --with-libc=...
13978
Matthias Kloseb9621712010-04-24 17:59:49 +000013979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13980$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013985if test "$withval" = no
13986then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13988$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013989elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013990then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13992$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013993else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013994fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013995else
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13997$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998fi
13999
Guido van Rossum7f43da71994-08-01 12:15:30 +000014000
Stefan Krah1919b7e2012-03-21 18:25:23 +010014001# **************************************
14002# * Check for gcc x64 inline assembler *
14003# **************************************
14004
14005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14006$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008/* end confdefs.h. */
14009
14010int
14011main ()
14012{
14013
14014 __asm__ __volatile__ ("movq %rcx, %rax");
14015
14016 ;
14017 return 0;
14018}
14019_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014020if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014021 have_gcc_asm_for_x64=yes
14022else
14023 have_gcc_asm_for_x64=no
14024fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014025rm -f core conftest.err conftest.$ac_objext \
14026 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14028$as_echo "$have_gcc_asm_for_x64" >&6; }
14029if test "$have_gcc_asm_for_x64" = yes
14030then
14031
14032$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14033
14034fi
14035
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014036# **************************************************
14037# * Check for various properties of floating point *
14038# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
14041$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014042if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014044else
14045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014047 ac_cv_little_endian_double=no
14048else
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014050/* end confdefs.h. */
14051
14052#include <string.h>
14053int main() {
14054 double x = 9006104071832581.0;
14055 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
14056 return 0;
14057 else
14058 return 1;
14059}
14060
14061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014062if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014063 ac_cv_little_endian_double=yes
14064else
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14068 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014069fi
14070
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014071fi
14072
Matthias Kloseb9621712010-04-24 17:59:49 +000014073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14074$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014075if test "$ac_cv_little_endian_double" = yes
14076then
14077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014079
14080fi
14081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14083$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014084if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014086else
14087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014089 ac_cv_big_endian_double=no
14090else
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014092/* end confdefs.h. */
14093
14094#include <string.h>
14095int main() {
14096 double x = 9006104071832581.0;
14097 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14098 return 0;
14099 else
14100 return 1;
14101}
14102
14103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014104if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014105 ac_cv_big_endian_double=yes
14106else
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014111fi
14112
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014113fi
14114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14116$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014117if test "$ac_cv_big_endian_double" = yes
14118then
14119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014121
14122fi
14123
14124# Some ARM platforms use a mixed-endian representation for doubles.
14125# While Python doesn't currently have full support for these platforms
14126# (see e.g., issue 1762561), we can at least make sure that float <-> string
14127# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14129$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014130if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014132else
14133
Matthias Kloseb9621712010-04-24 17:59:49 +000014134if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014135 ac_cv_mixed_endian_double=no
14136else
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014138/* end confdefs.h. */
14139
14140#include <string.h>
14141int main() {
14142 double x = 9006104071832581.0;
14143 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14144 return 0;
14145 else
14146 return 1;
14147}
14148
14149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014150if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014151 ac_cv_mixed_endian_double=yes
14152else
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14156 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014157fi
14158
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014159fi
14160
Matthias Kloseb9621712010-04-24 17:59:49 +000014161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14162$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014163if test "$ac_cv_mixed_endian_double" = yes
14164then
14165
Matthias Kloseb9621712010-04-24 17:59:49 +000014166$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014167
14168fi
14169
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014170# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014171# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014172# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014173# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014174# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014175# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014176
14177# This inline assembler syntax may also work for suncc and icc,
14178# so we try it on all platforms.
14179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14181$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014183/* end confdefs.h. */
14184
14185int
14186main ()
14187{
14188
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014189 unsigned short cw;
14190 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14191 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014192
14193 ;
14194 return 0;
14195}
14196_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014197if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014198 have_gcc_asm_for_x87=yes
14199else
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014201fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014202rm -f core conftest.err conftest.$ac_objext \
14203 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14205$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014206if test "$have_gcc_asm_for_x87" = yes
14207then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014210
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014212
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14214$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216/* end confdefs.h. */
14217
14218int
14219main ()
14220{
14221
14222 unsigned int fpcr;
14223 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14224 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14225
14226 ;
14227 return 0;
14228}
14229_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014230if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014231 have_gcc_asm_for_mc68881=yes
14232else
14233 have_gcc_asm_for_mc68881=no
14234fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014235rm -f core conftest.err conftest.$ac_objext \
14236 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14238$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14239if test "$have_gcc_asm_for_mc68881" = yes
14240then
14241
14242$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14243
14244fi
14245
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014246# Detect whether system arithmetic is subject to x87-style double
14247# rounding issues. The result of this test has little meaning on non
14248# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14249# mode is round-to-nearest and double rounding issues are present, and
14250# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14252$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014253# $BASECFLAGS may affect the result
14254ac_save_cc="$CC"
14255CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014256if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014257 ac_cv_x87_double_rounding=no
14258else
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014260/* end confdefs.h. */
14261
14262#include <stdlib.h>
14263#include <math.h>
14264int main() {
14265 volatile double x, y, z;
14266 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14267 x = 0.99999999999999989; /* 1-2**-53 */
14268 y = 1./x;
14269 if (y != 1.)
14270 exit(0);
14271 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14272 x = 1e16;
14273 y = 2.99999;
14274 z = x + y;
14275 if (z != 1e16+4.)
14276 exit(0);
14277 /* both tests show evidence of double rounding */
14278 exit(1);
14279}
14280
14281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014282if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014283 ac_cv_x87_double_rounding=no
14284else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014289fi
14290
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014291CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14293$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014294if test "$ac_cv_x87_double_rounding" = yes
14295then
14296
Matthias Kloseb9621712010-04-24 17:59:49 +000014297$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014298
14299fi
14300
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014301# ************************************
14302# * Check for mathematical functions *
14303# ************************************
14304
14305LIBS_SAVE=$LIBS
14306LIBS="$LIBS $LIBM"
14307
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014308for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14309do :
14310 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14311ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014312if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014313 cat >>confdefs.h <<_ACEOF
14314#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14315_ACEOF
14316
14317fi
14318done
14319
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014320for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014321do :
14322 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14323ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014324if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014325 cat >>confdefs.h <<_ACEOF
14326#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14327_ACEOF
14328
14329fi
14330done
14331
14332ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14333"
Victor Stinnere0be4232011-10-25 13:06:09 +020014334if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014335 ac_have_decl=1
14336else
14337 ac_have_decl=0
14338fi
14339
14340cat >>confdefs.h <<_ACEOF
14341#define HAVE_DECL_ISINF $ac_have_decl
14342_ACEOF
14343ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14344"
Victor Stinnere0be4232011-10-25 13:06:09 +020014345if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014346 ac_have_decl=1
14347else
14348 ac_have_decl=0
14349fi
14350
14351cat >>confdefs.h <<_ACEOF
14352#define HAVE_DECL_ISNAN $ac_have_decl
14353_ACEOF
14354ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14355"
Victor Stinnere0be4232011-10-25 13:06:09 +020014356if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014357 ac_have_decl=1
14358else
14359 ac_have_decl=0
14360fi
14361
14362cat >>confdefs.h <<_ACEOF
14363#define HAVE_DECL_ISFINITE $ac_have_decl
14364_ACEOF
14365
14366
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014367# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14368# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14370$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014371if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014373else
14374
Matthias Kloseb9621712010-04-24 17:59:49 +000014375if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014376 ac_cv_tanh_preserves_zero_sign=no
14377else
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014379/* end confdefs.h. */
14380
14381#include <math.h>
14382#include <stdlib.h>
14383int main() {
14384 /* return 0 if either negative zeros don't exist
14385 on this platform or if negative zeros exist
14386 and tanh(-0.) == -0. */
14387 if (atan2(0., -1.) == atan2(-0., -1.) ||
14388 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14389 else exit(1);
14390}
14391
14392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014393if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014394 ac_cv_tanh_preserves_zero_sign=yes
14395else
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014400fi
14401
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014402fi
14403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14405$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014406if test "$ac_cv_tanh_preserves_zero_sign" = yes
14407then
14408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014410
14411fi
14412
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014413if test "$ac_cv_func_log1p" = yes
14414then
14415 # On some versions of AIX, log1p(-0.) returns 0. instead of
14416 # -0. See issue #9920.
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14418$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014419 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014420 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014421else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014422
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014423 if test "$cross_compiling" = yes; 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14427/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014428
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014429 #include <math.h>
14430 #include <stdlib.h>
14431 int main() {
14432 /* Fail if the signs of log1p(-0.) and -0. can be
14433 distinguished. */
14434 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14435 return 0;
14436 else
14437 return 1;
14438 }
14439
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014440_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014441if ac_fn_c_try_run "$LINENO"; then :
14442 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014443else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014444 ac_cv_log1p_drops_zero_sign=yes
14445fi
14446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14447 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014448fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014449
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014450fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014451
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14453$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14454fi
14455if test "$ac_cv_log1p_drops_zero_sign" = yes
14456then
14457
14458$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14459
14460fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014461
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014462LIBS=$LIBS_SAVE
14463
Mark Dickinsona614f042009-11-28 12:48:43 +000014464# For multiprocessing module, check that sem_open
14465# actually works. For FreeBSD versions <= 7.2,
14466# the kernel module that provides POSIX semaphores
14467# isn't loaded by default, so an attempt to call
14468# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14470$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014471if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014475 ac_cv_posix_semaphores_enabled=yes
14476else
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014478/* end confdefs.h. */
14479
14480#include <unistd.h>
14481#include <fcntl.h>
14482#include <stdio.h>
14483#include <semaphore.h>
14484#include <sys/stat.h>
14485
14486int main(void) {
14487 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14488 if (a == SEM_FAILED) {
14489 perror("sem_open");
14490 return 1;
14491 }
14492 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014493 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014494 return 0;
14495}
14496
14497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014498if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014499 ac_cv_posix_semaphores_enabled=yes
14500else
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14504 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014505fi
14506
14507
Mark Dickinsona614f042009-11-28 12:48:43 +000014508fi
14509
Matthias Kloseb9621712010-04-24 17:59:49 +000014510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14511$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014512if test $ac_cv_posix_semaphores_enabled = no
14513then
14514
Matthias Kloseb9621712010-04-24 17:59:49 +000014515$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014516
14517fi
14518
Mark Dickinson10683072009-04-18 21:18:19 +000014519# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14521$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014522if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014524else
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014526 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014527else
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014529/* end confdefs.h. */
14530
14531#include <unistd.h>
14532#include <fcntl.h>
14533#include <stdio.h>
14534#include <semaphore.h>
14535#include <sys/stat.h>
14536
14537int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014538 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014539 int count;
14540 int res;
14541 if(a==SEM_FAILED){
14542 perror("sem_open");
14543 return 1;
14544
14545 }
14546 res = sem_getvalue(a, &count);
14547 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014548 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014549 return res==-1 ? 1 : 0;
14550}
14551
Mark Dickinson10683072009-04-18 21:18:19 +000014552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014553if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014554 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014555else
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014560fi
14561
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014562
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014563fi
14564
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14566$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014567if test $ac_cv_broken_sem_getvalue = yes
14568then
14569
Matthias Kloseb9621712010-04-24 17:59:49 +000014570$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014571
14572fi
14573
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014574ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14575"
14576if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14577 ac_have_decl=1
14578else
14579 ac_have_decl=0
14580fi
14581
14582cat >>confdefs.h <<_ACEOF
14583#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14584_ACEOF
14585ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14586"
14587if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14588 ac_have_decl=1
14589else
14590 ac_have_decl=0
14591fi
14592
14593cat >>confdefs.h <<_ACEOF
14594#define HAVE_DECL_RTLD_NOW $ac_have_decl
14595_ACEOF
14596ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14597"
14598if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14599 ac_have_decl=1
14600else
14601 ac_have_decl=0
14602fi
14603
14604cat >>confdefs.h <<_ACEOF
14605#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14606_ACEOF
14607ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14608"
14609if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14610 ac_have_decl=1
14611else
14612 ac_have_decl=0
14613fi
14614
14615cat >>confdefs.h <<_ACEOF
14616#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14617_ACEOF
14618ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14619"
14620if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14621 ac_have_decl=1
14622else
14623 ac_have_decl=0
14624fi
14625
14626cat >>confdefs.h <<_ACEOF
14627#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14628_ACEOF
14629ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14630"
14631if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14632 ac_have_decl=1
14633else
14634 ac_have_decl=0
14635fi
14636
14637cat >>confdefs.h <<_ACEOF
14638#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14639_ACEOF
14640ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14641"
14642if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14643 ac_have_decl=1
14644else
14645 ac_have_decl=0
14646fi
14647
14648cat >>confdefs.h <<_ACEOF
14649#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14650_ACEOF
14651
14652
Mark Dickinsonbd792642009-03-18 20:06:12 +000014653# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14655$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014656# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014657if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014658 enableval=$enable_big_digits; case $enable_big_digits in
14659yes)
14660 enable_big_digits=30 ;;
14661no)
14662 enable_big_digits=15 ;;
1466315|30)
14664 ;;
14665*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014666 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 +000014667esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14669$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014670
14671cat >>confdefs.h <<_ACEOF
14672#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14673_ACEOF
14674
14675
14676else
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14678$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014679fi
14680
14681
Guido van Rossumef2255b2000-03-10 22:30:29 +000014682# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014683ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014684if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014685
14686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014689 wchar_h="yes"
14690
Guido van Rossumef2255b2000-03-10 22:30:29 +000014691else
Martin v. Löwis11437992002-04-12 09:54:03 +000014692 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014693
14694fi
14695
Michael W. Hudson54241132001-12-07 15:38:26 +000014696
Martin v. Löwis11437992002-04-12 09:54:03 +000014697
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014698# determine wchar_t size
14699if test "$wchar_h" = yes
14700then
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14704# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14706$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014707if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014709else
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14711"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713else
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 if test "$ac_cv_type_wchar_t" = yes; then
14715 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014717as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014718See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014719 else
14720 ac_cv_sizeof_wchar_t=0
14721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014723
Martin v. Löwis11437992002-04-12 09:54:03 +000014724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14726$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727
14728
14729
Martin v. Löwis11437992002-04-12 09:54:03 +000014730cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014731#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014732_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014733
Michael W. Hudson54241132001-12-07 15:38:26 +000014734
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014735fi
14736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14738$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014739have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014741/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014742
14743#include <tcl.h>
14744#if TCL_UTF_MAX != 6
14745# error "NOT UCS4_TCL"
14746#endif
14747int
14748main ()
14749{
14750
14751 ;
14752 return 0;
14753}
14754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014756
14757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014759
14760 have_ucs4_tcl=yes
14761
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14765$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014766
Skip Montanaro6dead952003-09-25 14:50:04 +000014767# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014768if test "$wchar_h" = yes
14769then
14770 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14772$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014773 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014775else
14776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014778 ac_cv_wchar_t_signed=yes
14779else
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014781/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014782
14783 #include <wchar.h>
14784 int main()
14785 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014786 /* Success: exit code 0 */
14787 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014788 }
14789
14790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014791if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014792 ac_cv_wchar_t_signed=yes
14793else
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014798fi
14799
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014800fi
14801
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14803$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804fi
14805
Georg Brandl52d168a2008-01-07 18:10:24 +000014806# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014807if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014808 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014809then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014810 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014813
Georg Brandl52d168a2008-01-07 18:10:24 +000014814else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014815 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014816fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14818$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014819
14820# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14822$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014823if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014825else
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 ac_cv_c_bigendian=unknown
14827 # See if we're dealing with a universal compiler.
14828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14829/* end confdefs.h. */
14830#ifndef __APPLE_CC__
14831 not a universal capable compiler
14832 #endif
14833 typedef int dummy;
14834
Skip Montanaro6dead952003-09-25 14:50:04 +000014835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014836if ac_fn_c_try_compile "$LINENO"; then :
14837
14838 # Check for potential -arch flags. It is not universal unless
14839 # there are at least two -arch flags with different values.
14840 ac_arch=
14841 ac_prev=
14842 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14843 if test -n "$ac_prev"; then
14844 case $ac_word in
14845 i?86 | x86_64 | ppc | ppc64)
14846 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14847 ac_arch=$ac_word
14848 else
14849 ac_cv_c_bigendian=universal
14850 break
14851 fi
14852 ;;
14853 esac
14854 ac_prev=
14855 elif test "x$ac_word" = "x-arch"; then
14856 ac_prev=arch
14857 fi
14858 done
14859fi
14860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14861 if test $ac_cv_c_bigendian = unknown; then
14862 # See if sys/param.h defines the BYTE_ORDER macro.
14863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014864/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014865#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014867
Martin v. Löwis11437992002-04-12 09:54:03 +000014868int
14869main ()
14870{
Matthias Kloseb9621712010-04-24 17:59:49 +000014871#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14872 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14873 && LITTLE_ENDIAN)
14874 bogus endian macros
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 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014884/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014885#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014887
Martin v. Löwis11437992002-04-12 09:54:03 +000014888int
14889main ()
14890{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014891#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 not big endian
14893 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014894
14895 ;
14896 return 0;
14897}
14898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014899if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014900 ac_cv_c_bigendian=yes
14901else
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014905fi
14906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14907 fi
14908 if test $ac_cv_c_bigendian = unknown; then
14909 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014911/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014912#include <limits.h>
14913
Martin v. Löwis11437992002-04-12 09:54:03 +000014914int
14915main ()
14916{
Matthias Kloseb9621712010-04-24 17:59:49 +000014917#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14918 bogus endian macros
14919 #endif
14920
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 ;
14922 return 0;
14923}
14924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014925if ac_fn_c_try_compile "$LINENO"; then :
14926 # It does; now see whether it defined to _BIG_ENDIAN or not.
14927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14928/* end confdefs.h. */
14929#include <limits.h>
14930
14931int
14932main ()
14933{
14934#ifndef _BIG_ENDIAN
14935 not big endian
14936 #endif
14937
14938 ;
14939 return 0;
14940}
14941_ACEOF
14942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014944else
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14948fi
14949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14950 fi
14951 if test $ac_cv_c_bigendian = unknown; then
14952 # Compile a test program.
14953 if test "$cross_compiling" = yes; then :
14954 # Try to guess by grepping values from an object file.
14955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14956/* end confdefs.h. */
14957short int ascii_mm[] =
14958 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14959 short int ascii_ii[] =
14960 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14961 int use_ascii (int i) {
14962 return ascii_mm[i] + ascii_ii[i];
14963 }
14964 short int ebcdic_ii[] =
14965 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14966 short int ebcdic_mm[] =
14967 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14968 int use_ebcdic (int i) {
14969 return ebcdic_mm[i] + ebcdic_ii[i];
14970 }
14971 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972
Matthias Kloseb9621712010-04-24 17:59:49 +000014973int
14974main ()
14975{
14976return use_ascii (foo) == use_ebcdic (foo);
14977 ;
14978 return 0;
14979}
14980_ACEOF
14981if ac_fn_c_try_compile "$LINENO"; then :
14982 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14983 ac_cv_c_bigendian=yes
14984 fi
14985 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14986 if test "$ac_cv_c_bigendian" = unknown; then
14987 ac_cv_c_bigendian=no
14988 else
14989 # finding both strings is unlikely to happen, but who knows?
14990 ac_cv_c_bigendian=unknown
14991 fi
14992 fi
14993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014995else
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014997/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014999int
15000main ()
15001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 /* Are we little or big endian? From Harbison&Steele. */
15004 union
15005 {
15006 long int l;
15007 char c[sizeof (long int)];
15008 } u;
15009 u.l = 1;
15010 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011
15012 ;
15013 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015014}
Martin v. Löwis11437992002-04-12 09:54:03 +000015015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015016if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015017 ac_cv_c_bigendian=no
15018else
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15022 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15028$as_echo "$ac_cv_c_bigendian" >&6; }
15029 case $ac_cv_c_bigendian in #(
15030 yes)
15031 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15032;; #(
15033 no)
15034 ;; #(
15035 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015036
Matthias Kloseb9621712010-04-24 17:59:49 +000015037$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015038
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 ;; #(
15040 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015041 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015042 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015044
Michael W. Hudson54241132001-12-07 15:38:26 +000015045
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015046# ABI version string for Python extension modules. This appears between the
15047# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15048# from the following attributes which affect the ABI of this Python build (in
15049# this order):
15050#
15051# * The Python implementation (always 'cpython-' for us)
15052# * The major and minor version numbers
15053# * --with-pydebug (adds a 'd')
15054# * --with-pymalloc (adds a 'm')
15055# * --with-wide-unicode (adds a 'u')
15056#
15057# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015058# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15059# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015060
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15062$as_echo_n "checking ABIFLAGS... " >&6; }
15063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15064$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15066$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015067SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15069$as_echo "$SOABI" >&6; }
15070
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015071
15072case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015073 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015074 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15075 *)
15076 EXT_SUFFIX=${SHLIB_SUFFIX};;
15077esac
15078
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15080$as_echo_n "checking LDVERSION... " >&6; }
15081LDVERSION='$(VERSION)$(ABIFLAGS)'
15082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15083$as_echo "$LDVERSION" >&6; }
15084
doko@python.org87421192013-01-26 11:39:31 +010015085
doko@ubuntu.com55532312016-06-14 08:55:19 +020015086if test x$PLATFORM_TRIPLET = x; then
15087 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15088else
15089 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15090fi
doko@python.org87421192013-01-26 11:39:31 +010015091
15092
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015093# Check whether right shifting a negative integer extends the sign bit
15094# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15096$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015097if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015099else
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015102 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015103else
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015105/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015106
15107int main()
15108{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015109 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015110}
15111
Martin v. Löwis11437992002-04-12 09:54:03 +000015112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015113if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015114 ac_cv_rshift_extends_sign=yes
15115else
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15119 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015120fi
15121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122fi
15123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15125$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015126if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015127then
Martin v. Löwis11437992002-04-12 09:54:03 +000015128
Matthias Kloseb9621712010-04-24 17:59:49 +000015129$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015130
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015131fi
15132
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015133# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15135$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015136if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015138else
Martin v. Löwis11437992002-04-12 09:54:03 +000015139
Matthias Kloseb9621712010-04-24 17:59:49 +000015140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015141/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015142#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015143int
15144main ()
15145{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015146
15147 FILE *f = fopen("/dev/null", "r");
15148 flockfile(f);
15149 getc_unlocked(f);
15150 funlockfile(f);
15151
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ;
15153 return 0;
15154}
15155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015156if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015157 ac_cv_have_getc_unlocked=yes
15158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 ac_cv_have_getc_unlocked=no
15160fi
15161rm -f core conftest.err conftest.$ac_objext \
15162 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15166$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015167if test "$ac_cv_have_getc_unlocked" = yes
15168then
Martin v. Löwis11437992002-04-12 09:54:03 +000015169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015171
15172fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015173
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015174# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015175# save the value of LIBS so we don't actually link Python with readline
15176LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015177
Gregory P. Smith18820942008-09-07 06:24:49 +000015178# On some systems we need to link readline to a termcap compatible
15179# library. NOTE: Keep the precedence of listed libraries synchronised
15180# with setup.py.
15181py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15183$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015184for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015185 if test -z "$py_libtermcap"; then
15186 READLINE_LIBS="-lreadline"
15187 else
15188 READLINE_LIBS="-lreadline -l$py_libtermcap"
15189 fi
15190 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015192/* end confdefs.h. */
15193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194/* Override any GCC internal prototype to avoid an error.
15195 Use char because int might match the return type of a GCC
15196 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015197#ifdef __cplusplus
15198extern "C"
15199#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015200char readline ();
15201int
15202main ()
15203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015205 ;
15206 return 0;
15207}
15208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015209if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015210 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015212rm -f core conftest.err conftest.$ac_objext \
15213 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015214 if test $py_cv_lib_readline = yes; then
15215 break
15216 fi
15217done
15218# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15219#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015220if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15222$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015223else
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15225$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015226
Matthias Kloseb9621712010-04-24 17:59:49 +000015227$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015228
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015229fi
15230
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015231# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15233$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015234if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015236else
15237 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015238LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015240/* end confdefs.h. */
15241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242/* Override any GCC internal prototype to avoid an error.
15243 Use char because int might match the return type of a GCC
15244 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015245#ifdef __cplusplus
15246extern "C"
15247#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015248char rl_callback_handler_install ();
15249int
15250main ()
15251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015253 ;
15254 return 0;
15255}
15256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015257if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015258 ac_cv_lib_readline_rl_callback_handler_install=yes
15259else
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015262rm -f core conftest.err conftest.$ac_objext \
15263 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015264LIBS=$ac_check_lib_save_LIBS
15265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15267$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015268if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015271
15272fi
15273
15274
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015275# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015277/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015278#include <readline/readline.h>
15279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015280if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015281 have_readline=yes
15282else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015283 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015284
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015285fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015286rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015287if test $have_readline = yes
15288then
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015290/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015291#include <readline/readline.h>
15292
15293_ACEOF
15294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015296
Matthias Kloseb9621712010-04-24 17:59:49 +000015297$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015298
15299fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015300rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015303/* end confdefs.h. */
15304#include <readline/readline.h>
15305
15306_ACEOF
15307if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015308 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015309
Matthias Kloseb9621712010-04-24 17:59:49 +000015310$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015311
15312fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015313rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015314
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015315fi
15316
Martin v. Löwis0daad592001-09-30 21:09:59 +000015317# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15319$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015320if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015321 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015322else
Martin v. Löwis11437992002-04-12 09:54:03 +000015323 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015324LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015328/* Override any GCC internal prototype to avoid an error.
15329 Use char because int might match the return type of a GCC
15330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015331#ifdef __cplusplus
15332extern "C"
15333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015334char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015335int
15336main ()
15337{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ;
15340 return 0;
15341}
15342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015345else
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015348rm -f core conftest.err conftest.$ac_objext \
15349 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015350LIBS=$ac_check_lib_save_LIBS
15351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15353$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015354if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015355
Matthias Kloseb9621712010-04-24 17:59:49 +000015356$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015357
Martin v. Löwis0daad592001-09-30 21:09:59 +000015358fi
15359
Michael W. Hudson54241132001-12-07 15:38:26 +000015360
Thomas Wouters89d996e2007-09-08 17:39:28 +000015361# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15363$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015364if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015366else
15367 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015368LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015370/* end confdefs.h. */
15371
15372/* Override any GCC internal prototype to avoid an error.
15373 Use char because int might match the return type of a GCC
15374 builtin and then its argument prototype would still apply. */
15375#ifdef __cplusplus
15376extern "C"
15377#endif
15378char rl_completion_display_matches_hook ();
15379int
15380main ()
15381{
15382return rl_completion_display_matches_hook ();
15383 ;
15384 return 0;
15385}
15386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015387if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015388 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15389else
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015392rm -f core conftest.err conftest.$ac_objext \
15393 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015394LIBS=$ac_check_lib_save_LIBS
15395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15397$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015398if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015399
Matthias Kloseb9621712010-04-24 17:59:49 +000015400$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015401
15402fi
15403
15404
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015405# also in 4.0, but not in editline
15406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15407$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15408if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15409 $as_echo_n "(cached) " >&6
15410else
15411 ac_check_lib_save_LIBS=$LIBS
15412LIBS="-lreadline $READLINE_LIBS $LIBS"
15413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414/* end confdefs.h. */
15415
15416/* Override any GCC internal prototype to avoid an error.
15417 Use char because int might match the return type of a GCC
15418 builtin and then its argument prototype would still apply. */
15419#ifdef __cplusplus
15420extern "C"
15421#endif
15422char rl_resize_terminal ();
15423int
15424main ()
15425{
15426return rl_resize_terminal ();
15427 ;
15428 return 0;
15429}
15430_ACEOF
15431if ac_fn_c_try_link "$LINENO"; then :
15432 ac_cv_lib_readline_rl_resize_terminal=yes
15433else
15434 ac_cv_lib_readline_rl_resize_terminal=no
15435fi
15436rm -f core conftest.err conftest.$ac_objext \
15437 conftest$ac_exeext conftest.$ac_ext
15438LIBS=$ac_check_lib_save_LIBS
15439fi
15440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15441$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15442if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15443
15444$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15445
15446fi
15447
15448
Martin v. Löwis0daad592001-09-30 21:09:59 +000015449# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15451$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015452if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015454else
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015456LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460/* Override any GCC internal prototype to avoid an error.
15461 Use char because int might match the return type of a GCC
15462 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015463#ifdef __cplusplus
15464extern "C"
15465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015466char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015467int
15468main ()
15469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 ;
15472 return 0;
15473}
15474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015475if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015477else
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015480rm -f core conftest.err conftest.$ac_objext \
15481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015482LIBS=$ac_check_lib_save_LIBS
15483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15485$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015486if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015489
Guido van Rossum353ae582001-07-10 16:45:32 +000015490fi
15491
Jack Jansendd19cf82001-12-06 22:36:17 +000015492
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015493# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015495/* end confdefs.h. */
15496#include <readline/readline.h>
15497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015498if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015499 have_readline=yes
15500else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015501 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015502
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015503fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015504rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015505if test $have_readline = yes
15506then
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015508/* end confdefs.h. */
15509#include <readline/readline.h>
15510
15511_ACEOF
15512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015514
Matthias Kloseb9621712010-04-24 17:59:49 +000015515$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015516
15517fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015518rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015519
15520fi
15521
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15523$as_echo_n "checking for append_history in -lreadline... " >&6; }
15524if ${ac_cv_lib_readline_append_history+:} false; then :
15525 $as_echo_n "(cached) " >&6
15526else
15527 ac_check_lib_save_LIBS=$LIBS
15528LIBS="-lreadline $READLINE_LIBS $LIBS"
15529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15530/* end confdefs.h. */
15531
15532/* Override any GCC internal prototype to avoid an error.
15533 Use char because int might match the return type of a GCC
15534 builtin and then its argument prototype would still apply. */
15535#ifdef __cplusplus
15536extern "C"
15537#endif
15538char append_history ();
15539int
15540main ()
15541{
15542return append_history ();
15543 ;
15544 return 0;
15545}
15546_ACEOF
15547if ac_fn_c_try_link "$LINENO"; then :
15548 ac_cv_lib_readline_append_history=yes
15549else
15550 ac_cv_lib_readline_append_history=no
15551fi
15552rm -f core conftest.err conftest.$ac_objext \
15553 conftest$ac_exeext conftest.$ac_ext
15554LIBS=$ac_check_lib_save_LIBS
15555fi
15556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15557$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15558if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15559
15560$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15561
15562fi
15563
15564
Martin v. Löwis82bca632006-02-10 20:49:30 +000015565# End of readline checks: restore LIBS
15566LIBS=$LIBS_no_readline
15567
Matthias Kloseb9621712010-04-24 17:59:49 +000015568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15569$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015570if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015572else
Martin v. Löwis11437992002-04-12 09:54:03 +000015573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015575 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015576else
Matthias Kloseb9621712010-04-24 17:59:49 +000015577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015578/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015579
15580int main()
15581{
15582 int val1 = nice(1);
15583 if (val1 != -1 && val1 == nice(2))
15584 exit(0);
15585 exit(1);
15586}
15587
Martin v. Löwis11437992002-04-12 09:54:03 +000015588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015589if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015590 ac_cv_broken_nice=yes
15591else
Matthias Kloseb9621712010-04-24 17:59:49 +000015592 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15595 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015596fi
15597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598fi
15599
Matthias Kloseb9621712010-04-24 17:59:49 +000015600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15601$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015602if test "$ac_cv_broken_nice" = yes
15603then
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015606
15607fi
15608
Matthias Kloseb9621712010-04-24 17:59:49 +000015609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15610$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015611if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015613else
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015615 ac_cv_broken_poll=no
15616else
Matthias Kloseb9621712010-04-24 17:59:49 +000015617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015618/* end confdefs.h. */
15619
15620#include <poll.h>
15621
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015622int main()
15623{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015624 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015625 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015626
15627 close (42);
15628
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015629 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015630 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015631 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015632 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015633 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015634 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015635 return 1;
15636}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015637
15638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015639if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015640 ac_cv_broken_poll=yes
15641else
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15645 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015648fi
15649
Matthias Kloseb9621712010-04-24 17:59:49 +000015650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15651$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015652if test "$ac_cv_broken_poll" = yes
15653then
15654
Matthias Kloseb9621712010-04-24 17:59:49 +000015655$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015656
15657fi
15658
Brett Cannon43802422005-02-10 20:48:03 +000015659# 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 +000015660# (which is not required by ISO C or UNIX spec) and/or if we support
15661# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015662ac_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 +000015663#include <$ac_cv_struct_tm>
15664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665"
Victor Stinnere0be4232011-10-25 13:06:09 +020015666if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015667
15668cat >>confdefs.h <<_ACEOF
15669#define HAVE_STRUCT_TM_TM_ZONE 1
15670_ACEOF
15671
15672
15673fi
15674
15675if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15676
Matthias Kloseb9621712010-04-24 17:59:49 +000015677$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015678
15679else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15681"
Victor Stinnere0be4232011-10-25 13:06:09 +020015682if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015684else
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015686fi
15687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015688cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015689#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015690_ACEOF
15691
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15693$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015694if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015698/* end confdefs.h. */
15699#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015700#if !HAVE_DECL_TZNAME
15701extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015702#endif
15703
15704int
15705main ()
15706{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015708 ;
15709 return 0;
15710}
15711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015713 ac_cv_var_tzname=yes
15714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015717rm -f core conftest.err conftest.$ac_objext \
15718 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15721$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015722 if test $ac_cv_var_tzname = yes; then
15723
Matthias Kloseb9621712010-04-24 17:59:49 +000015724$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015725
15726 fi
15727fi
15728
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015729
Martin v. Löwis1d459062005-03-14 21:23:33 +000015730# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15732$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015733if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015734 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015735else
15736
Matthias Kloseb9621712010-04-24 17:59:49 +000015737if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015738 ac_cv_working_tzset=no
15739else
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015741/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015742
15743#include <stdlib.h>
15744#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015745#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015746
15747#if HAVE_TZNAME
15748extern char *tzname[];
15749#endif
15750
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015751int main()
15752{
Brett Cannon18367812003-09-19 00:59:16 +000015753 /* Note that we need to ensure that not only does tzset(3)
15754 do 'something' with localtime, but it works as documented
15755 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015756 This includes making sure that tzname is set properly if
15757 tm->tm_zone does not exist since it is the alternative way
15758 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015759
15760 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015761 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015762 */
15763
Martin v. Löwis1d459062005-03-14 21:23:33 +000015764 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015765 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15766
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015767 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015768 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015769 if (localtime(&groundhogday)->tm_hour != 0)
15770 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015771#if HAVE_TZNAME
15772 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15773 if (strcmp(tzname[0], "UTC") ||
15774 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15775 exit(1);
15776#endif
Brett Cannon18367812003-09-19 00:59:16 +000015777
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015778 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015779 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015780 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015781 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015782#if HAVE_TZNAME
15783 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15784 exit(1);
15785#endif
Brett Cannon18367812003-09-19 00:59:16 +000015786
15787 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15788 tzset();
15789 if (localtime(&groundhogday)->tm_hour != 11)
15790 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015791#if HAVE_TZNAME
15792 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15793 exit(1);
15794#endif
15795
15796#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015797 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15798 exit(1);
15799 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15800 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015801#endif
Brett Cannon18367812003-09-19 00:59:16 +000015802
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015803 exit(0);
15804}
15805
15806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015807if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015808 ac_cv_working_tzset=yes
15809else
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015814fi
15815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816fi
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15819$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015820if test "$ac_cv_working_tzset" = yes
15821then
15822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015824
15825fi
15826
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015827# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15829$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015830if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015832else
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015834/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015835#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015836int
15837main ()
15838{
15839
15840struct stat st;
15841st.st_mtim.tv_nsec = 1;
15842
15843 ;
15844 return 0;
15845}
15846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015848 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015849else
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15853fi
15854
Matthias Kloseb9621712010-04-24 17:59:49 +000015855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15856$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015857if test "$ac_cv_stat_tv_nsec" = yes
15858then
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015861
15862fi
15863
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015864# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15866$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015867if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015869else
Matthias Kloseb9621712010-04-24 17:59:49 +000015870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015871/* end confdefs.h. */
15872#include <sys/stat.h>
15873int
15874main ()
15875{
15876
15877struct stat st;
15878st.st_mtimespec.tv_nsec = 1;
15879
15880 ;
15881 return 0;
15882}
15883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015885 ac_cv_stat_tv_nsec2=yes
15886else
Matthias Kloseb9621712010-04-24 17:59:49 +000015887 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15890fi
15891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15893$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015894if test "$ac_cv_stat_tv_nsec2" = yes
15895then
15896
Matthias Kloseb9621712010-04-24 17:59:49 +000015897$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015898
15899fi
15900
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015901# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015902ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015903if test "$cross_compiling" = no; then
15904 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15905fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015906
15907for ac_header in curses.h ncurses.h
15908do :
15909 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15910ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15911if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15912 cat >>confdefs.h <<_ACEOF
15913#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15914_ACEOF
15915
15916fi
15917
15918done
15919
15920
15921# On Solaris, term.h requires curses.h
15922for ac_header in term.h
15923do :
15924 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15925#ifdef HAVE_CURSES_H
15926#include <curses.h>
15927#endif
15928
15929"
15930if test "x$ac_cv_header_term_h" = xyes; then :
15931 cat >>confdefs.h <<_ACEOF
15932#define HAVE_TERM_H 1
15933_ACEOF
15934
15935fi
15936
15937done
15938
15939
Jack Jansen666b1e72001-10-31 12:11:48 +000015940# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15942$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015943if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015944 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015945else
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015947/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015948#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015949int
15950main ()
15951{
Jack Jansen666b1e72001-10-31 12:11:48 +000015952
15953 int rtn;
15954 rtn = mvwdelch(0,0,0);
15955
Martin v. Löwis11437992002-04-12 09:54:03 +000015956 ;
15957 return 0;
15958}
15959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015960if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015961 ac_cv_mvwdelch_is_expression=yes
15962else
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15966fi
15967
Matthias Kloseb9621712010-04-24 17:59:49 +000015968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15969$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015970
15971if test "$ac_cv_mvwdelch_is_expression" = yes
15972then
Martin v. Löwis11437992002-04-12 09:54:03 +000015973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015975
15976fi
15977
Matthias Kloseb9621712010-04-24 17:59:49 +000015978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15979$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015980if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015981 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015982else
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015984/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015985#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015986int
15987main ()
15988{
Jack Jansen666b1e72001-10-31 12:11:48 +000015989
15990 WINDOW *w;
15991 w->_flags = 0;
15992
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 ;
15994 return 0;
15995}
15996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015997if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015998 ac_cv_window_has_flags=yes
15999else
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16003fi
16004
Matthias Kloseb9621712010-04-24 17:59:49 +000016005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16006$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016007
Jack Jansen666b1e72001-10-31 12:11:48 +000016008
16009if test "$ac_cv_window_has_flags" = yes
16010then
Martin v. Löwis11437992002-04-12 09:54:03 +000016011
Matthias Kloseb9621712010-04-24 17:59:49 +000016012$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016013
16014fi
16015
Matthias Kloseb9621712010-04-24 17:59:49 +000016016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16017$as_echo_n "checking for is_term_resized... " >&6; }
16018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016019/* end confdefs.h. */
16020#include <curses.h>
16021int
16022main ()
16023{
16024void *x=is_term_resized
16025 ;
16026 return 0;
16027}
16028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016032
Matthias Kloseb159a552010-04-25 21:00:44 +000016033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016034$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016035else
Matthias Kloseb9621712010-04-24 17:59:49 +000016036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16037$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016038
16039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16041
Matthias Kloseb9621712010-04-24 17:59:49 +000016042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16043$as_echo_n "checking for resize_term... " >&6; }
16044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016045/* end confdefs.h. */
16046#include <curses.h>
16047int
16048main ()
16049{
16050void *x=resize_term
16051 ;
16052 return 0;
16053}
16054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016055if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016056
Matthias Kloseb9621712010-04-24 17:59:49 +000016057$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016058
Matthias Kloseb159a552010-04-25 21:00:44 +000016059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016060$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016061else
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16063$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016064
16065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16069$as_echo_n "checking for resizeterm... " >&6; }
16070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016071/* end confdefs.h. */
16072#include <curses.h>
16073int
16074main ()
16075{
16076void *x=resizeterm
16077 ;
16078 return 0;
16079}
16080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016081if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016082
Matthias Kloseb9621712010-04-24 17:59:49 +000016083$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016084
Matthias Kloseb159a552010-04-25 21:00:44 +000016085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016086$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016087else
Matthias Kloseb9621712010-04-24 17:59:49 +000016088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16089$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016090
16091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016093# last curses configure check
16094CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016095
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16097$as_echo "$as_me: checking for device files" >&6;}
16098
16099if test "x$cross_compiling" = xyes; then
16100 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16102$as_echo_n "checking for /dev/ptmx... " >&6; }
16103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16104$as_echo "not set" >&6; }
16105 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16106 fi
16107 if test "${ac_cv_file__dev_ptc+set}" != set; then
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16109$as_echo_n "checking for /dev/ptc... " >&6; }
16110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16111$as_echo "not set" >&6; }
16112 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16113 fi
16114fi
16115
Matthias Kloseb9621712010-04-24 17:59:49 +000016116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16117$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016118if ${ac_cv_file__dev_ptmx+:} false; then :
16119 $as_echo_n "(cached) " >&6
16120else
16121 test "$cross_compiling" = yes &&
16122 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16123if test -r "/dev/ptmx"; then
16124 ac_cv_file__dev_ptmx=yes
16125else
16126 ac_cv_file__dev_ptmx=no
16127fi
16128fi
16129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16130$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16131if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016132
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016133fi
16134
16135if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016136
Matthias Kloseb9621712010-04-24 17:59:49 +000016137$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016138
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16141$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016142if ${ac_cv_file__dev_ptc+:} false; then :
16143 $as_echo_n "(cached) " >&6
16144else
16145 test "$cross_compiling" = yes &&
16146 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16147if test -r "/dev/ptc"; then
16148 ac_cv_file__dev_ptc=yes
16149else
16150 ac_cv_file__dev_ptc=no
16151fi
16152fi
16153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16154$as_echo "$ac_cv_file__dev_ptc" >&6; }
16155if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016156
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016157fi
16158
16159if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016160
Matthias Kloseb9621712010-04-24 17:59:49 +000016161$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016162
Neal Norwitz865400f2003-03-21 01:42:58 +000016163fi
16164
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016165if test $ac_sys_system = Darwin
16166then
16167 LIBS="$LIBS -framework CoreFoundation"
16168fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016169
Matthias Kloseb9621712010-04-24 17:59:49 +000016170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16171$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016172if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016173 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016174else
Matthias Kloseb9621712010-04-24 17:59:49 +000016175 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016176 ac_cv_have_size_t_format="cross -- assuming yes"
16177
Thomas Wouters477c8d52006-05-27 19:21:47 +000016178else
Matthias Kloseb9621712010-04-24 17:59:49 +000016179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016180/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016181
Thomas Wouters477c8d52006-05-27 19:21:47 +000016182#include <stdio.h>
16183#include <stddef.h>
16184#include <string.h>
16185
Christian Heimes2c181612007-12-17 20:04:13 +000016186#ifdef HAVE_SYS_TYPES_H
16187#include <sys/types.h>
16188#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016189
16190#ifdef HAVE_SSIZE_T
16191typedef ssize_t Py_ssize_t;
16192#elif SIZEOF_VOID_P == SIZEOF_LONG
16193typedef long Py_ssize_t;
16194#else
16195typedef int Py_ssize_t;
16196#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016197
Christian Heimes2c181612007-12-17 20:04:13 +000016198int main()
16199{
16200 char buffer[256];
16201
Thomas Wouters477c8d52006-05-27 19:21:47 +000016202 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16203 return 1;
16204
Thomas Wouters89f507f2006-12-13 04:49:30 +000016205 if (strcmp(buffer, "123"))
16206 return 1;
16207
16208 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16209 return 1;
16210
16211 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016212 return 1;
16213
16214 return 0;
16215}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016216
Thomas Wouters477c8d52006-05-27 19:21:47 +000016217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016218if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016219 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016220else
Matthias Kloseb9621712010-04-24 17:59:49 +000016221 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16224 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016225fi
16226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16229$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016230if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016231
Matthias Kloseb9621712010-04-24 17:59:49 +000016232$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016233
16234fi
16235
Matthias Kloseb9621712010-04-24 17:59:49 +000016236ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016237#ifdef HAVE_SYS_TYPES_H
16238#include <sys/types.h>
16239#endif
16240#ifdef HAVE_SYS_SOCKET_H
16241#include <sys/socket.h>
16242#endif
16243
Matthias Kloseb9621712010-04-24 17:59:49 +000016244"
Victor Stinnere0be4232011-10-25 13:06:09 +020016245if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016246
Martin v. Löwis11437992002-04-12 09:54:03 +000016247else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016248
Matthias Kloseb9621712010-04-24 17:59:49 +000016249$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016250
16251fi
16252
Michael W. Hudson54241132001-12-07 15:38:26 +000016253
Matthias Kloseb9621712010-04-24 17:59:49 +000016254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16255$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016256if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016257 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016258else
Matthias Kloseb9621712010-04-24 17:59:49 +000016259 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016260 ac_cv_broken_mbstowcs=no
16261else
Matthias Kloseb9621712010-04-24 17:59:49 +000016262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016263/* end confdefs.h. */
16264
Stefan Krah19c21392012-11-22 23:47:32 +010016265#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016266#include<stdlib.h>
16267int main() {
16268 size_t len = -1;
16269 const char *str = "text";
16270 len = mbstowcs(NULL, str, 0);
16271 return (len != 4);
16272}
16273
16274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016275if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016276 ac_cv_broken_mbstowcs=no
16277else
Matthias Kloseb9621712010-04-24 17:59:49 +000016278 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16281 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016282fi
16283
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016284fi
16285
Matthias Kloseb9621712010-04-24 17:59:49 +000016286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16287$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016288if test "$ac_cv_broken_mbstowcs" = yes
16289then
16290
Matthias Kloseb9621712010-04-24 17:59:49 +000016291$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016292
16293fi
16294
Antoine Pitroub52ec782009-01-25 16:34:23 +000016295# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16297$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016298
16299# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016300if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016301 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016302if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016303then
16304
Matthias Kloseb9621712010-04-24 17:59:49 +000016305$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016306
Matthias Kloseb9621712010-04-24 17:59:49 +000016307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16308$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016309fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016310if test "$withval" = no
16311then
16312
16313$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16314
Matthias Kloseb9621712010-04-24 17:59:49 +000016315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16316$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016317fi
16318
Antoine Pitrou042b1282010-08-13 21:15:58 +000016319else
16320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16321$as_echo "no value specified" >&6; }
16322fi
16323
Antoine Pitroub52ec782009-01-25 16:34:23 +000016324
Matthias Kloseb17289e2012-03-15 19:51:34 +010016325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16326$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16327if ${ac_cv_computed_gotos+:} false; then :
16328 $as_echo_n "(cached) " >&6
16329else
16330 if test "$cross_compiling" = yes; then :
16331 if test "${with_computed_gotos+set}" = set; then
16332 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16333 else
16334 ac_cv_computed_gotos=no
16335 fi
16336else
16337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338/* end confdefs.h. */
16339
16340int main(int argc, char **argv)
16341{
16342 static void *targets[1] = { &&LABEL1 };
16343 goto LABEL2;
16344LABEL1:
16345 return 0;
16346LABEL2:
16347 goto *targets[0];
16348 return 1;
16349}
16350
16351_ACEOF
16352if ac_fn_c_try_run "$LINENO"; then :
16353 ac_cv_computed_gotos=yes
16354else
16355 ac_cv_computed_gotos=no
16356fi
16357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16358 conftest.$ac_objext conftest.beam conftest.$ac_ext
16359fi
16360
16361fi
16362
16363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16364$as_echo "$ac_cv_computed_gotos" >&6; }
16365case "$ac_cv_computed_gotos" in yes*)
16366
16367$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16368
16369esac
16370
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016371case $ac_sys_system in
16372AIX*)
16373
16374$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16375 ;;
16376esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016377
Michael W. Hudson54241132001-12-07 15:38:26 +000016378
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016379
16380
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016381for h in `(cd $srcdir;echo Python/thread_*.h)`
16382do
16383 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16384done
16385
Michael W. Hudson54241132001-12-07 15:38:26 +000016386
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016387SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16389$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016390for dir in $SRCDIRS; do
16391 if test ! -d $dir; then
16392 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016393 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016394done
Matthias Kloseb9621712010-04-24 17:59:49 +000016395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16396$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016397
Stefan Krah1919b7e2012-03-21 18:25:23 +010016398# Availability of -O2:
16399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16400$as_echo_n "checking for -O2... " >&6; }
16401saved_cflags="$CFLAGS"
16402CFLAGS="-O2"
16403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16404/* end confdefs.h. */
16405
16406int
16407main ()
16408{
16409
16410
16411 ;
16412 return 0;
16413}
16414_ACEOF
16415if ac_fn_c_try_compile "$LINENO"; then :
16416 have_O2=yes
16417else
16418 have_O2=no
16419fi
16420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16422$as_echo "$have_O2" >&6; }
16423CFLAGS="$saved_cflags"
16424
16425# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16426# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16428$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16429saved_cflags="$CFLAGS"
16430CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16431if test "$have_O2" = no; then
16432 CFLAGS=""
16433fi
16434if test "$cross_compiling" = yes; then :
16435 have_glibc_memmove_bug=undefined
16436else
16437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16438/* end confdefs.h. */
16439
16440#include <stdio.h>
16441#include <stdlib.h>
16442#include <string.h>
16443void foo(void *p, void *q) { memmove(p, q, 19); }
16444int main() {
16445 char a[32] = "123456789000000000";
16446 foo(&a[9], a);
16447 if (strcmp(a, "123456789123456789000000000") != 0)
16448 return 1;
16449 foo(a, &a[9]);
16450 if (strcmp(a, "123456789000000000") != 0)
16451 return 1;
16452 return 0;
16453}
16454
16455_ACEOF
16456if ac_fn_c_try_run "$LINENO"; then :
16457 have_glibc_memmove_bug=no
16458else
16459 have_glibc_memmove_bug=yes
16460fi
16461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16462 conftest.$ac_objext conftest.beam conftest.$ac_ext
16463fi
16464
16465CFLAGS="$saved_cflags"
16466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16467$as_echo "$have_glibc_memmove_bug" >&6; }
16468if test "$have_glibc_memmove_bug" = yes; then
16469
16470$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16471
16472fi
16473
16474if test "$have_gcc_asm_for_x87" = yes; then
16475 # Some versions of gcc miscompile inline asm:
16476 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16477 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16478 case $CC in
16479 *gcc*)
16480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16481$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16482 saved_cflags="$CFLAGS"
16483 CFLAGS="-O2"
16484 if test "$cross_compiling" = yes; then :
16485 have_ipa_pure_const_bug=undefined
16486else
16487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16488/* end confdefs.h. */
16489
16490 __attribute__((noinline)) int
16491 foo(int *p) {
16492 int r;
16493 asm ( "movl \$6, (%1)\n\t"
16494 "xorl %0, %0\n\t"
16495 : "=r" (r) : "r" (p) : "memory"
16496 );
16497 return r;
16498 }
16499 int main() {
16500 int p = 8;
16501 if ((foo(&p) ? : p) != 6)
16502 return 1;
16503 return 0;
16504 }
16505
16506_ACEOF
16507if ac_fn_c_try_run "$LINENO"; then :
16508 have_ipa_pure_const_bug=no
16509else
16510 have_ipa_pure_const_bug=yes
16511fi
16512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16513 conftest.$ac_objext conftest.beam conftest.$ac_ext
16514fi
16515
16516 CFLAGS="$saved_cflags"
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16518$as_echo "$have_ipa_pure_const_bug" >&6; }
16519 if test "$have_ipa_pure_const_bug" = yes; then
16520
16521$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16522
16523 fi
16524 ;;
16525 esac
16526fi
16527
Victor Stinner4f5366e2015-01-09 02:13:19 +010016528# Check for stdatomic.h
16529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16530$as_echo_n "checking for stdatomic.h... " >&6; }
16531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16532/* end confdefs.h. */
16533
16534
16535 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016536 atomic_int value = ATOMIC_VAR_INIT(1);
16537 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016538 int main() {
16539 int loaded_value = atomic_load(&value);
16540 return 0;
16541 }
16542
16543
16544_ACEOF
16545if ac_fn_c_try_link "$LINENO"; then :
16546 have_stdatomic_h=yes
16547else
16548 have_stdatomic_h=no
16549fi
16550rm -f core conftest.err conftest.$ac_objext \
16551 conftest$ac_exeext conftest.$ac_ext
16552
16553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16554$as_echo "$have_stdatomic_h" >&6; }
16555
16556if test "$have_stdatomic_h" = yes; then
16557
16558$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16559
16560fi
16561
16562# Check for GCC >= 4.7 __atomic builtins
16563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16564$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16566/* end confdefs.h. */
16567
16568
16569 volatile int val = 1;
16570 int main() {
16571 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16572 return 0;
16573 }
16574
16575
16576_ACEOF
16577if ac_fn_c_try_link "$LINENO"; then :
16578 have_builtin_atomic=yes
16579else
16580 have_builtin_atomic=no
16581fi
16582rm -f core conftest.err conftest.$ac_objext \
16583 conftest$ac_exeext conftest.$ac_ext
16584
16585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16586$as_echo "$have_builtin_atomic" >&6; }
16587
16588if test "$have_builtin_atomic" = yes; then
16589
16590$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16591
16592fi
16593
Ned Deily322f5ba2013-11-21 23:01:59 -080016594# ensurepip option
16595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16596$as_echo_n "checking for ensurepip... " >&6; }
16597
16598# Check whether --with-ensurepip was given.
16599if test "${with_ensurepip+set}" = set; then :
16600 withval=$with_ensurepip;
16601else
16602 with_ensurepip=upgrade
16603fi
16604
16605case $with_ensurepip in #(
16606 yes|upgrade) :
16607 ENSUREPIP=upgrade ;; #(
16608 install) :
16609 ENSUREPIP=install ;; #(
16610 no) :
16611 ENSUREPIP=no ;; #(
16612 *) :
16613 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16614esac
16615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16616$as_echo "$ENSUREPIP" >&6; }
16617
16618
Victor Stinner35a97c02015-03-08 02:59:09 +010016619# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16621$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16623/* end confdefs.h. */
16624
16625
16626 #include <dirent.h>
16627
16628 int main() {
16629 struct dirent entry;
16630 return entry.d_type == DT_UNKNOWN;
16631 }
16632
16633
16634_ACEOF
16635if ac_fn_c_try_link "$LINENO"; then :
16636 have_dirent_d_type=yes
16637else
16638 have_dirent_d_type=no
16639fi
16640rm -f core conftest.err conftest.$ac_objext \
16641 conftest$ac_exeext conftest.$ac_ext
16642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16643$as_echo "$have_dirent_d_type" >&6; }
16644
16645if test "$have_dirent_d_type" = yes; then
16646
16647$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16648
16649fi
16650
Victor Stinner9eb57c52015-03-19 22:21:49 +010016651# check if the Linux getrandom() syscall is available
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16653$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16655/* end confdefs.h. */
16656
16657
Victor Stinner1b80b242016-04-12 22:34:58 +020016658 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016659 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016660 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016661
16662 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016663 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016664 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016665 const int flags = GRND_NONBLOCK;
16666 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016667 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016668 return 0;
16669 }
16670
16671
16672_ACEOF
16673if ac_fn_c_try_link "$LINENO"; then :
16674 have_getrandom_syscall=yes
16675else
16676 have_getrandom_syscall=no
16677fi
16678rm -f core conftest.err conftest.$ac_objext \
16679 conftest$ac_exeext conftest.$ac_ext
16680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16681$as_echo "$have_getrandom_syscall" >&6; }
16682
16683if test "$have_getrandom_syscall" = yes; then
16684
16685$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16686
16687fi
16688
Victor Stinner3abf44e2015-09-18 15:38:37 +020016689# check if the getrandom() function is available
16690# the test was written for the Solaris function of <sys/random.h>
16691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16692$as_echo_n "checking for the getrandom() function... " >&6; }
16693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16694/* end confdefs.h. */
16695
16696
16697 #include <sys/random.h>
16698
16699 int main() {
16700 char buffer[1];
16701 const size_t buflen = sizeof(buffer);
16702 const int flags = 0;
16703 /* ignore the result, Python checks for ENOSYS at runtime */
16704 (void)getrandom(buffer, buflen, flags);
16705 return 0;
16706 }
16707
16708
16709_ACEOF
16710if ac_fn_c_try_link "$LINENO"; then :
16711 have_getrandom=yes
16712else
16713 have_getrandom=no
16714fi
16715rm -f core conftest.err conftest.$ac_objext \
16716 conftest$ac_exeext conftest.$ac_ext
16717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16718$as_echo "$have_getrandom" >&6; }
16719
16720if test "$have_getrandom" = yes; then
16721
16722$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16723
16724fi
16725
Guido van Rossum627b2d71993-12-24 10:39:16 +000016726# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016727ac_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 +000016728
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016729ac_config_files="$ac_config_files Modules/ld_so_aix"
16730
Martin v. Löwis11437992002-04-12 09:54:03 +000016731cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016732# This file is a shell script that caches the results of configure
16733# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016734# scripts and configure runs, see configure's option --config-cache.
16735# It is not useful on other systems. If it contains results you don't
16736# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016737#
Martin v. Löwis11437992002-04-12 09:54:03 +000016738# config.status only pays attention to the cache file if you give it
16739# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016740#
Skip Montanaro6dead952003-09-25 14:50:04 +000016741# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016742# loading this file, other *unset* `ac_cv_foo' will be assigned the
16743# following values.
16744
16745_ACEOF
16746
Guido van Rossumf78abae1997-01-21 22:02:36 +000016747# The following way of writing the cache mishandles newlines in values,
16748# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016750# Ultrix sh set writes to stderr and can't be redirected directly,
16751# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752(
16753 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16754 eval ac_val=\$$ac_var
16755 case $ac_val in #(
16756 *${as_nl}*)
16757 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016758 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16759$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760 esac
16761 case $ac_var in #(
16762 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016763 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16764 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765 esac ;;
16766 esac
16767 done
16768
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16771 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016772 # `set' does not quote correctly, so add quotes: double-quote
16773 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016774 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016775 "s/'/'\\\\''/g;
16776 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016777 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016778 *)
16779 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016781 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016782 esac |
16783 sort
16784) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016785 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016787 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016789 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16790 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16792 :end' >>confcache
16793if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16794 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016795 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016796 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16797$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016798 if test ! -f "$cache_file" || test -h "$cache_file"; then
16799 cat confcache >"$cache_file"
16800 else
16801 case $cache_file in #(
16802 */* | ?:*)
16803 mv -f confcache "$cache_file"$$ &&
16804 mv -f "$cache_file"$$ "$cache_file" ;; #(
16805 *)
16806 mv -f confcache "$cache_file" ;;
16807 esac
16808 fi
16809 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016810 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016811 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16812$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016813 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016814fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016815rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016816
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016817test "x$prefix" = xNONE && prefix=$ac_default_prefix
16818# Let make expand exec_prefix.
16819test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016820
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016821DEFS=-DHAVE_CONFIG_H
16822
Skip Montanaro6dead952003-09-25 14:50:04 +000016823ac_libobjs=
16824ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016825U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016826for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16827 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016828 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016829 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016830 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16831 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016832 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16833 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016834done
16835LIBOBJS=$ac_libobjs
16836
16837LTLIBOBJS=$ac_ltlibobjs
16838
16839
Martin v. Löwis11437992002-04-12 09:54:03 +000016840
Matthias Kloseb9621712010-04-24 17:59:49 +000016841
Victor Stinnere0be4232011-10-25 13:06:09 +020016842: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016843ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016844ac_clean_files_save=$ac_clean_files
16845ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016846{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16847$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16848as_write_fail=0
16849cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016850#! $SHELL
16851# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016852# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016853# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016854# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016855
Martin v. Löwis11437992002-04-12 09:54:03 +000016856debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016857ac_cs_recheck=false
16858ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016859
Matthias Kloseb9621712010-04-24 17:59:49 +000016860SHELL=\${CONFIG_SHELL-$SHELL}
16861export SHELL
16862_ASEOF
16863cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16864## -------------------- ##
16865## M4sh Initialization. ##
16866## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868# Be more Bourne compatible
16869DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016870if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 emulate sh
16872 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016873 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016874 # is contrary to our usage. Disable this feature.
16875 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016877else
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 case `(set -o) 2>/dev/null` in #(
16879 *posix*) :
16880 set -o posix ;; #(
16881 *) :
16882 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016884fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016885
16886
Matthias Kloseb9621712010-04-24 17:59:49 +000016887as_nl='
16888'
16889export as_nl
16890# Printing a long string crashes Solaris 7 /usr/bin/printf.
16891as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16892as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16893as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16894# Prefer a ksh shell builtin over an external printf program on Solaris,
16895# but without wasting forks for bash or zsh.
16896if test -z "$BASH_VERSION$ZSH_VERSION" \
16897 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16898 as_echo='print -r --'
16899 as_echo_n='print -rn --'
16900elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16901 as_echo='printf %s\n'
16902 as_echo_n='printf %s'
16903else
16904 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16905 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16906 as_echo_n='/usr/ucb/echo -n'
16907 else
16908 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16909 as_echo_n_body='eval
16910 arg=$1;
16911 case $arg in #(
16912 *"$as_nl"*)
16913 expr "X$arg" : "X\\(.*\\)$as_nl";
16914 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16915 esac;
16916 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16917 '
16918 export as_echo_n_body
16919 as_echo_n='sh -c $as_echo_n_body as_echo'
16920 fi
16921 export as_echo_body
16922 as_echo='sh -c $as_echo_body as_echo'
16923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016924
16925# The user is always right.
16926if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016927 PATH_SEPARATOR=:
16928 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16929 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16930 PATH_SEPARATOR=';'
16931 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016934
16935# IFS
16936# We need space, tab and new line, in precisely that order. Quoting is
16937# there to prevent editors from complaining about space-tab.
16938# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16939# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016940IFS=" "" $as_nl"
16941
16942# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016943as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016944case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945 *[\\/]* ) as_myself=$0 ;;
16946 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016947for as_dir in $PATH
16948do
16949 IFS=$as_save_IFS
16950 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016951 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16952 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016953IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955 ;;
16956esac
16957# We did not find ourselves, most probably we were run as `sh COMMAND'
16958# in which case we are not to be found in the path.
16959if test "x$as_myself" = x; then
16960 as_myself=$0
16961fi
16962if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016963 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16964 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016965fi
16966
Matthias Kloseb9621712010-04-24 17:59:49 +000016967# Unset variables that we do not need and which cause bugs (e.g. in
16968# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16969# suppresses any "Segmentation fault" message there. '((' could
16970# trigger a bug in pdksh 5.2.14.
16971for as_var in BASH_ENV ENV MAIL MAILPATH
16972do eval test x\${$as_var+set} = xset \
16973 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016974done
16975PS1='$ '
16976PS2='> '
16977PS4='+ '
16978
16979# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016980LC_ALL=C
16981export LC_ALL
16982LANGUAGE=C
16983export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984
Matthias Kloseb9621712010-04-24 17:59:49 +000016985# CDPATH.
16986(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16987
16988
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016989# as_fn_error STATUS ERROR [LINENO LOG_FD]
16990# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016991# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16992# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016993# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016994as_fn_error ()
16995{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016996 as_status=$1; test $as_status -eq 0 && as_status=1
16997 if test "$4"; then
16998 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16999 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017000 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017001 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017002 as_fn_exit $as_status
17003} # as_fn_error
17004
17005
17006# as_fn_set_status STATUS
17007# -----------------------
17008# Set $? to STATUS, without forking.
17009as_fn_set_status ()
17010{
17011 return $1
17012} # as_fn_set_status
17013
17014# as_fn_exit STATUS
17015# -----------------
17016# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17017as_fn_exit ()
17018{
17019 set +e
17020 as_fn_set_status $1
17021 exit $1
17022} # as_fn_exit
17023
17024# as_fn_unset VAR
17025# ---------------
17026# Portably unset VAR.
17027as_fn_unset ()
17028{
17029 { eval $1=; unset $1;}
17030}
17031as_unset=as_fn_unset
17032# as_fn_append VAR VALUE
17033# ----------------------
17034# Append the text in VALUE to the end of the definition contained in VAR. Take
17035# advantage of any shell optimizations that allow amortized linear growth over
17036# repeated appends, instead of the typical quadratic growth present in naive
17037# implementations.
17038if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17039 eval 'as_fn_append ()
17040 {
17041 eval $1+=\$2
17042 }'
17043else
17044 as_fn_append ()
17045 {
17046 eval $1=\$$1\$2
17047 }
17048fi # as_fn_append
17049
17050# as_fn_arith ARG...
17051# ------------------
17052# Perform arithmetic evaluation on the ARGs, and store the result in the
17053# global $as_val. Take advantage of shells that can avoid forks. The arguments
17054# must be portable across $(()) and expr.
17055if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17056 eval 'as_fn_arith ()
17057 {
17058 as_val=$(( $* ))
17059 }'
17060else
17061 as_fn_arith ()
17062 {
17063 as_val=`expr "$@" || test $? -eq 1`
17064 }
17065fi # as_fn_arith
17066
17067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068if expr a : '\(a\)' >/dev/null 2>&1 &&
17069 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17070 as_expr=expr
17071else
17072 as_expr=false
17073fi
17074
17075if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17076 as_basename=basename
17077else
17078 as_basename=false
17079fi
17080
Matthias Kloseb9621712010-04-24 17:59:49 +000017081if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17082 as_dirname=dirname
17083else
17084 as_dirname=false
17085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087as_me=`$as_basename -- "$0" ||
17088$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17089 X"$0" : 'X\(//\)$' \| \
17090 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017091$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092 sed '/^.*\/\([^/][^/]*\)\/*$/{
17093 s//\1/
17094 q
17095 }
17096 /^X\/\(\/\/\)$/{
17097 s//\1/
17098 q
17099 }
17100 /^X\/\(\/\).*/{
17101 s//\1/
17102 q
17103 }
17104 s/.*/./; q'`
17105
Matthias Kloseb9621712010-04-24 17:59:49 +000017106# Avoid depending upon Character Ranges.
17107as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17108as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17109as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17110as_cr_digits='0123456789'
17111as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017112
17113ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017114case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017116 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017117 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017118 xy) ECHO_C='\c';;
17119 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17120 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017121 esac;;
17122*)
17123 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017125
Martin v. Löwis11437992002-04-12 09:54:03 +000017126rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017127if test -d conf$$.dir; then
17128 rm -f conf$$.dir/conf$$.file
17129else
17130 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017133if (echo >conf$$.file) 2>/dev/null; then
17134 if ln -s conf$$.file conf$$ 2>/dev/null; then
17135 as_ln_s='ln -s'
17136 # ... but there are two gotchas:
17137 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17138 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017139 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017140 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017141 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017142 elif ln conf$$.file conf$$ 2>/dev/null; then
17143 as_ln_s=ln
17144 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017145 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017146 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017147else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017148 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17151rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
Matthias Kloseb9621712010-04-24 17:59:49 +000017153
17154# as_fn_mkdir_p
17155# -------------
17156# Create "$as_dir" as a directory, including parents if necessary.
17157as_fn_mkdir_p ()
17158{
17159
17160 case $as_dir in #(
17161 -*) as_dir=./$as_dir;;
17162 esac
17163 test -d "$as_dir" || eval $as_mkdir_p || {
17164 as_dirs=
17165 while :; do
17166 case $as_dir in #(
17167 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17168 *) as_qdir=$as_dir;;
17169 esac
17170 as_dirs="'$as_qdir' $as_dirs"
17171 as_dir=`$as_dirname -- "$as_dir" ||
17172$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17173 X"$as_dir" : 'X\(//\)[^/]' \| \
17174 X"$as_dir" : 'X\(//\)$' \| \
17175 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17176$as_echo X"$as_dir" |
17177 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17178 s//\1/
17179 q
17180 }
17181 /^X\(\/\/\)[^/].*/{
17182 s//\1/
17183 q
17184 }
17185 /^X\(\/\/\)$/{
17186 s//\1/
17187 q
17188 }
17189 /^X\(\/\).*/{
17190 s//\1/
17191 q
17192 }
17193 s/.*/./; q'`
17194 test -d "$as_dir" && break
17195 done
17196 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017197 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017198
17199
17200} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017201if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017202 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017203else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017204 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017205 as_mkdir_p=false
17206fi
17207
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017208
17209# as_fn_executable_p FILE
17210# -----------------------
17211# Test if FILE is an executable regular file.
17212as_fn_executable_p ()
17213{
17214 test -f "$1" && test -x "$1"
17215} # as_fn_executable_p
17216as_test_x='test -x'
17217as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017218
17219# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017220as_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 +000017221
17222# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017223as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017224
17225
Martin v. Löwis11437992002-04-12 09:54:03 +000017226exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017227## ----------------------------------- ##
17228## Main body of $CONFIG_STATUS script. ##
17229## ----------------------------------- ##
17230_ASEOF
17231test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017232
Matthias Kloseb9621712010-04-24 17:59:49 +000017233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17234# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017235# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236# values after options handling.
17237ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017238This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017239generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017240
17241 CONFIG_FILES = $CONFIG_FILES
17242 CONFIG_HEADERS = $CONFIG_HEADERS
17243 CONFIG_LINKS = $CONFIG_LINKS
17244 CONFIG_COMMANDS = $CONFIG_COMMANDS
17245 $ $0 $@
17246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247on `(hostname || uname -n) 2>/dev/null | sed 1q`
17248"
17249
Martin v. Löwis11437992002-04-12 09:54:03 +000017250_ACEOF
17251
Matthias Kloseb9621712010-04-24 17:59:49 +000017252case $ac_config_files in *"
17253"*) set x $ac_config_files; shift; ac_config_files=$*;;
17254esac
17255
17256case $ac_config_headers in *"
17257"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17258esac
17259
17260
17261cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017262# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017263config_files="$ac_config_files"
17264config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017266_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017267
Matthias Kloseb9621712010-04-24 17:59:49 +000017268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017269ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017270\`$as_me' instantiates files and other configuration actions
17271from templates according to the current configuration. Unless the files
17272and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017273
Matthias Kloseb9621712010-04-24 17:59:49 +000017274Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017275
17276 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017278 --config print configuration, then exit
17279 -q, --quiet, --silent
17280 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017281 -d, --debug don't remove temporary files
17282 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017283 --file=FILE[:TEMPLATE]
17284 instantiate the configuration file FILE
17285 --header=FILE[:TEMPLATE]
17286 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017287
17288Configuration files:
17289$config_files
17290
17291Configuration headers:
17292$config_headers
17293
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017294Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017297cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17298ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017299ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017300python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017301configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017302 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017303
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017304Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017305This config.status script is free software; the Free Software Foundation
17306gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307
17308ac_pwd='$ac_pwd'
17309srcdir='$srcdir'
17310INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017311MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017312test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017313_ACEOF
17314
Matthias Kloseb9621712010-04-24 17:59:49 +000017315cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17316# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017317ac_need_defaults=:
17318while test $# != 0
17319do
17320 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017321 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17323 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017324 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017325 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017326 --*=)
17327 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17328 ac_optarg=
17329 ac_shift=:
17330 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017332 ac_option=$1
17333 ac_optarg=$2
17334 ac_shift=shift
17335 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017336 esac
17337
Skip Montanaro6dead952003-09-25 14:50:04 +000017338 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017339 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017340 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17341 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017343 $as_echo "$ac_cs_version"; exit ;;
17344 --config | --confi | --conf | --con | --co | --c )
17345 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 debug=: ;;
17348 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017349 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 case $ac_optarg in
17351 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017352 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017353 esac
17354 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017355 ac_need_defaults=false;;
17356 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017357 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017358 case $ac_optarg in
17359 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17360 esac
17361 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017362 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363 --he | --h)
17364 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017365 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017366Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017368 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017369 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17370 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17371 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017372
17373 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017374 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017375Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017376
Matthias Kloseb9621712010-04-24 17:59:49 +000017377 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017379
17380 esac
17381 shift
17382done
17383
Skip Montanaro6dead952003-09-25 14:50:04 +000017384ac_configure_extra_args=
17385
17386if $ac_cs_silent; then
17387 exec 6>/dev/null
17388 ac_configure_extra_args="$ac_configure_extra_args --silent"
17389fi
17390
17391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017393if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017394 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017395 shift
17396 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17397 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017399 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017400fi
17401
Martin v. Löwis11437992002-04-12 09:54:03 +000017402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404exec 5>>config.log
17405{
17406 echo
17407 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17408## Running $as_me. ##
17409_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017410 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017414cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017416
Matthias Kloseb9621712010-04-24 17:59:49 +000017417cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418
17419# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017420for ac_config_target in $ac_config_targets
17421do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422 case $ac_config_target in
17423 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17424 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17425 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017426 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17427 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17429 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017430 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017431 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017432 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433
Victor Stinnere0be4232011-10-25 13:06:09 +020017434 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017435 esac
17436done
17437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438
Martin v. Löwis11437992002-04-12 09:54:03 +000017439# If the user did not use the arguments to specify the items to instantiate,
17440# then the envvar interface is used. Set only those that are not.
17441# We use the long form for the default assignment because of an extremely
17442# bizarre bug on SunOS 4.1.3.
17443if $ac_need_defaults; then
17444 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17445 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17446fi
17447
Skip Montanaro6dead952003-09-25 14:50:04 +000017448# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017450# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451# Hook for its removal unless debugging.
17452# Note that there is a small window in which the directory will not be cleaned:
17453# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017454$debug ||
17455{
Victor Stinnere0be4232011-10-25 13:06:09 +020017456 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017458 : "${ac_tmp:=$tmp}"
17459 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017461 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017462}
Martin v. Löwis11437992002-04-12 09:54:03 +000017463# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017464
Martin v. Löwis11437992002-04-12 09:54:03 +000017465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017467 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017468} ||
17469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470 tmp=./conf$$-$RANDOM
17471 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017472} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017473ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017474
Matthias Kloseb9621712010-04-24 17:59:49 +000017475# Set up the scripts for CONFIG_FILES section.
17476# No need to generate them if there are no CONFIG_FILES.
17477# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017479
Matthias Kloseb9621712010-04-24 17:59:49 +000017480
17481ac_cr=`echo X | tr X '\015'`
17482# On cygwin, bash can eat \r inside `` if the user requested igncr.
17483# But we know of no other shell where ac_cr would be empty at this
17484# point, so we can use a bashism as a fallback.
17485if test "x$ac_cr" = x; then
17486 eval ac_cr=\$\'\\r\'
17487fi
17488ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17489if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017490 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017491else
17492 ac_cs_awk_cr=$ac_cr
17493fi
17494
Victor Stinnere0be4232011-10-25 13:06:09 +020017495echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017496_ACEOF
17497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498
Matthias Kloseb9621712010-04-24 17:59:49 +000017499{
17500 echo "cat >conf$$subs.awk <<_ACEOF" &&
17501 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17502 echo "_ACEOF"
17503} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017504 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17505ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506ac_delim='%!_!# '
17507for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017508 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017509 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17512 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017513 break
17514 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017515 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516 else
17517 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519done
Matthias Kloseb9621712010-04-24 17:59:49 +000017520rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521
Matthias Kloseb9621712010-04-24 17:59:49 +000017522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017523cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017525sed -n '
17526h
17527s/^/S["/; s/!.*/"]=/
17528p
17529g
17530s/^[^!]*!//
17531:repl
17532t repl
17533s/'"$ac_delim"'$//
17534t delim
17535:nl
17536h
17537s/\(.\{148\}\)..*/\1/
17538t more1
17539s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17540p
17541n
17542b repl
17543:more1
17544s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17545p
17546g
17547s/.\{148\}//
17548t nl
17549:delim
17550h
17551s/\(.\{148\}\)..*/\1/
17552t more2
17553s/["\\]/\\&/g; s/^/"/; s/$/"/
17554p
17555b
17556:more2
17557s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17558p
17559g
17560s/.\{148\}//
17561t delim
17562' <conf$$subs.awk | sed '
17563/^[^""]/{
17564 N
17565 s/\n//
17566}
17567' >>$CONFIG_STATUS || ac_write_fail=1
17568rm -f conf$$subs.awk
17569cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17570_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017571cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017572 for (key in S) S_is_set[key] = 1
17573 FS = ""
17574
17575}
17576{
17577 line = $ 0
17578 nfields = split(line, field, "@")
17579 substed = 0
17580 len = length(field[1])
17581 for (i = 2; i < nfields; i++) {
17582 key = field[i]
17583 keylen = length(key)
17584 if (S_is_set[key]) {
17585 value = S[key]
17586 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17587 len += length(value) + length(field[++i])
17588 substed = 1
17589 } else
17590 len += 1 + keylen
17591 }
17592
17593 print line
17594}
17595
17596_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17599if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17600 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17601else
17602 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017603fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017604 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017605_ACEOF
17606
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017607# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17608# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609# trailing colons and then remove the whole line if VPATH becomes empty
17610# (actually we leave an empty line to preserve line numbers).
17611if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017612 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17613h
17614s///
17615s/^/:/
17616s/[ ]*$/:/
17617s/:\$(srcdir):/:/g
17618s/:\${srcdir}:/:/g
17619s/:@srcdir@:/:/g
17620s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017621s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017622x
17623s/\(=[ ]*\).*/\1/
17624G
17625s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626s/^[^=]*=[ ]*$//
17627}'
17628fi
17629
Matthias Kloseb9621712010-04-24 17:59:49 +000017630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017631fi # test -n "$CONFIG_FILES"
17632
Matthias Kloseb9621712010-04-24 17:59:49 +000017633# Set up the scripts for CONFIG_HEADERS section.
17634# No need to generate them if there are no CONFIG_HEADERS.
17635# This happens for instance with `./config.status Makefile'.
17636if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017637cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017638BEGIN {
17639_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640
Matthias Kloseb9621712010-04-24 17:59:49 +000017641# Transform confdefs.h into an awk script `defines.awk', embedded as
17642# here-document in config.status, that substitutes the proper values into
17643# config.h.in to produce config.h.
17644
17645# Create a delimiter string that does not exist in confdefs.h, to ease
17646# handling of long lines.
17647ac_delim='%!_!# '
17648for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017649 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17650 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017651 break
17652 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017653 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017654 else
17655 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17656 fi
17657done
17658
17659# For the awk script, D is an array of macro values keyed by name,
17660# likewise P contains macro parameters if any. Preserve backslash
17661# newline sequences.
17662
17663ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17664sed -n '
17665s/.\{148\}/&'"$ac_delim"'/g
17666t rset
17667:rset
17668s/^[ ]*#[ ]*define[ ][ ]*/ /
17669t def
17670d
17671:def
17672s/\\$//
17673t bsnl
17674s/["\\]/\\&/g
17675s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17676D["\1"]=" \3"/p
17677s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17678d
17679:bsnl
17680s/["\\]/\\&/g
17681s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17682D["\1"]=" \3\\\\\\n"\\/p
17683t cont
17684s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17685t cont
17686d
17687:cont
17688n
17689s/.\{148\}/&'"$ac_delim"'/g
17690t clear
17691:clear
17692s/\\$//
17693t bsnlc
17694s/["\\]/\\&/g; s/^/"/; s/$/"/p
17695d
17696:bsnlc
17697s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17698b cont
17699' <confdefs.h | sed '
17700s/'"$ac_delim"'/"\\\
17701"/g' >>$CONFIG_STATUS || ac_write_fail=1
17702
17703cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17704 for (key in D) D_is_set[key] = 1
17705 FS = ""
17706}
17707/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17708 line = \$ 0
17709 split(line, arg, " ")
17710 if (arg[1] == "#") {
17711 defundef = arg[2]
17712 mac1 = arg[3]
17713 } else {
17714 defundef = substr(arg[1], 2)
17715 mac1 = arg[2]
17716 }
17717 split(mac1, mac2, "(") #)
17718 macro = mac2[1]
17719 prefix = substr(line, 1, index(line, defundef) - 1)
17720 if (D_is_set[macro]) {
17721 # Preserve the white space surrounding the "#".
17722 print prefix "define", macro P[macro] D[macro]
17723 next
17724 } else {
17725 # Replace #undef with comments. This is necessary, for example,
17726 # in the case of _POSIX_SOURCE, which is predefined and required
17727 # on some systems where configure will not decide to define it.
17728 if (defundef == "undef") {
17729 print "/*", prefix defundef, macro, "*/"
17730 next
17731 }
17732 }
17733}
17734{ print }
17735_ACAWK
17736_ACEOF
17737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017738 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017739fi # test -n "$CONFIG_HEADERS"
17740
17741
17742eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17743shift
17744for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745do
17746 case $ac_tag in
17747 :[FHLC]) ac_mode=$ac_tag; continue;;
17748 esac
17749 case $ac_mode$ac_tag in
17750 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017751 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 :[FH]-) ac_tag=-:-;;
17753 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17754 esac
17755 ac_save_IFS=$IFS
17756 IFS=:
17757 set x $ac_tag
17758 IFS=$ac_save_IFS
17759 shift
17760 ac_file=$1
17761 shift
17762
17763 case $ac_mode in
17764 :L) ac_source=$1;;
17765 :[FH])
17766 ac_file_inputs=
17767 for ac_f
17768 do
17769 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017770 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 *) # Look for the file first in the build tree, then in the source tree
17772 # (if the path is not absolute). The absolute path cannot be DOS-style,
17773 # because $ac_f cannot contain `:'.
17774 test -f "$ac_f" ||
17775 case $ac_f in
17776 [\\/$]*) false;;
17777 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17778 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017779 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017781 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17782 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783 done
17784
17785 # Let's still pretend it is `configure' which instantiates (i.e., don't
17786 # use $as_me), people would be surprised to read:
17787 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017788 configure_input='Generated from '`
17789 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17790 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017791 if test x"$ac_file" != x-; then
17792 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017793 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17794$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017796 # Neutralize special characters interpreted by sed in replacement strings.
17797 case $configure_input in #(
17798 *\&* | *\|* | *\\* )
17799 ac_sed_conf_input=`$as_echo "$configure_input" |
17800 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17801 *) ac_sed_conf_input=$configure_input;;
17802 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803
17804 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017805 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17806 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807 esac
17808 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 esac
17810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017812$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017813 X"$ac_file" : 'X\(//\)[^/]' \| \
17814 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017816$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17818 s//\1/
17819 q
17820 }
17821 /^X\(\/\/\)[^/].*/{
17822 s//\1/
17823 q
17824 }
17825 /^X\(\/\/\)$/{
17826 s//\1/
17827 q
17828 }
17829 /^X\(\/\).*/{
17830 s//\1/
17831 q
17832 }
17833 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017834 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 ac_builddir=.
17836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837case "$ac_dir" in
17838.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17839*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017840 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017841 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017842 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843 case $ac_top_builddir_sub in
17844 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17845 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17846 esac ;;
17847esac
17848ac_abs_top_builddir=$ac_pwd
17849ac_abs_builddir=$ac_pwd$ac_dir_suffix
17850# for backward compatibility:
17851ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017852
17853case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017855 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856 ac_top_srcdir=$ac_top_builddir_sub
17857 ac_abs_top_srcdir=$ac_pwd ;;
17858 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017859 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860 ac_top_srcdir=$srcdir
17861 ac_abs_top_srcdir=$srcdir ;;
17862 *) # Relative name.
17863 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17864 ac_top_srcdir=$ac_top_build_prefix$srcdir
17865 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017866esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017868
Martin v. Löwis11437992002-04-12 09:54:03 +000017869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870 case $ac_mode in
17871 :F)
17872 #
17873 # CONFIG_FILE
17874 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017875
17876 case $INSTALL in
17877 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017878 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017879 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017880 ac_MKDIR_P=$MKDIR_P
17881 case $MKDIR_P in
17882 [\\/$]* | ?:[\\/]* ) ;;
17883 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17884 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017885_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017886
Matthias Kloseb9621712010-04-24 17:59:49 +000017887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888# If the template does not know about datarootdir, expand it.
17889# FIXME: This hack should be removed a few years after 2.60.
17890ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017891ac_sed_dataroot='
17892/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017893 p
17894 q
17895}
17896/@datadir@/p
17897/@docdir@/p
17898/@infodir@/p
17899/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017900/@mandir@/p'
17901case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902*datarootdir*) ac_datarootdir_seen=yes;;
17903*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17905$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017907cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908 ac_datarootdir_hack='
17909 s&@datadir@&$datadir&g
17910 s&@docdir@&$docdir&g
17911 s&@infodir@&$infodir&g
17912 s&@localedir@&$localedir&g
17913 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017914 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017915esac
17916_ACEOF
17917
17918# Neutralize VPATH when `$srcdir' = `.'.
17919# Shell code in configure.ac might set extrasub.
17920# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17922ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017923$extrasub
17924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017926:t
17927/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017928s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017930s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931s&@srcdir@&$ac_srcdir&;t t
17932s&@abs_srcdir@&$ac_abs_srcdir&;t t
17933s&@top_srcdir@&$ac_top_srcdir&;t t
17934s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17935s&@builddir@&$ac_builddir&;t t
17936s&@abs_builddir@&$ac_abs_builddir&;t t
17937s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17938s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017939s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017940$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017941"
Victor Stinnere0be4232011-10-25 13:06:09 +020017942eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17943 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017946 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17947 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17948 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017950which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017951$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017952which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017953
Victor Stinnere0be4232011-10-25 13:06:09 +020017954 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017956 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17957 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017958 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017959 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017960 ;;
17961 :H)
17962 #
17963 # CONFIG_HEADER
17964 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017965 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017966 {
17967 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017968 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17969 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017970 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017971 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017972 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17973$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017975 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017976 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017977 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017978 fi
17979 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017980 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017981 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017982 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986
17987 esac
17988
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017989
17990 case $ac_file$ac_mode in
17991 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17992
17993 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017994done # for ac_tag
17995
Guido van Rossum627b2d71993-12-24 10:39:16 +000017996
Matthias Kloseb9621712010-04-24 17:59:49 +000017997as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017998_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017999ac_clean_files=$ac_clean_files_save
18000
Matthias Kloseb9621712010-04-24 17:59:49 +000018001test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018002 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018003
Martin v. Löwis11437992002-04-12 09:54:03 +000018004
18005# configure is writing to config.log, and then calls config.status.
18006# config.status does its own redirection, appending to config.log.
18007# Unfortunately, on DOS this fails, as config.log is still kept open
18008# by configure, so config.status won't be able to write to it; its
18009# output is simply discarded. So we exec the FD to /dev/null,
18010# effectively closing config.log, so it can be properly (re)opened and
18011# appended to by config.status. When coming back to configure, we
18012# need to make the FD available again.
18013if test "$no_create" != yes; then
18014 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018015 ac_config_status_args=
18016 test "$silent" = yes &&
18017 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018019 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018020 exec 5>>config.log
18021 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18022 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018023 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018024fi
18025if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18027$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018028fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018029
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018030
Christian Heimes75ed8902013-11-20 01:11:18 +010018031echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018032if test ! -f Modules/Setup
18033then
18034 cp $srcdir/Modules/Setup.dist Modules/Setup
18035fi
18036
Christian Heimes75ed8902013-11-20 01:11:18 +010018037echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018038if test ! -f Modules/Setup.local
18039then
18040 echo "# Edit this file for local setup changes" >Modules/Setup.local
18041fi
18042
Christian Heimes75ed8902013-11-20 01:11:18 +010018043echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018044$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18045 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018046 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018047mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018048
18049if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18050 echo "" >&6
18051 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018052 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 +000018053 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018054 echo "" >&6
18055 echo "" >&6
18056fi
18057