blob: adf8cf3ab9c19630e6e6f43fe374084678550be4 [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 Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
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 Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675target_os
676target_vendor
677target_cpu
678target
679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
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
Matthias Kloseb9621712010-04-24 17:59:49 +0000698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200751PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500760HAS_GIT
761GITBRANCH
762GITTAG
763GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
Matthias Kloseddbe9762018-04-30 19:22:16 +0200784runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
811with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600812with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_libs
824with_system_expat
825with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100826with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000827enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700828with_tcltk_includes
829with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000831enable_ipv6
832with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000834with_c_locale_coercion
835with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Matthias Kloseddbe9762018-04-30 19:22:16 +0200897runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Matthias Kloseddbe9762018-04-30 19:22:16 +02001150 -runstatedir | --runstatedir | --runstatedi | --runstated \
1151 | --runstate | --runstat | --runsta | --runst | --runs \
1152 | --run | --ru | --r)
1153 ac_prev=runstatedir ;;
1154 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1155 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1156 | --run=* | --ru=* | --r=*)
1157 runstatedir=$ac_optarg ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160 ac_prev=sbindir ;;
1161 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
1165 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167 | --sharedst | --shareds | --shared | --share | --shar \
1168 | --sha | --sh)
1169 ac_prev=sharedstatedir ;;
1170 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 -site | --site | --sit)
1177 ac_prev=site ;;
1178 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182 ac_prev=srcdir ;;
1183 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187 | --syscon | --sysco | --sysc | --sys | --sy)
1188 ac_prev=sysconfdir ;;
1189 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199 verbose=yes ;;
1200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 -version | --version | --versio | --versi | --vers | -V)
1202 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 --x)
1237 # Obsolete; use --with-x.
1238 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241 | --x-incl | --x-inc | --x-in | --x-i)
1242 ac_prev=x_includes ;;
1243 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249 ac_prev=x_libraries ;;
1250 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 *=*)
1259 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 case $ac_envvar in #(
1262 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 export $ac_envvar ;;
1267
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001268 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001273 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
1276 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277done
1278
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
1283
Matthias Kloseb9621712010-04-24 17:59:49 +00001284if test -n "$ac_unrecognized_opts"; then
1285 case $enable_option_checking in
1286 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289 esac
1290fi
1291
1292# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294 datadir sysconfdir sharedstatedir localstatedir includedir \
1295 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Matthias Kloseddbe9762018-04-30 19:22:16 +02001296 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 # Remove trailing slashes.
1300 case $ac_val in
1301 */ )
1302 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303 eval $ac_var=\$ac_val;;
1304 esac
1305 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 [\\/$]* | ?:[\\/]* ) continue;;
1308 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001311done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322 if test "x$build_alias" = x; then
1323 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 elif test "x$build_alias" != "x$host_alias"; then
1325 cross_compiling=yes
1326 fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349 X"$as_myself" : 'X\(//\)[^/]' \| \
1350 X"$as_myself" : 'X\(//\)$' \| \
1351 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)[^/].*/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\).*/{
1366 s//\1/
1367 q
1368 }
1369 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 srcdir=..
1373 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374else
1375 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377if test ! -r "$srcdir/$ac_unique_file"; then
1378 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384 pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387 srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_env_${ac_var}_value=\$${ac_var}
1398 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406 # Omit some internal or obsolete options to make the list less imposing.
1407 # This message is too long to be a string in the A/UX 3.1 sh.
1408 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001409\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE. See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419 -h, --help display this help and exit
1420 --help=short display options specific to this package
1421 --help=recursive display the short help of all the included packages
1422 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001423 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --cache-file=FILE cache test results in FILE [disabled]
1425 -C, --config-cache alias for \`--cache-file=config.cache'
1426 -n, --no-create do not create output files
1427 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429Installation directories:
1430 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --bindir=DIR user executables [EPREFIX/bin]
1444 --sbindir=DIR system admin executables [EPREFIX/sbin]
1445 --libexecdir=DIR program executables [EPREFIX/libexec]
1446 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1447 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1448 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Matthias Kloseddbe9762018-04-30 19:22:16 +02001449 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464
1465 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001466
1467System types:
1468 --build=BUILD configure for building on BUILD [guessed]
1469 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001470 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001471_ACEOF
1472fi
1473
1474if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001476 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 cat <<\_ACEOF
1479
1480Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1483 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001484 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001485 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-framework[=INSTALLDIR]
1487 Build (MacOSX|Darwin) framework
1488 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001489 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001490 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1491 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001492 --enable-loadable-sqlite-extensions
1493 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --enable-ipv6 Enable ipv6 (with ipv4) support
1495 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001496 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499Optional Packages:
1500 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1501 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001502 --with-universal-archs=ARCH
1503 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001504 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1505 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001506 --with-framework-name=FRAMEWORK
1507 specify an alternate name of the framework built
1508 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001510 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001511 --with-cxx-main=<compiler>
1512 compile main() and link python executable with C++
1513 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-suffix=.exe set executable suffix
1515 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001516 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001517 --with-lto Enable Link Time Optimization in any build. Disabled
1518 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001519 --with-hash-algorithm=[fnv|siphash24]
1520 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001521 --with-address-sanitizer
1522 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001523 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001524 --with-system-expat build pyexpat module using an installed expat
1525 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001526 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001527 --with-system-libmpdec build _decimal module using an installed libmpdec
1528 library
Ned Deilyd819b932013-09-06 01:07:05 -07001529 --with-tcltk-includes='-I...'
1530 override search for Tcl and Tk include files
1531 --with-tcltk-libs='-L...'
1532 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001533 --with-dbmliborder=db1:db2:...
1534 order to check db backends for dbm. Valid value is a
1535 colon separated string with the backend names
1536 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001537 --with(out)-doc-strings disable/enable documentation strings
1538 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001539 --with(out)-c-locale-coercion
1540 disable/enable C locale coercion to a UTF-8 based
1541 locale
1542 --with(out)-c-locale-warning
1543 disable/enable locale compatibility warning in the C
1544 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001545 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001546 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001547 --with-libm=STRING math library
1548 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001549 --with(out)-computed-gotos
1550 Use computed gotos in evaluation loop (enabled by
1551 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001552 --with(out)-ensurepip=[=upgrade]
1553 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001554 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001555 --with-ssl-default-suites=[python|openssl|STRING]
1556 Override default cipher suites string, python: use
1557 Python's preferred selection (default), openssl:
1558 leave OpenSSL's defaults untouched, STRING: use a
1559 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001562 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001571 PKG_CONFIG path to pkg-config utility
1572 PKG_CONFIG_PATH
1573 directories to add to pkg-config's search path
1574 PKG_CONFIG_LIBDIR
1575 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001576
1577Use these variables to override the choices made by `configure' or to help
1578it to find libraries and programs with nonstandard names/locations.
1579
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001580Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001583fi
1584
1585if test "$ac_init_help" = "recursive"; then
1586 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 test -d "$ac_dir" ||
1589 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1590 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_builddir=.
1592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593case "$ac_dir" in
1594.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1595*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 case $ac_top_builddir_sub in
1600 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1601 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1602 esac ;;
1603esac
1604ac_abs_top_builddir=$ac_pwd
1605ac_abs_builddir=$ac_pwd$ac_dir_suffix
1606# for backward compatibility:
1607ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001608
1609case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 ac_top_srcdir=$ac_top_builddir_sub
1613 ac_abs_top_srcdir=$ac_pwd ;;
1614 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 ac_top_srcdir=$srcdir
1617 ac_abs_top_srcdir=$srcdir ;;
1618 *) # Relative name.
1619 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1620 ac_top_srcdir=$ac_top_build_prefix$srcdir
1621 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001622esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 cd "$ac_dir" || { ac_status=$?; continue; }
1626 # Check for guested configure.
1627 if test -f "$ac_srcdir/configure.gnu"; then
1628 echo &&
1629 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1630 elif test -f "$ac_srcdir/configure"; then
1631 echo &&
1632 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001633 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635 fi || ac_status=$?
1636 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 done
1638fi
1639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001641if $ac_init_version; then
1642 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001643python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001644generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001645
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001646Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647This configure script is free software; the Free Software Foundation
1648gives unlimited permission to copy, distribute and modify it.
1649_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001652
1653## ------------------------ ##
1654## Autoconf initialization. ##
1655## ------------------------ ##
1656
1657# ac_fn_c_try_compile LINENO
1658# --------------------------
1659# Try to compile conftest.$ac_ext, and return whether this succeeded.
1660ac_fn_c_try_compile ()
1661{
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1663 rm -f conftest.$ac_objext
1664 if { { ac_try="$ac_compile"
1665case "(($ac_try" in
1666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1667 *) ac_try_echo=$ac_try;;
1668esac
1669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1670$as_echo "$ac_try_echo"; } >&5
1671 (eval "$ac_compile") 2>conftest.err
1672 ac_status=$?
1673 if test -s conftest.err; then
1674 grep -v '^ *+' conftest.err >conftest.er1
1675 cat conftest.er1 >&5
1676 mv -f conftest.er1 conftest.err
1677 fi
1678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1679 test $ac_status = 0; } && {
1680 test -z "$ac_c_werror_flag" ||
1681 test ! -s conftest.err
1682 } && test -s conftest.$ac_objext; then :
1683 ac_retval=0
1684else
1685 $as_echo "$as_me: failed program was:" >&5
1686sed 's/^/| /' conftest.$ac_ext >&5
1687
1688 ac_retval=1
1689fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001690 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001691 as_fn_set_status $ac_retval
1692
1693} # ac_fn_c_try_compile
1694
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001695# ac_fn_c_try_cpp LINENO
1696# ----------------------
1697# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1698ac_fn_c_try_cpp ()
1699{
1700 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1701 if { { ac_try="$ac_cpp conftest.$ac_ext"
1702case "(($ac_try" in
1703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704 *) ac_try_echo=$ac_try;;
1705esac
1706eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707$as_echo "$ac_try_echo"; } >&5
1708 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1709 ac_status=$?
1710 if test -s conftest.err; then
1711 grep -v '^ *+' conftest.err >conftest.er1
1712 cat conftest.er1 >&5
1713 mv -f conftest.er1 conftest.err
1714 fi
1715 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1716 test $ac_status = 0; } > conftest.i && {
1717 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1718 test ! -s conftest.err
1719 }; then :
1720 ac_retval=0
1721else
1722 $as_echo "$as_me: failed program was:" >&5
1723sed 's/^/| /' conftest.$ac_ext >&5
1724
1725 ac_retval=1
1726fi
1727 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1728 as_fn_set_status $ac_retval
1729
1730} # ac_fn_c_try_cpp
1731
Matthias Kloseb9621712010-04-24 17:59:49 +00001732# ac_fn_c_try_link LINENO
1733# -----------------------
1734# Try to link conftest.$ac_ext, and return whether this succeeded.
1735ac_fn_c_try_link ()
1736{
1737 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1738 rm -f conftest.$ac_objext conftest$ac_exeext
1739 if { { ac_try="$ac_link"
1740case "(($ac_try" in
1741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1742 *) ac_try_echo=$ac_try;;
1743esac
1744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1745$as_echo "$ac_try_echo"; } >&5
1746 (eval "$ac_link") 2>conftest.err
1747 ac_status=$?
1748 if test -s conftest.err; then
1749 grep -v '^ *+' conftest.err >conftest.er1
1750 cat conftest.er1 >&5
1751 mv -f conftest.er1 conftest.err
1752 fi
1753 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1754 test $ac_status = 0; } && {
1755 test -z "$ac_c_werror_flag" ||
1756 test ! -s conftest.err
1757 } && test -s conftest$ac_exeext && {
1758 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001759 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 }; then :
1761 ac_retval=0
1762else
1763 $as_echo "$as_me: failed program was:" >&5
1764sed 's/^/| /' conftest.$ac_ext >&5
1765
1766 ac_retval=1
1767fi
1768 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1769 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1770 # interfere with the next link command; also delete a directory that is
1771 # left behind by Apple's compiler. We do this before executing the actions.
1772 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001773 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 as_fn_set_status $ac_retval
1775
1776} # ac_fn_c_try_link
1777
Matthias Kloseb9621712010-04-24 17:59:49 +00001778# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1779# -------------------------------------------------------
1780# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1781# the include files in INCLUDES and setting the cache variable VAR
1782# accordingly.
1783ac_fn_c_check_header_mongrel ()
1784{
1785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001786 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001789if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 $as_echo_n "(cached) " >&6
1791fi
1792eval ac_res=\$$3
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1794$as_echo "$ac_res" >&6; }
1795else
1796 # Is the header compilable?
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1798$as_echo_n "checking $2 usability... " >&6; }
1799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1800/* end confdefs.h. */
1801$4
1802#include <$2>
1803_ACEOF
1804if ac_fn_c_try_compile "$LINENO"; then :
1805 ac_header_compiler=yes
1806else
1807 ac_header_compiler=no
1808fi
1809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1811$as_echo "$ac_header_compiler" >&6; }
1812
1813# Is the header present?
1814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1815$as_echo_n "checking $2 presence... " >&6; }
1816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818#include <$2>
1819_ACEOF
1820if ac_fn_c_try_cpp "$LINENO"; then :
1821 ac_header_preproc=yes
1822else
1823 ac_header_preproc=no
1824fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001825rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1827$as_echo "$ac_header_preproc" >&6; }
1828
1829# So? What about this header?
1830case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1831 yes:no: )
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1833$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1835$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1836 ;;
1837 no:yes:* )
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1839$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1841$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1843$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1845$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1847$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001848( $as_echo "## --------------------------------------- ##
1849## Report this to https://bugs.python.org/ ##
1850## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 ) | sed "s/^/$as_me: WARNING: /" >&2
1852 ;;
1853esac
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001856if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001857 $as_echo_n "(cached) " >&6
1858else
1859 eval "$3=\$ac_header_compiler"
1860fi
1861eval ac_res=\$$3
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1863$as_echo "$ac_res" >&6; }
1864fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001865 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001866
1867} # ac_fn_c_check_header_mongrel
1868
1869# ac_fn_c_try_run LINENO
1870# ----------------------
1871# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1872# that executables *can* be run.
1873ac_fn_c_try_run ()
1874{
1875 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1876 if { { ac_try="$ac_link"
1877case "(($ac_try" in
1878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879 *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883 (eval "$ac_link") 2>&5
1884 ac_status=$?
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1887 { { case "(($ac_try" in
1888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1889 *) ac_try_echo=$ac_try;;
1890esac
1891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1892$as_echo "$ac_try_echo"; } >&5
1893 (eval "$ac_try") 2>&5
1894 ac_status=$?
1895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896 test $ac_status = 0; }; }; then :
1897 ac_retval=0
1898else
1899 $as_echo "$as_me: program exited with status $ac_status" >&5
1900 $as_echo "$as_me: failed program was:" >&5
1901sed 's/^/| /' conftest.$ac_ext >&5
1902
1903 ac_retval=$ac_status
1904fi
1905 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001906 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 as_fn_set_status $ac_retval
1908
1909} # ac_fn_c_try_run
1910
1911# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1912# -------------------------------------------------------
1913# Tests whether HEADER exists and can be compiled using the include files in
1914# INCLUDES, setting the cache variable VAR accordingly.
1915ac_fn_c_check_header_compile ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001920if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$4
1926#include <$2>
1927_ACEOF
1928if ac_fn_c_try_compile "$LINENO"; then :
1929 eval "$3=yes"
1930else
1931 eval "$3=no"
1932fi
1933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1934fi
1935eval ac_res=\$$3
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1937$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001939
1940} # ac_fn_c_check_header_compile
1941
Matthias Kloseb9621712010-04-24 17:59:49 +00001942# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1943# -------------------------------------------
1944# Tests whether TYPE exists after having included INCLUDES, setting cache
1945# variable VAR accordingly.
1946ac_fn_c_check_type ()
1947{
1948 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1950$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001951if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001952 $as_echo_n "(cached) " >&6
1953else
1954 eval "$3=no"
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958int
1959main ()
1960{
1961if (sizeof ($2))
1962 return 0;
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$4
1971int
1972main ()
1973{
1974if (sizeof (($2)))
1975 return 0;
1976 ;
1977 return 0;
1978}
1979_ACEOF
1980if ac_fn_c_try_compile "$LINENO"; then :
1981
1982else
1983 eval "$3=yes"
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989eval ac_res=\$$3
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1991$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001992 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994} # ac_fn_c_check_type
1995
Matthias Kloseb9621712010-04-24 17:59:49 +00001996# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1997# --------------------------------------------
1998# Tries to find the compile-time value of EXPR in a program that includes
1999# INCLUDES, setting VAR accordingly. Returns whether the value could be
2000# computed
2001ac_fn_c_compute_int ()
2002{
2003 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2004 if test "$cross_compiling" = yes; then
2005 # Depending upon the size, compute the lo and hi bounds.
2006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$4
2009int
2010main ()
2011{
2012static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002013test_array [0] = 0;
2014return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 ac_lo=0 ac_mid=0
2022 while :; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026int
2027main ()
2028{
2029static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002030test_array [0] = 0;
2031return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 ac_hi=$ac_mid; break
2039else
2040 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2041 if test $ac_lo -le $ac_mid; then
2042 ac_lo= ac_hi=
2043 break
2044 fi
2045 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 done
2049else
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002057test_array [0] = 0;
2058return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065 ac_hi=-1 ac_mid=-1
2066 while :; do
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002074test_array [0] = 0;
2075return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081if ac_fn_c_try_compile "$LINENO"; then :
2082 ac_lo=$ac_mid; break
2083else
2084 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2085 if test $ac_mid -le $ac_hi; then
2086 ac_lo= ac_hi=
2087 break
2088 fi
2089 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092 done
2093else
2094 ac_lo= ac_hi=
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099# Binary search between lo and hi bounds.
2100while test "x$ac_lo" != "x$ac_hi"; do
2101 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002109test_array [0] = 0;
2110return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
2138
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
2172
2173 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 as_fn_set_status $ac_retval
2176
2177} # ac_fn_c_compute_int
2178
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002187if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002188 $as_echo_n "(cached) " >&6
2189else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002243
2244} # ac_fn_c_check_func
2245
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002246# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2247# ---------------------------------------------
2248# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2249# accordingly.
2250ac_fn_c_check_decl ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 as_decl_name=`echo $2|sed 's/ *(.*//'`
2254 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2256$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2257if eval \${$3+:} false; then :
2258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$4
2263int
2264main ()
2265{
2266#ifndef $as_decl_name
2267#ifdef __cplusplus
2268 (void) $as_decl_use;
2269#else
2270 (void) $as_decl_name;
2271#endif
2272#endif
2273
2274 ;
2275 return 0;
2276}
2277_ACEOF
2278if ac_fn_c_try_compile "$LINENO"; then :
2279 eval "$3=yes"
2280else
2281 eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_c_check_decl
2291
Matthias Kloseb9621712010-04-24 17:59:49 +00002292# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2293# ----------------------------------------------------
2294# Tries to find if the field MEMBER exists in type AGGR, after including
2295# INCLUDES, setting cache variable VAR accordingly.
2296ac_fn_c_check_member ()
2297{
2298 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2300$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002301if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002302 $as_echo_n "(cached) " >&6
2303else
2304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h. */
2306$5
2307int
2308main ()
2309{
2310static $2 ac_aggr;
2311if (ac_aggr.$3)
2312return 0;
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$4=yes"
2319else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$5
2323int
2324main ()
2325{
2326static $2 ac_aggr;
2327if (sizeof ac_aggr.$3)
2328return 0;
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$4=yes"
2335else
2336 eval "$4=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$4
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002346
2347} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002349This file contains any messages produced by compilers while
2350running configure, to aid debugging if configure makes a mistake.
2351
Ned Deily5489bda2018-01-31 17:44:09 -05002352It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002353generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
2355 $ $0 $@
2356
2357_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002359{
2360cat <<_ASUNAME
2361## --------- ##
2362## Platform. ##
2363## --------- ##
2364
2365hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2366uname -m = `(uname -m) 2>/dev/null || echo unknown`
2367uname -r = `(uname -r) 2>/dev/null || echo unknown`
2368uname -s = `(uname -s) 2>/dev/null || echo unknown`
2369uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370
2371/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2372/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373
2374/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2375/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2376/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002378/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2379/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2380/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2381
2382_ASUNAME
2383
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo "PATH: $as_dir"
2390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
2393} >&5
2394
2395cat >&5 <<_ACEOF
2396
2397
2398## ----------- ##
2399## Core tests. ##
2400## ----------- ##
2401
2402_ACEOF
2403
2404
2405# Keep a trace of the command line.
2406# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_configure_args0=
2412ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_must_keep_next=false
2414for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002415do
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 for ac_arg
2417 do
2418 case $ac_arg in
2419 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2420 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2421 | -silent | --silent | --silen | --sile | --sil)
2422 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 esac
2426 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 case $ac_arg in
2434 *=* | --config-cache | -C | -disable-* | --disable-* \
2435 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2436 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2437 | -with-* | --with-* | -without-* | --without-* | --x)
2438 case "$ac_configure_args0 " in
2439 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2440 esac
2441 ;;
2442 -* ) ac_must_keep_next=true ;;
2443 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002445 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ;;
2447 esac
2448 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002449done
Matthias Kloseb9621712010-04-24 17:59:49 +00002450{ ac_configure_args0=; unset ac_configure_args0;}
2451{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453# When interrupted or exit'd, cleanup temporary files, and complete
2454# config.log. We remove comments because anyway the quotes in there
2455# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456# WARNING: Use '\'' to represent an apostrophe within the trap.
2457# 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 +00002458trap 'exit_status=$?
2459 # Save into config.log some information that might help in debugging.
2460 {
2461 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002462
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002463 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002464## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
2467 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468(
2469 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2470 eval ac_val=\$$ac_var
2471 case $ac_val in #(
2472 *${as_nl}*)
2473 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac
2477 case $ac_var in #(
2478 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2480 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2486 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 "s/'\''/'\''\\\\'\'''\''/g;
2489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2490 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac |
2495 sort
2496)
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 echo
2503 for ac_var in $ac_subst_vars
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512
2513 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_files
2519 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527 fi
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002530 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002531## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 fi
2537 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 $as_echo "$as_me: caught signal $ac_signal"
2539 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 rm -f core *.core core.conftest.* &&
2542 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002545for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
2548ac_signal=0
2549
2550# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
Matthias Kloseb9621712010-04-24 17:59:49 +00002553$as_echo "/* confdefs.h */" > confdefs.h
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555# Predefined preprocessor variables.
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_NAME "$PACKAGE_NAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_VERSION "$PACKAGE_VERSION"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_STRING "$PACKAGE_STRING"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2575_ACEOF
2576
Matthias Kloseb9621712010-04-24 17:59:49 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_URL "$PACKAGE_URL"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002583# Prefer an explicitly selected file to automatically selected ones.
2584ac_site_file1=NONE
2585ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 # We do not want a PATH search for config.site.
2588 case $CONFIG_SITE in #((
2589 -*) ac_site_file1=./$CONFIG_SITE;;
2590 */*) ac_site_file1=$CONFIG_SITE;;
2591 *) ac_site_file1=./$CONFIG_SITE;;
2592 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 ac_site_file1=$prefix/share/config.site
2595 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596else
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 ac_site_file1=$ac_default_prefix/share/config.site
2598 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002600for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601do
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 test "x$ac_site_file" = xNONE && continue
2603 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2605$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607 . "$ac_site_file" \
2608 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2610as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002611See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 fi
2613done
2614
2615if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 # Some versions of bash will fail to source /dev/null (special files
2617 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2618 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2620$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2623 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 esac
2625 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626else
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2628$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 >$cache_file
2630fi
2631
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $ac_old_set,$ac_new_set in
2641 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$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 +00002644 ac_cache_corrupted=: ;;
2645 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699
Michael W. Hudson54241132001-12-07 15:38:26 +00002700
Trent Nelson4d4ec652012-10-16 08:51:24 -04002701
Christian Heimesff5be6e2018-01-20 13:19:21 +01002702
2703
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002704if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002705 # If we're building out-of-tree, we need to make sure the following
2706 # resources get picked up before their $srcdir counterparts.
2707 # Objects/ -> typeslots.inc
2708 # Include/ -> Python-ast.h, graminit.h
2709 # Python/ -> importlib.h
2710 # (A side effect of this is that these resources will automatically be
2711 # regenerated when building out-of-tree, regardless of whether or not
2712 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2713 # off.)
2714 BASECPPFLAGS="-IObjects -IInclude -IPython"
2715else
2716 BASECPPFLAGS=""
2717fi
2718
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719
2720
2721
2722
Victor Stinner9ed34a82017-05-02 22:35:58 +02002723if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002725# Extract the first word of "git", so it can be a program name with args.
2726set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2728$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730 $as_echo_n "(cached) " >&6
2731else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732 if test -n "$HAS_GIT"; then
2733 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002734else
2735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2736for as_dir in $PATH
2737do
2738 IFS=$as_save_IFS
2739 test -z "$as_dir" && as_dir=.
2740 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2744 break 2
2745 fi
2746done
2747 done
2748IFS=$as_save_IFS
2749
Ned Deily5c4b0d02017-03-04 00:19:55 -05002750 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751fi
2752fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753HAS_GIT=$ac_cv_prog_HAS_GIT
2754if test -n "$HAS_GIT"; then
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2756$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757else
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2759$as_echo "no" >&6; }
2760fi
2761
2762
2763else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767then
Ned Deily554626a2017-03-20 23:41:52 -04002768 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2769 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002772 GITVERSION=""
2773 GITTAG=""
2774 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002775fi
2776
2777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002779
2780
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002781ac_aux_dir=
2782for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2783 if test -f "$ac_dir/install-sh"; then
2784 ac_aux_dir=$ac_dir
2785 ac_install_sh="$ac_aux_dir/install-sh -c"
2786 break
2787 elif test -f "$ac_dir/install.sh"; then
2788 ac_aux_dir=$ac_dir
2789 ac_install_sh="$ac_aux_dir/install.sh -c"
2790 break
2791 elif test -f "$ac_dir/shtool"; then
2792 ac_aux_dir=$ac_dir
2793 ac_install_sh="$ac_aux_dir/shtool install -c"
2794 break
2795 fi
2796done
2797if test -z "$ac_aux_dir"; then
2798 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2799fi
2800
2801# These three variables are undocumented and unsupported,
2802# and are intended to be withdrawn in a future Autoconf release.
2803# They can cause serious problems if a builder's source tree is in a directory
2804# whose full name contains unusual characters.
2805ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2806ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2807ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2808
2809
2810# Make sure we can run config.sub.
2811$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2812 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2813
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2815$as_echo_n "checking build system type... " >&6; }
2816if ${ac_cv_build+:} false; then :
2817 $as_echo_n "(cached) " >&6
2818else
2819 ac_build_alias=$build_alias
2820test "x$ac_build_alias" = x &&
2821 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2822test "x$ac_build_alias" = x &&
2823 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2824ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2825 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2826
2827fi
2828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2829$as_echo "$ac_cv_build" >&6; }
2830case $ac_cv_build in
2831*-*-*) ;;
2832*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2833esac
2834build=$ac_cv_build
2835ac_save_IFS=$IFS; IFS='-'
2836set x $ac_cv_build
2837shift
2838build_cpu=$1
2839build_vendor=$2
2840shift; shift
2841# Remember, the first character of IFS is used to create $*,
2842# except with old shells:
2843build_os=$*
2844IFS=$ac_save_IFS
2845case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2846
2847
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2849$as_echo_n "checking host system type... " >&6; }
2850if ${ac_cv_host+:} false; then :
2851 $as_echo_n "(cached) " >&6
2852else
2853 if test "x$host_alias" = x; then
2854 ac_cv_host=$ac_cv_build
2855else
2856 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2857 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2858fi
2859
2860fi
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2862$as_echo "$ac_cv_host" >&6; }
2863case $ac_cv_host in
2864*-*-*) ;;
2865*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2866esac
2867host=$ac_cv_host
2868ac_save_IFS=$IFS; IFS='-'
2869set x $ac_cv_host
2870shift
2871host_cpu=$1
2872host_vendor=$2
2873shift; shift
2874# Remember, the first character of IFS is used to create $*,
2875# except with old shells:
2876host_os=$*
2877IFS=$ac_save_IFS
2878case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2879
2880
2881
doko@python.orga10e4a92013-01-25 18:45:12 +01002882
2883
Ned Deilyfcbc2462014-08-22 13:32:49 -07002884# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2885rm -f pybuilddir.txt
2886
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002887for ac_prog in python$PACKAGE_VERSION python3 python
2888do
2889 # Extract the first word of "$ac_prog", so it can be a program name with args.
2890set dummy $ac_prog; ac_word=$2
2891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2892$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002893if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894 $as_echo_n "(cached) " >&6
2895else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002896 if test -n "$PYTHON_FOR_REGEN"; then
2897 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002898else
2899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2900for as_dir in $PATH
2901do
2902 IFS=$as_save_IFS
2903 test -z "$as_dir" && as_dir=.
2904 for ac_exec_ext in '' $ac_executable_extensions; do
2905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002906 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2908 break 2
2909 fi
2910done
2911 done
2912IFS=$as_save_IFS
2913
2914fi
2915fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2917if test -n "$PYTHON_FOR_REGEN"; then
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2919$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920else
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2922$as_echo "no" >&6; }
2923fi
2924
2925
Victor Stinnera5c62a82017-05-03 18:21:48 +02002926 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002927done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002928test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002930
2931
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002932if test "$cross_compiling" = yes; then
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2934$as_echo_n "checking for python interpreter for cross build... " >&6; }
2935 if test -z "$PYTHON_FOR_BUILD"; then
2936 for interp in python$PACKAGE_VERSION python3 python; do
2937 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002938 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 +02002939 break
2940 fi
2941 interp=
2942 done
2943 if test x$interp = x; then
2944 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2945 fi
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2947$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002948 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 +02002949 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002950elif test "$cross_compiling" = maybe; then
2951 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952else
2953 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2954fi
2955
2956
Martin v. Löwis11437992002-04-12 09:54:03 +00002957
Benjamin Petersond23f8222009-04-05 19:13:16 +00002958if test "$prefix" != "/"; then
2959 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2960fi
2961
2962
Martin v. Löwis11437992002-04-12 09:54:03 +00002963
2964
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002965# We don't use PACKAGE_ variables, and they cause conflicts
2966# with other autoconf-based packages that include Python.h
2967grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2968rm confdefs.h
2969mv confdefs.h.new confdefs.h
2970
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002971
Ned Deily5489bda2018-01-31 17:44:09 -05002972VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002973
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002974# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002975
2976SOVERSION=1.0
2977
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002978# The later defininition of _XOPEN_SOURCE disables certain features
2979# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002982
2983
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2985# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002989
2990
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2993# them.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002996
2997
Martin v. Löwisd6320502004-08-12 13:45:08 +00002998# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002999# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3000# them.
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003
3004
3005
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003006define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003007
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003008# Arguments passed to configure.
3009
3010CONFIG_ARGS="$ac_configure_args"
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3013$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003014# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003015if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 case $enableval in
3018 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003019 # Locate the best usable SDK, see Mac/README.txt for more
3020 # information
3021 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003022 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3025 if test ! -d "${enableval}"
3026 then
3027 enableval=/
3028 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030 ;;
3031 esac
3032 case $enableval in
3033 no)
3034 UNIVERSALSDK=
3035 enable_universalsdk=
3036 ;;
3037 *)
3038 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039 if test ! -d "${UNIVERSALSDK}"
3040 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003041 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043 ;;
3044 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003045
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047else
3048
3049 UNIVERSALSDK=
3050 enable_universalsdk=
3051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003052fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054if test -n "${UNIVERSALSDK}"
3055then
Matthias Kloseb9621712010-04-24 17:59:49 +00003056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3057$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058else
Matthias Kloseb9621712010-04-24 17:59:49 +00003059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3060$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003063
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003064
Ned Deily87adb6e2013-10-18 21:09:56 -07003065ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003066
Ned Deilycbfb9a52012-06-23 16:02:19 -07003067# For backward compatibility reasons we prefer to select '32-bit' if available,
3068# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003069UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070if test "`uname -s`" = "Darwin"
3071then
3072 if test -n "${UNIVERSALSDK}"
3073 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003074 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003075 then
3076 UNIVERSAL_ARCHS="intel"
3077 fi
3078 fi
3079fi
3080
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003081
Matthias Kloseb9621712010-04-24 17:59:49 +00003082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3083$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084
3085# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003086if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088 UNIVERSAL_ARCHS="$withval"
3089
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090fi
3091
Ned Deily87adb6e2013-10-18 21:09:56 -07003092if test -n "${UNIVERSALSDK}"
3093then
3094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3095$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3096else
3097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3098$as_echo "no" >&6; }
3099fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003100
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003101
3102# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003103if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003104 withval=$with_framework_name;
3105 PYTHONFRAMEWORK=${withval}
3106 PYTHONFRAMEWORKDIR=${withval}.framework
3107 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3108
3109else
3110
3111 PYTHONFRAMEWORK=Python
3112 PYTHONFRAMEWORKDIR=Python.framework
3113 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3114
3115fi
3116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003118if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003120 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003122 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003123 esac
3124 case $enableval in
3125 no)
3126 PYTHONFRAMEWORK=
3127 PYTHONFRAMEWORKDIR=no-framework
3128 PYTHONFRAMEWORKPREFIX=
3129 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003130 FRAMEWORKINSTALLFIRST=
3131 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003132 FRAMEWORKALTINSTALLFIRST=
3133 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003134 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003135 if test "x${prefix}" = "xNONE"; then
3136 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3137 else
3138 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3139 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003140 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003141 ;;
3142 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003144 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003145 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003146 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003147 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3148 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003149 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003151
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003152 if test "x${prefix}" = "xNONE" ; then
3153 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003155 else
3156 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3157 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158
3159 case "${enableval}" in
3160 /System*)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 if test "${prefix}" = "NONE" ; then
3163 # See below
3164 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3165 fi
3166 ;;
3167
3168 /Library*)
3169 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3170 ;;
3171
3172 */Library/Frameworks)
3173 MDIR="`dirname "${enableval}"`"
3174 MDIR="`dirname "${MDIR}"`"
3175 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3176
3177 if test "${prefix}" = "NONE"; then
3178 # User hasn't specified the
3179 # --prefix option, but wants to install
3180 # the framework in a non-default location,
3181 # ensure that the compatibility links get
3182 # installed relative to that prefix as well
3183 # instead of in /usr/local.
3184 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3185 fi
3186 ;;
3187
3188 *)
3189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3190 ;;
3191 esac
3192
Jack Jansen127e56e2001-09-11 14:41:54 +00003193 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003195 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003201 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3202
3203 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3204
Jack Jansene578a632001-08-15 01:27:14 +00003205 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Guido van Rossum563e7081996-09-10 18:20:48 +00003207else
Martin v. Löwis11437992002-04-12 09:54:03 +00003208
Jack Jansene578a632001-08-15 01:27:14 +00003209 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003210 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003211 PYTHONFRAMEWORKPREFIX=
3212 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003213 FRAMEWORKINSTALLFIRST=
3214 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 FRAMEWORKALTINSTALLFIRST=
3216 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003217 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003218 if test "x${prefix}" = "xNONE" ; then
3219 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3220 else
3221 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3222 fi
Jack Jansene578a632001-08-15 01:27:14 +00003223 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003224
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226fi
3227
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
3229
Michael W. Hudson54241132001-12-07 15:38:26 +00003230
3231
3232
3233
Jack Jansene578a632001-08-15 01:27:14 +00003234
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003235
3236
3237
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003238
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003239
Ned Deilyb8f944f2013-11-21 22:42:25 -08003240
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003241
3242cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003243#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003244_ACEOF
3245
3246
Jack Jansene578a632001-08-15 01:27:14 +00003247##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003248## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003249## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003250##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003251# Set name for machine-dependent library files
3252
Matthias Kloseb9621712010-04-24 17:59:49 +00003253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3254$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003255if test -z "$MACHDEP"
3256then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 # avoid using uname for cross builds
3258 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003259 # ac_sys_system and ac_sys_release are used for setting
3260 # a lot of different things including 'define_xopen_source'
3261 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003263 *-*-linux-android*)
3264 ac_sys_system=Linux-android
3265 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003266 *-*-linux*)
3267 ac_sys_system=Linux
3268 ;;
3269 *-*-cygwin*)
3270 ac_sys_system=Cygwin
3271 ;;
3272 *)
3273 # for now, limit cross builds to known configurations
3274 MACHDEP="unknown"
3275 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3276 esac
3277 ac_sys_release=
3278 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003279 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003280 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003281 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 fi
3287 ac_md_system=`echo $ac_sys_system |
3288 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3289 ac_md_release=`echo $ac_sys_release |
3290 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3291 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003292
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003293 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003294 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003295 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003296 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003297 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299fi
Guido van Rossum91922671997-10-09 20:24:13 +00003300
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003301
3302if test "$cross_compiling" = yes; then
3303 case "$host" in
3304 *-*-linux*)
3305 case "$host_cpu" in
3306 arm*)
3307 _host_cpu=arm
3308 ;;
3309 *)
3310 _host_cpu=$host_cpu
3311 esac
3312 ;;
3313 *-*-cygwin*)
3314 _host_cpu=
3315 ;;
3316 *)
3317 # for now, limit cross builds to known configurations
3318 MACHDEP="unknown"
3319 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3320 esac
3321 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3322fi
3323
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003324# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3325# disable features if it is defined, without any means to access these
3326# features as extensions. For these systems, we skip the definition of
3327# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3328# some feature, make sure there is no alternative way to access this
3329# feature. Also, when using wildcards, make sure you have verified the
3330# need for not defining _XOPEN_SOURCE on all systems matching the
3331# wildcard, and that the wildcard does not include future systems
3332# (which may remove their limitations).
3333case $ac_sys_system/$ac_sys_release in
3334 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3335 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003336 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003337 # In addition, Stefan Krah confirms that issue #1244610 exists through
3338 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003340 define_xopen_source=no
3341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346
3347 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003348 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003349 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3350 # also defined. This can be overridden by defining _BSD_SOURCE
3351 # As this has a different meaning on Linux, only define it on OpenBSD
3352
Matthias Kloseb9621712010-04-24 17:59:49 +00003353$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003354
3355 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003356 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3357 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3358 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003359 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 +00003360 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003361 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3362 # request to enable features supported by the standard as a request
3363 # to disable features not supported by the standard. The best way
3364 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3365 # entirely and define __EXTENSIONS__ instead.
3366 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003367 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3369 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003370 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003371 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 define_xopen_source=no;;
3373 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003375 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003376 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003377 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3378 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3379 # identifies itself as Darwin/7.*
3380 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3381 # disables platform specific features beyond repair.
3382 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3383 # has no effect, don't bother defining them
3384 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003385 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003386 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3389 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3390 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003391 AIX/4)
3392 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003393 AIX/5)
3394 if test `uname -r` -eq 1; then
3395 define_xopen_source=no
3396 fi
3397 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003398 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3399 # defining NI_NUMERICHOST.
3400 QNX/6.3.2)
3401 define_xopen_source=no
3402 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003403
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003404esac
3405
3406if test $define_xopen_source = yes
3407then
Victor Stinner14d098d2011-09-07 22:29:43 +02003408 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Victor Stinner14d098d2011-09-07 22:29:43 +02003410$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003411
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
3413 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3414 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3415 # several APIs are not declared. Since this is also needed in some
3416 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
Matthias Kloseb9621712010-04-24 17:59:49 +00003418$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
3420
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003421
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003422$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003424fi
3425
Christian Heimes647cd872013-12-07 23:39:33 +01003426# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3427case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003428 hp*|HP*)
3429 define_stdc_a1=yes;;
3430 *)
3431 define_stdc_a1=no;;
3432esac
3433
3434if test $define_stdc_a1 = yes
3435then
Christian Heimes647cd872013-12-07 23:39:33 +01003436
3437$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3438
Christian Heimesb02bcae2013-12-08 15:21:08 +01003439fi
Christian Heimes647cd872013-12-07 23:39:33 +01003440
Jack Jansen6b08a402004-06-03 12:41:45 +00003441# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3442# it may influence the way we can build extensions, so distutils
3443# needs to check it
3444
Thomas Wouters477c8d52006-05-27 19:21:47 +00003445
Jack Jansen6b08a402004-06-03 12:41:45 +00003446CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003447EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003448
Guido van Rossum627b2d71993-12-24 10:39:16 +00003449# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003450
3451# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3452# for debug/optimization stuff. BASECFLAGS is for flags that are required
3453# just to get things to compile and link. Users are free to override OPT
3454# when running configure or make. The build should not break if they do.
3455# BASECFLAGS should generally not be messed with, however.
3456
3457# XXX shouldn't some/most/all of this code be merged with the stuff later
3458# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3460$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003463if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003465 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003466 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003467 without_gcc=yes;;
3468 yes) CC=gcc
3469 without_gcc=no;;
3470 *) CC=$withval
3471 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003472 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003473else
Martin v. Löwis11437992002-04-12 09:54:03 +00003474
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003475 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003476 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003477 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003478 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003479 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003480fi
3481
Matthias Kloseb9621712010-04-24 17:59:49 +00003482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3483$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003484
Zachary Ware5af85642015-12-21 12:09:17 -06003485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3486$as_echo_n "checking for --with-icc... " >&6; }
3487
3488# Check whether --with-icc was given.
3489if test "${with_icc+set}" = set; then :
3490 withval=$with_icc;
3491 case $withval in
3492 no) CC=${CC:-cc}
3493 with_icc=no;;
3494 yes) CC=icc
3495 CXX=icpc
3496 with_icc=yes;;
3497 *) CC=$withval
3498 with_icc=$withval;;
3499 esac
3500else
3501
3502 with_icc=no
3503fi
3504
3505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3506$as_echo "$with_icc" >&6; }
3507
Guido van Rossum8b131c51995-03-09 14:10:13 +00003508# If the user switches compilers, we can't believe the cache
3509if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3510then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003511 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003512(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003513fi
3514
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003515# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3516# when the compiler supports them, but we don't always want -O2, and
3517# we set -g later.
3518if test -z "$CFLAGS"; then
3519 CFLAGS=
3520fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003521
3522if test "$ac_sys_system" = "Darwin"
3523then
3524 # Compiler selection on MacOSX is more complicated than
3525 # AC_PROG_CC can handle, see Mac/README.txt for more
3526 # information
3527 if test -z "${CC}"
3528 then
3529 found_gcc=
3530 found_clang=
3531 as_save_IFS=$IFS; IFS=:
3532 for as_dir in $PATH
3533 do
3534 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003535 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003536 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003537 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003538 fi
3539 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003540 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003541 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003542 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543 fi
3544 fi
3545 done
3546 IFS=$as_save_IFS
3547
3548 if test -n "$found_gcc" -a -n "$found_clang"
3549 then
3550 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3551 then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3553$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3554 CC="$found_clang"
3555 CXX="$found_clang++"
3556 fi
3557
3558
3559 elif test -z "$found_gcc" -a -n "$found_clang"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3562$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3563 CC="$found_clang"
3564 CXX="$found_clang++"
3565
3566 elif test -z "$found_gcc" -a -z "$found_clang"
3567 then
3568 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3569 if test -n "${found_clang}"
3570 then
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3572$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3573 CC="${found_clang}"
3574 CXX="`/usr/bin/xcrun -find clang++`"
3575
3576 # else: use default behaviour
3577 fi
3578 fi
3579 fi
3580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003581ac_ext=c
3582ac_cpp='$CPP $CPPFLAGS'
3583ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3584ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3585ac_compiler_gnu=$ac_cv_c_compiler_gnu
3586if test -n "$ac_tool_prefix"; then
3587 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3588set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3590$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003591if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003593else
3594 if test -n "$CC"; then
3595 ac_cv_prog_CC="$CC" # Let the user override the test.
3596else
Martin v. Löwis11437992002-04-12 09:54:03 +00003597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3598for as_dir in $PATH
3599do
3600 IFS=$as_save_IFS
3601 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 $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 +00003606 break 2
3607 fi
3608done
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003611
Jack Jansendd19cf82001-12-06 22:36:17 +00003612fi
3613fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003614CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003615if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3617$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003618else
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3620$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003621fi
3622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624fi
3625if test -z "$ac_cv_prog_CC"; then
3626 ac_ct_CC=$CC
3627 # Extract the first word of "gcc", so it can be a program name with args.
3628set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003631if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003633else
3634 if test -n "$ac_ct_CC"; then
3635 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3636else
3637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 $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 +00003646 break 2
3647 fi
3648done
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003651
3652fi
3653fi
3654ac_ct_CC=$ac_cv_prog_ac_ct_CC
3655if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3657$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658else
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661fi
3662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663 if test "x$ac_ct_CC" = x; then
3664 CC=""
3665 else
3666 case $cross_compiling:$ac_tool_warned in
3667yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003668{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3669$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003670ac_tool_warned=yes ;;
3671esac
3672 CC=$ac_ct_CC
3673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003674else
3675 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003676fi
3677
Jack Jansendd19cf82001-12-06 22:36:17 +00003678if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679 if test -n "$ac_tool_prefix"; then
3680 # 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 +00003681set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3683$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003684if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003686else
3687 if test -n "$CC"; then
3688 ac_cv_prog_CC="$CC" # Let the user override the test.
3689else
Martin v. Löwis11437992002-04-12 09:54:03 +00003690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3691for as_dir in $PATH
3692do
3693 IFS=$as_save_IFS
3694 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 $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 +00003699 break 2
3700 fi
3701done
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003704
3705fi
3706fi
3707CC=$ac_cv_prog_CC
3708if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3710$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003711else
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3713$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003714fi
3715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003718fi
3719if test -z "$CC"; then
3720 # Extract the first word of "cc", so it can be a program name with args.
3721set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3723$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003724if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003726else
3727 if test -n "$CC"; then
3728 ac_cv_prog_CC="$CC" # Let the user override the test.
3729else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3732for as_dir in $PATH
3733do
3734 IFS=$as_save_IFS
3735 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003738 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3739 ac_prog_rejected=yes
3740 continue
3741 fi
3742 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 $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 +00003744 break 2
3745 fi
3746done
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003749
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750if test $ac_prog_rejected = yes; then
3751 # We found a bogon in the path, so make sure we never use it.
3752 set dummy $ac_cv_prog_CC
3753 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755 # We chose a different compiler from the bogus one.
3756 # However, it has the same basename, so the bogon will be chosen
3757 # first if we set CC to just the basename; use the full file name.
3758 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003759 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760 fi
3761fi
3762fi
3763fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003764CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003765if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3767$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768else
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3770$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771fi
3772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773
Martin v. Löwis11437992002-04-12 09:54:03 +00003774fi
3775if test -z "$CC"; then
3776 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 do
3779 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3780set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3782$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003783if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003785else
3786 if test -n "$CC"; then
3787 ac_cv_prog_CC="$CC" # Let the user override the test.
3788else
Martin v. Löwis11437992002-04-12 09:54:03 +00003789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3790for as_dir in $PATH
3791do
3792 IFS=$as_save_IFS
3793 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 $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 +00003798 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003799 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003800done
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003803
3804fi
3805fi
3806CC=$ac_cv_prog_CC
3807if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3809$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003810else
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3812$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003813fi
3814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 test -n "$CC" && break
3817 done
3818fi
3819if test -z "$CC"; then
3820 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003822do
3823 # Extract the first word of "$ac_prog", so it can be a program name with args.
3824set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3826$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003827if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
3830 if test -n "$ac_ct_CC"; then
3831 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3832else
3833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3834for as_dir in $PATH
3835do
3836 IFS=$as_save_IFS
3837 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 $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 +00003842 break 2
3843 fi
3844done
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848fi
3849fi
3850ac_ct_CC=$ac_cv_prog_ac_ct_CC
3851if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3853$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003854else
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3856$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 test -n "$ac_ct_CC" && break
3861done
Michael W. Hudson54241132001-12-07 15:38:26 +00003862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863 if test "x$ac_ct_CC" = x; then
3864 CC=""
3865 else
3866 case $cross_compiling:$ac_tool_warned in
3867yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003868{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3869$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870ac_tool_warned=yes ;;
3871esac
3872 CC=$ac_ct_CC
3873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003874fi
3875
3876fi
3877
3878
Matthias Kloseb9621712010-04-24 17:59:49 +00003879test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003881as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003882See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883
3884# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003885$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3886set X $ac_compile
3887ac_compiler=$2
3888for ac_option in --version -v -V -qversion; do
3889 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890case "(($ac_try" in
3891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892 *) ac_try_echo=$ac_try;;
3893esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3895$as_echo "$ac_try_echo"; } >&5
3896 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003897 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003898 if test -s conftest.err; then
3899 sed '10a\
3900... rest of stderr output deleted ...
3901 10q' conftest.err >conftest.er1
3902 cat conftest.er1 >&5
3903 fi
3904 rm -f conftest.er1 conftest.err
3905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3906 test $ac_status = 0; }
3907done
Martin v. Löwis11437992002-04-12 09:54:03 +00003908
Matthias Kloseb9621712010-04-24 17:59:49 +00003909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003910/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003911
Martin v. Löwis11437992002-04-12 09:54:03 +00003912int
3913main ()
3914{
3915
3916 ;
3917 return 0;
3918}
3919_ACEOF
3920ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003921ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003922# Try to create an executable without -o first, disregard a.out.
3923# It will help us diagnose broken compilers, and finding out an intuition
3924# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3926$as_echo_n "checking whether the C compiler works... " >&6; }
3927ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3928
3929# The possible output files:
3930ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932ac_rmfiles=
3933for ac_file in $ac_files
3934do
3935 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3938 esac
3939done
3940rm -f $ac_rmfiles
3941
Matthias Kloseb9621712010-04-24 17:59:49 +00003942if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943case "(($ac_try" in
3944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3945 *) ac_try_echo=$ac_try;;
3946esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3948$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3952 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3954# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3955# in a Makefile. We should not override ac_cv_exeext if it was cached,
3956# so that the user can short-circuit this test for compilers unknown to
3957# Autoconf.
3958for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003959do
3960 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003963 ;;
3964 [ab].out )
3965 # We found the default executable, but exeext='' is most
3966 # certainly right.
3967 break;;
3968 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 then :; else
3971 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3972 fi
3973 # We set ac_cv_exeext here because the later test for it is not
3974 # safe: cross compilers may not add the suffix if given an `-o'
3975 # argument, so we may need to know it at that point already.
3976 # Even if this section looks crufty: it has the advantage of
3977 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003978 break;;
3979 * )
3980 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003981 esac
3982done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983test "$ac_cv_exeext" = no && ac_cv_exeext=
3984
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003985else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986 ac_file=''
3987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003988if test -z "$ac_file"; then :
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3990$as_echo "no" >&6; }
3991$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003992sed 's/^/| /' conftest.$ac_ext >&5
3993
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003996as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003997See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003998else
3999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4000$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4003$as_echo_n "checking for C compiler default output file name... " >&6; }
4004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4005$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007
Matthias Kloseb9621712010-04-24 17:59:49 +00004008rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4011$as_echo_n "checking for suffix of executables... " >&6; }
4012if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004017eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4022 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4024# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4025# work properly (i.e., refer to `conftest.exe'), while it won't with
4026# `rm'.
4027for ac_file in conftest.exe conftest conftest.*; do
4028 test -f "$ac_file" || continue
4029 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4032 break;;
4033 * ) break;;
4034 esac
4035done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004036else
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004039as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004040See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004042rm -f conftest conftest$ac_cv_exeext
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4044$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045
4046rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004047EXEEXT=$ac_cv_exeext
4048ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4050/* end confdefs.h. */
4051#include <stdio.h>
4052int
4053main ()
4054{
4055FILE *f = fopen ("conftest.out", "w");
4056 return ferror (f) || fclose (f) != 0;
4057
4058 ;
4059 return 0;
4060}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004062ac_clean_files="$ac_clean_files conftest.out"
4063# Check that the compiler produces executables we can run. If not, either
4064# the compiler is broken, or we cross compile.
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4066$as_echo_n "checking whether we are cross compiling... " >&6; }
4067if test "$cross_compiling" != yes; then
4068 { { ac_try="$ac_link"
4069case "(($ac_try" in
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4072esac
4073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074$as_echo "$ac_try_echo"; } >&5
4075 (eval "$ac_link") 2>&5
4076 ac_status=$?
4077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078 test $ac_status = 0; }
4079 if { ac_try='./conftest$ac_cv_exeext'
4080 { { case "(($ac_try" in
4081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082 *) ac_try_echo=$ac_try;;
4083esac
4084eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4085$as_echo "$ac_try_echo"; } >&5
4086 (eval "$ac_try") 2>&5
4087 ac_status=$?
4088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4089 test $ac_status = 0; }; }; then
4090 cross_compiling=no
4091 else
4092 if test "$cross_compiling" = maybe; then
4093 cross_compiling=yes
4094 else
4095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004097as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004098If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004099See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 fi
4101 fi
4102fi
4103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4104$as_echo "$cross_compiling" >&6; }
4105
4106rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4107ac_clean_files=$ac_clean_files_save
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4109$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004110if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 $as_echo_n "(cached) " >&6
4112else
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004114/* end confdefs.h. */
4115
4116int
4117main ()
4118{
4119
4120 ;
4121 return 0;
4122}
4123_ACEOF
4124rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004125if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126case "(($ac_try" in
4127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4128 *) ac_try_echo=$ac_try;;
4129esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004130eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4131$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4135 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136 for ac_file in conftest.o conftest.obj conftest.*; do
4137 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004138 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4141 break;;
4142 esac
4143done
4144else
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004146sed 's/^/| /' conftest.$ac_ext >&5
4147
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004150as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004151See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004152fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004153rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4156$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004157OBJEXT=$ac_cv_objext
4158ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4160$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004161if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004163else
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004166
Martin v. Löwis11437992002-04-12 09:54:03 +00004167int
4168main ()
4169{
4170#ifndef __GNUC__
4171 choke me
4172#endif
4173
4174 ;
4175 return 0;
4176}
4177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004179 ac_compiler_gnu=yes
4180else
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004184ac_cv_c_compiler_gnu=$ac_compiler_gnu
4185
4186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4188$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4189if test $ac_compiler_gnu = yes; then
4190 GCC=yes
4191else
4192 GCC=
4193fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004194ac_test_CFLAGS=${CFLAGS+set}
4195ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4197$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004198if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004200else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 ac_save_c_werror_flag=$ac_c_werror_flag
4202 ac_c_werror_flag=yes
4203 ac_cv_prog_cc_g=no
4204 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004207
Martin v. Löwis11437992002-04-12 09:54:03 +00004208int
4209main ()
4210{
4211
4212 ;
4213 return 0;
4214}
4215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004216if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004217 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218else
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 CFLAGS=""
4220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221/* end confdefs.h. */
4222
4223int
4224main ()
4225{
4226
4227 ;
4228 return 0;
4229}
4230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004231if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232
Matthias Kloseb9621712010-04-24 17:59:49 +00004233else
4234 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237/* end confdefs.h. */
4238
4239int
4240main ()
4241{
4242
4243 ;
4244 return 0;
4245}
4246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004247if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255 ac_c_werror_flag=$ac_save_c_werror_flag
4256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4258$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004259if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261elif test $ac_cv_prog_cc_g = yes; then
4262 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004263 CFLAGS="-g -O2"
4264 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004265 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266 fi
4267else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268 if test "$GCC" = yes; then
4269 CFLAGS="-O2"
4270 else
4271 CFLAGS=
4272 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4275$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004276if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004277 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004278else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004280ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004282/* end confdefs.h. */
4283#include <stdarg.h>
4284#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004285struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004286/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4287struct buf { int x; };
4288FILE * (*rcsopen) (struct buf *, struct stat *, int);
4289static char *e (p, i)
4290 char **p;
4291 int i;
4292{
4293 return p[i];
4294}
4295static char *f (char * (*g) (char **, int), char **p, ...)
4296{
4297 char *s;
4298 va_list v;
4299 va_start (v,p);
4300 s = g (p, va_arg (v,int));
4301 va_end (v);
4302 return s;
4303}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304
4305/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4306 function prototypes and stuff, but not '\xHH' hex character constants.
4307 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004309 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4310 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4315 inside strings and character constants. */
4316#define FOO(x) 'x'
4317int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4318
Skip Montanaro6dead952003-09-25 14:50:04 +00004319int test (int i, double x);
4320struct s1 {int (*f) (int a);};
4321struct s2 {int (*f) (double a);};
4322int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4323int argc;
4324char **argv;
4325int
4326main ()
4327{
4328return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4329 ;
4330 return 0;
4331}
4332_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4334 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004335do
4336 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340rm -f core conftest.err conftest.$ac_objext
4341 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004342done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004344CC=$ac_save_CC
4345
4346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347# AC_CACHE_VAL
4348case "x$ac_cv_prog_cc_c89" in
4349 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4351$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4354$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004355 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4358$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004359esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004360if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004361
Matthias Kloseb9621712010-04-24 17:59:49 +00004362fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004363
Martin v. Löwis11437992002-04-12 09:54:03 +00004364ac_ext=c
4365ac_cpp='$CPP $CPPFLAGS'
4366ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4367ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4368ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004370ac_ext=c
4371ac_cpp='$CPP $CPPFLAGS'
4372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4374ac_compiler_gnu=$ac_cv_c_compiler_gnu
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4376$as_echo_n "checking how to run the C preprocessor... " >&6; }
4377# On Suns, sometimes $CPP names a directory.
4378if test -n "$CPP" && test -d "$CPP"; then
4379 CPP=
4380fi
4381if test -z "$CPP"; then
4382 if ${ac_cv_prog_CPP+:} false; then :
4383 $as_echo_n "(cached) " >&6
4384else
4385 # Double quotes because CPP needs to be expanded
4386 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4387 do
4388 ac_preproc_ok=false
4389for ac_c_preproc_warn_flag in '' yes
4390do
4391 # Use a header file that comes with gcc, so configuring glibc
4392 # with a fresh cross-compiler works.
4393 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4394 # <limits.h> exists even on freestanding compilers.
4395 # On the NeXT, cc -E runs the code through the compiler's parser,
4396 # not just through cpp. "Syntax error" is here to catch this case.
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398/* end confdefs.h. */
4399#ifdef __STDC__
4400# include <limits.h>
4401#else
4402# include <assert.h>
4403#endif
4404 Syntax error
4405_ACEOF
4406if ac_fn_c_try_cpp "$LINENO"; then :
4407
4408else
4409 # Broken: fails on valid input.
4410continue
4411fi
4412rm -f conftest.err conftest.i conftest.$ac_ext
4413
4414 # OK, works on sane cases. Now check whether nonexistent headers
4415 # can be detected and how.
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417/* end confdefs.h. */
4418#include <ac_nonexistent.h>
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421 # Broken: success on invalid input.
4422continue
4423else
4424 # Passes both tests.
4425ac_preproc_ok=:
4426break
4427fi
4428rm -f conftest.err conftest.i conftest.$ac_ext
4429
4430done
4431# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4432rm -f conftest.i conftest.err conftest.$ac_ext
4433if $ac_preproc_ok; then :
4434 break
4435fi
4436
4437 done
4438 ac_cv_prog_CPP=$CPP
4439
4440fi
4441 CPP=$ac_cv_prog_CPP
4442else
4443 ac_cv_prog_CPP=$CPP
4444fi
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4446$as_echo "$CPP" >&6; }
4447ac_preproc_ok=false
4448for ac_c_preproc_warn_flag in '' yes
4449do
4450 # Use a header file that comes with gcc, so configuring glibc
4451 # with a fresh cross-compiler works.
4452 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4453 # <limits.h> exists even on freestanding compilers.
4454 # On the NeXT, cc -E runs the code through the compiler's parser,
4455 # not just through cpp. "Syntax error" is here to catch this case.
4456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4457/* end confdefs.h. */
4458#ifdef __STDC__
4459# include <limits.h>
4460#else
4461# include <assert.h>
4462#endif
4463 Syntax error
4464_ACEOF
4465if ac_fn_c_try_cpp "$LINENO"; then :
4466
4467else
4468 # Broken: fails on valid input.
4469continue
4470fi
4471rm -f conftest.err conftest.i conftest.$ac_ext
4472
4473 # OK, works on sane cases. Now check whether nonexistent headers
4474 # can be detected and how.
4475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4476/* end confdefs.h. */
4477#include <ac_nonexistent.h>
4478_ACEOF
4479if ac_fn_c_try_cpp "$LINENO"; then :
4480 # Broken: success on invalid input.
4481continue
4482else
4483 # Passes both tests.
4484ac_preproc_ok=:
4485break
4486fi
4487rm -f conftest.err conftest.i conftest.$ac_ext
4488
4489done
4490# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4491rm -f conftest.i conftest.err conftest.$ac_ext
4492if $ac_preproc_ok; then :
4493
4494else
4495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4497as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4498See \`config.log' for more details" "$LINENO" 5; }
4499fi
4500
4501ac_ext=c
4502ac_cpp='$CPP $CPPFLAGS'
4503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4505ac_compiler_gnu=$ac_cv_c_compiler_gnu
4506
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4508$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4509if ${ac_cv_path_GREP+:} false; then :
4510 $as_echo_n "(cached) " >&6
4511else
4512 if test -z "$GREP"; then
4513 ac_path_GREP_found=false
4514 # Loop through the user's path and test for each of PROGNAME-LIST
4515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4516for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4517do
4518 IFS=$as_save_IFS
4519 test -z "$as_dir" && as_dir=.
4520 for ac_prog in grep ggrep; do
4521 for ac_exec_ext in '' $ac_executable_extensions; do
4522 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4523 as_fn_executable_p "$ac_path_GREP" || continue
4524# Check for GNU ac_path_GREP and select it if it is found.
4525 # Check for GNU $ac_path_GREP
4526case `"$ac_path_GREP" --version 2>&1` in
4527*GNU*)
4528 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4529*)
4530 ac_count=0
4531 $as_echo_n 0123456789 >"conftest.in"
4532 while :
4533 do
4534 cat "conftest.in" "conftest.in" >"conftest.tmp"
4535 mv "conftest.tmp" "conftest.in"
4536 cp "conftest.in" "conftest.nl"
4537 $as_echo 'GREP' >> "conftest.nl"
4538 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4539 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4540 as_fn_arith $ac_count + 1 && ac_count=$as_val
4541 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4542 # Best one so far, save it but keep looking for a better one
4543 ac_cv_path_GREP="$ac_path_GREP"
4544 ac_path_GREP_max=$ac_count
4545 fi
4546 # 10*(2^10) chars as input seems more than enough
4547 test $ac_count -gt 10 && break
4548 done
4549 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4550esac
4551
4552 $ac_path_GREP_found && break 3
4553 done
4554 done
4555 done
4556IFS=$as_save_IFS
4557 if test -z "$ac_cv_path_GREP"; then
4558 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4559 fi
4560else
4561 ac_cv_path_GREP=$GREP
4562fi
4563
4564fi
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4566$as_echo "$ac_cv_path_GREP" >&6; }
4567 GREP="$ac_cv_path_GREP"
4568
4569
Łukasz Langaa785c872016-09-09 17:37:37 -07004570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4571$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4572if ${ac_cv_path_SED+:} false; then :
4573 $as_echo_n "(cached) " >&6
4574else
4575 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4576 for ac_i in 1 2 3 4 5 6 7; do
4577 ac_script="$ac_script$as_nl$ac_script"
4578 done
4579 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4580 { ac_script=; unset ac_script;}
4581 if test -z "$SED"; then
4582 ac_path_SED_found=false
4583 # Loop through the user's path and test for each of PROGNAME-LIST
4584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4585for as_dir in $PATH
4586do
4587 IFS=$as_save_IFS
4588 test -z "$as_dir" && as_dir=.
4589 for ac_prog in sed gsed; do
4590 for ac_exec_ext in '' $ac_executable_extensions; do
4591 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4592 as_fn_executable_p "$ac_path_SED" || continue
4593# Check for GNU ac_path_SED and select it if it is found.
4594 # Check for GNU $ac_path_SED
4595case `"$ac_path_SED" --version 2>&1` in
4596*GNU*)
4597 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4598*)
4599 ac_count=0
4600 $as_echo_n 0123456789 >"conftest.in"
4601 while :
4602 do
4603 cat "conftest.in" "conftest.in" >"conftest.tmp"
4604 mv "conftest.tmp" "conftest.in"
4605 cp "conftest.in" "conftest.nl"
4606 $as_echo '' >> "conftest.nl"
4607 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4608 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4609 as_fn_arith $ac_count + 1 && ac_count=$as_val
4610 if test $ac_count -gt ${ac_path_SED_max-0}; then
4611 # Best one so far, save it but keep looking for a better one
4612 ac_cv_path_SED="$ac_path_SED"
4613 ac_path_SED_max=$ac_count
4614 fi
4615 # 10*(2^10) chars as input seems more than enough
4616 test $ac_count -gt 10 && break
4617 done
4618 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4619esac
4620
4621 $ac_path_SED_found && break 3
4622 done
4623 done
4624 done
4625IFS=$as_save_IFS
4626 if test -z "$ac_cv_path_SED"; then
4627 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4628 fi
4629else
4630 ac_cv_path_SED=$SED
4631fi
4632
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4635$as_echo "$ac_cv_path_SED" >&6; }
4636 SED="$ac_cv_path_SED"
4637 rm -f conftest.sed
4638
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004639
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004640
4641
Matthias Kloseb9621712010-04-24 17:59:49 +00004642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4643$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004645# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004646if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004647 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648
4649 case $withval in
4650 no) with_cxx_main=no
4651 MAINCC='$(CC)';;
4652 yes) with_cxx_main=yes
4653 MAINCC='$(CXX)';;
4654 *) with_cxx_main=yes
4655 MAINCC=$withval
4656 if test -z "$CXX"
4657 then
4658 CXX=$withval
4659 fi;;
4660 esac
4661else
4662
4663 with_cxx_main=no
4664 MAINCC='$(CC)'
4665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004666fi
4667
Matthias Kloseb9621712010-04-24 17:59:49 +00004668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4669$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004670
4671preset_cxx="$CXX"
4672if test -z "$CXX"
4673then
4674 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004675 gcc) if test -n "$ac_tool_prefix"; then
4676 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4677set dummy ${ac_tool_prefix}g++; ac_word=$2
4678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4679$as_echo_n "checking for $ac_word... " >&6; }
4680if ${ac_cv_path_CXX+:} false; then :
4681 $as_echo_n "(cached) " >&6
4682else
4683 case $CXX in
4684 [\\/]* | ?:[\\/]*)
4685 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4686 ;;
4687 *)
4688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4689for as_dir in notfound
4690do
4691 IFS=$as_save_IFS
4692 test -z "$as_dir" && as_dir=.
4693 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004695 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4697 break 2
4698 fi
4699done
4700 done
4701IFS=$as_save_IFS
4702
4703 ;;
4704esac
4705fi
4706CXX=$ac_cv_path_CXX
4707if test -n "$CXX"; then
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4709$as_echo "$CXX" >&6; }
4710else
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4712$as_echo "no" >&6; }
4713fi
4714
4715
4716fi
4717if test -z "$ac_cv_path_CXX"; then
4718 ac_pt_CXX=$CXX
4719 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004723if ${ac_cv_path_ac_pt_CXX+:} false; then :
4724 $as_echo_n "(cached) " >&6
4725else
4726 case $ac_pt_CXX in
4727 [\\/]* | ?:[\\/]*)
4728 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4729 ;;
4730 *)
4731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in notfound
4733do
4734 IFS=$as_save_IFS
4735 test -z "$as_dir" && as_dir=.
4736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004738 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4740 break 2
4741 fi
4742done
4743 done
4744IFS=$as_save_IFS
4745
4746 ;;
4747esac
4748fi
4749ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4750if test -n "$ac_pt_CXX"; then
4751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4752$as_echo "$ac_pt_CXX" >&6; }
4753else
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
4756fi
4757
4758 if test "x$ac_pt_CXX" = x; then
4759 CXX="g++"
4760 else
4761 case $cross_compiling:$ac_tool_warned in
4762yes:)
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4765ac_tool_warned=yes ;;
4766esac
4767 CXX=$ac_pt_CXX
4768 fi
4769else
4770 CXX="$ac_cv_path_CXX"
4771fi
4772 ;;
4773 cc) if test -n "$ac_tool_prefix"; then
4774 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4775set dummy ${ac_tool_prefix}c++; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004778if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780else
4781 case $CXX in
4782 [\\/]* | ?:[\\/]*)
4783 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4784 ;;
4785 *)
4786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4787for as_dir in notfound
4788do
4789 IFS=$as_save_IFS
4790 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795 break 2
4796 fi
4797done
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004799IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801 ;;
4802esac
4803fi
4804CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004805if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4807$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004808else
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004812
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813
4814fi
4815if test -z "$ac_cv_path_CXX"; then
4816 ac_pt_CXX=$CXX
4817 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4820$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826 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 +00004827 ;;
4828 *)
4829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830for as_dir in notfound
4831do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838 break 2
4839 fi
4840done
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004842IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 ;;
4845esac
4846fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4848if test -n "$ac_pt_CXX"; then
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4850$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004851else
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4853$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004855
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856 if test "x$ac_pt_CXX" = x; then
4857 CXX="c++"
4858 else
4859 case $cross_compiling:$ac_tool_warned in
4860yes:)
4861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4863ac_tool_warned=yes ;;
4864esac
4865 CXX=$ac_pt_CXX
4866 fi
4867else
4868 CXX="$ac_cv_path_CXX"
4869fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004870 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004871 clang|*/clang) if test -n "$ac_tool_prefix"; then
4872 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4873set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if ${ac_cv_path_CXX+:} false; then :
4877 $as_echo_n "(cached) " >&6
4878else
4879 case $CXX in
4880 [\\/]* | ?:[\\/]*)
4881 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4882 ;;
4883 *)
4884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in notfound
4886do
4887 IFS=$as_save_IFS
4888 test -z "$as_dir" && as_dir=.
4889 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004891 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893 break 2
4894 fi
4895done
4896 done
4897IFS=$as_save_IFS
4898
Ned Deilycbfb9a52012-06-23 16:02:19 -07004899 ;;
4900esac
4901fi
4902CXX=$ac_cv_path_CXX
4903if test -n "$CXX"; then
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4905$as_echo "$CXX" >&6; }
4906else
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908$as_echo "no" >&6; }
4909fi
4910
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004911
4912fi
4913if test -z "$ac_cv_path_CXX"; then
4914 ac_pt_CXX=$CXX
4915 # Extract the first word of "clang++", so it can be a program name with args.
4916set dummy clang++; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if ${ac_cv_path_ac_pt_CXX+:} false; then :
4920 $as_echo_n "(cached) " >&6
4921else
4922 case $ac_pt_CXX in
4923 [\\/]* | ?:[\\/]*)
4924 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4925 ;;
4926 *)
4927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in notfound
4929do
4930 IFS=$as_save_IFS
4931 test -z "$as_dir" && as_dir=.
4932 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004934 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936 break 2
4937 fi
4938done
4939 done
4940IFS=$as_save_IFS
4941
4942 ;;
4943esac
4944fi
4945ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4946if test -n "$ac_pt_CXX"; then
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4948$as_echo "$ac_pt_CXX" >&6; }
4949else
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954 if test "x$ac_pt_CXX" = x; then
4955 CXX="clang++"
4956 else
4957 case $cross_compiling:$ac_tool_warned in
4958yes:)
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4961ac_tool_warned=yes ;;
4962esac
4963 CXX=$ac_pt_CXX
4964 fi
4965else
4966 CXX="$ac_cv_path_CXX"
4967fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004968 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004969 icc|*/icc) if test -n "$ac_tool_prefix"; then
4970 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4971set dummy ${ac_tool_prefix}icpc; ac_word=$2
4972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4973$as_echo_n "checking for $ac_word... " >&6; }
4974if ${ac_cv_path_CXX+:} false; then :
4975 $as_echo_n "(cached) " >&6
4976else
4977 case $CXX in
4978 [\\/]* | ?:[\\/]*)
4979 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4980 ;;
4981 *)
4982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4983for as_dir in notfound
4984do
4985 IFS=$as_save_IFS
4986 test -z "$as_dir" && as_dir=.
4987 for ac_exec_ext in '' $ac_executable_extensions; do
4988 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4989 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4990 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4991 break 2
4992 fi
4993done
4994 done
4995IFS=$as_save_IFS
4996
4997 ;;
4998esac
4999fi
5000CXX=$ac_cv_path_CXX
5001if test -n "$CXX"; then
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5003$as_echo "$CXX" >&6; }
5004else
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5006$as_echo "no" >&6; }
5007fi
5008
5009
5010fi
5011if test -z "$ac_cv_path_CXX"; then
5012 ac_pt_CXX=$CXX
5013 # Extract the first word of "icpc", so it can be a program name with args.
5014set dummy icpc; ac_word=$2
5015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5016$as_echo_n "checking for $ac_word... " >&6; }
5017if ${ac_cv_path_ac_pt_CXX+:} false; then :
5018 $as_echo_n "(cached) " >&6
5019else
5020 case $ac_pt_CXX in
5021 [\\/]* | ?:[\\/]*)
5022 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5023 ;;
5024 *)
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5026for as_dir in notfound
5027do
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
5030 for ac_exec_ext in '' $ac_executable_extensions; do
5031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5032 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5034 break 2
5035 fi
5036done
5037 done
5038IFS=$as_save_IFS
5039
5040 ;;
5041esac
5042fi
5043ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5044if test -n "$ac_pt_CXX"; then
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5046$as_echo "$ac_pt_CXX" >&6; }
5047else
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5049$as_echo "no" >&6; }
5050fi
5051
5052 if test "x$ac_pt_CXX" = x; then
5053 CXX="icpc"
5054 else
5055 case $cross_compiling:$ac_tool_warned in
5056yes:)
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5058$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5059ac_tool_warned=yes ;;
5060esac
5061 CXX=$ac_pt_CXX
5062 fi
5063else
5064 CXX="$ac_cv_path_CXX"
5065fi
5066 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067 esac
5068 if test "$CXX" = "notfound"
5069 then
5070 CXX=""
5071 fi
5072fi
5073if test -z "$CXX"
5074then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005075 if test -n "$ac_tool_prefix"; then
5076 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5077 do
5078 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5079set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5081$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005082if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084else
5085 if test -n "$CXX"; then
5086 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5087else
5088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091 IFS=$as_save_IFS
5092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005095 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097 break 2
5098 fi
5099done
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102
5103fi
5104fi
5105CXX=$ac_cv_prog_CXX
5106if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5108$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005109else
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5111$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005112fi
5113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005115 test -n "$CXX" && break
5116 done
5117fi
5118if test -z "$CXX"; then
5119 ac_ct_CXX=$CXX
5120 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5121do
5122 # Extract the first word of "$ac_prog", so it can be a program name with args.
5123set dummy $ac_prog; ac_word=$2
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125$as_echo_n "checking for $ac_word... " >&6; }
5126if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5127 $as_echo_n "(cached) " >&6
5128else
5129 if test -n "$ac_ct_CXX"; then
5130 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5131else
5132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133for as_dir in $PATH
5134do
5135 IFS=$as_save_IFS
5136 test -z "$as_dir" && as_dir=.
5137 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005139 ac_cv_prog_ac_ct_CXX="$ac_prog"
5140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5141 break 2
5142 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005143done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005144 done
5145IFS=$as_save_IFS
5146
5147fi
5148fi
5149ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5150if test -n "$ac_ct_CXX"; then
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5152$as_echo "$ac_ct_CXX" >&6; }
5153else
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5155$as_echo "no" >&6; }
5156fi
5157
5158
5159 test -n "$ac_ct_CXX" && break
5160done
5161
5162 if test "x$ac_ct_CXX" = x; then
5163 CXX="notfound"
5164 else
5165 case $cross_compiling:$ac_tool_warned in
5166yes:)
5167{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5168$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5169ac_tool_warned=yes ;;
5170esac
5171 CXX=$ac_ct_CXX
5172 fi
5173fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005174
5175 if test "$CXX" = "notfound"
5176 then
5177 CXX=""
5178 fi
5179fi
5180if test "$preset_cxx" != "$CXX"
5181then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005182 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005183
5184 By default, distutils will build C++ extension modules with \"$CXX\".
5185 If this is not intended, then set CXX on the configure command line.
5186 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005187$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005188
5189 By default, distutils will build C++ extension modules with \"$CXX\".
5190 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005191 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005192fi
5193
5194
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005195MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5196
5197
5198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5199$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5200cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005201#undef bfin
5202#undef cris
5203#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005205#undef hppa
5206#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005208#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005209#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005211#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005212#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005213 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005214#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215# if defined(__x86_64__) && defined(__LP64__)
5216 x86_64-linux-gnu
5217# elif defined(__x86_64__) && defined(__ILP32__)
5218 x86_64-linux-gnux32
5219# elif defined(__i386__)
5220 i386-linux-gnu
5221# elif defined(__aarch64__) && defined(__AARCH64EL__)
5222# if defined(__ILP32__)
5223 aarch64_ilp32-linux-gnu
5224# else
5225 aarch64-linux-gnu
5226# endif
5227# elif defined(__aarch64__) && defined(__AARCH64EB__)
5228# if defined(__ILP32__)
5229 aarch64_be_ilp32-linux-gnu
5230# else
5231 aarch64_be-linux-gnu
5232# endif
5233# elif defined(__alpha__)
5234 alpha-linux-gnu
5235# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5236# if defined(__ARMEL__)
5237 arm-linux-gnueabihf
5238# else
5239 armeb-linux-gnueabihf
5240# endif
5241# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5242# if defined(__ARMEL__)
5243 arm-linux-gnueabi
5244# else
5245 armeb-linux-gnueabi
5246# endif
5247# elif defined(__hppa__)
5248 hppa-linux-gnu
5249# elif defined(__ia64__)
5250 ia64-linux-gnu
5251# elif defined(__m68k__) && !defined(__mcoldfire__)
5252 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005253# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5254# if _MIPS_SIM == _ABIO32
5255 mipsisa32r6el-linux-gnu
5256# elif _MIPS_SIM == _ABIN32
5257 mipsisa64r6el-linux-gnuabin32
5258# elif _MIPS_SIM == _ABI64
5259 mipsisa64r6el-linux-gnuabi64
5260# else
5261# error unknown platform triplet
5262# endif
5263# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5264# if _MIPS_SIM == _ABIO32
5265 mipsisa32r6-linux-gnu
5266# elif _MIPS_SIM == _ABIN32
5267 mipsisa64r6-linux-gnuabin32
5268# elif _MIPS_SIM == _ABI64
5269 mipsisa64r6-linux-gnuabi64
5270# else
5271# error unknown platform triplet
5272# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005273# elif defined(__mips_hard_float) && defined(_MIPSEL)
5274# if _MIPS_SIM == _ABIO32
5275 mipsel-linux-gnu
5276# elif _MIPS_SIM == _ABIN32
5277 mips64el-linux-gnuabin32
5278# elif _MIPS_SIM == _ABI64
5279 mips64el-linux-gnuabi64
5280# else
5281# error unknown platform triplet
5282# endif
5283# elif defined(__mips_hard_float)
5284# if _MIPS_SIM == _ABIO32
5285 mips-linux-gnu
5286# elif _MIPS_SIM == _ABIN32
5287 mips64-linux-gnuabin32
5288# elif _MIPS_SIM == _ABI64
5289 mips64-linux-gnuabi64
5290# else
5291# error unknown platform triplet
5292# endif
5293# elif defined(__or1k__)
5294 or1k-linux-gnu
5295# elif defined(__powerpc__) && defined(__SPE__)
5296 powerpc-linux-gnuspe
5297# elif defined(__powerpc64__)
5298# if defined(__LITTLE_ENDIAN__)
5299 powerpc64le-linux-gnu
5300# else
5301 powerpc64-linux-gnu
5302# endif
5303# elif defined(__powerpc__)
5304 powerpc-linux-gnu
5305# elif defined(__s390x__)
5306 s390x-linux-gnu
5307# elif defined(__s390__)
5308 s390-linux-gnu
5309# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5310 sh4-linux-gnu
5311# elif defined(__sparc__) && defined(__arch64__)
5312 sparc64-linux-gnu
5313# elif defined(__sparc__)
5314 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005315# elif defined(__riscv)
5316# if __riscv_xlen == 32
5317 riscv32-linux-gnu
5318# elif __riscv_xlen == 64
5319 riscv64-linux-gnu
5320# else
5321# error unknown platform triplet
5322# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005323# else
5324# error unknown platform triplet
5325# endif
5326#elif defined(__FreeBSD_kernel__)
5327# if defined(__LP64__)
5328 x86_64-kfreebsd-gnu
5329# elif defined(__i386__)
5330 i386-kfreebsd-gnu
5331# else
5332# error unknown platform triplet
5333# endif
5334#elif defined(__gnu_hurd__)
5335 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005336#elif defined(__APPLE__)
5337 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005338#else
5339# error unknown platform triplet
5340#endif
5341
5342EOF
5343
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005344if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5347$as_echo "$PLATFORM_TRIPLET" >&6; }
5348else
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5350$as_echo "none" >&6; }
5351fi
5352rm -f conftest.c conftest.out
5353
5354if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5355 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5356 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5357 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005358elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5359 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005361
doko@ubuntu.com55532312016-06-14 08:55:19 +02005362if test x$MULTIARCH != x; then
5363 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5364fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005365
5366
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5368$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5369save_LDFLAGS="$LDFLAGS"
5370LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5373/* end confdefs.h. */
5374
5375int
5376main ()
5377{
5378
5379 ;
5380 return 0;
5381}
5382_ACEOF
5383if ac_fn_c_try_link "$LINENO"; then :
5384 NO_AS_NEEDED="-Wl,--no-as-needed"
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5386$as_echo "yes" >&6; }
5387else
5388 NO_AS_NEEDED=""
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392rm -f core conftest.err conftest.$ac_objext \
5393 conftest$ac_exeext conftest.$ac_ext
5394LDFLAGS="$save_LDFLAGS"
5395
5396
5397
5398# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399
Matthias Kloseb9621712010-04-24 17:59:49 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5401$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005402if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404else
5405 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5406 then ac_cv_path_EGREP="$GREP -E"
5407 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 # Loop through the user's path and test for each of PROGNAME-LIST
5411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5413do
5414 IFS=$as_save_IFS
5415 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 for ac_prog in egrep; do
5417 for ac_exec_ext in '' $ac_executable_extensions; do
5418 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005419 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005420# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 # Check for GNU $ac_path_EGREP
5422case `"$ac_path_EGREP" --version 2>&1` in
5423*GNU*)
5424 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5425*)
5426 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 while :
5429 do
5430 cat "conftest.in" "conftest.in" >"conftest.tmp"
5431 mv "conftest.tmp" "conftest.in"
5432 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5435 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5438 # Best one so far, save it but keep looking for a better one
5439 ac_cv_path_EGREP="$ac_path_EGREP"
5440 ac_path_EGREP_max=$ac_count
5441 fi
5442 # 10*(2^10) chars as input seems more than enough
5443 test $ac_count -gt 10 && break
5444 done
5445 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5446esac
5447
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 $ac_path_EGREP_found && break 3
5449 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005452IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005454 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 +00005455 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005456else
5457 ac_cv_path_EGREP=$EGREP
5458fi
5459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005460 fi
5461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5463$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005464 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005465
5466
Matthias Kloseb9621712010-04-24 17:59:49 +00005467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5468$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005469if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005470 $as_echo_n "(cached) " >&6
5471else
5472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005473/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005474#include <stdlib.h>
5475#include <stdarg.h>
5476#include <string.h>
5477#include <float.h>
5478
5479int
5480main ()
5481{
5482
5483 ;
5484 return 0;
5485}
5486_ACEOF
5487if ac_fn_c_try_compile "$LINENO"; then :
5488 ac_cv_header_stdc=yes
5489else
5490 ac_cv_header_stdc=no
5491fi
5492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5493
5494if test $ac_cv_header_stdc = yes; then
5495 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497/* end confdefs.h. */
5498#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005499
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005500_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005502 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005504else
Matthias Kloseb9621712010-04-24 17:59:49 +00005505 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005506fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005507rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508
Matthias Kloseb9621712010-04-24 17:59:49 +00005509fi
5510
5511if test $ac_cv_header_stdc = yes; then
5512 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5514/* end confdefs.h. */
5515#include <stdlib.h>
5516
5517_ACEOF
5518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5519 $EGREP "free" >/dev/null 2>&1; then :
5520
5521else
5522 ac_cv_header_stdc=no
5523fi
5524rm -f conftest*
5525
5526fi
5527
5528if test $ac_cv_header_stdc = yes; then
5529 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5530 if test "$cross_compiling" = yes; then :
5531 :
5532else
5533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5534/* end confdefs.h. */
5535#include <ctype.h>
5536#include <stdlib.h>
5537#if ((' ' & 0x0FF) == 0x020)
5538# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5539# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5540#else
5541# define ISLOWER(c) \
5542 (('a' <= (c) && (c) <= 'i') \
5543 || ('j' <= (c) && (c) <= 'r') \
5544 || ('s' <= (c) && (c) <= 'z'))
5545# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5546#endif
5547
5548#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5549int
5550main ()
5551{
5552 int i;
5553 for (i = 0; i < 256; i++)
5554 if (XOR (islower (i), ISLOWER (i))
5555 || toupper (i) != TOUPPER (i))
5556 return 2;
5557 return 0;
5558}
5559_ACEOF
5560if ac_fn_c_try_run "$LINENO"; then :
5561
5562else
5563 ac_cv_header_stdc=no
5564fi
5565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5566 conftest.$ac_objext conftest.beam conftest.$ac_ext
5567fi
5568
5569fi
5570fi
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5572$as_echo "$ac_cv_header_stdc" >&6; }
5573if test $ac_cv_header_stdc = yes; then
5574
5575$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5576
5577fi
5578
5579# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5580for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5581 inttypes.h stdint.h unistd.h
5582do :
5583 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5584ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5585"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005586if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 cat >>confdefs.h <<_ACEOF
5588#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5589_ACEOF
5590
5591fi
5592
5593done
5594
5595
5596
5597 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 +02005598if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005599 MINIX=yes
5600else
5601 MINIX=
5602fi
5603
5604
5605 if test "$MINIX" = yes; then
5606
5607$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5608
5609
5610$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5611
5612
5613$as_echo "#define _MINIX 1" >>confdefs.h
5614
5615 fi
5616
5617
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5619$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005620if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005621 $as_echo_n "(cached) " >&6
5622else
5623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5624/* end confdefs.h. */
5625
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005626# define __EXTENSIONS__ 1
5627 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005628int
5629main ()
5630{
5631
5632 ;
5633 return 0;
5634}
5635_ACEOF
5636if ac_fn_c_try_compile "$LINENO"; then :
5637 ac_cv_safe_to_define___extensions__=yes
5638else
5639 ac_cv_safe_to_define___extensions__=no
5640fi
5641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5642fi
5643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5644$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5645 test $ac_cv_safe_to_define___extensions__ = yes &&
5646 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5647
5648 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5649
5650 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5651
5652 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5653
5654 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5655
5656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657
Xavier de Gaye95750b12016-07-09 11:05:42 +02005658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5659$as_echo_n "checking for the Android API level... " >&6; }
5660cat >> conftest.c <<EOF
5661#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005662android_api = __ANDROID_API__
5663arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005664#else
5665#error not Android
5666#endif
5667EOF
5668
5669if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005670 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5671 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5673$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005674 if test -z "$ANDROID_API_LEVEL"; then
5675 echo 'Fatal: you must define __ANDROID_API__'
5676 exit 1
5677 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005678
5679cat >>confdefs.h <<_ACEOF
5680#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5681_ACEOF
5682
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005683
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5685$as_echo_n "checking for the Android arm ABI... " >&6; }
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5687$as_echo "$_arm_arch" >&6; }
5688 if test "$_arm_arch" = 7; then
5689 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5690 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5691 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005692else
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5694$as_echo "not Android" >&6; }
5695fi
5696rm -f conftest.c conftest.out
5697
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698# Check for unsupported systems
5699case $ac_sys_system/$ac_sys_release in
5700atheos*|Linux*/1*)
5701 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5702 echo See README for details.
5703 exit 1;;
5704esac
5705
5706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5708$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709
5710# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005711if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 withval=$with_suffix;
5713 case $withval in
5714 no) EXEEXT=;;
5715 yes) EXEEXT=.exe;;
5716 *) EXEEXT=$withval;;
5717 esac
5718fi
5719
Matthias Kloseb9621712010-04-24 17:59:49 +00005720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5721$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722
5723# Test whether we're running on a non-case-sensitive system, in which
5724# case we give a warning if no ext is given
5725
Matthias Kloseb9621712010-04-24 17:59:49 +00005726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5727$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728if test ! -d CaseSensitiveTestDir; then
5729mkdir CaseSensitiveTestDir
5730fi
5731
5732if test -d casesensitivetestdir
5733then
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5735$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 BUILDEXEEXT=.exe
5737else
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740 BUILDEXEEXT=$EXEEXT
5741fi
5742rmdir CaseSensitiveTestDir
5743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744case $ac_sys_system in
5745hp*|HP*)
5746 case $CC in
5747 cc|*/cc) CC="$CC -Ae";;
5748 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749esac
5750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5753$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754if test -z "$LIBRARY"
5755then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005756 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5759$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760
5761# LDLIBRARY is the name of the library to link against (as opposed to the
5762# name of the library into which to insert object files). BLDLIBRARY is also
5763# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5764# is blank as the main program is not linked directly against LDLIBRARY.
5765# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5766# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5767# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5768# DLLLIBRARY is the shared (i.e., DLL) library.
5769#
5770# RUNSHARED is used to run shared python without installed libraries
5771#
5772# INSTSONAME is the name of the shared library that will be use to install
5773# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005774#
5775# LDVERSION is the shared library version number, normally the Python version
5776# with the ABI build flags appended.
5777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779
5780
5781
5782
5783
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785LDLIBRARY="$LIBRARY"
5786BLDLIBRARY='$(LDLIBRARY)'
5787INSTSONAME='$(LDLIBRARY)'
5788DLLLIBRARY=''
5789LDLIBRARYDIR=''
5790RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005791LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
5793# LINKCC is the command that links the python executable -- default is $(CC).
5794# If CXX is set, and if it is needed to link a main function that was
5795# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5796# python might then depend on the C++ runtime
5797# This is altered for AIX in order to build the export list before
5798# linking.
5799
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5801$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802if test -z "$LINKCC"
5803then
5804 LINKCC='$(PURIFY) $(MAINCC)'
5805 case $ac_sys_system in
5806 AIX*)
5807 exp_extra="\"\""
5808 if test $ac_sys_release -ge 5 -o \
5809 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5810 exp_extra="."
5811 fi
5812 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813 QNX*)
5814 # qcc must be used because the other compilers do not
5815 # support -N.
5816 LINKCC=qcc;;
5817 esac
5818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5820$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821
5822# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5823# make sure we default having it set to "no": this is used by
5824# distutils.unixccompiler to know if it should add --enable-new-dtags
5825# to linker command lines, and failing to detect GNU ld simply results
5826# in the same bahaviour as before.
5827
Matthias Kloseb9621712010-04-24 17:59:49 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5829$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830ac_prog=ld
5831if test "$GCC" = yes; then
5832 ac_prog=`$CC -print-prog-name=ld`
5833fi
5834case `"$ac_prog" -V 2>&1 < /dev/null` in
5835 *GNU*)
5836 GNULD=yes;;
5837 *)
5838 GNULD=no;;
5839esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5841$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5844$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005846if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847 enableval=$enable_shared;
5848fi
5849
5850
5851if test -z "$enable_shared"
5852then
5853 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005854 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855 enable_shared="yes";;
5856 *)
5857 enable_shared="no";;
5858 esac
5859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5861$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862
Matthias Kloseb9621712010-04-24 17:59:49 +00005863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5864$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005866if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005867 enableval=$enable_profiling;
5868fi
5869
5870if test "x$enable_profiling" = xyes; then
5871 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005872 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874/* end confdefs.h. */
5875int main() { return 0; }
5876_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877if ac_fn_c_try_link "$LINENO"; then :
5878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882rm -f core conftest.err conftest.$ac_objext \
5883 conftest$ac_exeext conftest.$ac_ext
5884 CC="$ac_save_cc"
5885else
5886 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5889$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890
doko@ubuntu.comba015832012-06-30 16:52:05 +02005891if test "x$enable_profiling" = xyes; then
5892 BASECFLAGS="-pg $BASECFLAGS"
5893 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894fi
5895
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5897$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898
5899# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5900# library that we build, but we do not want to link against it (we
5901# will find it with a -framework option). For this reason there is an
5902# extra variable BLDLIBRARY against which Python and the extension
5903# modules are linked, BLDLIBRARY. This is normally the same as
5904# LDLIBRARY, but empty for MacOSX framework builds.
5905if test "$enable_framework"
5906then
5907 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005908 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 BLDLIBRARY=''
5910else
5911 BLDLIBRARY='$(LDLIBRARY)'
5912fi
5913
5914# Other platforms follow
5915if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005916 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917
Matthias Kloseb9621712010-04-24 17:59:49 +00005918$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
5920 case $ac_sys_system in
5921 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 LDLIBRARY='libpython$(LDVERSION).dll.a'
5923 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 ;;
5925 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 LDLIBRARY='libpython$(LDVERSION).so'
5927 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005928 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005930 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005931 then
5932 PY3LIBRARY=libpython3.so
5933 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005935 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).so'
5937 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005938 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005940 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005941 then
5942 PY3LIBRARY=libpython3.so
5943 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
5945 hp*|HP*)
5946 case `uname -m` in
5947 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005948 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
5950 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ;;
5953 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005955 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).dylib'
5959 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005962 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005964 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005965 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966
5967 esac
5968else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005969 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 case $ac_sys_system in
5971 CYGWIN*)
5972 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005973 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 ;;
5975 esac
5976fi
5977
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005978if test "$cross_compiling" = yes; then
5979 RUNSHARED=
5980fi
5981
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5983$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005986if test -n "$ac_tool_prefix"; then
5987 for ac_prog in ar aal
5988 do
5989 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5990set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5992$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005993if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005994 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995else
5996 if test -n "$AR"; then
5997 ac_cv_prog_AR="$AR" # Let the user override the test.
5998else
5999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6000for as_dir in $PATH
6001do
6002 IFS=$as_save_IFS
6003 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006005 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006006 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 break 2
6009 fi
6010done
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012IFS=$as_save_IFS
6013
6014fi
6015fi
6016AR=$ac_cv_prog_AR
6017if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6019$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020else
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6022$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023fi
6024
6025
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006026 test -n "$AR" && break
6027 done
6028fi
6029if test -z "$AR"; then
6030 ac_ct_AR=$AR
6031 for ac_prog in ar aal
6032do
6033 # Extract the first word of "$ac_prog", so it can be a program name with args.
6034set dummy $ac_prog; ac_word=$2
6035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6036$as_echo_n "checking for $ac_word... " >&6; }
6037if ${ac_cv_prog_ac_ct_AR+:} false; then :
6038 $as_echo_n "(cached) " >&6
6039else
6040 if test -n "$ac_ct_AR"; then
6041 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6042else
6043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044for as_dir in $PATH
6045do
6046 IFS=$as_save_IFS
6047 test -z "$as_dir" && as_dir=.
6048 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006049 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006050 ac_cv_prog_ac_ct_AR="$ac_prog"
6051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6052 break 2
6053 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006055 done
6056IFS=$as_save_IFS
6057
6058fi
6059fi
6060ac_ct_AR=$ac_cv_prog_ac_ct_AR
6061if test -n "$ac_ct_AR"; then
6062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6063$as_echo "$ac_ct_AR" >&6; }
6064else
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6066$as_echo "no" >&6; }
6067fi
6068
6069
6070 test -n "$ac_ct_AR" && break
6071done
6072
6073 if test "x$ac_ct_AR" = x; then
6074 AR="ar"
6075 else
6076 case $cross_compiling:$ac_tool_warned in
6077yes:)
6078{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6079$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6080ac_tool_warned=yes ;;
6081esac
6082 AR=$ac_ct_AR
6083 fi
6084fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085
6086
6087# tweak ARFLAGS only if the user didn't set it on the command line
6088
6089if test -z "$ARFLAGS"
6090then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006091 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092fi
6093
doko@ubuntu.com58844492012-06-30 18:25:32 +02006094if test -n "$ac_tool_prefix"; then
6095 for ac_prog in readelf
6096 do
6097 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6100$as_echo_n "checking for $ac_word... " >&6; }
6101if ${ac_cv_prog_READELF+:} false; then :
6102 $as_echo_n "(cached) " >&6
6103else
6104 if test -n "$READELF"; then
6105 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6106else
6107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6108for as_dir in $PATH
6109do
6110 IFS=$as_save_IFS
6111 test -z "$as_dir" && as_dir=.
6112 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006114 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6116 break 2
6117 fi
6118done
6119 done
6120IFS=$as_save_IFS
6121
6122fi
6123fi
6124READELF=$ac_cv_prog_READELF
6125if test -n "$READELF"; then
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6127$as_echo "$READELF" >&6; }
6128else
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6130$as_echo "no" >&6; }
6131fi
6132
6133
6134 test -n "$READELF" && break
6135 done
6136fi
6137if test -z "$READELF"; then
6138 ac_ct_READELF=$READELF
6139 for ac_prog in readelf
6140do
6141 # Extract the first word of "$ac_prog", so it can be a program name with args.
6142set dummy $ac_prog; ac_word=$2
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6144$as_echo_n "checking for $ac_word... " >&6; }
6145if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6146 $as_echo_n "(cached) " >&6
6147else
6148 if test -n "$ac_ct_READELF"; then
6149 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6150else
6151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6152for as_dir in $PATH
6153do
6154 IFS=$as_save_IFS
6155 test -z "$as_dir" && as_dir=.
6156 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006158 ac_cv_prog_ac_ct_READELF="$ac_prog"
6159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6160 break 2
6161 fi
6162done
6163 done
6164IFS=$as_save_IFS
6165
6166fi
6167fi
6168ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6169if test -n "$ac_ct_READELF"; then
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6171$as_echo "$ac_ct_READELF" >&6; }
6172else
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6174$as_echo "no" >&6; }
6175fi
6176
6177
6178 test -n "$ac_ct_READELF" && break
6179done
6180
6181 if test "x$ac_ct_READELF" = x; then
6182 READELF=":"
6183 else
6184 case $cross_compiling:$ac_tool_warned in
6185yes:)
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6188ac_tool_warned=yes ;;
6189esac
6190 READELF=$ac_ct_READELF
6191 fi
6192fi
6193
6194if test "$cross_compiling" = yes; then
6195 case "$READELF" in
6196 readelf|:)
6197 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6198 ;;
6199 esac
6200fi
6201
6202
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006205hp*|HP*)
6206 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207 if test -z "$INSTALL"
6208 then
6209 INSTALL="${srcdir}/install-sh -c"
6210 fi
6211esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212# Find a good install program. We prefer a C program (faster),
6213# so one script is as good as another. But avoid the broken or
6214# incompatible versions:
6215# SysV /etc/install, /usr/sbin/install
6216# SunOS /usr/etc/install
6217# IRIX /sbin/install
6218# AIX /bin/install
6219# AmigaOS /C/install, which installs bootblocks on floppy discs
6220# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6221# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6222# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6223# OS/2's system install, which has a completely different semantic
6224# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006225# Reject install programs that cannot install multiple files.
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6227$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006229if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006230 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231else
6232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6233for as_dir in $PATH
6234do
6235 IFS=$as_save_IFS
6236 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006237 # Account for people who put trailing slashes in PATH elements.
6238case $as_dir/ in #((
6239 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006241 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242 /usr/ucb/* ) ;;
6243 *)
6244 # OSF1 and SCO ODT 3.0 have their own names for install.
6245 # Don't use installbsd from OSF since it installs stuff as root
6246 # by default.
6247 for ac_prog in ginstall scoinst install; do
6248 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006249 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250 if test $ac_prog = install &&
6251 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6252 # AIX install. It has an incompatible calling convention.
6253 :
6254 elif test $ac_prog = install &&
6255 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6256 # program-specific install script used by HP pwplus--don't use.
6257 :
6258 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 rm -rf conftest.one conftest.two conftest.dir
6260 echo one > conftest.one
6261 echo two > conftest.two
6262 mkdir conftest.dir
6263 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6264 test -s conftest.one && test -s conftest.two &&
6265 test -s conftest.dir/conftest.one &&
6266 test -s conftest.dir/conftest.two
6267 then
6268 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6269 break 3
6270 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271 fi
6272 fi
6273 done
6274 done
6275 ;;
6276esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006277
6278 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279IFS=$as_save_IFS
6280
Matthias Kloseb9621712010-04-24 17:59:49 +00006281rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282
6283fi
6284 if test "${ac_cv_path_install+set}" = set; then
6285 INSTALL=$ac_cv_path_install
6286 else
6287 # As a last resort, use the slow shell script. Don't cache a
6288 # value for INSTALL within a source directory, because that will
6289 # break other packages using the cache if that directory is
6290 # removed, or if the value is a relative name.
6291 INSTALL=$ac_install_sh
6292 fi
6293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6295$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296
6297# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6298# It thinks the first close brace ends the variable substitution.
6299test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6300
6301test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6302
6303test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6304
Matthias Klose93a0ef12012-03-15 18:08:34 +01006305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6306$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6307if test -z "$MKDIR_P"; then
6308 if ${ac_cv_path_mkdir+:} false; then :
6309 $as_echo_n "(cached) " >&6
6310else
6311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6313do
6314 IFS=$as_save_IFS
6315 test -z "$as_dir" && as_dir=.
6316 for ac_prog in mkdir gmkdir; do
6317 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006318 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006319 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6320 'mkdir (GNU coreutils) '* | \
6321 'mkdir (coreutils) '* | \
6322 'mkdir (fileutils) '4.1*)
6323 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6324 break 3;;
6325 esac
6326 done
6327 done
6328 done
6329IFS=$as_save_IFS
6330
6331fi
6332
6333 test -d ./--version && rmdir ./--version
6334 if test "${ac_cv_path_mkdir+set}" = set; then
6335 MKDIR_P="$ac_cv_path_mkdir -p"
6336 else
6337 # As a last resort, use the slow shell script. Don't cache a
6338 # value for MKDIR_P within a source directory, because that will
6339 # break other packages using the cache if that directory is
6340 # removed, or if the value is a relative name.
6341 MKDIR_P="$ac_install_sh -d"
6342 fi
6343fi
6344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6345$as_echo "$MKDIR_P" >&6; }
6346
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347
6348# Not every filesystem supports hard links
6349
6350if test -z "$LN" ; then
6351 case $ac_sys_system in
6352 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353 *) LN=ln;;
6354 esac
6355fi
6356
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006357# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006358
6359ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006360
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6363$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364
6365# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006366if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367 withval=$with_pydebug;
6368if test "$withval" != no
6369then
6370
Matthias Kloseb9621712010-04-24 17:59:49 +00006371$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372
Matthias Kloseb9621712010-04-24 17:59:49 +00006373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6374$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006376 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006377else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379fi
6380else
Matthias Kloseb9621712010-04-24 17:59:49 +00006381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383fi
6384
6385
T. Woutersddbfa2c2017-05-23 01:30:49 +02006386# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6387# the ABI. This allows enabling assertions without changing the ABI.
6388assertions='false'
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6390$as_echo_n "checking for --with-assertions... " >&6; }
6391
6392# Check whether --with-assertions was given.
6393if test "${with_assertions+set}" = set; then :
6394 withval=$with_assertions;
6395if test "$withval" != no
6396then
6397 assertions='true'
6398fi
6399fi
6400
6401if test "$assertions" = 'true'; then
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403$as_echo "yes" >&6; }
6404elif test "$Py_DEBUG" = 'true'; then
6405 assertions='true'
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6407$as_echo "implied by --with-pydebug" >&6; }
6408else
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
Brett Cannon63d98bc2016-09-06 17:12:40 -07006413# Enable optimization flags
6414
6415
6416Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6418$as_echo_n "checking for --enable-optimizations... " >&6; }
6419# Check whether --enable-optimizations was given.
6420if test "${enable_optimizations+set}" = set; then :
6421 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006422if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006423then
6424 Py_OPT='true'
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6426$as_echo "yes" >&6; };
6427else
6428 Py_OPT='false'
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430$as_echo "no" >&6; };
6431fi
6432else
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434$as_echo "no" >&6; }
6435fi
6436
6437if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006438 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6439 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006440 # 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 +00006441 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006442 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006443 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006444 DEF_MAKE_RULE="build_all"
6445else
6446 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006447 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006448 DEF_MAKE_RULE="all"
6449fi
6450
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006451# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6453$as_echo_n "checking for --with-lto... " >&6; }
6454
6455# Check whether --with-lto was given.
6456if test "${with_lto+set}" = set; then :
6457 withval=$with_lto;
6458if test "$withval" != no
6459then
6460 Py_LTO='true'
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6462$as_echo "yes" >&6; };
6463else
6464 Py_LTO='false'
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; };
6467fi
6468else
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; }
6471fi
6472
6473if test "$Py_LTO" = 'true' ; then
6474 case $CC in
6475 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006476 case $ac_sys_system in
6477 Darwin*)
6478 # Any changes made here should be reflected in the GCC+Darwin case below
6479 LTOFLAGS="-flto -Wl,-export_dynamic"
6480 ;;
6481 *)
6482 LTOFLAGS="-flto"
6483 ;;
6484 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006485 ;;
6486 *gcc*)
6487 case $ac_sys_system in
6488 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006489 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006490 ;;
6491 *)
6492 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6493 ;;
6494 esac
6495 ;;
6496 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006497 CFLAGS="$CFLAGS $LTOFLAGS"
6498 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006499fi
6500
Brett Cannon7188a3e2015-09-18 15:13:44 -07006501# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006502
6503
6504
6505
6506
Gregory P. Smith799520c2016-09-07 16:10:00 -07006507# Make this work on systems where llvm tools are not installed with their
6508# normal names in the default $PATH (ie: Ubuntu). They exist under the
6509# non-suffixed name in their versioned llvm directory.
6510llvm_bin_dir=''
6511llvm_path="${PATH}"
6512if test "${CC}" = "clang"
6513then
6514 clang_bin=`which clang`
6515 # Some systems install clang elsewhere as a symlink to the real path
6516 # which is where the related llvm tools are located.
6517 if test -L "${clang_bin}"
6518 then
6519 clang_dir=`dirname "${clang_bin}"`
6520 clang_bin=`readlink "${clang_bin}"`
6521 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6522 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6523 fi
6524fi
Zachary Ware5af85642015-12-21 12:09:17 -06006525
Gregory P. Smith799520c2016-09-07 16:10:00 -07006526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6527$as_echo_n "checking target system type... " >&6; }
6528if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006529 $as_echo_n "(cached) " >&6
6530else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006531 if test "x$target_alias" = x; then
6532 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006533else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006534 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6535 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6536fi
6537
6538fi
6539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6540$as_echo "$ac_cv_target" >&6; }
6541case $ac_cv_target in
6542*-*-*) ;;
6543*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6544esac
6545target=$ac_cv_target
6546ac_save_IFS=$IFS; IFS='-'
6547set x $ac_cv_target
6548shift
6549target_cpu=$1
6550target_vendor=$2
6551shift; shift
6552# Remember, the first character of IFS is used to create $*,
6553# except with old shells:
6554target_os=$*
6555IFS=$ac_save_IFS
6556case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6557
6558
6559# The aliases save the names the user supplied, while $host etc.
6560# will get canonicalized.
6561test -n "$target_alias" &&
6562 test "$program_prefix$program_suffix$program_transform_name" = \
6563 NONENONEs,x,x, &&
6564 program_prefix=${target_alias}-
6565# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6566set dummy $target_alias-llvm-profdata; ac_word=$2
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6568$as_echo_n "checking for $ac_word... " >&6; }
6569if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6570 $as_echo_n "(cached) " >&6
6571else
6572 case $LLVM_PROFDATA in
6573 [\\/]* | ?:[\\/]*)
6574 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6575 ;;
6576 *)
6577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006579do
6580 IFS=$as_save_IFS
6581 test -z "$as_dir" && as_dir=.
6582 for ac_exec_ext in '' $ac_executable_extensions; do
6583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006584 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586 break 2
6587 fi
6588done
6589 done
6590IFS=$as_save_IFS
6591
Gregory P. Smith799520c2016-09-07 16:10:00 -07006592 ;;
6593esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006594fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006595LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6596if test -n "$LLVM_PROFDATA"; then
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6598$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006599else
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6601$as_echo "no" >&6; }
6602fi
6603
6604
Gregory P. Smith799520c2016-09-07 16:10:00 -07006605if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6606 if test "$build" = "$target"; then
6607 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6608 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6609set dummy llvm-profdata; ac_word=$2
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6613 $as_echo_n "(cached) " >&6
6614else
6615 case $ac_pt_LLVM_PROFDATA in
6616 [\\/]* | ?:[\\/]*)
6617 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6618 ;;
6619 *)
6620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in ${llvm_path}
6622do
6623 IFS=$as_save_IFS
6624 test -z "$as_dir" && as_dir=.
6625 for ac_exec_ext in '' $ac_executable_extensions; do
6626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6629 break 2
6630 fi
6631done
6632 done
6633IFS=$as_save_IFS
6634
6635 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6636 ;;
6637esac
6638fi
6639ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6640if test -n "$ac_pt_LLVM_PROFDATA"; then
6641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6642$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6643else
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645$as_echo "no" >&6; }
6646fi
6647
6648 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6649 else
6650 LLVM_PROFDATA="''"
6651 fi
6652else
6653 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6654fi
6655
6656
6657if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6658then
6659 LLVM_PROF_FOUND="found"
6660else
6661 LLVM_PROF_FOUND="not-found"
6662fi
6663if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6664then
6665 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6666 if test -n "${found_llvm_profdata}"
6667 then
6668 # llvm-profdata isn't directly in $PATH in some cases.
6669 # https://apple.stackexchange.com/questions/197053/
6670 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6671 LLVM_PROF_FOUND=found
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6673$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6674 fi
6675fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006676LLVM_PROF_ERR=no
6677case $CC in
6678 *clang*)
6679 # Any changes made here should be reflected in the GCC+Darwin case below
6680 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6681 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006682 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6684 if test $LLVM_PROF_FOUND = not-found
6685 then
6686 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006687 if test "${REQUIRE_PGO}" = "yes"
6688 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006689 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 -07006690 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006691 fi
6692 ;;
6693 *gcc*)
6694 case $ac_sys_system in
6695 Darwin*)
6696 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6697 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006698 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006699 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006700 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006701 then
6702 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006703 if test "${REQUIRE_PGO}" = "yes"
6704 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006705 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 -07006706 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006707 fi
6708 ;;
6709 *)
6710 PGO_PROF_GEN_FLAG="-fprofile-generate"
6711 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6712 LLVM_PROF_MERGER="true"
6713 LLVM_PROF_FILE=""
6714 ;;
6715 esac
6716 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006717 *icc*)
6718 PGO_PROF_GEN_FLAG="-prof-gen"
6719 PGO_PROF_USE_FLAG="-prof-use"
6720 LLVM_PROF_MERGER="true"
6721 LLVM_PROF_FILE=""
6722 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006723esac
6724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006725# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6726# merged with this chunk of code?
6727
6728# Optimizer/debugger flags
6729# ------------------------
6730# (The following bit of code is complicated enough - please keep things
6731# indented properly. Just pretend you're editing Python code. ;-)
6732
6733# There are two parallel sets of case statements below, one that checks to
6734# see if OPT was set and one that does BASECFLAGS setting based upon
6735# compiler and platform. BASECFLAGS tweaks need to be made even if the
6736# user set OPT.
6737
6738# tweak OPT based on compiler and platform, only if the user didn't set
6739# it on the command line
6740
Victor Stinner9ed34a82017-05-02 22:35:58 +02006741
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006742if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743then
6744 case $GCC in
6745 yes)
6746 if test "$CC" != 'g++' ; then
6747 STRICT_PROTO="-Wstrict-prototypes"
6748 fi
6749 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6750 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6751 WRAP="-fwrapv"
6752 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006753
Stefan Krahaf04ff22011-12-08 22:20:31 +01006754 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006755 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006756 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006757 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006758 *)
6759 if $CC --version 2>&1 | grep -q clang
6760 then
6761 cc_is_clang=1
6762 else
6763 cc_is_clang=
6764 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006765 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006766
Victor Stinner35f3d242017-04-21 12:35:24 +02006767 if test -n "${cc_is_clang}"
6768 then
6769 # Clang also needs -fwrapv
6770 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006771 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6772 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006773 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006774 fi
6775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776 case $ac_cv_prog_cc_g in
6777 yes)
6778 if test "$Py_DEBUG" = 'true' ; then
6779 # Optimization messes up debuggers, so turn it off for
6780 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006781 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006782 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006783 else
Victor Stinner28205b22017-04-21 11:24:34 +02006784 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006785 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786 else
Victor Stinner28205b22017-04-21 11:24:34 +02006787 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788 fi
6789 ;;
6790 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006791 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006792 ;;
6793 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006794
Victor Stinner826f83f2017-04-28 15:07:10 +02006795 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797 case $ac_sys_system in
6798 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6799 ;;
6800 esac
6801 ;;
6802
6803 *)
6804 OPT="-O"
6805 ;;
6806 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807fi
6808
6809
6810
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812# The -arch flags for universal builds on OSX
6813UNIVERSAL_ARCH_FLAGS=
6814
6815
6816# tweak BASECFLAGS based on compiler and platform
6817case $GCC in
6818yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006819 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006820
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6822$as_echo_n "checking for -Wextra... " >&6; }
6823 ac_save_cc="$CC"
6824 CC="$CC -Wextra -Werror"
6825 if ${ac_cv_extra_warnings+:} false; then :
6826 $as_echo_n "(cached) " >&6
6827else
6828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829/* end confdefs.h. */
6830
6831
6832int
6833main ()
6834{
6835
6836 ;
6837 return 0;
6838}
6839
6840_ACEOF
6841if ac_fn_c_try_compile "$LINENO"; then :
6842
6843 ac_cv_extra_warnings=yes
6844
6845else
6846
6847 ac_cv_extra_warnings=no
6848
6849fi
6850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6851fi
6852
6853 CC="$ac_save_cc"
6854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6855$as_echo "$ac_cv_extra_warnings" >&6; }
6856
6857 if test $ac_cv_extra_warnings = yes
6858 then
6859 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6860 fi
6861
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006862 # Python doesn't violate C99 aliasing rules, but older versions of
6863 # GCC produce warnings for legal Python code. Enable
6864 # -fno-strict-aliasing on versions of GCC that support but produce
6865 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6867$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 ac_save_cc="$CC"
6869 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006870 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006871 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006873else
Matthias Kloseb9621712010-04-24 17:59:49 +00006874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006876
Matthias Kloseb159a552010-04-25 21:00:44 +00006877
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006878int
6879main ()
6880{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006881
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006882 ;
6883 return 0;
6884}
Matthias Kloseb159a552010-04-25 21:00:44 +00006885
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006887if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006888
6889 CC="$ac_save_cc -fstrict-aliasing"
6890 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006892/* end confdefs.h. */
6893
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006894 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006895int
6896main ()
6897{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006898double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006899 ;
6900 return 0;
6901}
Matthias Kloseb159a552010-04-25 21:00:44 +00006902
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006904if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006905
6906 ac_cv_no_strict_aliasing=no
6907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908else
Matthias Kloseb159a552010-04-25 21:00:44 +00006909
6910 ac_cv_no_strict_aliasing=yes
6911
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006912fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006914
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006915else
Matthias Kloseb159a552010-04-25 21:00:44 +00006916
6917 ac_cv_no_strict_aliasing=no
6918
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006921fi
6922
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006923 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6926$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006927 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928 then
6929 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6930 fi
6931
Zachary Ware5af85642015-12-21 12:09:17 -06006932 # ICC doesn't recognize the option, but only emits a warning
6933 ## XXX does it emit an unused result warning and can it be disabled?
6934 case "$CC" in
6935 *icc*)
6936 ac_cv_disable_unused_result_warning=no
6937 ;;
6938 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6940$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6941 ac_save_cc="$CC"
6942 CC="$CC -Wunused-result -Werror"
6943 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006944 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006945 $as_echo_n "(cached) " >&6
6946else
6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6948/* end confdefs.h. */
6949
6950
6951int
6952main ()
6953{
6954
6955 ;
6956 return 0;
6957}
6958
6959_ACEOF
6960if ac_fn_c_try_compile "$LINENO"; then :
6961
6962 ac_cv_disable_unused_result_warning=yes
6963
6964else
6965
6966 ac_cv_disable_unused_result_warning=no
6967
6968fi
6969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6970fi
6971
6972 CFLAGS="$save_CFLAGS"
6973 CC="$ac_save_cc"
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6975$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006976 ;;
6977 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006978
6979 if test $ac_cv_disable_unused_result_warning = yes
6980 then
6981 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006982 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6983 fi
6984
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6986$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6987 ac_save_cc="$CC"
6988 CC="$CC -Wunused-parameter -Werror"
6989 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6990 $as_echo_n "(cached) " >&6
6991else
6992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6993/* end confdefs.h. */
6994
6995
6996int
6997main ()
6998{
6999
7000 ;
7001 return 0;
7002}
7003
7004_ACEOF
7005if ac_fn_c_try_compile "$LINENO"; then :
7006
7007 ac_cv_disable_unused_parameter_warning=yes
7008
7009else
7010
7011 ac_cv_disable_unused_parameter_warning=no
7012
7013fi
7014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7015fi
7016
7017 CC="$ac_save_cc"
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7019$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7020
7021 if test $ac_cv_disable_unused_parameter_warning = yes
7022 then
7023 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7024 fi
7025
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7027$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7028 ac_save_cc="$CC"
7029 CC="$CC -Wmissing-field-initializers -Werror"
7030 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7031 $as_echo_n "(cached) " >&6
7032else
7033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7034/* end confdefs.h. */
7035
7036
7037int
7038main ()
7039{
7040
7041 ;
7042 return 0;
7043}
7044
7045_ACEOF
7046if ac_fn_c_try_compile "$LINENO"; then :
7047
7048 ac_cv_disable_missing_field_initializers=yes
7049
7050else
7051
7052 ac_cv_disable_missing_field_initializers=no
7053
7054fi
7055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7056fi
7057
7058 CC="$ac_save_cc"
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7060$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7061
7062 if test $ac_cv_disable_missing_field_initializers = yes
7063 then
7064 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007065 fi
7066
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7068$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7069 ac_save_cc="$CC"
7070 CC="$CC -Wsign-compare"
7071 save_CFLAGS="$CFLAGS"
7072 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7073 $as_echo_n "(cached) " >&6
7074else
7075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7076/* end confdefs.h. */
7077
7078
7079int
7080main ()
7081{
7082
7083 ;
7084 return 0;
7085}
7086
7087_ACEOF
7088if ac_fn_c_try_compile "$LINENO"; then :
7089
7090 ac_cv_enable_sign_compare_warning=yes
7091
7092else
7093
7094 ac_cv_enable_sign_compare_warning=no
7095
7096fi
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7098fi
7099
7100 CFLAGS="$save_CFLAGS"
7101 CC="$ac_save_cc"
7102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7103$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7104
7105 if test $ac_cv_enable_sign_compare_warning = yes
7106 then
7107 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7108 fi
7109
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7111$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7112 ac_save_cc="$CC"
7113 CC="$CC -Wunreachable-code"
7114 save_CFLAGS="$CFLAGS"
7115 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7116 $as_echo_n "(cached) " >&6
7117else
7118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7119/* end confdefs.h. */
7120
7121
7122int
7123main ()
7124{
7125
7126 ;
7127 return 0;
7128}
7129
7130_ACEOF
7131if ac_fn_c_try_compile "$LINENO"; then :
7132
7133 ac_cv_enable_unreachable_code_warning=yes
7134
7135else
7136
7137 ac_cv_enable_unreachable_code_warning=no
7138
7139fi
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141fi
7142
7143 CFLAGS="$save_CFLAGS"
7144 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007145
7146 # Don't enable unreachable code warning in debug mode, since it usually
7147 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007148 # Issue #24324: Unfortunately, the unreachable code warning does not work
7149 # correctly on gcc and has been silently removed from the compiler.
7150 # It is supported on clang but on OS X systems gcc may be an alias
7151 # for clang. Try to determine if the compiler is not really gcc and,
7152 # if so, only then enable the warning.
7153 if test $ac_cv_enable_unreachable_code_warning = yes && \
7154 test "$Py_DEBUG" != "true" && \
7155 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007156 then
7157 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007158 else
7159 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007160 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7162$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007163
Victor Stinner193ee0a2017-02-06 14:24:00 +01007164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7165$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7166 ac_save_cc="$CC"
7167 CC="$CC -Werror=implicit-function-declaration"
7168 if ${ac_cv_enable_implicit_function_declaration_error+:} 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_implicit_function_declaration_error=yes
7187
7188else
7189
7190 ac_cv_enable_implicit_function_declaration_error=no
7191
7192fi
7193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7194fi
7195
7196 CC="$ac_save_cc"
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7198$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7199
7200 if test $ac_cv_enable_implicit_function_declaration_error = yes
7201 then
7202 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7203 fi
7204
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007205 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7206 # support. Without this, treatment of subnormals doesn't follow
7207 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007208 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007209 alpha*)
7210 BASECFLAGS="$BASECFLAGS -mieee"
7211 ;;
7212 esac
7213
7214 case $ac_sys_system in
7215 SCO_SV*)
7216 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7217 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007218
7219 # is there any other compiler on Darwin besides gcc?
7220 Darwin*)
7221 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7222 # used to be here, but non-Apple gcc doesn't accept them.
7223 if test "${CC}" = gcc
7224 then
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007226$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007227 case "${UNIVERSALSDK}" in
7228 */MacOSX10.4u.sdk)
7229 # Build using 10.4 SDK, force usage of gcc when the
7230 # compiler is gcc, otherwise the user will get very
7231 # confusing error messages when building on OSX 10.6
7232 CC=gcc-4.0
7233 CPP=cpp-4.0
7234 ;;
7235 esac
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007237$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007238 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239
Ned Deily87adb6e2013-10-18 21:09:56 -07007240 if test "${enable_universalsdk}"
7241 then
7242 case "$UNIVERSAL_ARCHS" in
7243 32-bit)
7244 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7245 LIPO_32BIT_FLAGS=""
7246 ARCH_RUN_32BIT=""
7247 ;;
7248 64-bit)
7249 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7250 LIPO_32BIT_FLAGS=""
7251 ARCH_RUN_32BIT="true"
7252 ;;
7253 all)
7254 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7255 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7256 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7257 ;;
7258 intel)
7259 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7260 LIPO_32BIT_FLAGS="-extract i386"
7261 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7262 ;;
7263 intel-32)
7264 UNIVERSAL_ARCH_FLAGS="-arch i386"
7265 LIPO_32BIT_FLAGS=""
7266 ARCH_RUN_32BIT=""
7267 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007268 intel-64)
7269 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7270 LIPO_32BIT_FLAGS=""
7271 ARCH_RUN_32BIT="true"
7272 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007273 3-way)
7274 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7275 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7276 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7277 ;;
7278 *)
7279 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7280 ;;
7281 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007282
Ned Deily87adb6e2013-10-18 21:09:56 -07007283 if test "${UNIVERSALSDK}" != "/"
7284 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007285 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7286 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007287 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007288 else
7289 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7290 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007291 fi
7292 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293
Ned Deily87adb6e2013-10-18 21:09:56 -07007294 # Calculate an appropriate deployment target for this build:
7295 # The deployment target value is used explicitly to enable certain
7296 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007297 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007298 # component of the string returned by distutils.get_platform().
7299 #
7300 # Use the value from:
7301 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7302 # 2. the operating system version of the build machine if >= 10.6
7303 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7304 # below to pick either 10.3, 10.4, or 10.5 as the target.
7305 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007306
Ned Deily87adb6e2013-10-18 21:09:56 -07007307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7308$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007309 cur_target_major=`sw_vers -productVersion | \
7310 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7311 cur_target_minor=`sw_vers -productVersion | \
7312 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7313 cur_target="${cur_target_major}.${cur_target_minor}"
7314 if test ${cur_target_major} -eq 10 && \
7315 test ${cur_target_minor} -ge 3 && \
7316 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007317 then
Ned Deily36820b62014-06-25 13:44:22 -07007318 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007319 cur_target=10.3
7320 if test ${enable_universalsdk}
7321 then
7322 case "$UNIVERSAL_ARCHS" in
7323 all|3-way|intel|64-bit)
7324 # These configurations were first supported in 10.5
7325 cur_target='10.5'
7326 ;;
7327 esac
7328 else
7329 if test `/usr/bin/arch` = "i386"
7330 then
7331 # 10.4 was the first release to support Intel archs
7332 cur_target="10.4"
7333 fi
7334 fi
7335 fi
7336 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007337
Ned Deily87adb6e2013-10-18 21:09:56 -07007338 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7339 # environment with a value that is the same as what we'll use
7340 # in the Makefile to ensure that we'll get the same compiler
7341 # environment during configure and build time.
7342 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7343 export MACOSX_DEPLOYMENT_TARGET
7344 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7346$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007347
Ned Deily87adb6e2013-10-18 21:09:56 -07007348 # end of Darwin* tests
7349 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350 esac
7351 ;;
7352
7353*)
7354 case $ac_sys_system in
7355 OpenUNIX*|UnixWare*)
7356 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7357 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358 SCO_SV*)
7359 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7360 ;;
7361 esac
7362 ;;
7363esac
7364
Zachary Ware5af85642015-12-21 12:09:17 -06007365# ICC needs -fp-model strict or floats behave badly
7366case "$CC" in
7367*icc*)
7368 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7369 ;;
7370esac
7371
T. Woutersddbfa2c2017-05-23 01:30:49 +02007372if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373 :
7374else
7375 OPT="-DNDEBUG $OPT"
7376fi
7377
7378if test "$ac_arch_flags"
7379then
7380 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7381fi
7382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383# On some compilers, pthreads are available without further options
7384# (e.g. MacOS X). On some of these systems, the compiler will not
7385# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7386# So we have to see first whether pthreads are available without
7387# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7389$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007390if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007391 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392else
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394 ac_cv_pthread_is_default=no
7395else
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397/* end confdefs.h. */
7398
Stefan Krah7dba5942012-11-22 22:49:11 +01007399#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400#include <pthread.h>
7401
7402void* routine(void* p){return NULL;}
7403
7404int main(){
7405 pthread_t p;
7406 if(pthread_create(&p,NULL,routine,NULL)!=0)
7407 return 1;
7408 (void)pthread_detach(p);
7409 return 0;
7410}
7411
7412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007413if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007414
7415 ac_cv_pthread_is_default=yes
7416 ac_cv_kthread=no
7417 ac_cv_pthread=no
7418
7419else
Matthias Kloseb9621712010-04-24 17:59:49 +00007420 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7423 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424fi
7425
7426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427fi
7428
Matthias Kloseb9621712010-04-24 17:59:49 +00007429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7430$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431
7432
7433if test $ac_cv_pthread_is_default = yes
7434then
7435 ac_cv_kpthread=no
7436else
7437# -Kpthread, if available, provides the right #defines
7438# and linker options to make pthread_create available
7439# Some compilers won't report that they do not support -Kpthread,
7440# so we need to run a program to see whether it really made the
7441# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7443$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007444if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446else
7447 ac_save_cc="$CC"
7448CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007449if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450 ac_cv_kpthread=no
7451else
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453/* end confdefs.h. */
7454
Stefan Krah7dba5942012-11-22 22:49:11 +01007455#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456#include <pthread.h>
7457
7458void* routine(void* p){return NULL;}
7459
7460int main(){
7461 pthread_t p;
7462 if(pthread_create(&p,NULL,routine,NULL)!=0)
7463 return 1;
7464 (void)pthread_detach(p);
7465 return 0;
7466}
7467
7468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007469if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470 ac_cv_kpthread=yes
7471else
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7475 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476fi
7477
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478CC="$ac_save_cc"
7479fi
7480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7482$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483fi
7484
7485if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7486then
7487# -Kthread, if available, provides the right #defines
7488# and linker options to make pthread_create available
7489# Some compilers won't report that they do not support -Kthread,
7490# so we need to run a program to see whether it really made the
7491# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7493$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007494if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496else
7497 ac_save_cc="$CC"
7498CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007499if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500 ac_cv_kthread=no
7501else
Matthias Kloseb9621712010-04-24 17:59:49 +00007502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503/* end confdefs.h. */
7504
Stefan Krah7dba5942012-11-22 22:49:11 +01007505#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506#include <pthread.h>
7507
7508void* routine(void* p){return NULL;}
7509
7510int main(){
7511 pthread_t p;
7512 if(pthread_create(&p,NULL,routine,NULL)!=0)
7513 return 1;
7514 (void)pthread_detach(p);
7515 return 0;
7516}
7517
7518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007519if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520 ac_cv_kthread=yes
7521else
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7525 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526fi
7527
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528CC="$ac_save_cc"
7529fi
7530
Matthias Kloseb9621712010-04-24 17:59:49 +00007531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7532$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533fi
7534
7535if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7536then
7537# -pthread, if available, provides the right #defines
7538# and linker options to make pthread_create available
7539# Some compilers won't report that they do not support -pthread,
7540# so we need to run a program to see whether it really made the
7541# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7543$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007544if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546else
7547 ac_save_cc="$CC"
7548CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007549if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550 ac_cv_pthread=no
7551else
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553/* end confdefs.h. */
7554
Stefan Krah7dba5942012-11-22 22:49:11 +01007555#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556#include <pthread.h>
7557
7558void* routine(void* p){return NULL;}
7559
7560int main(){
7561 pthread_t p;
7562 if(pthread_create(&p,NULL,routine,NULL)!=0)
7563 return 1;
7564 (void)pthread_detach(p);
7565 return 0;
7566}
7567
7568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007569if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570 ac_cv_pthread=yes
7571else
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7575 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576fi
7577
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578CC="$ac_save_cc"
7579fi
7580
Matthias Kloseb9621712010-04-24 17:59:49 +00007581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7582$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583fi
7584
7585# If we have set a CC compiler flag for thread support then
7586# check if it works for CXX, too.
7587ac_cv_cxx_thread=no
7588if test ! -z "$CXX"
7589then
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7591$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592ac_save_cxx="$CXX"
7593
7594if test "$ac_cv_kpthread" = "yes"
7595then
7596 CXX="$CXX -Kpthread"
7597 ac_cv_cxx_thread=yes
7598elif test "$ac_cv_kthread" = "yes"
7599then
7600 CXX="$CXX -Kthread"
7601 ac_cv_cxx_thread=yes
7602elif test "$ac_cv_pthread" = "yes"
7603then
7604 CXX="$CXX -pthread"
7605 ac_cv_cxx_thread=yes
7606fi
7607
7608if test $ac_cv_cxx_thread = yes
7609then
7610 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7611 $CXX -c conftest.$ac_ext 2>&5
7612 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7613 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7614 then
7615 ac_cv_cxx_thread=yes
7616 else
7617 ac_cv_cxx_thread=no
7618 fi
7619 rm -fr conftest*
7620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7622$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623fi
7624CXX="$ac_save_cxx"
7625
7626
7627# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7629$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007630if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634/* end confdefs.h. */
7635#include <stdlib.h>
7636#include <stdarg.h>
7637#include <string.h>
7638#include <float.h>
7639
7640int
7641main ()
7642{
7643
7644 ;
7645 return 0;
7646}
7647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007648if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649 ac_cv_header_stdc=yes
7650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7654
7655if test $ac_cv_header_stdc = yes; then
7656 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658/* end confdefs.h. */
7659#include <string.h>
7660
7661_ACEOF
7662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 $EGREP "memchr" >/dev/null 2>&1; then :
7664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665else
7666 ac_cv_header_stdc=no
7667fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007668rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669
7670fi
7671
7672if test $ac_cv_header_stdc = yes; then
7673 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675/* end confdefs.h. */
7676#include <stdlib.h>
7677
7678_ACEOF
7679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 $EGREP "free" >/dev/null 2>&1; then :
7681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682else
7683 ac_cv_header_stdc=no
7684fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007685rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686
7687fi
7688
7689if test $ac_cv_header_stdc = yes; then
7690 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007692 :
7693else
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695/* end confdefs.h. */
7696#include <ctype.h>
7697#include <stdlib.h>
7698#if ((' ' & 0x0FF) == 0x020)
7699# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7700# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7701#else
7702# define ISLOWER(c) \
7703 (('a' <= (c) && (c) <= 'i') \
7704 || ('j' <= (c) && (c) <= 'r') \
7705 || ('s' <= (c) && (c) <= 'z'))
7706# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7707#endif
7708
7709#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7710int
7711main ()
7712{
7713 int i;
7714 for (i = 0; i < 256; i++)
7715 if (XOR (islower (i), ISLOWER (i))
7716 || toupper (i) != TOUPPER (i))
7717 return 2;
7718 return 0;
7719}
7720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007721if ac_fn_c_try_run "$LINENO"; then :
7722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723else
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728fi
7729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730fi
7731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7733$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734if test $ac_cv_header_stdc = yes; then
7735
Matthias Kloseb9621712010-04-24 17:59:49 +00007736$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737
7738fi
7739
stratakise768c862018-01-23 16:11:24 +01007740for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007741fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007742ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007743sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007744unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007745poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007746sys/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 +01007747sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007748sys/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 +01007749sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007750sys/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 -07007751libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007752linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007753sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007754do :
7755 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7756ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007757if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007759#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007760_ACEOF
7761
7762fi
7763
Guido van Rossum627b2d71993-12-24 10:39:16 +00007764done
7765
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007766ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007767for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7770$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007771if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007773else
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007775/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776#include <sys/types.h>
7777#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007778
Martin v. Löwis11437992002-04-12 09:54:03 +00007779int
7780main ()
7781{
7782if ((DIR *) 0)
7783return 0;
7784 ;
7785 return 0;
7786}
7787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007790else
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007795eval ac_res=\$$as_ac_Header
7796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7797$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007798if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007800#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007801_ACEOF
7802
7803ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007806done
7807# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7808if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7810$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007811if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007813else
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818/* Override any GCC internal prototype to avoid an error.
7819 Use char because int might match the return type of a GCC
7820 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007821#ifdef __cplusplus
7822extern "C"
7823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007824char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007825int
7826main ()
7827{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007829 ;
7830 return 0;
7831}
7832_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833for ac_lib in '' dir; do
7834 if test -z "$ac_lib"; then
7835 ac_res="none required"
7836 else
7837 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007838 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007843rm -f core conftest.err conftest.$ac_objext \
7844 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007845 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848done
Victor Stinnere0be4232011-10-25 13:06:09 +02007849if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851else
7852 ac_cv_search_opendir=no
7853fi
7854rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007855LIBS=$ac_func_search_save_LIBS
7856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7858$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007860if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007862
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007863fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007864
Michael W. Hudson54241132001-12-07 15:38:26 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7867$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007868if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007870else
7871 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875/* Override any GCC internal prototype to avoid an error.
7876 Use char because int might match the return type of a GCC
7877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007878#ifdef __cplusplus
7879extern "C"
7880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007881char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007882int
7883main ()
7884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ;
7887 return 0;
7888}
7889_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890for ac_lib in '' x; do
7891 if test -z "$ac_lib"; then
7892 ac_res="none required"
7893 else
7894 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007895 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900rm -f core conftest.err conftest.$ac_objext \
7901 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007902 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905done
Victor Stinnere0be4232011-10-25 13:06:09 +02007906if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908else
7909 ac_cv_search_opendir=no
7910fi
7911rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007912LIBS=$ac_func_search_save_LIBS
7913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7915$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007917if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007920fi
7921
7922fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007923
Matthias Kloseb9621712010-04-24 17:59:49 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7925$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007926if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007928else
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007931#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007932int
7933main ()
7934{
7935return makedev(0, 0);
7936 ;
7937 return 0;
7938}
7939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007941 ac_cv_header_sys_types_h_makedev=yes
7942else
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945rm -f core conftest.err conftest.$ac_objext \
7946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007947
7948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7950$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007951
7952if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007953ac_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 +02007954if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007955
Matthias Kloseb9621712010-04-24 17:59:49 +00007956$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007957
7958fi
7959
7960
7961
7962 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 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 +02007964if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007965
Matthias Kloseb9621712010-04-24 17:59:49 +00007966$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007967
7968fi
7969
7970
7971 fi
7972fi
7973
Michael W. Hudson54241132001-12-07 15:38:26 +00007974
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007975# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7976# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7977SAVE_CFLAGS=$CFLAGS
7978CFLAGS="-std=c99 $CFLAGS"
7979for ac_header in bluetooth/bluetooth.h
7980do :
7981 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7982if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7983 cat >>confdefs.h <<_ACEOF
7984#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7985_ACEOF
7986
7987fi
7988
7989done
7990
7991CFLAGS=$SAVE_CFLAGS
7992
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007993# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7994for ac_header in net/if.h
7995do :
7996 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7997#ifdef STDC_HEADERS
7998# include <stdlib.h>
7999# include <stddef.h>
8000#else
8001# ifdef HAVE_STDLIB_H
8002# include <stdlib.h>
8003# endif
8004#endif
8005#ifdef HAVE_SYS_SOCKET_H
8006# include <sys/socket.h>
8007#endif
8008
8009"
Victor Stinnere0be4232011-10-25 13:06:09 +02008010if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008011 cat >>confdefs.h <<_ACEOF
8012#define HAVE_NET_IF_H 1
8013_ACEOF
8014
8015fi
8016
8017done
8018
8019
Martin v. Löwis11017b12006-01-14 18:12:57 +00008020# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008021for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008022do :
8023 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 +00008024#ifdef HAVE_ASM_TYPES_H
8025#include <asm/types.h>
8026#endif
8027#ifdef HAVE_SYS_SOCKET_H
8028#include <sys/socket.h>
8029#endif
8030
Matthias Kloseb9621712010-04-24 17:59:49 +00008031"
Victor Stinnere0be4232011-10-25 13:06:09 +02008032if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008033 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008034#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008035_ACEOF
8036
8037fi
8038
8039done
8040
8041
caaveryeffc12f2017-09-06 18:18:10 -04008042for ac_header in linux/vm_sockets.h
8043do :
8044 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8045#ifdef HAVE_SYS_SOCKET_H
8046#include <sys/socket.h>
8047#endif
8048
8049"
8050if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8051 cat >>confdefs.h <<_ACEOF
8052#define HAVE_LINUX_VM_SOCKETS_H 1
8053_ACEOF
8054
8055fi
8056
8057done
8058
8059
Charles-François Natali47413c12011-10-06 19:47:44 +02008060# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008061for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008062do :
8063 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8064ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8065#ifdef HAVE_SYS_SOCKET_H
8066#include <sys/socket.h>
8067#endif
8068
8069"
8070if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8071 cat >>confdefs.h <<_ACEOF
8072#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8073_ACEOF
8074
8075fi
8076
8077done
8078
8079
Guido van Rossum627b2d71993-12-24 10:39:16 +00008080# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008081was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8083$as_echo_n "checking for clock_t in time.h... " >&6; }
8084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008085/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008086#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008087
8088_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008091 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008092else
Martin v. Löwis11437992002-04-12 09:54:03 +00008093
8094
Matthias Kloseb9621712010-04-24 17:59:49 +00008095$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008096
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008097
Guido van Rossum627b2d71993-12-24 10:39:16 +00008098fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008099rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008100
Matthias Kloseb9621712010-04-24 17:59:49 +00008101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8102$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8105$as_echo_n "checking for makedev... " >&6; }
8106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008107/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008108
Jesus Cea740f53a2010-04-28 11:35:30 +00008109#if defined(MAJOR_IN_MKDEV)
8110#include <sys/mkdev.h>
8111#elif defined(MAJOR_IN_SYSMACROS)
8112#include <sys/sysmacros.h>
8113#else
8114#include <sys/types.h>
8115#endif
8116
Neal Norwitz11690112002-07-30 01:08:28 +00008117int
8118main ()
8119{
Jesus Cea740f53a2010-04-28 11:35:30 +00008120
8121 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008122 ;
8123 return 0;
8124}
Matthias Kloseb159a552010-04-25 21:00:44 +00008125
Neal Norwitz11690112002-07-30 01:08:28 +00008126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008127if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008128 ac_cv_has_makedev=yes
8129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008132rm -f core conftest.err conftest.$ac_objext \
8133 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8135$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008136if test "$ac_cv_has_makedev" = "yes"; then
8137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008139
8140fi
8141
Christian Heimes985ecdc2013-11-20 11:46:18 +01008142# byte swapping
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8144$as_echo_n "checking for le64toh... " >&6; }
8145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8146/* end confdefs.h. */
8147
8148#ifdef HAVE_ENDIAN_H
8149#include <endian.h>
8150#elif defined(HAVE_SYS_ENDIAN_H)
8151#include <sys/endian.h>
8152#endif
8153
8154int
8155main ()
8156{
8157
8158 le64toh(1)
8159 ;
8160 return 0;
8161}
8162
8163_ACEOF
8164if ac_fn_c_try_link "$LINENO"; then :
8165 ac_cv_has_le64toh=yes
8166else
8167 ac_cv_has_le64toh=no
8168fi
8169rm -f core conftest.err conftest.$ac_objext \
8170 conftest$ac_exeext conftest.$ac_ext
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8172$as_echo "$ac_cv_has_le64toh" >&6; }
8173if test "$ac_cv_has_le64toh" = "yes"; then
8174
8175$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8176
8177fi
8178
Martin v. Löwis399a6892002-10-04 10:22:02 +00008179use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008180# Don't use largefile support for GNU/Hurd
8181case $ac_sys_system in GNU*)
8182 use_lfs=no
8183esac
8184
Martin v. Löwis399a6892002-10-04 10:22:02 +00008185if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008186# Two defines needed to enable largefile support on various platforms
8187# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008188case $ac_sys_system/$ac_sys_release in
8189AIX*)
8190
8191$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8192
8193 ;;
8194esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008195
Matthias Kloseb9621712010-04-24 17:59:49 +00008196$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008197
8198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008200
Martin v. Löwis399a6892002-10-04 10:22:02 +00008201fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008202
Guido van Rossum84e7b241996-08-19 21:59:00 +00008203# Add some code to confdefs.h so that the test for off_t works on SCO
8204cat >> confdefs.h <<\EOF
8205#if defined(SCO_DS)
8206#undef _OFF_T
8207#endif
8208EOF
8209
Guido van Rossumef2255b2000-03-10 22:30:29 +00008210# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008211ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008212if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008214else
Martin v. Löwis11437992002-04-12 09:54:03 +00008215
8216cat >>confdefs.h <<_ACEOF
8217#define mode_t int
8218_ACEOF
8219
8220fi
8221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008223if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008224
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008225else
Martin v. Löwis11437992002-04-12 09:54:03 +00008226
8227cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008229_ACEOF
8230
8231fi
8232
Matthias Kloseb9621712010-04-24 17:59:49 +00008233ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008234if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008236else
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
8238cat >>confdefs.h <<_ACEOF
8239#define pid_t int
8240_ACEOF
8241
8242fi
8243
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008244
Martin v. Löwis11437992002-04-12 09:54:03 +00008245cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008246#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008247_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008250if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008251
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008252else
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
8254cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008256_ACEOF
8257
8258fi
8259
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8261$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008262if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008264else
Matthias Kloseb9621712010-04-24 17:59:49 +00008265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008266/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008267#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
8269_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008272 ac_cv_type_uid_t=yes
8273else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008274 ac_cv_type_uid_t=no
8275fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008276rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008277
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8280$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008281if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
8285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008287
8288fi
8289
Mark Dickinson983bc162012-12-02 12:11:38 +00008290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008292if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293
Matthias Kloseb9621712010-04-24 17:59:49 +00008294$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008295
8296fi
8297
Stefan Krah1919b7e2012-03-21 18:25:23 +01008298ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8299if test "x$ac_cv_type___uint128_t" = xyes; then :
8300
8301$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8302
8303fi
8304
Jack Jansendd19cf82001-12-06 22:36:17 +00008305
Michael W. Hudson54241132001-12-07 15:38:26 +00008306# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008307# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308# The cast to long int works around a bug in the HP C Compiler
8309# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8310# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8311# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8313$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008314if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008316else
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 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 +00008318
Martin v. Löwis11437992002-04-12 09:54:03 +00008319else
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 if test "$ac_cv_type_int" = yes; then
8321 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8322$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008323as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008324See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325 else
8326 ac_cv_sizeof_int=0
8327 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008329
Martin v. Löwis11437992002-04-12 09:54:03 +00008330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8332$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008333
8334
8335
Martin v. Löwis11437992002-04-12 09:54:03 +00008336cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008337#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008338_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008339
8340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008341# The cast to long int works around a bug in the HP C Compiler
8342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8344# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8346$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008347if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008349else
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 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 +00008351
Martin v. Löwis11437992002-04-12 09:54:03 +00008352else
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 if test "$ac_cv_type_long" = yes; then
8354 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8355$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008356as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008357See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358 else
8359 ac_cv_sizeof_long=0
8360 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008362
Martin v. Löwis11437992002-04-12 09:54:03 +00008363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8365$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366
8367
8368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008370#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008371_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008372
8373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374# The cast to long int works around a bug in the HP C Compiler
8375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8376# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8377# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8379$as_echo_n "checking size of long long... " >&6; }
8380if ${ac_cv_sizeof_long_long+:} false; then :
8381 $as_echo_n "(cached) " >&6
8382else
8383 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8384
8385else
8386 if test "$ac_cv_type_long_long" = yes; then
8387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8389as_fn_error 77 "cannot compute sizeof (long long)
8390See \`config.log' for more details" "$LINENO" 5; }
8391 else
8392 ac_cv_sizeof_long_long=0
8393 fi
8394fi
8395
8396fi
8397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8398$as_echo "$ac_cv_sizeof_long_long" >&6; }
8399
8400
8401
8402cat >>confdefs.h <<_ACEOF
8403#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8404_ACEOF
8405
8406
8407# The cast to long int works around a bug in the HP C Compiler
8408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8410# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8412$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008413if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008415else
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 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 +00008417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418else
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 if test "$ac_cv_type_void_p" = yes; then
8420 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008422as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008423See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424 else
8425 ac_cv_sizeof_void_p=0
8426 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008428
Martin v. Löwis11437992002-04-12 09:54:03 +00008429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8431$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008432
8433
8434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008436#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008437_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008438
8439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440# The cast to long int works around a bug in the HP C Compiler
8441# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8442# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8443# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8445$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008446if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008448else
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 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 +00008450
Martin v. Löwis11437992002-04-12 09:54:03 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 if test "$ac_cv_type_short" = yes; then
8453 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8454$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008455as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008456See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457 else
8458 ac_cv_sizeof_short=0
8459 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461
Martin v. Löwis11437992002-04-12 09:54:03 +00008462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8464$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465
8466
8467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008469#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008470_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008471
8472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473# The cast to long int works around a bug in the HP C Compiler
8474# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8475# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8476# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8478$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008479if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008481else
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 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 +00008483
Martin v. Löwis11437992002-04-12 09:54:03 +00008484else
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 if test "$ac_cv_type_float" = yes; then
8486 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008488as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008489See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490 else
8491 ac_cv_sizeof_float=0
8492 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494
Martin v. Löwis11437992002-04-12 09:54:03 +00008495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8497$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498
8499
8500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008502#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008503_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008504
8505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506# The cast to long int works around a bug in the HP C Compiler
8507# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8508# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8509# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8511$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008512if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008514else
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 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 +00008516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517else
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 if test "$ac_cv_type_double" = yes; then
8519 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008521as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008522See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523 else
8524 ac_cv_sizeof_double=0
8525 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527
Martin v. Löwis11437992002-04-12 09:54:03 +00008528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8530$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531
8532
8533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008535#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008536_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008537
8538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539# The cast to long int works around a bug in the HP C Compiler
8540# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8541# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8542# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8544$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008545if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 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 +00008549
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 if test "$ac_cv_type_fpos_t" = yes; then
8552 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008554as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008555See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 else
8557 ac_cv_sizeof_fpos_t=0
8558 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8563$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564
8565
8566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008568#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008569_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008570
Michael W. Hudson54241132001-12-07 15:38:26 +00008571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572# The cast to long int works around a bug in the HP C Compiler
8573# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8574# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8575# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8577$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008578if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008580else
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 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 +00008582
Martin v. Löwis18e16552006-02-15 17:27:45 +00008583else
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 if test "$ac_cv_type_size_t" = yes; then
8585 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8586$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008587as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008588See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589 else
8590 ac_cv_sizeof_size_t=0
8591 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593
Martin v. Löwis18e16552006-02-15 17:27:45 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8596$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597
8598
8599
Martin v. Löwis18e16552006-02-15 17:27:45 +00008600cat >>confdefs.h <<_ACEOF
8601#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8602_ACEOF
8603
8604
Christian Heimes400adb02008-02-01 08:12:03 +00008605# The cast to long int works around a bug in the HP C Compiler
8606# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8607# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8608# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8610$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008611if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 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 +00008615
Christian Heimes400adb02008-02-01 08:12:03 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 if test "$ac_cv_type_pid_t" = yes; then
8618 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008620as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008621See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008622 else
8623 ac_cv_sizeof_pid_t=0
8624 fi
8625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626
Christian Heimes400adb02008-02-01 08:12:03 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8629$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008630
8631
8632
8633cat >>confdefs.h <<_ACEOF
8634#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8635_ACEOF
8636
8637
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008638# The cast to long int works around a bug in the HP C Compiler
8639# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8640# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8641# This bug is HP SR number 8606223364.
8642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8643$as_echo_n "checking size of uintptr_t... " >&6; }
8644if ${ac_cv_sizeof_uintptr_t+:} false; then :
8645 $as_echo_n "(cached) " >&6
8646else
8647 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8648
8649else
8650 if test "$ac_cv_type_uintptr_t" = yes; then
8651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8653as_fn_error 77 "cannot compute sizeof (uintptr_t)
8654See \`config.log' for more details" "$LINENO" 5; }
8655 else
8656 ac_cv_sizeof_uintptr_t=0
8657 fi
8658fi
8659
8660fi
8661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8662$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8663
8664
8665
8666cat >>confdefs.h <<_ACEOF
8667#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8668_ACEOF
8669
8670
Michael W. Hudson54241132001-12-07 15:38:26 +00008671
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8673$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008674have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008676/* end confdefs.h. */
8677
8678int
8679main ()
8680{
8681long double x; x = (long double)0;
8682 ;
8683 return 0;
8684}
8685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008686if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008687
8688
Matthias Kloseb9621712010-04-24 17:59:49 +00008689$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008690
8691 have_long_double=yes
8692
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008693fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8696$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008697if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008698# The cast to long int works around a bug in the HP C Compiler
8699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8703$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 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 +00008708
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 if test "$ac_cv_type_long_double" = yes; then
8711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008713as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008714See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008715 else
8716 ac_cv_sizeof_long_double=0
8717 fi
8718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8722$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008723
8724
8725
8726cat >>confdefs.h <<_ACEOF
8727#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8728_ACEOF
8729
8730
8731fi
8732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733# The cast to long int works around a bug in the HP C Compiler
8734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8736# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8738$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008739if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008741else
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 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 +00008743
Thomas Woutersb2137042007-02-01 18:02:27 +00008744else
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 if test "$ac_cv_type__Bool" = yes; then
8746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008748as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008749See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750 else
8751 ac_cv_sizeof__Bool=0
8752 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008754
Thomas Woutersb2137042007-02-01 18:02:27 +00008755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8757$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758
8759
8760
Thomas Woutersb2137042007-02-01 18:02:27 +00008761cat >>confdefs.h <<_ACEOF
8762#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8763_ACEOF
8764
8765
Thomas Woutersb2137042007-02-01 18:02:27 +00008766
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008767# The cast to long int works around a bug in the HP C Compiler
8768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8770# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8772$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008773if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008777#ifdef HAVE_SYS_TYPES_H
8778#include <sys/types.h>
8779#endif
8780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 if test "$ac_cv_type_off_t" = yes; then
8785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008787as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008788See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008789 else
8790 ac_cv_sizeof_off_t=0
8791 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8796$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008798
8799
Martin v. Löwis11437992002-04-12 09:54:03 +00008800cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008801#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008802_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008803
Michael W. Hudson54241132001-12-07 15:38:26 +00008804
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8807$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008808if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008809 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008810
Matthias Kloseb9621712010-04-24 17:59:49 +00008811$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008812
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8814$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008818fi
8819
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008820# The cast to long int works around a bug in the HP C Compiler
8821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8823# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8825$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008826if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008828else
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008830#ifdef HAVE_SYS_TYPES_H
8831#include <sys/types.h>
8832#endif
8833#ifdef HAVE_TIME_H
8834#include <time.h>
8835#endif
8836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008838
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839else
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 if test "$ac_cv_type_time_t" = yes; then
8841 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008843as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008844See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845 else
8846 ac_cv_sizeof_time_t=0
8847 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8852$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008853
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854
8855
Martin v. Löwis11437992002-04-12 09:54:03 +00008856cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008857#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008858_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008859
Michael W. Hudson54241132001-12-07 15:38:26 +00008860
8861
Trent Mick635f6fb2000-08-23 21:33:05 +00008862# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008863ac_save_cc="$CC"
8864if test "$ac_cv_kpthread" = "yes"
8865then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008866elif test "$ac_cv_kthread" = "yes"
8867then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008868elif test "$ac_cv_pthread" = "yes"
8869then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008870fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871
Matthias Kloseb9621712010-04-24 17:59:49 +00008872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8873$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008874have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008876/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008877
8878 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008879int
8880main ()
8881{
Guido van Rossum12580492000-09-24 16:47:19 +00008882pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ;
8884 return 0;
8885}
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
Martin v. Löwis11437992002-04-12 09:54:03 +00008887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008888if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008889 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8893$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008894if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008896# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8897# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8898# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8900$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008901if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008905#ifdef HAVE_PTHREAD_H
8906#include <pthread.h>
8907#endif
8908
Matthias Kloseb9621712010-04-24 17:59:49 +00008909"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911else
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 if test "$ac_cv_type_pthread_t" = yes; then
8913 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008915as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008916See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917 else
8918 ac_cv_sizeof_pthread_t=0
8919 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921
Trent Mick635f6fb2000-08-23 21:33:05 +00008922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8924$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008925
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926
8927
Martin v. Löwis11437992002-04-12 09:54:03 +00008928cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008929#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008931
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008932
Trent Mick635f6fb2000-08-23 21:33:05 +00008933fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008934
8935# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8936# This checking will be unnecessary after removing deprecated TLS API.
8937# The cast to long int works around a bug in the HP C Compiler
8938# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8939# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8940# This bug is HP SR number 8606223364.
8941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8942$as_echo_n "checking size of pthread_key_t... " >&6; }
8943if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8944 $as_echo_n "(cached) " >&6
8945else
8946 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8947"; then :
8948
8949else
8950 if test "$ac_cv_type_pthread_key_t" = yes; then
8951 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8953as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8954See \`config.log' for more details" "$LINENO" 5; }
8955 else
8956 ac_cv_sizeof_pthread_key_t=0
8957 fi
8958fi
8959
8960fi
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8962$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8963
8964
8965
8966cat >>confdefs.h <<_ACEOF
8967#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8968_ACEOF
8969
8970
8971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8972$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8973if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8975/* end confdefs.h. */
8976#include <pthread.h>
8977int
8978main ()
8979{
8980pthread_key_t k; k * 1;
8981 ;
8982 return 0;
8983}
8984_ACEOF
8985if ac_fn_c_try_compile "$LINENO"; then :
8986 ac_pthread_key_t_is_arithmetic_type=yes
8987else
8988 ac_pthread_key_t_is_arithmetic_type=no
8989
8990fi
8991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8993$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8994 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8995
8996$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8997
8998 fi
8999else
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9001$as_echo "no" >&6; }
9002fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009003CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009004
Michael W. Hudson54241132001-12-07 15:38:26 +00009005
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009006case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009007 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009008 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9009 ;;
9010 Darwin/*)
9011 OTHER_LIBTOOL_OPT=""
9012 ;;
9013esac
9014
9015
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009016
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009017case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009018 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009019 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9020 if test "${enable_universalsdk}"; then
9021 :
9022 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009023 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009024 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009025 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009026 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009027 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009028 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009029 if test ${gcc_version} '<' 4.0
9030 then
9031 LIBTOOL_CRUFT="-lcc_dynamic"
9032 else
9033 LIBTOOL_CRUFT=""
9034 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009036 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009037else
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009039/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009040
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009041 #include <unistd.h>
9042 int main(int argc, char*argv[])
9043 {
9044 if (sizeof(long) == 4) {
9045 return 0;
9046 } else {
9047 return 1;
9048 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009049 }
9050
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009052if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053 ac_osx_32bit=yes
9054else
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009059fi
9060
9061
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009062 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009063 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009064 i386)
9065 MACOSX_DEFAULT_ARCH="i386"
9066 ;;
9067 ppc)
9068 MACOSX_DEFAULT_ARCH="ppc"
9069 ;;
9070 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009071 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009072 ;;
9073 esac
9074 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009075 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009076 i386)
9077 MACOSX_DEFAULT_ARCH="x86_64"
9078 ;;
9079 ppc)
9080 MACOSX_DEFAULT_ARCH="ppc64"
9081 ;;
9082 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009083 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009084 ;;
9085 esac
9086
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009087 fi
9088
9089 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009090 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009091 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009092esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9094$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009095if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009096then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009097 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009099 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9104$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009105 if test $enable_shared = "yes"
9106 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009107 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 +00009108 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009109else
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9111$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009112fi
9113
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9115$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009116case $ac_sys_system/$ac_sys_release in
9117 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009120
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9122$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009123 ;;
9124 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009127 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009128esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009129
Guido van Rossum0a516c91994-09-12 10:58:40 +00009130# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009131
Michael W. Hudson54241132001-12-07 15:38:26 +00009132
9133
9134
9135
Benjamin Peterson99f03762010-04-11 22:15:28 +00009136
Thomas Wouters477c8d52006-05-27 19:21:47 +00009137
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009138# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9139# -- usually .so, .sl on HP-UX, .dll on Cygwin
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9141$as_echo_n "checking the extension of shared libraries... " >&6; }
9142if test -z "$SHLIB_SUFFIX"; then
9143 case $ac_sys_system in
9144 hp*|HP*)
9145 case `uname -m` in
9146 ia64) SHLIB_SUFFIX=.so;;
9147 *) SHLIB_SUFFIX=.sl;;
9148 esac
9149 ;;
9150 CYGWIN*) SHLIB_SUFFIX=.dll;;
9151 *) SHLIB_SUFFIX=.so;;
9152 esac
9153fi
9154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9155$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009156
Guido van Rossum0a516c91994-09-12 10:58:40 +00009157# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009158# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009159# (Shared libraries in this instance are shared modules to be loaded into
9160# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9162$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009163if test -z "$LDSHARED"
9164then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009165 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009166 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009167 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009168 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009169 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009171 if test "$GCC" = "yes" ; then
9172 LDSHARED='$(CC) -shared'
9173 LDCXXSHARED='$(CXX) -shared'
9174 else
9175 LDSHARED='$(CC) -G'
9176 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009177 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009178 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 if test "$GCC" = "yes" ; then
9180 LDSHARED='$(CC) -shared'
9181 LDCXXSHARED='$(CXX) -shared'
9182 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009183 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009184 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009185 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009186 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009187 LDSHARED='$(CC) -bundle'
9188 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009189 if test "$enable_framework" ; then
9190 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009191 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9192 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009193 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009194 else
9195 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009196 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009197 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009198 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009199 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009200 LDSHARED='$(CC) -bundle'
9201 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009202 if test "$enable_framework" ; then
9203 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009204 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9205 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009206 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009207 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009208 # No framework, use the Python app as bundle-loader
9209 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009210 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009211 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009212 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009213 Darwin/*)
9214 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9215 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009216
Ned Deily36820b62014-06-25 13:44:22 -07009217 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9218 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9219 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9220 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9221 if test ${dep_target_major} -eq 10 && \
9222 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009223 then
Ned Deily36820b62014-06-25 13:44:22 -07009224 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009225 LDSHARED='$(CC) -bundle'
9226 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +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 Jansen6b08a402004-06-03 12:41:45 +00009232 else
9233 # No framework, use the Python app as bundle-loader
9234 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9235 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009237 fi
Ned Deily36820b62014-06-25 13:44:22 -07009238 else
9239 # building for OS X 10.3 and later
9240 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9241 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9242 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009243 fi
9244 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009245 Linux*|GNU*|QNX*)
9246 LDSHARED='$(CC) -shared'
9247 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009248 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009249 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009250 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009251 LDSHARED='$(CC) -shared'
9252 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009253 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009254 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009255 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009256 OpenBSD*)
9257 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9258 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009259 LDSHARED='$(CC) -shared $(CCSHARED)'
9260 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009261 else
9262 case `uname -r` in
9263 [01].* | 2.[0-7] | 2.[0-7].*)
9264 LDSHARED="ld -Bshareable ${LDFLAGS}"
9265 ;;
9266 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009267 LDSHARED='$(CC) -shared $(CCSHARED)'
9268 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009269 ;;
9270 esac
9271 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009272 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009273 LDSHARED='$(CC) -shared'
9274 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009275 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009276 if test "$GCC" = "yes" ; then
9277 LDSHARED='$(CC) -shared'
9278 LDCXXSHARED='$(CXX) -shared'
9279 else
9280 LDSHARED='$(CC) -G'
9281 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009282 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009283 SCO_SV*)
9284 LDSHARED='$(CC) -Wl,-G,-Bexport'
9285 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9286 CYGWIN*)
9287 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9288 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009289 *) LDSHARED="ld";;
9290 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9293$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009294LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009295BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009296# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9299$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009300if test -z "$CCSHARED"
9301then
Guido van Rossum07397971997-04-29 21:49:50 +00009302 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009303 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009304 then CCSHARED="-fPIC";
9305 elif test `uname -p` = sparc;
9306 then CCSHARED="-xcode=pic32";
9307 else CCSHARED="-Kpic";
9308 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009309 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009310 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009311 else CCSHARED="+z";
9312 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009313 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009314 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009315 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009316 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009317 if test "$GCC" = "yes"
9318 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009319 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009320 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009321 SCO_SV*)
9322 if test "$GCC" = "yes"
9323 then CCSHARED="-fPIC"
9324 else CCSHARED="-Kpic -belf"
9325 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9329$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009331# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9333$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334if test -z "$LINKFORSHARED"
9335then
Guido van Rossum07397971997-04-29 21:49:50 +00009336 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009337 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009338 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009339 LINKFORSHARED="-Wl,-E -Wl,+s";;
9340# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009341 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009342 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009343 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009345 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009346
9347 # Issue #18075: the default maximum stack size (8MBytes) is too
9348 # small for the default recursion limit. Increase the stack size
9349 # to ensure that tests don't crash
9350 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9351
Jack Jansene578a632001-08-15 01:27:14 +00009352 if test "$enable_framework"
9353 then
Jack Jansenda49e192005-01-07 13:08:22 +00009354 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009355 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009356 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009357 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009358 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009359 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009360 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009361 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9362 then
9363 LINKFORSHARED="-Wl,--export-dynamic"
9364 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009365 SunOS/5*) case $CC in
9366 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009367 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009368 then
9369 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009370 fi;;
9371 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009372 CYGWIN*)
9373 if test $enable_shared = "no"
9374 then
9375 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9376 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009377 QNX*)
9378 # -Wl,-E causes the symbols to be added to the dynamic
9379 # symbol table so that they can be found when a module
9380 # is loaded. -N 2048K causes the stack size to be set
9381 # to 2048 kilobytes so that the stack doesn't overflow
9382 # when running test_compile.py.
9383 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009384 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009385fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9387$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009388
Michael W. Hudson54241132001-12-07 15:38:26 +00009389
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9392$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009393if test ! "$LIBRARY" = "$LDLIBRARY"
9394then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009395 case $ac_sys_system in
9396 CYGWIN*)
9397 # Cygwin needs CCSHARED when building extension DLLs
9398 # but not when building the interpreter DLL.
9399 CFLAGSFORSHARED='';;
9400 *)
9401 CFLAGSFORSHARED='$(CCSHARED)'
9402 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9405$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009406
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009407# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9408# library (with --enable-shared).
9409# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009410# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9411# if it is not required, since it creates a dependency of the shared library
9412# to LIBS. This, in turn, means that applications linking the shared libpython
9413# don't need to link LIBS explicitly. The default should be only changed
9414# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009415
Matthias Kloseb9621712010-04-24 17:59:49 +00009416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9417$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009419 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009420 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009421esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9423$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009424
9425
Guido van Rossum627b2d71993-12-24 10:39:16 +00009426# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9428$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009429if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009430 $as_echo_n "(cached) " >&6
9431else
9432 ac_check_lib_save_LIBS=$LIBS
9433LIBS="-lsendfile $LIBS"
9434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9435/* end confdefs.h. */
9436
9437/* Override any GCC internal prototype to avoid an error.
9438 Use char because int might match the return type of a GCC
9439 builtin and then its argument prototype would still apply. */
9440#ifdef __cplusplus
9441extern "C"
9442#endif
9443char sendfile ();
9444int
9445main ()
9446{
9447return sendfile ();
9448 ;
9449 return 0;
9450}
9451_ACEOF
9452if ac_fn_c_try_link "$LINENO"; then :
9453 ac_cv_lib_sendfile_sendfile=yes
9454else
9455 ac_cv_lib_sendfile_sendfile=no
9456fi
9457rm -f core conftest.err conftest.$ac_objext \
9458 conftest$ac_exeext conftest.$ac_ext
9459LIBS=$ac_check_lib_save_LIBS
9460fi
9461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9462$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009463if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009464 cat >>confdefs.h <<_ACEOF
9465#define HAVE_LIBSENDFILE 1
9466_ACEOF
9467
9468 LIBS="-lsendfile $LIBS"
9469
9470fi
9471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9473$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009474if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009475 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009476else
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009478LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482/* Override any GCC internal prototype to avoid an error.
9483 Use char because int might match the return type of a GCC
9484 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485#ifdef __cplusplus
9486extern "C"
9487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009488char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009489int
9490main ()
9491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ;
9494 return 0;
9495}
9496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009497if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009499else
Matthias Kloseb9621712010-04-24 17:59:49 +00009500 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009502rm -f core conftest.err conftest.$ac_objext \
9503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009504LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9507$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009508if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 cat >>confdefs.h <<_ACEOF
9510#define HAVE_LIBDL 1
9511_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009512
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009513 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009515fi
9516 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9518$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009519if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009521else
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009523LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009527/* Override any GCC internal prototype to avoid an error.
9528 Use char because int might match the return type of a GCC
9529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009530#ifdef __cplusplus
9531extern "C"
9532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009533char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009534int
9535main ()
9536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 ;
9539 return 0;
9540}
9541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009542if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009544else
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009547rm -f core conftest.err conftest.$ac_objext \
9548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009549LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9552$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009553if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 cat >>confdefs.h <<_ACEOF
9555#define HAVE_LIBDLD 1
9556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009557
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009558 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009559
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009560fi
9561 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009562
Michael Felt0d3ccb42017-12-30 22:39:20 +01009563# checks for uuid.h location
9564for ac_header in uuid/uuid.h uuid.h
9565do :
9566 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9567ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9568if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9569 cat >>confdefs.h <<_ACEOF
9570#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9571_ACEOF
9572
9573fi
9574
9575done
9576
9577
Berker Peksag9a10ff42017-11-08 23:09:16 +03009578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9579$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581/* end confdefs.h. */
9582#include <uuid/uuid.h>
9583int
9584main ()
9585{
9586
9587#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009588void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009589#endif
9590
9591 ;
9592 return 0;
9593}
9594_ACEOF
9595if ac_fn_c_try_compile "$LINENO"; then :
9596
9597$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9598
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9600$as_echo "yes" >&6; }
9601else
9602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9603$as_echo "no" >&6; }
9604
9605fi
9606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9607
Michael Felt0d3ccb42017-12-30 22:39:20 +01009608# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009609# FreeBSD and OpenBSD provides support as well
9610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9611$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9613/* end confdefs.h. */
9614#include <uuid.h>
9615int
9616main ()
9617{
9618
9619#ifndef uuid_create
9620void *x = uuid_create
9621#endif
9622
9623 ;
9624 return 0;
9625}
9626_ACEOF
9627if ac_fn_c_try_compile "$LINENO"; then :
9628
9629$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9630
9631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9632$as_echo "yes" >&6; }
9633else
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
9636
9637fi
9638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9639
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009640# 'Real Time' functions on Solaris
9641# posix4 on Solaris 2.6
9642# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009644$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009645if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009647else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009648 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652/* Override any GCC internal prototype to avoid an error.
9653 Use char because int might match the return type of a GCC
9654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655#ifdef __cplusplus
9656extern "C"
9657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009658char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009659int
9660main ()
9661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 ;
9664 return 0;
9665}
9666_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667for ac_lib in '' pthread rt posix4; do
9668 if test -z "$ac_lib"; then
9669 ac_res="none required"
9670 else
9671 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009672 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009674 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009679 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682done
Victor Stinnere0be4232011-10-25 13:06:09 +02009683if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685else
9686 ac_cv_search_sem_init=no
9687fi
9688rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009689LIBS=$ac_func_search_save_LIBS
9690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9692$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009694if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009696
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009697fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009698
Martin v. Löwis519adae2003-09-20 10:47:47 +00009699
Martin v. Löwis19d17342003-06-14 21:03:05 +00009700# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9702$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009703if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009704 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009705else
9706 ac_check_lib_save_LIBS=$LIBS
9707LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711/* Override any GCC internal prototype to avoid an error.
9712 Use char because int might match the return type of a GCC
9713 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009714#ifdef __cplusplus
9715extern "C"
9716#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009717char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009718int
9719main ()
9720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009721return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009722 ;
9723 return 0;
9724}
9725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009726if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009727 ac_cv_lib_intl_textdomain=yes
9728else
Matthias Kloseb9621712010-04-24 17:59:49 +00009729 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009731rm -f core conftest.err conftest.$ac_objext \
9732 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009733LIBS=$ac_check_lib_save_LIBS
9734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9736$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009737if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009738
Matthias Kloseb9621712010-04-24 17:59:49 +00009739$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009740
Brett Cannonc6d936e2009-06-07 20:09:53 +00009741 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009742fi
9743
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009744
9745# checks for system dependent C++ extensions support
9746case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9748$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009750/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009751
Georg Brandl59e87bd2011-02-15 19:48:59 +00009752 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009753int
9754main ()
9755{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009756loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ;
9758 return 0;
9759}
Matthias Kloseb159a552010-04-25 21:00:44 +00009760
Martin v. Löwis11437992002-04-12 09:54:03 +00009761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009762if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009763
Matthias Kloseb159a552010-04-25 21:00:44 +00009764
Matthias Kloseb9621712010-04-24 17:59:49 +00009765$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009766
Matthias Kloseb159a552010-04-25 21:00:44 +00009767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009768$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009769
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009770else
Matthias Kloseb159a552010-04-25 21:00:44 +00009771
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009773$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009774
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009776rm -f core conftest.err conftest.$ac_objext \
9777 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009778 *) ;;
9779esac
9780
Christian Heimes985ecdc2013-11-20 11:46:18 +01009781# check for systems that require aligned memory access
9782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9783$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009784if ${ac_cv_aligned_required+:} false; then :
9785 $as_echo_n "(cached) " >&6
9786else
9787 if test "$cross_compiling" = yes; then :
9788 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009789else
9790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9791/* end confdefs.h. */
9792
9793int main()
9794{
9795 char s[16];
9796 int i, *p1, *p2;
9797 for (i=0; i < 16; i++)
9798 s[i] = i;
9799 p1 = (int*)(s+1);
9800 p2 = (int*)(s+2);
9801 if (*p1 == *p2)
9802 return 1;
9803 return 0;
9804}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009805_ACEOF
9806if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009807 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009808else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009809 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009810fi
9811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9812 conftest.$ac_objext conftest.beam conftest.$ac_ext
9813fi
9814
9815
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009816fi
9817
9818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9819$as_echo "$ac_cv_aligned_required" >&6; }
9820if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009821
9822$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9823
9824fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009825
9826# str, bytes and memoryview hash algorithm
9827
9828
9829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9830$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9831
9832# Check whether --with-hash_algorithm was given.
9833if test "${with_hash_algorithm+set}" = set; then :
9834 withval=$with_hash_algorithm;
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9836$as_echo "$withval" >&6; }
9837case "$withval" in
9838 siphash24)
9839 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9840
9841 ;;
9842 fnv)
9843 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9844
9845 ;;
9846 *)
9847 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9848 ;;
9849esac
9850
9851else
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9853$as_echo "default" >&6; }
9854fi
9855
9856
Charles-François Natalid30b0222014-05-08 23:08:51 +01009857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9858$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9859
9860# Check whether --with-address_sanitizer was given.
9861if test "${with_address_sanitizer+set}" = set; then :
9862 withval=$with_address_sanitizer;
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9864$as_echo "$withval" >&6; }
9865BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9866LDFLAGS="-fsanitize=address $LDFLAGS"
9867
9868else
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9870$as_echo "no" >&6; }
9871fi
9872
9873
Guido van Rossum70c7f481998-03-26 18:44:10 +00009874# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9876$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009877if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009879else
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009881LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009891char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9910$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009911if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009912 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009913fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009914 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9916$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009917if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009919else
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009921LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009925/* Override any GCC internal prototype to avoid an error.
9926 Use char because int might match the return type of a GCC
9927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009928#ifdef __cplusplus
9929extern "C"
9930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009931char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009932int
9933main ()
9934{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ;
9937 return 0;
9938}
9939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009942else
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009945rm -f core conftest.err conftest.$ac_objext \
9946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009947LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9950$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009951if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009952 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009953fi
9954 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009955
Matthias Kloseb9621712010-04-24 17:59:49 +00009956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9957$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009960if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9963$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009964LIBS="$withval $LIBS"
9965
9966else
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009969fi
9970
Guido van Rossum7f43da71994-08-01 12:15:30 +00009971
Victor Stinner8291b5e2015-03-20 16:03:14 +01009972
9973
9974
9975
9976
9977
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009978
Victor Stinner8291b5e2015-03-20 16:03:14 +01009979if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9980 if test -n "$ac_tool_prefix"; then
9981 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9982set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9984$as_echo_n "checking for $ac_word... " >&6; }
9985if ${ac_cv_path_PKG_CONFIG+:} false; then :
9986 $as_echo_n "(cached) " >&6
9987else
9988 case $PKG_CONFIG in
9989 [\\/]* | ?:[\\/]*)
9990 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9991 ;;
9992 *)
9993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9994for as_dir in $PATH
9995do
9996 IFS=$as_save_IFS
9997 test -z "$as_dir" && as_dir=.
9998 for ac_exec_ext in '' $ac_executable_extensions; do
9999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10000 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10002 break 2
10003 fi
10004done
10005 done
10006IFS=$as_save_IFS
10007
10008 ;;
10009esac
10010fi
10011PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10012if test -n "$PKG_CONFIG"; then
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10014$as_echo "$PKG_CONFIG" >&6; }
10015else
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018fi
10019
10020
10021fi
10022if test -z "$ac_cv_path_PKG_CONFIG"; then
10023 ac_pt_PKG_CONFIG=$PKG_CONFIG
10024 # Extract the first word of "pkg-config", so it can be a program name with args.
10025set dummy pkg-config; ac_word=$2
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10027$as_echo_n "checking for $ac_word... " >&6; }
10028if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10029 $as_echo_n "(cached) " >&6
10030else
10031 case $ac_pt_PKG_CONFIG in
10032 [\\/]* | ?:[\\/]*)
10033 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10034 ;;
10035 *)
10036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10037for as_dir in $PATH
10038do
10039 IFS=$as_save_IFS
10040 test -z "$as_dir" && as_dir=.
10041 for ac_exec_ext in '' $ac_executable_extensions; do
10042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10043 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10045 break 2
10046 fi
10047done
10048 done
10049IFS=$as_save_IFS
10050
10051 ;;
10052esac
10053fi
10054ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10055if test -n "$ac_pt_PKG_CONFIG"; then
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10057$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10058else
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061fi
10062
10063 if test "x$ac_pt_PKG_CONFIG" = x; then
10064 PKG_CONFIG=""
10065 else
10066 case $cross_compiling:$ac_tool_warned in
10067yes:)
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10070ac_tool_warned=yes ;;
10071esac
10072 PKG_CONFIG=$ac_pt_PKG_CONFIG
10073 fi
10074else
10075 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10076fi
10077
10078fi
10079if test -n "$PKG_CONFIG"; then
10080 _pkg_min_version=0.9.0
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10082$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10083 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10085$as_echo "yes" >&6; }
10086 else
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10088$as_echo "no" >&6; }
10089 PKG_CONFIG=""
10090 fi
10091fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010092
10093# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10095$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010096
10097# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010098if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010099 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010100else
10101 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010102fi
10103
10104
Matthias Kloseb9621712010-04-24 17:59:49 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10106$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010107
10108# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10110$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010111
10112# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010113if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010114 withval=$with_system_ffi;
10115fi
10116
10117
Zachary Waref40d4dd2016-09-17 01:25:24 -050010118if test "$ac_sys_system" = "Darwin"
10119then
10120 case "$with_system_ffi" in
10121 "")
10122 with_system_ffi="no"
10123 ;;
10124 yes|no)
10125 ;;
10126 *)
10127 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10128 ;;
10129 esac
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10131$as_echo "$with_system_ffi" >&6; }
10132else
10133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10134$as_echo "yes" >&6; }
10135 if test "$with_system_ffi" != ""
10136 then
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10138$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10139 fi
10140 with_system_ffi="yes"
10141fi
Zachary Ware935043d2016-09-09 17:01:21 -070010142
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010143if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010144 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10145else
10146 LIBFFI_INCLUDEDIR=""
10147fi
10148
10149
Stefan Krah60187b52012-03-23 19:06:27 +010010150# Check for use of the system libmpdec library
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10152$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10153
10154# Check whether --with-system_libmpdec was given.
10155if test "${with_system_libmpdec+set}" = set; then :
10156 withval=$with_system_libmpdec;
10157else
10158 with_system_libmpdec="no"
10159fi
10160
10161
10162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10163$as_echo "$with_system_libmpdec" >&6; }
10164
Benjamin Peterson076ed002010-10-31 17:11:02 +000010165# Check for support for loadable sqlite extensions
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10167$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10168# Check whether --enable-loadable-sqlite-extensions was given.
10169if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10170 enableval=$enable_loadable_sqlite_extensions;
10171else
10172 enable_loadable_sqlite_extensions="no"
10173fi
10174
10175
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10177$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10178
Ned Deilyd819b932013-09-06 01:07:05 -070010179# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10180
10181
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10183$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10184
10185# Check whether --with-tcltk-includes was given.
10186if test "${with_tcltk_includes+set}" = set; then :
10187 withval=$with_tcltk_includes;
10188else
10189 with_tcltk_includes="default"
10190fi
10191
10192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10193$as_echo "$with_tcltk_includes" >&6; }
10194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10195$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10196
10197# Check whether --with-tcltk-libs was given.
10198if test "${with_tcltk_libs+set}" = set; then :
10199 withval=$with_tcltk_libs;
10200else
10201 with_tcltk_libs="default"
10202fi
10203
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10205$as_echo "$with_tcltk_libs" >&6; }
10206if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10207then
10208 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10209 then
10210 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10211 fi
10212 TCLTK_INCLUDES=""
10213 TCLTK_LIBS=""
10214else
10215 TCLTK_INCLUDES="$with_tcltk_includes"
10216 TCLTK_LIBS="$with_tcltk_libs"
10217fi
10218
Matthias Klose55708cc2009-04-30 08:06:49 +000010219# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10221$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010222
10223# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010224if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010225 withval=$with_dbmliborder;
10226if test x$with_dbmliborder = xyes
10227then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010228as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010229else
10230 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10231 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10232 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010233 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010234 fi
10235 done
10236fi
10237fi
10238
Matthias Kloseb9621712010-04-24 17:59:49 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10240$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242
Martin v. Löwis11437992002-04-12 09:54:03 +000010243
10244# Templates for things AC_DEFINEd more than once.
10245# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010246
10247
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010248if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010249then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010250 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010252
10253 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010254elif test "$ac_cv_kpthread" = "yes"
10255then
10256 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010257 if test "$ac_cv_cxx_thread" = "yes"; then
10258 CXX="$CXX -Kpthread"
10259 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010260 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010261elif test "$ac_cv_kthread" = "yes"
10262then
10263 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010264 if test "$ac_cv_cxx_thread" = "yes"; then
10265 CXX="$CXX -Kthread"
10266 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010267 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010268elif test "$ac_cv_pthread" = "yes"
10269then
10270 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010271 if test "$ac_cv_cxx_thread" = "yes"; then
10272 CXX="$CXX -pthread"
10273 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010274 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010275else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010276 if test ! -z "$withval" -a -d "$withval"
10277 then LDFLAGS="$LDFLAGS -L$withval"
10278 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010279
10280 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010281 # define _POSIX_THREADS in unistd.h. Some apparently don't
10282 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10284$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010286/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010287
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010288#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010289#ifdef _POSIX_THREADS
10290yes
10291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
10293_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010296 unistd_defines_pthreads=yes
10297else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010298 unistd_defines_pthreads=no
10299fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010300rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010301
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10303$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010304
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010306
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010307 # Just looking for pthread_create in libpthread is not enough:
10308 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10309 # So we really have to include pthread.h, and then link.
10310 _libs=$LIBS
10311 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10313$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010315/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010316
10317#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010318#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010319
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010320void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010321int
10322main ()
10323{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010324
10325pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10333$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010334 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010335
Guido van Rossum02a1c402000-02-25 19:26:31 +000010336else
Martin v. Löwis11437992002-04-12 09:54:03 +000010337
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010338 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010340if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010341
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010342 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010343
Guido van Rossumad678af1998-10-02 14:42:15 +000010344else
Guido van Rossumad678af1998-10-02 14:42:15 +000010345
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10347$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010348if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010350else
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010352LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010356/* Override any GCC internal prototype to avoid an error.
10357 Use char because int might match the return type of a GCC
10358 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010359#ifdef __cplusplus
10360extern "C"
10361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010362char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010363int
10364main ()
10365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 ;
10368 return 0;
10369}
10370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010371if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010373else
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010376rm -f core conftest.err conftest.$ac_objext \
10377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010378LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10381$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010382if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010383
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010384 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010385 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010386
Greg Steinadf63d62000-07-05 10:38:09 +000010387else
Greg Steinadf63d62000-07-05 10:38:09 +000010388
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10390$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010391if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010393else
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010395LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399/* Override any GCC internal prototype to avoid an error.
10400 Use char because int might match the return type of a GCC
10401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010402#ifdef __cplusplus
10403extern "C"
10404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010405char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010406int
10407main ()
10408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010416else
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010419rm -f core conftest.err conftest.$ac_objext \
10420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010421LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10424$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010425if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010426
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010427 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010428 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010429
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010430else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10433$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010434if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010436else
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010438LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442/* Override any GCC internal prototype to avoid an error.
10443 Use char because int might match the return type of a GCC
10444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010445#ifdef __cplusplus
10446extern "C"
10447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010448char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010449int
10450main ()
10451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 ;
10454 return 0;
10455}
10456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010459else
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010462rm -f core conftest.err conftest.$ac_objext \
10463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010464LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10467$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010468if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010469
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010470 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010471 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010472
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010473else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010474
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10476$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010477if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010479else
Martin v. Löwis11437992002-04-12 09:54:03 +000010480 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010481LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010485/* Override any GCC internal prototype to avoid an error.
10486 Use char because int might match the return type of a GCC
10487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010488#ifdef __cplusplus
10489extern "C"
10490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010491char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010492int
10493main ()
10494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 ;
10497 return 0;
10498}
10499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010500if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010502else
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010505rm -f core conftest.err conftest.$ac_objext \
10506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010507LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10510$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010511if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010513 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010514 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010515
Guido van Rossumb93a8621998-05-07 13:27:32 +000010516else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010517
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010518 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10519
Guido van Rossum2d38f911996-06-26 19:47:01 +000010520fi
10521
Guido van Rossum627b2d71993-12-24 10:39:16 +000010522
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010523fi
10524
Guido van Rossum0be3e491997-05-22 20:33:33 +000010525fi
10526
Guido van Rossum49545951997-12-02 19:28:29 +000010527fi
10528
Guido van Rossumb93a8621998-05-07 13:27:32 +000010529fi
10530
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010532rm -f core conftest.err conftest.$ac_objext \
10533 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010534
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10536$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010537if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010539else
Martin v. Löwis11437992002-04-12 09:54:03 +000010540 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010541LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545/* Override any GCC internal prototype to avoid an error.
10546 Use char because int might match the return type of a GCC
10547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010548#ifdef __cplusplus
10549extern "C"
10550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010551char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010552int
10553main ()
10554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010555return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010556 ;
10557 return 0;
10558}
10559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010560if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010561 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010562else
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010565rm -f core conftest.err conftest.$ac_objext \
10566 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010567LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10570$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010571if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010572
Martin v. Löwis130fb172001-07-19 11:00:41 +000010573 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010574
Guido van Rossum627b2d71993-12-24 10:39:16 +000010575fi
10576
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010577
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010578fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010579
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010580if test "$posix_threads" = "yes"; then
10581 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010582
Matthias Kloseb9621712010-04-24 17:59:49 +000010583$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584
10585 fi
10586
10587 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10588 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010589 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010590$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010591
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010592 ;;
10593 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595
10596 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010597 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010598$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010599
10600 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601 esac
10602
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10604$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010605 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609 ac_cv_pthread_system_supported=no
10610else
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010613
10614 #include <stdio.h>
10615 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010616 void *foo(void *parm) {
10617 return NULL;
10618 }
10619 main() {
10620 pthread_attr_t attr;
10621 pthread_t id;
10622 if (pthread_attr_init(&attr)) exit(-1);
10623 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10624 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10625 exit(0);
10626 }
10627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010629 ac_cv_pthread_system_supported=yes
10630else
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637
Guido van Rossum627b2d71993-12-24 10:39:16 +000010638fi
10639
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10641$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642 if test "$ac_cv_pthread_system_supported" = "yes"; then
10643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645
10646 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010647 for ac_func in pthread_sigmask
10648do :
10649 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010650if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010652#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010653_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010654 case $ac_sys_system in
10655 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010658
10659 ;;
10660 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010661fi
10662done
10663
pdoxe14679c2017-10-05 00:01:56 -070010664 for ac_func in pthread_getcpuclockid
10665do :
10666 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10667if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10668 cat >>confdefs.h <<_ACEOF
10669#define HAVE_PTHREAD_GETCPUCLOCKID 1
10670_ACEOF
10671
10672fi
10673done
10674
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675fi
10676
10677
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10681$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688 ipv6=no
10689 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10691$as_echo "yes" >&6; }
10692 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693
10694 ipv6=yes
10695 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697else
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010700/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010701 /* AF_INET6 available check */
10702#include <sys/types.h>
10703#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010704int
10705main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010706{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010707int domain = AF_INET6;
10708 ;
10709 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710}
Martin v. Löwis11437992002-04-12 09:54:03 +000010711_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010712if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10715$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718else
Matthias Kloseb159a552010-04-25 21:00:44 +000010719
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10721$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010723
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010727if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10729$as_echo_n "checking if RFC2553 API is available... " >&6; }
10730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010731/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010732
10733 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010734#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010735int
10736main ()
10737{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010738struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010739 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010740 ;
10741 return 0;
10742}
Matthias Kloseb159a552010-04-25 21:00:44 +000010743
Martin v. Löwis11437992002-04-12 09:54:03 +000010744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010745if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010746
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010748$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010749 ipv6=yes
10750
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751else
Matthias Kloseb159a552010-04-25 21:00:44 +000010752
10753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010754$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010755 ipv6=no
10756
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010759fi
10760
10761if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010763
10764fi
10765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766fi
10767
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768
10769ipv6type=unknown
10770ipv6lib=none
10771ipv6trylibc=no
10772
10773if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10775$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010776 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10777 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778 case $i in
10779 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010781/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010782
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783#include <netinet/in.h>
10784#ifdef IPV6_INRIA_VERSION
10785yes
10786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010787_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010790 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010792rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793
10794 ;;
10795 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010798
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799#include <netinet/in.h>
10800#ifdef __KAME__
10801yes
10802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010803_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806 ipv6type=$i;
10807 ipv6lib=inet6
10808 ipv6libdir=/usr/local/v6/lib
10809 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010811rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812
10813 ;;
10814 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818#include <features.h>
10819#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10820yes
10821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825 ipv6type=$i;
10826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010828rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829
10830 ;;
10831 linux-inet6)
10832 if test -d /usr/inet6; then
10833 ipv6type=$i
10834 ipv6lib=inet6
10835 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010836 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837 fi
10838 ;;
10839 solaris)
10840 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010841 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842 ipv6type=$i
10843 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844 fi
10845 fi
10846 ;;
10847 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851#include <sys/param.h>
10852#ifdef _TOSHIBA_INET6
10853yes
10854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010855_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858 ipv6type=$i;
10859 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010860 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010862rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863
10864 ;;
10865 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010867/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010868
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869#include </usr/local/v6/include/sys/v6config.h>
10870#ifdef __V6D__
10871yes
10872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010873_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010876 ipv6type=$i;
10877 ipv6lib=v6;
10878 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010879 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010881rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882
10883 ;;
10884 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888#include <sys/param.h>
10889#ifdef _ZETA_MINAMI_INET6
10890yes
10891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010892_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895 ipv6type=$i;
10896 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010897 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010899rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900
10901 ;;
10902 esac
10903 if test "$ipv6type" != "unknown"; then
10904 break
10905 fi
10906 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10908$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909fi
10910
10911if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10912 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10913 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10914 echo "using lib$ipv6lib"
10915 else
10916 if test $ipv6trylibc = "yes"; then
10917 echo "using libc"
10918 else
10919 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10920 echo "You need to fetch lib$ipv6lib.a from appropriate"
10921 echo 'ipv6 kit and compile beforehand.'
10922 exit 1
10923 fi
10924 fi
10925fi
10926
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10928$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10930/* end confdefs.h. */
10931 /* CAN_RAW_FD_FRAMES available check */
10932#include <linux/can/raw.h>
10933int
10934main ()
10935{
10936int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941if ac_fn_c_try_compile "$LINENO"; then :
10942
10943
10944$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10945
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10947$as_echo "yes" >&6; }
10948
10949else
10950
10951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10952$as_echo "no" >&6; }
10953
10954fi
10955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10956
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010957# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10959$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963 withval=$with_doc_strings;
10964fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010965
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010966
10967if test -z "$with_doc_strings"
10968then with_doc_strings="yes"
10969fi
10970if test "$with_doc_strings" != "no"
10971then
10972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010974
10975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10977$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010978
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010979# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10981$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010984if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010985 withval=$with_pymalloc;
10986fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010987
Neil Schemenauera35c6882001-02-27 04:45:05 +000010988
Neil Schemenauer16c22972002-03-22 15:34:49 +000010989if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010990then
10991 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010992fi
10993if test "$with_pymalloc" != "no"
10994then
Martin v. Löwis11437992002-04-12 09:54:03 +000010995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010997
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010998 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11001$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011002
Nick Coghlan6ea41862017-06-11 13:16:15 +100011003# Check for --with-c-locale-coercion
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11005$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11006
11007# Check whether --with-c-locale-coercion was given.
11008if test "${with_c_locale_coercion+set}" = set; then :
11009 withval=$with_c_locale_coercion;
11010fi
11011
11012
11013if test -z "$with_c_locale_coercion"
11014then
11015 with_c_locale_coercion="yes"
11016fi
11017if test "$with_c_locale_coercion" != "no"
11018then
11019
11020$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11021
11022fi
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11024$as_echo "$with_c_locale_coercion" >&6; }
11025
11026# Check for --with-c-locale-warning
11027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11028$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11029
11030# Check whether --with-c-locale-warning was given.
11031if test "${with_c_locale_warning+set}" = set; then :
11032 withval=$with_c_locale_warning;
11033fi
11034
11035
11036if test -z "$with_c_locale_warning"
11037then
11038 with_c_locale_warning="yes"
11039fi
11040if test "$with_c_locale_warning" != "no"
11041then
11042
11043$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11044
11045fi
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11047$as_echo "$with_c_locale_warning" >&6; }
11048
Benjamin Peterson05159c42009-12-03 03:01:27 +000011049# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11051$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011052
11053# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011055 withval=$with_valgrind;
11056else
11057 with_valgrind=no
11058fi
11059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11061$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011062if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 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 +020011064if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011067
11068else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011069 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011070
11071fi
11072
11073
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011074 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011075fi
11076
Łukasz Langaa785c872016-09-09 17:37:37 -070011077# Check for DTrace support
11078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11079$as_echo_n "checking for --with-dtrace... " >&6; }
11080
11081# Check whether --with-dtrace was given.
11082if test "${with_dtrace+set}" = set; then :
11083 withval=$with_dtrace;
11084else
11085 with_dtrace=no
11086fi
11087
11088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11089$as_echo "$with_dtrace" >&6; }
11090
11091
11092
11093
11094
11095DTRACE=
11096DFLAGS=
11097DTRACE_HEADERS=
11098DTRACE_OBJS=
11099
11100if test "$with_dtrace" = "yes"
11101then
11102 # Extract the first word of "dtrace", so it can be a program name with args.
11103set dummy dtrace; ac_word=$2
11104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11105$as_echo_n "checking for $ac_word... " >&6; }
11106if ${ac_cv_path_DTRACE+:} false; then :
11107 $as_echo_n "(cached) " >&6
11108else
11109 case $DTRACE in
11110 [\\/]* | ?:[\\/]*)
11111 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11112 ;;
11113 *)
11114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11115for as_dir in $PATH
11116do
11117 IFS=$as_save_IFS
11118 test -z "$as_dir" && as_dir=.
11119 for ac_exec_ext in '' $ac_executable_extensions; do
11120 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11121 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11123 break 2
11124 fi
11125done
11126 done
11127IFS=$as_save_IFS
11128
11129 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11130 ;;
11131esac
11132fi
11133DTRACE=$ac_cv_path_DTRACE
11134if test -n "$DTRACE"; then
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11136$as_echo "$DTRACE" >&6; }
11137else
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11139$as_echo "no" >&6; }
11140fi
11141
11142
11143 if test "$DTRACE" = "not found"; then
11144 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11145 fi
11146
11147$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11148
11149 DTRACE_HEADERS="Include/pydtrace_probes.h"
11150
11151 # On OS X, DTrace providers do not need to be explicitly compiled and
11152 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11153 # generation flag '-G'. We check for presence of this flag, rather than
11154 # hardcoding support by OS, in the interest of robustness.
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11156$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11157if ${ac_cv_dtrace_link+:} false; then :
11158 $as_echo_n "(cached) " >&6
11159else
11160 ac_cv_dtrace_link=no
11161 echo 'BEGIN' > conftest.d
11162 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11163 ac_cv_dtrace_link=yes
11164
11165fi
11166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11167$as_echo "$ac_cv_dtrace_link" >&6; }
11168 if test "$ac_cv_dtrace_link" = "yes"; then
11169 DTRACE_OBJS="Python/pydtrace.o"
11170 fi
11171fi
11172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011173# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011174
Guido van Rossum98935bf2001-09-05 19:13:16 +000011175DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011176
Guido van Rossume97ee181999-12-20 21:27:22 +000011177# the dlopen() function means we might want to use dynload_shlib.o. some
11178# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011179for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011180do :
11181 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011182if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011184#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011185_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011186
Guido van Rossume97ee181999-12-20 21:27:22 +000011187fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011188done
Guido van Rossume97ee181999-12-20 21:27:22 +000011189
Michael W. Hudson54241132001-12-07 15:38:26 +000011190
Guido van Rossume97ee181999-12-20 21:27:22 +000011191# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11192# loading of modules.
11193
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11195$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011196if test -z "$DYNLOADFILE"
11197then
11198 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011199 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11200 if test "$ac_cv_func_dlopen" = yes
11201 then DYNLOADFILE="dynload_shlib.o"
11202 else DYNLOADFILE="dynload_aix.o"
11203 fi
11204 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011205 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011206 *)
11207 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11208 # out any dynamic loading
11209 if test "$ac_cv_func_dlopen" = yes
11210 then DYNLOADFILE="dynload_shlib.o"
11211 else DYNLOADFILE="dynload_stub.o"
11212 fi
11213 ;;
11214 esac
11215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11217$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011218if test "$DYNLOADFILE" != "dynload_stub.o"
11219then
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011222
11223fi
11224
Neil Schemenauer4e425612001-06-19 15:44:15 +000011225# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11226
Michael W. Hudson54241132001-12-07 15:38:26 +000011227
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11229$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011230if test -z "$MACHDEP_OBJS"
11231then
Jack Jansene578a632001-08-15 01:27:14 +000011232 MACHDEP_OBJS=$extra_machdep_objs
11233else
11234 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011235fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011236if test -z "$MACHDEP_OBJS"; then
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11238$as_echo "none" >&6; }
11239else
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11241$as_echo "$MACHDEP_OBJS" >&6; }
11242fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011243
Guido van Rossum627b2d71993-12-24 10:39:16 +000011244# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011245for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011246 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011247 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011248 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011249 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011250 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011251 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011252 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011253 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011254 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011255 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011256 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011257 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011258 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011259 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011260 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11261 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011262 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011263 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011264 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011265 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011266 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011267do :
11268 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11269ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011270if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011271 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011272#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011273_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011275fi
11276done
11277
Michael W. Hudson54241132001-12-07 15:38:26 +000011278
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011279ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11280 #include <dirent.h>
11281"
11282if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11283
11284$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11285
11286fi
11287
11288
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011289# For some functions, having a definition is not sufficient, since
11290# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11292$as_echo_n "checking for chroot... " >&6; }
11293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011294/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011295#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011296int
11297main ()
11298{
11299void *x=chroot
11300 ;
11301 return 0;
11302}
11303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011307
Matthias Kloseb159a552010-04-25 21:00:44 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011309$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310else
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11312$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011313
11314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11317$as_echo_n "checking for link... " >&6; }
11318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011319/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011321int
11322main ()
11323{
11324void *x=link
11325 ;
11326 return 0;
11327}
11328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011332
Matthias Kloseb159a552010-04-25 21:00:44 +000011333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011334$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011335else
Matthias Kloseb9621712010-04-24 17:59:49 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011338
11339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11342$as_echo_n "checking for symlink... " >&6; }
11343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011344/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011345#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346int
11347main ()
11348{
11349void *x=symlink
11350 ;
11351 return 0;
11352}
11353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355
Matthias Kloseb9621712010-04-24 17:59:49 +000011356$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011357
Matthias Kloseb159a552010-04-25 21:00:44 +000011358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011359$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011360else
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11362$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011363
11364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11367$as_echo_n "checking for fchdir... " >&6; }
11368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011370#include <unistd.h>
11371int
11372main ()
11373{
11374void *x=fchdir
11375 ;
11376 return 0;
11377}
11378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011382
Matthias Kloseb159a552010-04-25 21:00:44 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011385else
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11387$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011388
11389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11392$as_echo_n "checking for fsync... " >&6; }
11393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011395#include <unistd.h>
11396int
11397main ()
11398{
11399void *x=fsync
11400 ;
11401 return 0;
11402}
11403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405
Matthias Kloseb9621712010-04-24 17:59:49 +000011406$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011407
Matthias Kloseb159a552010-04-25 21:00:44 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011409$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011410else
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011413
11414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11417$as_echo_n "checking for fdatasync... " >&6; }
11418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011419/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011420#include <unistd.h>
11421int
11422main ()
11423{
11424void *x=fdatasync
11425 ;
11426 return 0;
11427}
11428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430
Matthias Kloseb9621712010-04-24 17:59:49 +000011431$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011432
Matthias Kloseb159a552010-04-25 21:00:44 +000011433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011434$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011435else
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11437$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011438
11439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11442$as_echo_n "checking for epoll... " >&6; }
11443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011444/* end confdefs.h. */
11445#include <sys/epoll.h>
11446int
11447main ()
11448{
11449void *x=epoll_create
11450 ;
11451 return 0;
11452}
11453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011455
Matthias Kloseb9621712010-04-24 17:59:49 +000011456$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011457
Matthias Kloseb159a552010-04-25 21:00:44 +000011458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011459$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011460else
Matthias Kloseb9621712010-04-24 17:59:49 +000011461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11462$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011463
11464fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11467$as_echo_n "checking for epoll_create1... " >&6; }
11468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11469/* end confdefs.h. */
11470#include <sys/epoll.h>
11471int
11472main ()
11473{
11474void *x=epoll_create1
11475 ;
11476 return 0;
11477}
11478_ACEOF
11479if ac_fn_c_try_compile "$LINENO"; then :
11480
11481$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11482
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11484$as_echo "yes" >&6; }
11485else
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11487$as_echo "no" >&6; }
11488
11489fi
11490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11492$as_echo_n "checking for kqueue... " >&6; }
11493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011494/* end confdefs.h. */
11495
11496#include <sys/types.h>
11497#include <sys/event.h>
11498
11499int
11500main ()
11501{
11502int x=kqueue()
11503 ;
11504 return 0;
11505}
11506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011507if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011510
Matthias Kloseb159a552010-04-25 21:00:44 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011512$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011513else
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011516
11517fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11520$as_echo_n "checking for prlimit... " >&6; }
11521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11522/* end confdefs.h. */
11523
11524#include <sys/time.h>
11525#include <sys/resource.h>
11526
11527int
11528main ()
11529{
11530void *x=prlimit
11531 ;
11532 return 0;
11533}
11534_ACEOF
11535if ac_fn_c_try_compile "$LINENO"; then :
11536
11537$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11538
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11540$as_echo "yes" >&6; }
11541else
11542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11543$as_echo "no" >&6; }
11544
11545fi
11546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11547
Martin v. Löwisd5843682002-11-21 20:41:28 +000011548# On some systems (eg. FreeBSD 5), we would find a definition of the
11549# functions ctermid_r, setgroups in the library, but no prototype
11550# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11551# address to avoid compiler warnings and potential miscompilations
11552# because of the missing prototypes.
11553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11555$as_echo_n "checking for ctermid_r... " >&6; }
11556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011558
Martin v. Löwisd5843682002-11-21 20:41:28 +000011559#include <stdio.h>
11560
Martin v. Löwisd5843682002-11-21 20:41:28 +000011561int
11562main ()
11563{
11564void* p = ctermid_r
11565 ;
11566 return 0;
11567}
11568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011569if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011570
Matthias Kloseb9621712010-04-24 17:59:49 +000011571$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011572
Matthias Kloseb159a552010-04-25 21:00:44 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011574$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011575else
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11577$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011578
11579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11581
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11583$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011584if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011585 $as_echo_n "(cached) " >&6
11586else
11587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011588/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011589#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011590int
11591main ()
11592{
11593void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011594
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011595 ;
11596 return 0;
11597}
11598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011599if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011600 ac_cv_flock_decl=yes
11601else
11602 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011603
11604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011606
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011607fi
11608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11609$as_echo "$ac_cv_flock_decl" >&6; }
11610if test "x${ac_cv_flock_decl}" = xyes; then
11611 for ac_func in flock
11612do :
11613 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011614if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011615 cat >>confdefs.h <<_ACEOF
11616#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011617_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011618
Antoine Pitroua3000072010-09-07 14:52:42 +000011619else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011621$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011623 $as_echo_n "(cached) " >&6
11624else
11625 ac_check_lib_save_LIBS=$LIBS
11626LIBS="-lbsd $LIBS"
11627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11628/* end confdefs.h. */
11629
11630/* Override any GCC internal prototype to avoid an error.
11631 Use char because int might match the return type of a GCC
11632 builtin and then its argument prototype would still apply. */
11633#ifdef __cplusplus
11634extern "C"
11635#endif
11636char flock ();
11637int
11638main ()
11639{
11640return flock ();
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645if ac_fn_c_try_link "$LINENO"; then :
11646 ac_cv_lib_bsd_flock=yes
11647else
11648 ac_cv_lib_bsd_flock=no
11649fi
11650rm -f core conftest.err conftest.$ac_objext \
11651 conftest$ac_exeext conftest.$ac_ext
11652LIBS=$ac_check_lib_save_LIBS
11653fi
11654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11655$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011656if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011657 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011658
11659
11660$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11661
11662
11663fi
11664
11665
11666fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011667done
11668
Antoine Pitroua3000072010-09-07 14:52:42 +000011669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670
Matthias Kloseb9621712010-04-24 17:59:49 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11672$as_echo_n "checking for getpagesize... " >&6; }
11673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011675
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011676#include <unistd.h>
11677
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011678int
11679main ()
11680{
11681void* p = getpagesize
11682 ;
11683 return 0;
11684}
11685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011689
Matthias Kloseb159a552010-04-25 21:00:44 +000011690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011691$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011692else
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11694$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011695
11696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011698
Victor Stinner984890f2011-11-24 13:53:38 +010011699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11700$as_echo_n "checking for broken unsetenv... " >&6; }
11701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11702/* end confdefs.h. */
11703
11704#include <stdlib.h>
11705
11706int
11707main ()
11708{
11709int res = unsetenv("DUMMY")
11710 ;
11711 return 0;
11712}
11713_ACEOF
11714if ac_fn_c_try_compile "$LINENO"; then :
11715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11716$as_echo "no" >&6; }
11717else
11718
11719$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11720
11721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11722$as_echo "yes" >&6; }
11723
11724fi
11725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11726
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011727for ac_prog in true
11728do
11729 # Extract the first word of "$ac_prog", so it can be a program name with args.
11730set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011733if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011735else
11736 if test -n "$TRUE"; then
11737 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11738else
11739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11740for as_dir in $PATH
11741do
11742 IFS=$as_save_IFS
11743 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011746 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 $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 +000011748 break 2
11749 fi
11750done
Matthias Kloseb9621712010-04-24 17:59:49 +000011751 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011752IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011753
11754fi
11755fi
11756TRUE=$ac_cv_prog_TRUE
11757if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11759$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11762$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011763fi
11764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011765
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011766 test -n "$TRUE" && break
11767done
11768test -n "$TRUE" || TRUE="/bin/true"
11769
11770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11772$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011773if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011775else
11776 ac_check_lib_save_LIBS=$LIBS
11777LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011779/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011781/* Override any GCC internal prototype to avoid an error.
11782 Use char because int might match the return type of a GCC
11783 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784#ifdef __cplusplus
11785extern "C"
11786#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011787char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788int
11789main ()
11790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792 ;
11793 return 0;
11794}
11795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797 ac_cv_lib_c_inet_aton=yes
11798else
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011801rm -f core conftest.err conftest.$ac_objext \
11802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011803LIBS=$ac_check_lib_save_LIBS
11804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11806$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011807if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011808 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11811$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011812if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011814else
11815 ac_check_lib_save_LIBS=$LIBS
11816LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011818/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011820/* Override any GCC internal prototype to avoid an error.
11821 Use char because int might match the return type of a GCC
11822 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823#ifdef __cplusplus
11824extern "C"
11825#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011826char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011827int
11828main ()
11829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831 ;
11832 return 0;
11833}
11834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836 ac_cv_lib_resolv_inet_aton=yes
11837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011840rm -f core conftest.err conftest.$ac_objext \
11841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011842LIBS=$ac_check_lib_save_LIBS
11843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11845$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011846if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011847 cat >>confdefs.h <<_ACEOF
11848#define HAVE_LIBRESOLV 1
11849_ACEOF
11850
11851 LIBS="-lresolv $LIBS"
11852
11853fi
11854
11855
11856fi
11857
11858
Christian Heimesd0764e22007-12-04 15:00:33 +000011859# On Tru64, chflags seems to be present, but calling it will
11860# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11862$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011867 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011868else
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011870/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011871
Christian Heimesd0764e22007-12-04 15:00:33 +000011872#include <sys/stat.h>
11873#include <unistd.h>
11874int main(int argc, char*argv[])
11875{
11876 if(chflags(argv[0], 0) != 0)
11877 return 1;
11878 return 0;
11879}
Ned Deily3eb67d52011-06-28 00:00:28 -070011880
Christian Heimesd0764e22007-12-04 15:00:33 +000011881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011883 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011884else
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11888 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011889fi
11890
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11894$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011895if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011898 ac_cv_have_chflags="yes"
11899else
11900 ac_cv_have_chflags="no"
11901fi
11902
11903fi
11904if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011907
11908fi
11909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11911$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011912if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011914else
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011916 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011917else
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011919/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011920
Christian Heimesd0764e22007-12-04 15:00:33 +000011921#include <sys/stat.h>
11922#include <unistd.h>
11923int main(int argc, char*argv[])
11924{
11925 if(lchflags(argv[0], 0) != 0)
11926 return 1;
11927 return 0;
11928}
Ned Deily3eb67d52011-06-28 00:00:28 -070011929
Christian Heimesd0764e22007-12-04 15:00:33 +000011930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011931if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011932 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011933else
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11937 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011938fi
11939
11940
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11943$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011944if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011946if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011947 ac_cv_have_lchflags="yes"
11948else
11949 ac_cv_have_lchflags="no"
11950fi
11951
11952fi
11953if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011956
11957fi
11958
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011959case $ac_sys_system/$ac_sys_release in
11960Darwin/*)
11961 _CUR_CFLAGS="${CFLAGS}"
11962 _CUR_LDFLAGS="${LDFLAGS}"
11963 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11964 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11965 ;;
11966esac
11967
Matthias Kloseb9621712010-04-24 17:59:49 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11969$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011970if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011972else
11973 ac_check_lib_save_LIBS=$LIBS
11974LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011976/* end confdefs.h. */
11977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978/* Override any GCC internal prototype to avoid an error.
11979 Use char because int might match the return type of a GCC
11980 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011981#ifdef __cplusplus
11982extern "C"
11983#endif
11984char inflateCopy ();
11985int
11986main ()
11987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011989 ;
11990 return 0;
11991}
11992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011993if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011994 ac_cv_lib_z_inflateCopy=yes
11995else
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998rm -f core conftest.err conftest.$ac_objext \
11999 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012000LIBS=$ac_check_lib_save_LIBS
12001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12003$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012004if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012007
12008fi
12009
12010
12011case $ac_sys_system/$ac_sys_release in
12012Darwin/*)
12013 CFLAGS="${_CUR_CFLAGS}"
12014 LDFLAGS="${_CUR_LDFLAGS}"
12015 ;;
12016esac
12017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12019$as_echo_n "checking for hstrerror... " >&6; }
12020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012021/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012022
Martin v. Löwise9416172003-05-03 10:12:45 +000012023#include <netdb.h>
12024
Martin v. Löwise9416172003-05-03 10:12:45 +000012025int
12026main ()
12027{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012028void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012036
Matthias Kloseb159a552010-04-25 21:00:44 +000012037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012038$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12041$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012042
12043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044rm -f core conftest.err conftest.$ac_objext \
12045 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046
Matthias Kloseb9621712010-04-24 17:59:49 +000012047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12048$as_echo_n "checking for inet_aton... " >&6; }
12049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012050/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012051
Martin v. Löwis86d66262006-02-17 08:40:11 +000012052#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012053#include <sys/socket.h>
12054#include <netinet/in.h>
12055#include <arpa/inet.h>
12056
Martin v. Löwise9416172003-05-03 10:12:45 +000012057int
12058main ()
12059{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012060void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012061 ;
12062 return 0;
12063}
12064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012065if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012066
Matthias Kloseb9621712010-04-24 17:59:49 +000012067$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012068
Matthias Kloseb159a552010-04-25 21:00:44 +000012069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012070$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12073$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012074
12075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012076rm -f core conftest.err conftest.$ac_objext \
12077 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078
Matthias Kloseb9621712010-04-24 17:59:49 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12080$as_echo_n "checking for inet_pton... " >&6; }
12081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012082/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012083
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012084#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012085#include <sys/socket.h>
12086#include <netinet/in.h>
12087#include <arpa/inet.h>
12088
Martin v. Löwise9416172003-05-03 10:12:45 +000012089int
12090main ()
12091{
12092void* p = inet_pton
12093 ;
12094 return 0;
12095}
12096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012097if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012098
Matthias Kloseb9621712010-04-24 17:59:49 +000012099$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012100
Matthias Kloseb159a552010-04-25 21:00:44 +000012101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012102$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12105$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012106
12107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012109
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012110# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12112$as_echo_n "checking for setgroups... " >&6; }
12113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012114/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012115
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012116#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012117#ifdef HAVE_GRP_H
12118#include <grp.h>
12119#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012120
Martin v. Löwisd5843682002-11-21 20:41:28 +000012121int
12122main ()
12123{
12124void* p = setgroups
12125 ;
12126 return 0;
12127}
12128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012129if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012130
Matthias Kloseb9621712010-04-24 17:59:49 +000012131$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012132
Matthias Kloseb159a552010-04-25 21:00:44 +000012133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012134$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12137$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012138
12139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012141
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012142# check for openpty and forkpty
12143
12144for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012145do :
12146 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012147if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012149#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012150_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012151
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012152else
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12154$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012155if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012157else
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012159LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012163/* Override any GCC internal prototype to avoid an error.
12164 Use char because int might match the return type of a GCC
12165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012166#ifdef __cplusplus
12167extern "C"
12168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012169char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012170int
12171main ()
12172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012174 ;
12175 return 0;
12176}
12177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012178if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012183rm -f core conftest.err conftest.$ac_objext \
12184 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012185LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12188$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012189if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12194$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012195if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012197else
12198 ac_check_lib_save_LIBS=$LIBS
12199LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012201/* end confdefs.h. */
12202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012203/* Override any GCC internal prototype to avoid an error.
12204 Use char because int might match the return type of a GCC
12205 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206#ifdef __cplusplus
12207extern "C"
12208#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012209char openpty ();
12210int
12211main ()
12212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012213return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012214 ;
12215 return 0;
12216}
12217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012218if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012219 ac_cv_lib_bsd_openpty=yes
12220else
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012223rm -f core conftest.err conftest.$ac_objext \
12224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012225LIBS=$ac_check_lib_save_LIBS
12226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12228$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012229if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012231 LIBS="$LIBS -lbsd"
12232fi
12233
12234
12235fi
12236
Fred Drake8cef4cf2000-06-28 16:40:38 +000012237
12238fi
12239done
12240
12241for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012242do :
12243 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012244if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012245 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012246#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012247_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248
Fred Drake8cef4cf2000-06-28 16:40:38 +000012249else
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12251$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012252if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012254else
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012256LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012260/* Override any GCC internal prototype to avoid an error.
12261 Use char because int might match the return type of a GCC
12262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012263#ifdef __cplusplus
12264extern "C"
12265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012266char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012267int
12268main ()
12269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 ;
12272 return 0;
12273}
12274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012276 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012277else
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012280rm -f core conftest.err conftest.$ac_objext \
12281 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012282LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12285$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012286if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012288 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012289else
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12291$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012292if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012294else
12295 ac_check_lib_save_LIBS=$LIBS
12296LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012298/* end confdefs.h. */
12299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300/* Override any GCC internal prototype to avoid an error.
12301 Use char because int might match the return type of a GCC
12302 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012303#ifdef __cplusplus
12304extern "C"
12305#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012306char forkpty ();
12307int
12308main ()
12309{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012311 ;
12312 return 0;
12313}
12314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012316 ac_cv_lib_bsd_forkpty=yes
12317else
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012320rm -f core conftest.err conftest.$ac_objext \
12321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012322LIBS=$ac_check_lib_save_LIBS
12323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12325$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012326if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012328 LIBS="$LIBS -lbsd"
12329fi
12330
12331
12332fi
12333
Fred Drake8cef4cf2000-06-28 16:40:38 +000012334
12335fi
12336done
12337
Jack Jansendd19cf82001-12-06 22:36:17 +000012338
Michael W. Hudson54241132001-12-07 15:38:26 +000012339# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012340for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012341do :
12342 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12343ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012344if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012347_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012348
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012349fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012350done
12351
Michael W. Hudson54241132001-12-07 15:38:26 +000012352
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012353ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012354if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012355 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012356
Martin v. Löwis1142de32002-03-29 16:28:31 +000012357else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012359 *" dup2.$ac_objext "* ) ;;
12360 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012362esac
12363
Martin v. Löwis1142de32002-03-29 16:28:31 +000012364fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012365
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012366ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012367if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012368 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12369
12370else
12371 case " $LIBOBJS " in
12372 *" strdup.$ac_objext "* ) ;;
12373 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12374 ;;
12375esac
12376
12377fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012378
12379
12380for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012381do :
12382 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012383if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012385#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012388/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012389#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012390int
12391main ()
12392{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012393getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ;
12395 return 0;
12396}
12397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012399
Matthias Kloseb9621712010-04-24 17:59:49 +000012400$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012401
Guido van Rossum627b2d71993-12-24 10:39:16 +000012402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012404
Guido van Rossum627b2d71993-12-24 10:39:16 +000012405fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012406done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407
Jack Jansen150753c2003-03-29 22:07:47 +000012408for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012409do :
12410 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012411if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012412 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012416/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012417#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012418int
12419main ()
12420{
12421setpgrp(0,0);
12422 ;
12423 return 0;
12424}
12425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012427
Matthias Kloseb9621712010-04-24 17:59:49 +000012428$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012429
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012432
12433fi
12434done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012435
Thomas Wouters3a584202000-08-05 23:28:51 +000012436for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012437do :
12438 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012439if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012440 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012441#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012444/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012445#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012446int
12447main ()
12448{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 ;
12451 return 0;
12452}
12453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012454if ac_fn_c_try_compile "$LINENO"; then :
12455
Guido van Rossum627b2d71993-12-24 10:39:16 +000012456else
Skip Montanaro6dead952003-09-25 14:50:04 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012459
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Guido van Rossum627b2d71993-12-24 10:39:16 +000012461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012463
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012464fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012465done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012466
Michael W. Hudson54241132001-12-07 15:38:26 +000012467
Victor Stinnere0be4232011-10-25 13:06:09 +020012468for ac_func in clock_gettime
12469do :
12470 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12471if test "x$ac_cv_func_clock_gettime" = xyes; then :
12472 cat >>confdefs.h <<_ACEOF
12473#define HAVE_CLOCK_GETTIME 1
12474_ACEOF
12475
12476else
12477
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12479$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12480if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12481 $as_echo_n "(cached) " >&6
12482else
12483 ac_check_lib_save_LIBS=$LIBS
12484LIBS="-lrt $LIBS"
12485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12486/* end confdefs.h. */
12487
12488/* Override any GCC internal prototype to avoid an error.
12489 Use char because int might match the return type of a GCC
12490 builtin and then its argument prototype would still apply. */
12491#ifdef __cplusplus
12492extern "C"
12493#endif
12494char clock_gettime ();
12495int
12496main ()
12497{
12498return clock_gettime ();
12499 ;
12500 return 0;
12501}
12502_ACEOF
12503if ac_fn_c_try_link "$LINENO"; then :
12504 ac_cv_lib_rt_clock_gettime=yes
12505else
12506 ac_cv_lib_rt_clock_gettime=no
12507fi
12508rm -f core conftest.err conftest.$ac_objext \
12509 conftest$ac_exeext conftest.$ac_ext
12510LIBS=$ac_check_lib_save_LIBS
12511fi
12512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12513$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12514if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12515
Victor Stinner7efb8332014-08-29 15:41:08 +020012516 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012517 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12518
12519
12520$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12521
12522
12523fi
12524
12525
12526fi
12527done
12528
12529
12530for ac_func in clock_getres
12531do :
12532 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12533if test "x$ac_cv_func_clock_getres" = xyes; then :
12534 cat >>confdefs.h <<_ACEOF
12535#define HAVE_CLOCK_GETRES 1
12536_ACEOF
12537
12538else
12539
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12541$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12542if ${ac_cv_lib_rt_clock_getres+:} false; then :
12543 $as_echo_n "(cached) " >&6
12544else
12545 ac_check_lib_save_LIBS=$LIBS
12546LIBS="-lrt $LIBS"
12547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12548/* end confdefs.h. */
12549
12550/* Override any GCC internal prototype to avoid an error.
12551 Use char because int might match the return type of a GCC
12552 builtin and then its argument prototype would still apply. */
12553#ifdef __cplusplus
12554extern "C"
12555#endif
12556char clock_getres ();
12557int
12558main ()
12559{
12560return clock_getres ();
12561 ;
12562 return 0;
12563}
12564_ACEOF
12565if ac_fn_c_try_link "$LINENO"; then :
12566 ac_cv_lib_rt_clock_getres=yes
12567else
12568 ac_cv_lib_rt_clock_getres=no
12569fi
12570rm -f core conftest.err conftest.$ac_objext \
12571 conftest$ac_exeext conftest.$ac_ext
12572LIBS=$ac_check_lib_save_LIBS
12573fi
12574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12575$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12576if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12577
12578 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12579
12580
12581fi
12582
12583
12584fi
12585done
12586
12587
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012588for ac_func in clock_settime
12589do :
12590 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12591if test "x$ac_cv_func_clock_settime" = xyes; then :
12592 cat >>confdefs.h <<_ACEOF
12593#define HAVE_CLOCK_SETTIME 1
12594_ACEOF
12595
12596else
12597
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12599$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12600if ${ac_cv_lib_rt_clock_settime+:} false; then :
12601 $as_echo_n "(cached) " >&6
12602else
12603 ac_check_lib_save_LIBS=$LIBS
12604LIBS="-lrt $LIBS"
12605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12606/* end confdefs.h. */
12607
12608/* Override any GCC internal prototype to avoid an error.
12609 Use char because int might match the return type of a GCC
12610 builtin and then its argument prototype would still apply. */
12611#ifdef __cplusplus
12612extern "C"
12613#endif
12614char clock_settime ();
12615int
12616main ()
12617{
12618return clock_settime ();
12619 ;
12620 return 0;
12621}
12622_ACEOF
12623if ac_fn_c_try_link "$LINENO"; then :
12624 ac_cv_lib_rt_clock_settime=yes
12625else
12626 ac_cv_lib_rt_clock_settime=no
12627fi
12628rm -f core conftest.err conftest.$ac_objext \
12629 conftest$ac_exeext conftest.$ac_ext
12630LIBS=$ac_check_lib_save_LIBS
12631fi
12632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12633$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12634if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12635
12636 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12637
12638
12639fi
12640
12641
12642fi
12643done
12644
12645
Matthias Kloseb9621712010-04-24 17:59:49 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12647$as_echo_n "checking for major... " >&6; }
12648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012649/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012650
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012651#if defined(MAJOR_IN_MKDEV)
12652#include <sys/mkdev.h>
12653#elif defined(MAJOR_IN_SYSMACROS)
12654#include <sys/sysmacros.h>
12655#else
12656#include <sys/types.h>
12657#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012658
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012659int
12660main ()
12661{
12662
12663 makedev(major(0),minor(0));
12664
12665 ;
12666 return 0;
12667}
12668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012669if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012670
12671
Matthias Kloseb9621712010-04-24 17:59:49 +000012672$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12675$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012676
12677else
Skip Montanaro6dead952003-09-25 14:50:04 +000012678
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12680$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012681
12682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012683rm -f core conftest.err conftest.$ac_objext \
12684 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012685
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012686# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012687# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12689$as_echo_n "checking for getaddrinfo... " >&6; }
12690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012691/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012692
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012693#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012694#include <sys/socket.h>
12695#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012696#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012697
Martin v. Löwis11437992002-04-12 09:54:03 +000012698int
12699main ()
12700{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012701getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 ;
12703 return 0;
12704}
12705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012706if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012707 have_getaddrinfo=yes
12708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012711rm -f core conftest.err conftest.$ac_objext \
12712 conftest$ac_exeext conftest.$ac_ext
12713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12714$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012715if test $have_getaddrinfo = yes
12716then
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12718$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012719 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012721else
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012723
12724if test "${enable_ipv6+set}" = set; then
12725 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12726else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012727 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012728fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012732
Stefan Krah19c21392012-11-22 23:47:32 +010012733#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012734#include <sys/types.h>
12735#include <netdb.h>
12736#include <string.h>
12737#include <sys/socket.h>
12738#include <netinet/in.h>
12739
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012740int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012741{
12742 int passive, gaierr, inet4 = 0, inet6 = 0;
12743 struct addrinfo hints, *ai, *aitop;
12744 char straddr[INET6_ADDRSTRLEN], strport[16];
12745
12746 for (passive = 0; passive <= 1; passive++) {
12747 memset(&hints, 0, sizeof(hints));
12748 hints.ai_family = AF_UNSPEC;
12749 hints.ai_flags = passive ? AI_PASSIVE : 0;
12750 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012751 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012752 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12753 (void)gai_strerror(gaierr);
12754 goto bad;
12755 }
12756 for (ai = aitop; ai; ai = ai->ai_next) {
12757 if (ai->ai_addr == NULL ||
12758 ai->ai_addrlen == 0 ||
12759 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12760 straddr, sizeof(straddr), strport, sizeof(strport),
12761 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12762 goto bad;
12763 }
12764 switch (ai->ai_family) {
12765 case AF_INET:
12766 if (strcmp(strport, "54321") != 0) {
12767 goto bad;
12768 }
12769 if (passive) {
12770 if (strcmp(straddr, "0.0.0.0") != 0) {
12771 goto bad;
12772 }
12773 } else {
12774 if (strcmp(straddr, "127.0.0.1") != 0) {
12775 goto bad;
12776 }
12777 }
12778 inet4++;
12779 break;
12780 case AF_INET6:
12781 if (strcmp(strport, "54321") != 0) {
12782 goto bad;
12783 }
12784 if (passive) {
12785 if (strcmp(straddr, "::") != 0) {
12786 goto bad;
12787 }
12788 } else {
12789 if (strcmp(straddr, "::1") != 0) {
12790 goto bad;
12791 }
12792 }
12793 inet6++;
12794 break;
12795 case AF_UNSPEC:
12796 goto bad;
12797 break;
12798 default:
12799 /* another family support? */
12800 break;
12801 }
12802 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012803 freeaddrinfo(aitop);
12804 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012805 }
12806
12807 if (!(inet4 == 0 || inet4 == 2))
12808 goto bad;
12809 if (!(inet6 == 0 || inet6 == 2))
12810 goto bad;
12811
12812 if (aitop)
12813 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012814 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012815
12816 bad:
12817 if (aitop)
12818 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012819 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012820}
12821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012823if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012824 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012825else
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012832fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012833
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012835
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12837$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12838
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012839if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012840then
12841 if test $ipv6 = yes
12842 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012843 echo 'Fatal: You must get working getaddrinfo() function.'
12844 echo ' or you can specify "--disable-ipv6"'.
12845 exit 1
12846 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012847else
Martin v. Löwis11437992002-04-12 09:54:03 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012850
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012851fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012852
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012853for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012854do :
12855 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012856if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012859_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012860
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012861fi
12862done
12863
Michael W. Hudson54241132001-12-07 15:38:26 +000012864
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012865# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12867$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012868if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870else
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873#include <sys/types.h>
12874#include <sys/time.h>
12875#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012876
Martin v. Löwis11437992002-04-12 09:54:03 +000012877int
12878main ()
12879{
12880if ((struct tm *) 0)
12881return 0;
12882 ;
12883 return 0;
12884}
12885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012888else
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12894$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012895if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012898
12899fi
12900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12902$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012903if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905else
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012907/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012908#include <sys/types.h>
12909#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012910
Martin v. Löwis11437992002-04-12 09:54:03 +000012911int
12912main ()
12913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914struct tm tm;
12915 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 ;
12918 return 0;
12919}
12920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012921if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012922 ac_cv_struct_tm=time.h
12923else
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12929$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012930if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
Matthias Kloseb9621712010-04-24 17:59:49 +000012932$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933
12934fi
12935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936ac_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 +000012937#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939"
Victor Stinnere0be4232011-10-25 13:06:09 +020012940if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012941
12942cat >>confdefs.h <<_ACEOF
12943#define HAVE_STRUCT_TM_TM_ZONE 1
12944_ACEOF
12945
12946
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012947fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012948
Martin v. Löwis11437992002-04-12 09:54:03 +000012949if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012952
12953else
Matthias Kloseb9621712010-04-24 17:59:49 +000012954 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12955"
Victor Stinnere0be4232011-10-25 13:06:09 +020012956if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012957 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958else
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960fi
12961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012963#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964_ACEOF
12965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12967$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012968if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970else
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012972/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012973#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974#if !HAVE_DECL_TZNAME
12975extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
Martin v. Löwis11437992002-04-12 09:54:03 +000012978int
12979main ()
12980{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 ;
12983 return 0;
12984}
12985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012986if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987 ac_cv_var_tzname=yes
12988else
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012991rm -f core conftest.err conftest.$ac_objext \
12992 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12995$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012996 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012999
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013000 fi
13001fi
13002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003ac_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 +020013004if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
13006cat >>confdefs.h <<_ACEOF
13007#define HAVE_STRUCT_STAT_ST_RDEV 1
13008_ACEOF
13009
13010
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013011fi
13012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013ac_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 +020013014if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016cat >>confdefs.h <<_ACEOF
13017#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13018_ACEOF
13019
13020
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013021fi
13022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023ac_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 +020013024if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013025
13026cat >>confdefs.h <<_ACEOF
13027#define HAVE_STRUCT_STAT_ST_FLAGS 1
13028_ACEOF
13029
13030
13031fi
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033ac_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 +020013034if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013035
13036cat >>confdefs.h <<_ACEOF
13037#define HAVE_STRUCT_STAT_ST_GEN 1
13038_ACEOF
13039
13040
13041fi
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043ac_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 +020013044if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013045
13046cat >>confdefs.h <<_ACEOF
13047#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13048_ACEOF
13049
13050
13051fi
13052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053ac_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 +020013054if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013055
Martin v. Löwis11437992002-04-12 09:54:03 +000013056cat >>confdefs.h <<_ACEOF
13057#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13058_ACEOF
13059
13060
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013061fi
13062
Stefan Krah267b6392016-04-26 01:09:18 +020013063ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13064 #include <sys/types.h>
13065 #include <pwd.h>
13066
13067"
13068if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13069
13070cat >>confdefs.h <<_ACEOF
13071#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13072_ACEOF
13073
13074
13075fi
13076ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13077 #include <sys/types.h>
13078 #include <pwd.h>
13079
13080"
13081if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13082
13083cat >>confdefs.h <<_ACEOF
13084#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13085_ACEOF
13086
13087
13088fi
13089
Zachary Ware6a6967e2016-10-01 00:47:27 -050013090# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13091ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13092"
13093if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13094
13095cat >>confdefs.h <<_ACEOF
13096#define HAVE_SIGINFO_T_SI_BAND 1
13097_ACEOF
13098
13099
13100fi
13101
Michael W. Hudson54241132001-12-07 15:38:26 +000013102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13104$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013105if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013107else
Matthias Kloseb159a552010-04-25 21:00:44 +000013108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013110/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013111#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013112int
13113main ()
13114{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 ;
13117 return 0;
13118}
13119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013120if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013121 ac_cv_header_time_altzone=yes
13122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127fi
13128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13130$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013134
13135fi
13136
Guido van Rossumda88dad1995-01-26 00:46:29 +000013137was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13139$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013141/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013142
13143#include <sys/types.h>
13144#include <sys/select.h>
13145#include <sys/time.h>
13146
Martin v. Löwis11437992002-04-12 09:54:03 +000013147int
13148main ()
13149{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013150;
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 ;
13152 return 0;
13153}
13154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013155if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013156
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013159
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013160 was_it_defined=yes
13161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13165$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013166
Matthias Kloseb9621712010-04-24 17:59:49 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13168$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013169if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013171else
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013173/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013174#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013175int
13176main ()
13177{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013178struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 ;
13180 return 0;
13181}
13182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013183if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013184 ac_cv_struct_addrinfo=yes
13185else
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13189fi
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13192$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013193if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
Matthias Kloseb9621712010-04-24 17:59:49 +000013195$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013196
13197fi
13198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13200$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013201if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013205/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013206
13207# include <sys/types.h>
13208# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013209int
13210main ()
13211{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013212struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 ;
13214 return 0;
13215}
13216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013217if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013218 ac_cv_struct_sockaddr_storage=yes
13219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13223fi
13224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13226$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013228
Matthias Kloseb9621712010-04-24 17:59:49 +000013229$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013230
13231fi
13232
Christian Heimesdffa3942016-09-05 23:54:41 +020013233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13234$as_echo_n "checking for sockaddr_alg... " >&6; }
13235if ${ac_cv_struct_sockaddr_alg+:} false; then :
13236 $as_echo_n "(cached) " >&6
13237else
13238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13239/* end confdefs.h. */
13240
13241# include <sys/types.h>
13242# include <sys/socket.h>
13243# include <linux/if_alg.h>
13244int
13245main ()
13246{
13247struct sockaddr_alg s
13248 ;
13249 return 0;
13250}
13251_ACEOF
13252if ac_fn_c_try_compile "$LINENO"; then :
13253 ac_cv_struct_sockaddr_alg=yes
13254else
13255 ac_cv_struct_sockaddr_alg=no
13256fi
13257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13258fi
13259
13260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13261$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13262if test $ac_cv_struct_sockaddr_alg = yes; then
13263
13264$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13265
13266fi
13267
Guido van Rossum627b2d71993-12-24 10:39:16 +000013268# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13271$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013272if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013277$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013278int
13279main ()
13280{
13281static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013282test_array [0] = 0;
13283return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
13285 ;
13286 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013287}
Martin v. Löwis11437992002-04-12 09:54:03 +000013288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013289if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013290 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13297$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300
13301fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013302
Matthias Kloseb9621712010-04-24 17:59:49 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13304$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013305if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013309/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310
Martin v. Löwis11437992002-04-12 09:54:03 +000013311int
13312main ()
13313{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013314
Martin v. Löwis11437992002-04-12 09:54:03 +000013315#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013316 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013318 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320 char const *const *pcpcc;
13321 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 /* NEC SVR4.0.2 mips cc rejects this. */
13323 struct point {int x, y;};
13324 static struct point const zero = {0,0};
13325 /* AIX XL C 1.02.0.0 rejects this.
13326 It does not let you subtract one const X* pointer from another in
13327 an arm of an if-expression whose if-part is not a constant
13328 expression */
13329 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332 ++pcpcc;
13333 ppc = (char**) pcpcc;
13334 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013335 { /* SCO 3.2v4 cc rejects this sort of thing. */
13336 char tx;
13337 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 }
13343 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13344 int x[] = {25, 17};
13345 const int *foo = &x[0];
13346 ++foo;
13347 }
13348 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13349 typedef const int *iptr;
13350 iptr p = 0;
13351 ++p;
13352 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013353 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013354 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013355 struct s { int j; const int *ap[3]; } bx;
13356 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 }
13358 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13359 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013363#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013364
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 ;
13366 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013367}
Martin v. Löwis11437992002-04-12 09:54:03 +000013368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370 ac_cv_c_const=yes
13371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13377$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013378if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381
13382fi
13383
Michael W. Hudson54241132001-12-07 15:38:26 +000013384
Guido van Rossumda88dad1995-01-26 00:46:29 +000013385works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13387$as_echo_n "checking for working signed char... " >&6; }
13388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013389/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391int
13392main ()
13393{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013395 ;
13396 return 0;
13397}
13398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013399if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013400 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013401else
Skip Montanaro6dead952003-09-25 14:50:04 +000013402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013404
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013405
Guido van Rossum7f43da71994-08-01 12:15:30 +000013406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13409$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013410
Guido van Rossumda88dad1995-01-26 00:46:29 +000013411have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13413$as_echo_n "checking for prototypes... " >&6; }
13414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013415/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013416int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013417int
13418main ()
13419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013420return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 ;
13422 return 0;
13423}
13424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
Matthias Kloseb159a552010-04-25 21:00:44 +000013429 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13433$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013434
Guido van Rossumda88dad1995-01-26 00:46:29 +000013435works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13437$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013439/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013440
13441#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013442int foo(int x, ...) {
13443 va_list va;
13444 va_start(va, x);
13445 va_arg(va, int);
13446 va_arg(va, char *);
13447 va_arg(va, double);
13448 return 0;
13449}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451int
13452main ()
13453{
Guido van Rossum90eea071996-08-30 20:58:57 +000013454return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 ;
13456 return 0;
13457}
13458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013460
13461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013464 works=yes
13465
Guido van Rossum627b2d71993-12-24 10:39:16 +000013466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13469$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470
Martin v. Löwisd6320502004-08-12 13:45:08 +000013471# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13473$as_echo_n "checking for socketpair... " >&6; }
13474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013475/* end confdefs.h. */
13476
13477#include <sys/types.h>
13478#include <sys/socket.h>
13479
13480int
13481main ()
13482{
13483void *x=socketpair
13484 ;
13485 return 0;
13486}
13487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013491
Matthias Kloseb159a552010-04-25 21:00:44 +000013492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013493$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013494else
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13496$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013497
13498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013500
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013501# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13503$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013506#include <sys/types.h>
13507#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013508int
13509main ()
13510{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013511struct sockaddr x;
13512x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 ;
13514 return 0;
13515}
13516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013517if ac_fn_c_try_compile "$LINENO"; then :
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13519$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013522
13523else
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13525$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013526
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013530# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013531
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013534if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13539$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013540 OLD_CFLAGS=$CFLAGS
13541 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013543/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013544
13545# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
Martin v. Löwis11437992002-04-12 09:54:03 +000013547int
13548main ()
13549{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013550
13551 char *name;
13552 struct hostent *he, *res;
13553 char buffer[2048];
13554 int buflen = 2048;
13555 int h_errnop;
13556
13557 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
13559 ;
13560 return 0;
13561}
13562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013566
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
Matthias Kloseb9621712010-04-24 17:59:49 +000013568$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13571$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013573else
Skip Montanaro6dead952003-09-25 14:50:04 +000013574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13578$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013581
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013582# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Martin v. Löwis11437992002-04-12 09:54:03 +000013584int
13585main ()
13586{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013587
13588 char *name;
13589 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013590 char buffer[2048];
13591 int buflen = 2048;
13592 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013593
Matthias Kloseb159a552010-04-25 21:00:44 +000013594 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
13596 ;
13597 return 0;
13598}
13599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604
Matthias Kloseb159a552010-04-25 21:00:44 +000013605$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13608$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610else
Skip Montanaro6dead952003-09-25 14:50:04 +000013611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13613$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13615$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13617/* end confdefs.h. */
13618
13619# include <netdb.h>
13620
13621int
13622main ()
13623{
13624
13625 char *name;
13626 struct hostent *he;
13627 struct hostent_data data;
13628
13629 (void) gethostbyname_r(name, he, &data);
13630
13631 ;
13632 return 0;
13633}
13634_ACEOF
13635if ac_fn_c_try_compile "$LINENO"; then :
13636
13637 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13638
13639
13640$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13641
13642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13643$as_echo "yes" >&6; }
13644
13645else
13646
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13648$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013655
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013658 CFLAGS=$OLD_CFLAGS
13659
13660else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 for ac_func in gethostbyname
13663do :
13664 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013665if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013667#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013668_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013669
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013670fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013671done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013672
Michael W. Hudson54241132001-12-07 15:38:26 +000013673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013674fi
13675
Michael W. Hudson54241132001-12-07 15:38:26 +000013676
13677
13678
13679
13680
13681
Guido van Rossum627b2d71993-12-24 10:39:16 +000013682# checks for system services
13683# (none yet)
13684
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013686ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013687if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013688
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13691$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013692if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013694else
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013696LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700/* Override any GCC internal prototype to avoid an error.
13701 Use char because int might match the return type of a GCC
13702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013703#ifdef __cplusplus
13704extern "C"
13705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013706char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013707int
13708main ()
13709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ;
13712 return 0;
13713}
13714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013717else
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013720rm -f core conftest.err conftest.$ac_objext \
13721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013722LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13725$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013726if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 cat >>confdefs.h <<_ACEOF
13728#define HAVE_LIBIEEE 1
13729_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013731 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013732
Guido van Rossum627b2d71993-12-24 10:39:16 +000013733fi
13734
Michael W. Hudson54241132001-12-07 15:38:26 +000013735
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013736fi
13737
Michael W. Hudson54241132001-12-07 15:38:26 +000013738
Guido van Rossum7f43da71994-08-01 12:15:30 +000013739# check for --with-libm=...
13740
Guido van Rossum563e7081996-09-10 18:20:48 +000013741case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013742Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013743*) LIBM=-lm
13744esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13746$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013749if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013751if test "$withval" = no
13752then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13754$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013755elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013756then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13758$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013759else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013760fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013761else
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13763$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764fi
13765
Guido van Rossum7f43da71994-08-01 12:15:30 +000013766
13767# check for --with-libc=...
13768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13770$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013773if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013775if test "$withval" = no
13776then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13778$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013779elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013780then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13782$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013783else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013784fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13787$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788fi
13789
Guido van Rossum7f43da71994-08-01 12:15:30 +000013790
Stefan Krah1919b7e2012-03-21 18:25:23 +010013791# **************************************
13792# * Check for gcc x64 inline assembler *
13793# **************************************
13794
13795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13796$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13798/* end confdefs.h. */
13799
13800int
13801main ()
13802{
13803
13804 __asm__ __volatile__ ("movq %rcx, %rax");
13805
13806 ;
13807 return 0;
13808}
13809_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013810if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013811 have_gcc_asm_for_x64=yes
13812else
13813 have_gcc_asm_for_x64=no
13814fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013815rm -f core conftest.err conftest.$ac_objext \
13816 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13818$as_echo "$have_gcc_asm_for_x64" >&6; }
13819if test "$have_gcc_asm_for_x64" = yes
13820then
13821
13822$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13823
13824fi
13825
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013826# **************************************************
13827# * Check for various properties of floating point *
13828# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013829
Matthias Kloseb9621712010-04-24 17:59:49 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13831$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013832if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013834else
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013837 ac_cv_little_endian_double=no
13838else
Matthias Kloseb9621712010-04-24 17:59:49 +000013839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013840/* end confdefs.h. */
13841
13842#include <string.h>
13843int main() {
13844 double x = 9006104071832581.0;
13845 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13846 return 0;
13847 else
13848 return 1;
13849}
13850
13851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013852if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013853 ac_cv_little_endian_double=yes
13854else
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13858 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013859fi
13860
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861fi
13862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13864$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013865if test "$ac_cv_little_endian_double" = yes
13866then
13867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869
13870fi
13871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13873$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013874if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876else
13877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879 ac_cv_big_endian_double=no
13880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882/* end confdefs.h. */
13883
13884#include <string.h>
13885int main() {
13886 double x = 9006104071832581.0;
13887 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13888 return 0;
13889 else
13890 return 1;
13891}
13892
13893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013894if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013895 ac_cv_big_endian_double=yes
13896else
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013901fi
13902
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903fi
13904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13906$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907if test "$ac_cv_big_endian_double" = yes
13908then
13909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911
13912fi
13913
13914# Some ARM platforms use a mixed-endian representation for doubles.
13915# While Python doesn't currently have full support for these platforms
13916# (see e.g., issue 1762561), we can at least make sure that float <-> string
13917# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13919$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013920if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013922else
13923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013925 ac_cv_mixed_endian_double=no
13926else
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013928/* end confdefs.h. */
13929
13930#include <string.h>
13931int main() {
13932 double x = 9006104071832581.0;
13933 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13934 return 0;
13935 else
13936 return 1;
13937}
13938
13939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013940if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013941 ac_cv_mixed_endian_double=yes
13942else
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013947fi
13948
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949fi
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13952$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013953if test "$ac_cv_mixed_endian_double" = yes
13954then
13955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013957
13958fi
13959
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013960# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013961# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013962# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013963# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013964# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013965# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013966
13967# This inline assembler syntax may also work for suncc and icc,
13968# so we try it on all platforms.
13969
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13971$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013973/* end confdefs.h. */
13974
13975int
13976main ()
13977{
13978
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013979 unsigned short cw;
13980 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13981 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013982
13983 ;
13984 return 0;
13985}
13986_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013987if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013988 have_gcc_asm_for_x87=yes
13989else
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013991fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013992rm -f core conftest.err conftest.$ac_objext \
13993 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13995$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013996if test "$have_gcc_asm_for_x87" = yes
13997then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014001fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014002
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14004$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14006/* end confdefs.h. */
14007
14008int
14009main ()
14010{
14011
14012 unsigned int fpcr;
14013 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14014 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14015
14016 ;
14017 return 0;
14018}
14019_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014020if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014021 have_gcc_asm_for_mc68881=yes
14022else
14023 have_gcc_asm_for_mc68881=no
14024fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014025rm -f core conftest.err conftest.$ac_objext \
14026 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14028$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14029if test "$have_gcc_asm_for_mc68881" = yes
14030then
14031
14032$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14033
14034fi
14035
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014036# Detect whether system arithmetic is subject to x87-style double
14037# rounding issues. The result of this test has little meaning on non
14038# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14039# mode is round-to-nearest and double rounding issues are present, and
14040# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14042$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014043# $BASECFLAGS may affect the result
14044ac_save_cc="$CC"
14045CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014046if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014047 ac_cv_x87_double_rounding=no
14048else
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014050/* end confdefs.h. */
14051
14052#include <stdlib.h>
14053#include <math.h>
14054int main() {
14055 volatile double x, y, z;
14056 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14057 x = 0.99999999999999989; /* 1-2**-53 */
14058 y = 1./x;
14059 if (y != 1.)
14060 exit(0);
14061 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14062 x = 1e16;
14063 y = 2.99999;
14064 z = x + y;
14065 if (z != 1e16+4.)
14066 exit(0);
14067 /* both tests show evidence of double rounding */
14068 exit(1);
14069}
14070
14071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014072if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014073 ac_cv_x87_double_rounding=no
14074else
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14078 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014079fi
14080
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014081CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14083$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014084if test "$ac_cv_x87_double_rounding" = yes
14085then
14086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014088
14089fi
14090
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014091# ************************************
14092# * Check for mathematical functions *
14093# ************************************
14094
14095LIBS_SAVE=$LIBS
14096LIBS="$LIBS $LIBM"
14097
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014098for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14099do :
14100 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14101ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014102if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014103 cat >>confdefs.h <<_ACEOF
14104#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14105_ACEOF
14106
14107fi
14108done
14109
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014110for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014111do :
14112 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14113ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014114if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014115 cat >>confdefs.h <<_ACEOF
14116#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14117_ACEOF
14118
14119fi
14120done
14121
14122ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14123"
Victor Stinnere0be4232011-10-25 13:06:09 +020014124if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014125 ac_have_decl=1
14126else
14127 ac_have_decl=0
14128fi
14129
14130cat >>confdefs.h <<_ACEOF
14131#define HAVE_DECL_ISINF $ac_have_decl
14132_ACEOF
14133ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14134"
Victor Stinnere0be4232011-10-25 13:06:09 +020014135if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014136 ac_have_decl=1
14137else
14138 ac_have_decl=0
14139fi
14140
14141cat >>confdefs.h <<_ACEOF
14142#define HAVE_DECL_ISNAN $ac_have_decl
14143_ACEOF
14144ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14145"
Victor Stinnere0be4232011-10-25 13:06:09 +020014146if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014147 ac_have_decl=1
14148else
14149 ac_have_decl=0
14150fi
14151
14152cat >>confdefs.h <<_ACEOF
14153#define HAVE_DECL_ISFINITE $ac_have_decl
14154_ACEOF
14155
14156
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014157# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14158# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14160$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014161if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014163else
14164
Matthias Kloseb9621712010-04-24 17:59:49 +000014165if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014166 ac_cv_tanh_preserves_zero_sign=no
14167else
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014169/* end confdefs.h. */
14170
14171#include <math.h>
14172#include <stdlib.h>
14173int main() {
14174 /* return 0 if either negative zeros don't exist
14175 on this platform or if negative zeros exist
14176 and tanh(-0.) == -0. */
14177 if (atan2(0., -1.) == atan2(-0., -1.) ||
14178 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14179 else exit(1);
14180}
14181
14182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014183if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014184 ac_cv_tanh_preserves_zero_sign=yes
14185else
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014190fi
14191
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014192fi
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14195$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014196if test "$ac_cv_tanh_preserves_zero_sign" = yes
14197then
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014200
14201fi
14202
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014203if test "$ac_cv_func_log1p" = yes
14204then
14205 # On some versions of AIX, log1p(-0.) returns 0. instead of
14206 # -0. See issue #9920.
14207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14208$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014209 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014210 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014211else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014212
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014213 if test "$cross_compiling" = yes; then :
14214 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014215else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014218
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014219 #include <math.h>
14220 #include <stdlib.h>
14221 int main() {
14222 /* Fail if the signs of log1p(-0.) and -0. can be
14223 distinguished. */
14224 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14225 return 0;
14226 else
14227 return 1;
14228 }
14229
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014230_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014231if ac_fn_c_try_run "$LINENO"; then :
14232 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014233else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014234 ac_cv_log1p_drops_zero_sign=yes
14235fi
14236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014238fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014239
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014240fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014241
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14243$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14244fi
14245if test "$ac_cv_log1p_drops_zero_sign" = yes
14246then
14247
14248$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14249
14250fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014251
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014252LIBS=$LIBS_SAVE
14253
Mark Dickinsona614f042009-11-28 12:48:43 +000014254# For multiprocessing module, check that sem_open
14255# actually works. For FreeBSD versions <= 7.2,
14256# the kernel module that provides POSIX semaphores
14257# isn't loaded by default, so an attempt to call
14258# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14260$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014261if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014263else
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014265 ac_cv_posix_semaphores_enabled=yes
14266else
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014268/* end confdefs.h. */
14269
14270#include <unistd.h>
14271#include <fcntl.h>
14272#include <stdio.h>
14273#include <semaphore.h>
14274#include <sys/stat.h>
14275
14276int main(void) {
14277 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14278 if (a == SEM_FAILED) {
14279 perror("sem_open");
14280 return 1;
14281 }
14282 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014283 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014284 return 0;
14285}
14286
14287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014288if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014289 ac_cv_posix_semaphores_enabled=yes
14290else
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014295fi
14296
14297
Mark Dickinsona614f042009-11-28 12:48:43 +000014298fi
14299
Matthias Kloseb9621712010-04-24 17:59:49 +000014300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14301$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014302if test $ac_cv_posix_semaphores_enabled = no
14303then
14304
Matthias Kloseb9621712010-04-24 17:59:49 +000014305$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014306
14307fi
14308
Mark Dickinson10683072009-04-18 21:18:19 +000014309# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14311$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014312if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014314else
Matthias Kloseb9621712010-04-24 17:59:49 +000014315 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014316 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014317else
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014319/* end confdefs.h. */
14320
14321#include <unistd.h>
14322#include <fcntl.h>
14323#include <stdio.h>
14324#include <semaphore.h>
14325#include <sys/stat.h>
14326
14327int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014328 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014329 int count;
14330 int res;
14331 if(a==SEM_FAILED){
14332 perror("sem_open");
14333 return 1;
14334
14335 }
14336 res = sem_getvalue(a, &count);
14337 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014338 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014339 return res==-1 ? 1 : 0;
14340}
14341
Mark Dickinson10683072009-04-18 21:18:19 +000014342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014343if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014345else
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14349 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014350fi
14351
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014352
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014353fi
14354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14356$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357if test $ac_cv_broken_sem_getvalue = yes
14358then
14359
Matthias Kloseb9621712010-04-24 17:59:49 +000014360$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014361
14362fi
14363
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014364ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14365"
14366if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14367 ac_have_decl=1
14368else
14369 ac_have_decl=0
14370fi
14371
14372cat >>confdefs.h <<_ACEOF
14373#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14374_ACEOF
14375ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14376"
14377if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14378 ac_have_decl=1
14379else
14380 ac_have_decl=0
14381fi
14382
14383cat >>confdefs.h <<_ACEOF
14384#define HAVE_DECL_RTLD_NOW $ac_have_decl
14385_ACEOF
14386ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14387"
14388if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14389 ac_have_decl=1
14390else
14391 ac_have_decl=0
14392fi
14393
14394cat >>confdefs.h <<_ACEOF
14395#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14396_ACEOF
14397ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14398"
14399if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14400 ac_have_decl=1
14401else
14402 ac_have_decl=0
14403fi
14404
14405cat >>confdefs.h <<_ACEOF
14406#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14407_ACEOF
14408ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14409"
14410if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14411 ac_have_decl=1
14412else
14413 ac_have_decl=0
14414fi
14415
14416cat >>confdefs.h <<_ACEOF
14417#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14418_ACEOF
14419ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14420"
14421if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14422 ac_have_decl=1
14423else
14424 ac_have_decl=0
14425fi
14426
14427cat >>confdefs.h <<_ACEOF
14428#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14429_ACEOF
14430ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14431"
14432if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14433 ac_have_decl=1
14434else
14435 ac_have_decl=0
14436fi
14437
14438cat >>confdefs.h <<_ACEOF
14439#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14440_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014441ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14442"
14443if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14444 ac_have_decl=1
14445else
14446 ac_have_decl=0
14447fi
14448
14449cat >>confdefs.h <<_ACEOF
14450#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14451_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014452
14453
Mark Dickinsonbd792642009-03-18 20:06:12 +000014454# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14456$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014457# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014458if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014459 enableval=$enable_big_digits; case $enable_big_digits in
14460yes)
14461 enable_big_digits=30 ;;
14462no)
14463 enable_big_digits=15 ;;
1446415|30)
14465 ;;
14466*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014467 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 +000014468esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14470$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014471
14472cat >>confdefs.h <<_ACEOF
14473#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14474_ACEOF
14475
14476
14477else
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14479$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014480fi
14481
14482
Guido van Rossumef2255b2000-03-10 22:30:29 +000014483# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014484ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014485if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014486
14487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014490 wchar_h="yes"
14491
Guido van Rossumef2255b2000-03-10 22:30:29 +000014492else
Martin v. Löwis11437992002-04-12 09:54:03 +000014493 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014494
14495fi
14496
Michael W. Hudson54241132001-12-07 15:38:26 +000014497
Martin v. Löwis11437992002-04-12 09:54:03 +000014498
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014499# determine wchar_t size
14500if test "$wchar_h" = yes
14501then
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14504# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14505# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14507$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014508if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014510else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14512"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
Martin v. Löwis11437992002-04-12 09:54:03 +000014514else
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 if test "$ac_cv_type_wchar_t" = yes; then
14516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014518as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014519See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520 else
14521 ac_cv_sizeof_wchar_t=0
14522 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014524
Martin v. Löwis11437992002-04-12 09:54:03 +000014525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14527$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528
14529
14530
Martin v. Löwis11437992002-04-12 09:54:03 +000014531cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014532#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014534
Michael W. Hudson54241132001-12-07 15:38:26 +000014535
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014536fi
14537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14539$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014540have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014542/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014543
14544#include <tcl.h>
14545#if TCL_UTF_MAX != 6
14546# error "NOT UCS4_TCL"
14547#endif
14548int
14549main ()
14550{
14551
14552 ;
14553 return 0;
14554}
14555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014557
14558
Matthias Kloseb9621712010-04-24 17:59:49 +000014559$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014560
14561 have_ucs4_tcl=yes
14562
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14566$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014567
Skip Montanaro6dead952003-09-25 14:50:04 +000014568# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014569if test "$wchar_h" = yes
14570then
14571 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14573$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014574 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014576else
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014579 ac_cv_wchar_t_signed=yes
14580else
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014582/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014583
14584 #include <wchar.h>
14585 int main()
14586 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014587 /* Success: exit code 0 */
14588 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014589 }
14590
14591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014592if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014593 ac_cv_wchar_t_signed=yes
14594else
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14598 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014599fi
14600
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014601fi
14602
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14604$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605fi
14606
Georg Brandl52d168a2008-01-07 18:10:24 +000014607# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014608if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014609 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014610then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014611 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014614
Georg Brandl52d168a2008-01-07 18:10:24 +000014615else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014616 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014617fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14619$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014620
14621# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14623$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014624if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014625 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014626else
Matthias Kloseb9621712010-04-24 17:59:49 +000014627 ac_cv_c_bigendian=unknown
14628 # See if we're dealing with a universal compiler.
14629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14630/* end confdefs.h. */
14631#ifndef __APPLE_CC__
14632 not a universal capable compiler
14633 #endif
14634 typedef int dummy;
14635
Skip Montanaro6dead952003-09-25 14:50:04 +000014636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014637if ac_fn_c_try_compile "$LINENO"; then :
14638
14639 # Check for potential -arch flags. It is not universal unless
14640 # there are at least two -arch flags with different values.
14641 ac_arch=
14642 ac_prev=
14643 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14644 if test -n "$ac_prev"; then
14645 case $ac_word in
14646 i?86 | x86_64 | ppc | ppc64)
14647 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14648 ac_arch=$ac_word
14649 else
14650 ac_cv_c_bigendian=universal
14651 break
14652 fi
14653 ;;
14654 esac
14655 ac_prev=
14656 elif test "x$ac_word" = "x-arch"; then
14657 ac_prev=arch
14658 fi
14659 done
14660fi
14661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14662 if test $ac_cv_c_bigendian = unknown; then
14663 # See if sys/param.h defines the BYTE_ORDER macro.
14664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014665/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014666#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669int
14670main ()
14671{
Matthias Kloseb9621712010-04-24 17:59:49 +000014672#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14673 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14674 && LITTLE_ENDIAN)
14675 bogus endian macros
14676 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014677
14678 ;
14679 return 0;
14680}
14681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014682if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014683 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014685/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014686#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014688
Martin v. Löwis11437992002-04-12 09:54:03 +000014689int
14690main ()
14691{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014692#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 not big endian
14694 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
14696 ;
14697 return 0;
14698}
14699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014700if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014701 ac_cv_c_bigendian=yes
14702else
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014706fi
14707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14708 fi
14709 if test $ac_cv_c_bigendian = unknown; then
14710 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014712/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014713#include <limits.h>
14714
Martin v. Löwis11437992002-04-12 09:54:03 +000014715int
14716main ()
14717{
Matthias Kloseb9621712010-04-24 17:59:49 +000014718#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14719 bogus endian macros
14720 #endif
14721
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 ;
14723 return 0;
14724}
14725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014726if ac_fn_c_try_compile "$LINENO"; then :
14727 # It does; now see whether it defined to _BIG_ENDIAN or not.
14728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14729/* end confdefs.h. */
14730#include <limits.h>
14731
14732int
14733main ()
14734{
14735#ifndef _BIG_ENDIAN
14736 not big endian
14737 #endif
14738
14739 ;
14740 return 0;
14741}
14742_ACEOF
14743if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014745else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14749fi
14750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14751 fi
14752 if test $ac_cv_c_bigendian = unknown; then
14753 # Compile a test program.
14754 if test "$cross_compiling" = yes; then :
14755 # Try to guess by grepping values from an object file.
14756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14757/* end confdefs.h. */
14758short int ascii_mm[] =
14759 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14760 short int ascii_ii[] =
14761 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14762 int use_ascii (int i) {
14763 return ascii_mm[i] + ascii_ii[i];
14764 }
14765 short int ebcdic_ii[] =
14766 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14767 short int ebcdic_mm[] =
14768 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14769 int use_ebcdic (int i) {
14770 return ebcdic_mm[i] + ebcdic_ii[i];
14771 }
14772 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773
Matthias Kloseb9621712010-04-24 17:59:49 +000014774int
14775main ()
14776{
14777return use_ascii (foo) == use_ebcdic (foo);
14778 ;
14779 return 0;
14780}
14781_ACEOF
14782if ac_fn_c_try_compile "$LINENO"; then :
14783 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14784 ac_cv_c_bigendian=yes
14785 fi
14786 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14787 if test "$ac_cv_c_bigendian" = unknown; then
14788 ac_cv_c_bigendian=no
14789 else
14790 # finding both strings is unlikely to happen, but who knows?
14791 ac_cv_c_bigendian=unknown
14792 fi
14793 fi
14794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014796else
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014798/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014800int
14801main ()
14802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 /* Are we little or big endian? From Harbison&Steele. */
14805 union
14806 {
14807 long int l;
14808 char c[sizeof (long int)];
14809 } u;
14810 u.l = 1;
14811 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812
14813 ;
14814 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014815}
Martin v. Löwis11437992002-04-12 09:54:03 +000014816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014817if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014818 ac_cv_c_bigendian=no
14819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14829$as_echo "$ac_cv_c_bigendian" >&6; }
14830 case $ac_cv_c_bigendian in #(
14831 yes)
14832 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14833;; #(
14834 no)
14835 ;; #(
14836 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 ;; #(
14841 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014842 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014843 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014845
Michael W. Hudson54241132001-12-07 15:38:26 +000014846
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014847# ABI version string for Python extension modules. This appears between the
14848# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14849# from the following attributes which affect the ABI of this Python build (in
14850# this order):
14851#
14852# * The Python implementation (always 'cpython-' for us)
14853# * The major and minor version numbers
14854# * --with-pydebug (adds a 'd')
14855# * --with-pymalloc (adds a 'm')
14856# * --with-wide-unicode (adds a 'u')
14857#
14858# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014859# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14860# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014861
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14863$as_echo_n "checking ABIFLAGS... " >&6; }
14864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14865$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14867$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014868SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14870$as_echo "$SOABI" >&6; }
14871
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014872
14873case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014874 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014875 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14876 *)
14877 EXT_SUFFIX=${SHLIB_SUFFIX};;
14878esac
14879
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14881$as_echo_n "checking LDVERSION... " >&6; }
14882LDVERSION='$(VERSION)$(ABIFLAGS)'
14883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14884$as_echo "$LDVERSION" >&6; }
14885
doko@python.org87421192013-01-26 11:39:31 +010014886
doko@ubuntu.com55532312016-06-14 08:55:19 +020014887if test x$PLATFORM_TRIPLET = x; then
14888 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14889else
14890 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14891fi
doko@python.org87421192013-01-26 11:39:31 +010014892
14893
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014894# Check whether right shifting a negative integer extends the sign bit
14895# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14897$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014898if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014900else
Martin v. Löwis11437992002-04-12 09:54:03 +000014901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014903 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014904else
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014906/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014907
14908int main()
14909{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014910 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014911}
14912
Martin v. Löwis11437992002-04-12 09:54:03 +000014913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014914if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014915 ac_cv_rshift_extends_sign=yes
14916else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014921fi
14922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923fi
14924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14926$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014927if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014928then
Martin v. Löwis11437992002-04-12 09:54:03 +000014929
Matthias Kloseb9621712010-04-24 17:59:49 +000014930$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014931
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014932fi
14933
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014934# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14936$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014937if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014939else
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Matthias Kloseb9621712010-04-24 17:59:49 +000014941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014942/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014944int
14945main ()
14946{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014947
14948 FILE *f = fopen("/dev/null", "r");
14949 flockfile(f);
14950 getc_unlocked(f);
14951 funlockfile(f);
14952
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 ;
14954 return 0;
14955}
14956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014957if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014958 ac_cv_have_getc_unlocked=yes
14959else
Matthias Kloseb9621712010-04-24 17:59:49 +000014960 ac_cv_have_getc_unlocked=no
14961fi
14962rm -f core conftest.err conftest.$ac_objext \
14963 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965
Matthias Kloseb9621712010-04-24 17:59:49 +000014966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14967$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014968if test "$ac_cv_have_getc_unlocked" = yes
14969then
Martin v. Löwis11437992002-04-12 09:54:03 +000014970
Matthias Kloseb9621712010-04-24 17:59:49 +000014971$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014972
14973fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014974
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014975# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014976# save the value of LIBS so we don't actually link Python with readline
14977LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014978
Gregory P. Smith18820942008-09-07 06:24:49 +000014979# On some systems we need to link readline to a termcap compatible
14980# library. NOTE: Keep the precedence of listed libraries synchronised
14981# with setup.py.
14982py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14984$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014985for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014986 if test -z "$py_libtermcap"; then
14987 READLINE_LIBS="-lreadline"
14988 else
14989 READLINE_LIBS="-lreadline -l$py_libtermcap"
14990 fi
14991 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014993/* end confdefs.h. */
14994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995/* Override any GCC internal prototype to avoid an error.
14996 Use char because int might match the return type of a GCC
14997 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014998#ifdef __cplusplus
14999extern "C"
15000#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015001char readline ();
15002int
15003main ()
15004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015006 ;
15007 return 0;
15008}
15009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015011 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015013rm -f core conftest.err conftest.$ac_objext \
15014 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015015 if test $py_cv_lib_readline = yes; then
15016 break
15017 fi
15018done
15019# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15020#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015021if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15023$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015024else
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15026$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015027
Matthias Kloseb9621712010-04-24 17:59:49 +000015028$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015029
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015030fi
15031
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015032# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015034/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015035#include <readline/readline.h>
15036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015037if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015038 have_readline=yes
15039else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015040 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015041
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015042fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015043rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015044if test $have_readline = yes
15045then
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015047/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015048#include <readline/readline.h>
15049
15050_ACEOF
15051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015053
Matthias Kloseb9621712010-04-24 17:59:49 +000015054$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015055
15056fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015057rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015058
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015060/* end confdefs.h. */
15061#include <readline/readline.h>
15062
15063_ACEOF
15064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015066
Matthias Kloseb9621712010-04-24 17:59:49 +000015067$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015068
15069fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015070rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015071
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015072fi
15073
Martin v. Löwis0daad592001-09-30 21:09:59 +000015074# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15076$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015077if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015079else
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015081LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085/* Override any GCC internal prototype to avoid an error.
15086 Use char because int might match the return type of a GCC
15087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015088#ifdef __cplusplus
15089extern "C"
15090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015091char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015092int
15093main ()
15094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 ;
15097 return 0;
15098}
15099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015100if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015102else
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015105rm -f core conftest.err conftest.$ac_objext \
15106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015107LIBS=$ac_check_lib_save_LIBS
15108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15110$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015111if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015112
Matthias Kloseb9621712010-04-24 17:59:49 +000015113$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015114
Martin v. Löwis0daad592001-09-30 21:09:59 +000015115fi
15116
Michael W. Hudson54241132001-12-07 15:38:26 +000015117
Thomas Wouters89d996e2007-09-08 17:39:28 +000015118# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15120$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015121if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015123else
15124 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015125LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015127/* end confdefs.h. */
15128
15129/* Override any GCC internal prototype to avoid an error.
15130 Use char because int might match the return type of a GCC
15131 builtin and then its argument prototype would still apply. */
15132#ifdef __cplusplus
15133extern "C"
15134#endif
15135char rl_completion_display_matches_hook ();
15136int
15137main ()
15138{
15139return rl_completion_display_matches_hook ();
15140 ;
15141 return 0;
15142}
15143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015144if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015145 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15146else
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015149rm -f core conftest.err conftest.$ac_objext \
15150 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015151LIBS=$ac_check_lib_save_LIBS
15152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15154$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015155if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015156
Matthias Kloseb9621712010-04-24 17:59:49 +000015157$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015158
15159fi
15160
15161
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015162# also in 4.0, but not in editline
15163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15164$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15165if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15166 $as_echo_n "(cached) " >&6
15167else
15168 ac_check_lib_save_LIBS=$LIBS
15169LIBS="-lreadline $READLINE_LIBS $LIBS"
15170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15171/* end confdefs.h. */
15172
15173/* Override any GCC internal prototype to avoid an error.
15174 Use char because int might match the return type of a GCC
15175 builtin and then its argument prototype would still apply. */
15176#ifdef __cplusplus
15177extern "C"
15178#endif
15179char rl_resize_terminal ();
15180int
15181main ()
15182{
15183return rl_resize_terminal ();
15184 ;
15185 return 0;
15186}
15187_ACEOF
15188if ac_fn_c_try_link "$LINENO"; then :
15189 ac_cv_lib_readline_rl_resize_terminal=yes
15190else
15191 ac_cv_lib_readline_rl_resize_terminal=no
15192fi
15193rm -f core conftest.err conftest.$ac_objext \
15194 conftest$ac_exeext conftest.$ac_ext
15195LIBS=$ac_check_lib_save_LIBS
15196fi
15197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15198$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15199if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15200
15201$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15202
15203fi
15204
15205
Martin v. Löwis0daad592001-09-30 21:09:59 +000015206# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15208$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015209if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015211else
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015213LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015217/* Override any GCC internal prototype to avoid an error.
15218 Use char because int might match the return type of a GCC
15219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015220#ifdef __cplusplus
15221extern "C"
15222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015223char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015224int
15225main ()
15226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 ;
15229 return 0;
15230}
15231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015234else
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015237rm -f core conftest.err conftest.$ac_objext \
15238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015239LIBS=$ac_check_lib_save_LIBS
15240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15242$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015243if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015244
Matthias Kloseb9621712010-04-24 17:59:49 +000015245$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015246
Guido van Rossum353ae582001-07-10 16:45:32 +000015247fi
15248
Jack Jansendd19cf82001-12-06 22:36:17 +000015249
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015250# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015252/* end confdefs.h. */
15253#include <readline/readline.h>
15254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015255if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015256 have_readline=yes
15257else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015258 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015259
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015260fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015261rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015262if test $have_readline = yes
15263then
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015265/* end confdefs.h. */
15266#include <readline/readline.h>
15267
15268_ACEOF
15269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015273
15274fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015275rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015276
15277fi
15278
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15280$as_echo_n "checking for append_history in -lreadline... " >&6; }
15281if ${ac_cv_lib_readline_append_history+:} false; then :
15282 $as_echo_n "(cached) " >&6
15283else
15284 ac_check_lib_save_LIBS=$LIBS
15285LIBS="-lreadline $READLINE_LIBS $LIBS"
15286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15287/* end confdefs.h. */
15288
15289/* Override any GCC internal prototype to avoid an error.
15290 Use char because int might match the return type of a GCC
15291 builtin and then its argument prototype would still apply. */
15292#ifdef __cplusplus
15293extern "C"
15294#endif
15295char append_history ();
15296int
15297main ()
15298{
15299return append_history ();
15300 ;
15301 return 0;
15302}
15303_ACEOF
15304if ac_fn_c_try_link "$LINENO"; then :
15305 ac_cv_lib_readline_append_history=yes
15306else
15307 ac_cv_lib_readline_append_history=no
15308fi
15309rm -f core conftest.err conftest.$ac_objext \
15310 conftest$ac_exeext conftest.$ac_ext
15311LIBS=$ac_check_lib_save_LIBS
15312fi
15313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15314$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15315if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15316
15317$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15318
15319fi
15320
15321
Martin v. Löwis82bca632006-02-10 20:49:30 +000015322# End of readline checks: restore LIBS
15323LIBS=$LIBS_no_readline
15324
Matthias Kloseb9621712010-04-24 17:59:49 +000015325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15326$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015327if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015328 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015329else
Martin v. Löwis11437992002-04-12 09:54:03 +000015330
Matthias Kloseb9621712010-04-24 17:59:49 +000015331if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015332 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015333else
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015335/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015336
15337int main()
15338{
15339 int val1 = nice(1);
15340 if (val1 != -1 && val1 == nice(2))
15341 exit(0);
15342 exit(1);
15343}
15344
Martin v. Löwis11437992002-04-12 09:54:03 +000015345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015346if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015347 ac_cv_broken_nice=yes
15348else
Matthias Kloseb9621712010-04-24 17:59:49 +000015349 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15352 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015353fi
15354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355fi
15356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15358$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015359if test "$ac_cv_broken_nice" = yes
15360then
Martin v. Löwis11437992002-04-12 09:54:03 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015363
15364fi
15365
Matthias Kloseb9621712010-04-24 17:59:49 +000015366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15367$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015368if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015370else
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015372 ac_cv_broken_poll=no
15373else
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015375/* end confdefs.h. */
15376
15377#include <poll.h>
15378
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015379int main()
15380{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015381 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015382 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015383
15384 close (42);
15385
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015386 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015387 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015388 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015389 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015390 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015391 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015392 return 1;
15393}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015394
15395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015396if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015397 ac_cv_broken_poll=yes
15398else
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15402 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015405fi
15406
Matthias Kloseb9621712010-04-24 17:59:49 +000015407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15408$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015409if test "$ac_cv_broken_poll" = yes
15410then
15411
Matthias Kloseb9621712010-04-24 17:59:49 +000015412$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015413
15414fi
15415
Brett Cannon43802422005-02-10 20:48:03 +000015416# 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 +000015417# (which is not required by ISO C or UNIX spec) and/or if we support
15418# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015419ac_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 +000015420#include <$ac_cv_struct_tm>
15421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422"
Victor Stinnere0be4232011-10-25 13:06:09 +020015423if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015424
15425cat >>confdefs.h <<_ACEOF
15426#define HAVE_STRUCT_TM_TM_ZONE 1
15427_ACEOF
15428
15429
15430fi
15431
15432if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15433
Matthias Kloseb9621712010-04-24 17:59:49 +000015434$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015435
15436else
Matthias Kloseb9621712010-04-24 17:59:49 +000015437 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15438"
Victor Stinnere0be4232011-10-25 13:06:09 +020015439if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441else
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015443fi
15444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015446#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447_ACEOF
15448
Matthias Kloseb9621712010-04-24 17:59:49 +000015449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15450$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015451if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015452 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015453else
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015455/* end confdefs.h. */
15456#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457#if !HAVE_DECL_TZNAME
15458extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015459#endif
15460
15461int
15462main ()
15463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015465 ;
15466 return 0;
15467}
15468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015469if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015470 ac_cv_var_tzname=yes
15471else
Matthias Kloseb9621712010-04-24 17:59:49 +000015472 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015474rm -f core conftest.err conftest.$ac_objext \
15475 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15478$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015479 if test $ac_cv_var_tzname = yes; then
15480
Matthias Kloseb9621712010-04-24 17:59:49 +000015481$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015482
15483 fi
15484fi
15485
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015486
Martin v. Löwis1d459062005-03-14 21:23:33 +000015487# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15489$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015490if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015492else
15493
Matthias Kloseb9621712010-04-24 17:59:49 +000015494if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015495 ac_cv_working_tzset=no
15496else
Matthias Kloseb9621712010-04-24 17:59:49 +000015497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015498/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015499
15500#include <stdlib.h>
15501#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015502#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015503
15504#if HAVE_TZNAME
15505extern char *tzname[];
15506#endif
15507
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015508int main()
15509{
Brett Cannon18367812003-09-19 00:59:16 +000015510 /* Note that we need to ensure that not only does tzset(3)
15511 do 'something' with localtime, but it works as documented
15512 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015513 This includes making sure that tzname is set properly if
15514 tm->tm_zone does not exist since it is the alternative way
15515 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015516
15517 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015518 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015519 */
15520
Martin v. Löwis1d459062005-03-14 21:23:33 +000015521 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015522 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15523
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015524 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015525 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015526 if (localtime(&groundhogday)->tm_hour != 0)
15527 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015528#if HAVE_TZNAME
15529 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15530 if (strcmp(tzname[0], "UTC") ||
15531 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15532 exit(1);
15533#endif
Brett Cannon18367812003-09-19 00:59:16 +000015534
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015535 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015536 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015537 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015538 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015539#if HAVE_TZNAME
15540 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15541 exit(1);
15542#endif
Brett Cannon18367812003-09-19 00:59:16 +000015543
15544 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15545 tzset();
15546 if (localtime(&groundhogday)->tm_hour != 11)
15547 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015548#if HAVE_TZNAME
15549 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15550 exit(1);
15551#endif
15552
15553#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015554 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15555 exit(1);
15556 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15557 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015558#endif
Brett Cannon18367812003-09-19 00:59:16 +000015559
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015560 exit(0);
15561}
15562
15563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015564if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015565 ac_cv_working_tzset=yes
15566else
Matthias Kloseb9621712010-04-24 17:59:49 +000015567 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15570 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015571fi
15572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573fi
15574
Matthias Kloseb9621712010-04-24 17:59:49 +000015575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15576$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015577if test "$ac_cv_working_tzset" = yes
15578then
15579
Matthias Kloseb9621712010-04-24 17:59:49 +000015580$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015581
15582fi
15583
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015584# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15586$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015587if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015588 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015589else
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015591/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015592#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015593int
15594main ()
15595{
15596
15597struct stat st;
15598st.st_mtim.tv_nsec = 1;
15599
15600 ;
15601 return 0;
15602}
15603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015605 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015606else
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15610fi
15611
Matthias Kloseb9621712010-04-24 17:59:49 +000015612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15613$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015614if test "$ac_cv_stat_tv_nsec" = yes
15615then
15616
Matthias Kloseb9621712010-04-24 17:59:49 +000015617$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015618
15619fi
15620
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015621# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15623$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015624if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015626else
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015628/* end confdefs.h. */
15629#include <sys/stat.h>
15630int
15631main ()
15632{
15633
15634struct stat st;
15635st.st_mtimespec.tv_nsec = 1;
15636
15637 ;
15638 return 0;
15639}
15640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015642 ac_cv_stat_tv_nsec2=yes
15643else
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15647fi
15648
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15650$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015651if test "$ac_cv_stat_tv_nsec2" = yes
15652then
15653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015655
15656fi
15657
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015658# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015659ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015660if test "$cross_compiling" = no; then
15661 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15662fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015663
15664for ac_header in curses.h ncurses.h
15665do :
15666 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15667ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15668if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15669 cat >>confdefs.h <<_ACEOF
15670#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15671_ACEOF
15672
15673fi
15674
15675done
15676
15677
15678# On Solaris, term.h requires curses.h
15679for ac_header in term.h
15680do :
15681 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15682#ifdef HAVE_CURSES_H
15683#include <curses.h>
15684#endif
15685
15686"
15687if test "x$ac_cv_header_term_h" = xyes; then :
15688 cat >>confdefs.h <<_ACEOF
15689#define HAVE_TERM_H 1
15690_ACEOF
15691
15692fi
15693
15694done
15695
15696
Jack Jansen666b1e72001-10-31 12:11:48 +000015697# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15699$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015700if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015701 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015702else
Matthias Kloseb9621712010-04-24 17:59:49 +000015703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015704/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015705#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015706int
15707main ()
15708{
Jack Jansen666b1e72001-10-31 12:11:48 +000015709
15710 int rtn;
15711 rtn = mvwdelch(0,0,0);
15712
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 ;
15714 return 0;
15715}
15716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015717if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015718 ac_cv_mvwdelch_is_expression=yes
15719else
Matthias Kloseb9621712010-04-24 17:59:49 +000015720 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15723fi
15724
Matthias Kloseb9621712010-04-24 17:59:49 +000015725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15726$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015727
15728if test "$ac_cv_mvwdelch_is_expression" = yes
15729then
Martin v. Löwis11437992002-04-12 09:54:03 +000015730
Matthias Kloseb9621712010-04-24 17:59:49 +000015731$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015732
15733fi
15734
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015735# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15736# structs since version 5.7. If the macro is defined as zero before including
15737# [n]curses.h, ncurses will expose fields of the structs regardless of the
15738# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15740$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015741if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015743else
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015745/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015746
15747 #define NCURSES_OPAQUE 0
15748 #include <curses.h>
15749
Martin v. Löwis11437992002-04-12 09:54:03 +000015750int
15751main ()
15752{
Jack Jansen666b1e72001-10-31 12:11:48 +000015753
15754 WINDOW *w;
15755 w->_flags = 0;
15756
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ;
15758 return 0;
15759}
15760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015761if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015762 ac_cv_window_has_flags=yes
15763else
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15767fi
15768
Matthias Kloseb9621712010-04-24 17:59:49 +000015769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15770$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015771
Jack Jansen666b1e72001-10-31 12:11:48 +000015772
15773if test "$ac_cv_window_has_flags" = yes
15774then
Martin v. Löwis11437992002-04-12 09:54:03 +000015775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015777
15778fi
15779
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15781$as_echo_n "checking for is_pad... " >&6; }
15782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15783/* end confdefs.h. */
15784#include <curses.h>
15785int
15786main ()
15787{
15788
15789#ifndef is_pad
15790void *x=is_pad
15791#endif
15792
15793 ;
15794 return 0;
15795}
15796_ACEOF
15797if ac_fn_c_try_compile "$LINENO"; then :
15798
15799$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15800
15801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15802$as_echo "yes" >&6; }
15803else
15804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15805$as_echo "no" >&6; }
15806
15807fi
15808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15809
Matthias Kloseb9621712010-04-24 17:59:49 +000015810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15811$as_echo_n "checking for is_term_resized... " >&6; }
15812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015813/* end confdefs.h. */
15814#include <curses.h>
15815int
15816main ()
15817{
15818void *x=is_term_resized
15819 ;
15820 return 0;
15821}
15822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015824
Matthias Kloseb9621712010-04-24 17:59:49 +000015825$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015826
Matthias Kloseb159a552010-04-25 21:00:44 +000015827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015828$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015829else
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15831$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015832
15833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15835
Matthias Kloseb9621712010-04-24 17:59:49 +000015836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15837$as_echo_n "checking for resize_term... " >&6; }
15838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015839/* end confdefs.h. */
15840#include <curses.h>
15841int
15842main ()
15843{
15844void *x=resize_term
15845 ;
15846 return 0;
15847}
15848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015849if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015850
Matthias Kloseb9621712010-04-24 17:59:49 +000015851$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015852
Matthias Kloseb159a552010-04-25 21:00:44 +000015853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015854$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015855else
Matthias Kloseb9621712010-04-24 17:59:49 +000015856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15857$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015858
15859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15861
Matthias Kloseb9621712010-04-24 17:59:49 +000015862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15863$as_echo_n "checking for resizeterm... " >&6; }
15864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015865/* end confdefs.h. */
15866#include <curses.h>
15867int
15868main ()
15869{
15870void *x=resizeterm
15871 ;
15872 return 0;
15873}
15874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015875if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015876
Matthias Kloseb9621712010-04-24 17:59:49 +000015877$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015878
Matthias Kloseb159a552010-04-25 21:00:44 +000015879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015880$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015881else
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15883$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015884
15885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015887
15888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15889$as_echo_n "checking for immedok... " >&6; }
15890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15891/* end confdefs.h. */
15892#include <curses.h>
15893int
15894main ()
15895{
15896
15897#ifndef immedok
15898void *x=immedok
15899#endif
15900
15901 ;
15902 return 0;
15903}
15904_ACEOF
15905if ac_fn_c_try_compile "$LINENO"; then :
15906
15907$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15908
15909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15910$as_echo "yes" >&6; }
15911else
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15913$as_echo "no" >&6; }
15914
15915fi
15916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15917
15918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15919$as_echo_n "checking for syncok... " >&6; }
15920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15921/* end confdefs.h. */
15922#include <curses.h>
15923int
15924main ()
15925{
15926
15927#ifndef syncok
15928void *x=syncok
15929#endif
15930
15931 ;
15932 return 0;
15933}
15934_ACEOF
15935if ac_fn_c_try_compile "$LINENO"; then :
15936
15937$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15938
15939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15940$as_echo "yes" >&6; }
15941else
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15943$as_echo "no" >&6; }
15944
15945fi
15946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15947
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15949$as_echo_n "checking for wchgat... " >&6; }
15950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951/* end confdefs.h. */
15952#include <curses.h>
15953int
15954main ()
15955{
15956
15957#ifndef wchgat
15958void *x=wchgat
15959#endif
15960
15961 ;
15962 return 0;
15963}
15964_ACEOF
15965if ac_fn_c_try_compile "$LINENO"; then :
15966
15967$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15968
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15970$as_echo "yes" >&6; }
15971else
15972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15973$as_echo "no" >&6; }
15974
15975fi
15976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15977
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15979$as_echo_n "checking for filter... " >&6; }
15980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15981/* end confdefs.h. */
15982#include <curses.h>
15983int
15984main ()
15985{
15986
15987#ifndef filter
15988void *x=filter
15989#endif
15990
15991 ;
15992 return 0;
15993}
15994_ACEOF
15995if ac_fn_c_try_compile "$LINENO"; then :
15996
15997$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15998
15999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16000$as_echo "yes" >&6; }
16001else
16002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16003$as_echo "no" >&6; }
16004
16005fi
16006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16007
16008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16009$as_echo_n "checking for has_key... " >&6; }
16010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16011/* end confdefs.h. */
16012#include <curses.h>
16013int
16014main ()
16015{
16016
16017#ifndef has_key
16018void *x=has_key
16019#endif
16020
16021 ;
16022 return 0;
16023}
16024_ACEOF
16025if ac_fn_c_try_compile "$LINENO"; then :
16026
16027$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16028
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16030$as_echo "yes" >&6; }
16031else
16032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16033$as_echo "no" >&6; }
16034
16035fi
16036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16037
16038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16039$as_echo_n "checking for typeahead... " >&6; }
16040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16041/* end confdefs.h. */
16042#include <curses.h>
16043int
16044main ()
16045{
16046
16047#ifndef typeahead
16048void *x=typeahead
16049#endif
16050
16051 ;
16052 return 0;
16053}
16054_ACEOF
16055if ac_fn_c_try_compile "$LINENO"; then :
16056
16057$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16058
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16060$as_echo "yes" >&6; }
16061else
16062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16063$as_echo "no" >&6; }
16064
16065fi
16066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16067
16068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16069$as_echo_n "checking for use_env... " >&6; }
16070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16071/* end confdefs.h. */
16072#include <curses.h>
16073int
16074main ()
16075{
16076
16077#ifndef use_env
16078void *x=use_env
16079#endif
16080
16081 ;
16082 return 0;
16083}
16084_ACEOF
16085if ac_fn_c_try_compile "$LINENO"; then :
16086
16087$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16088
16089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16090$as_echo "yes" >&6; }
16091else
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16093$as_echo "no" >&6; }
16094
16095fi
16096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016097# last curses configure check
16098CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16101$as_echo "$as_me: checking for device files" >&6;}
16102
16103if test "x$cross_compiling" = xyes; then
16104 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16106$as_echo_n "checking for /dev/ptmx... " >&6; }
16107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16108$as_echo "not set" >&6; }
16109 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16110 fi
16111 if test "${ac_cv_file__dev_ptc+set}" != set; then
16112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16113$as_echo_n "checking for /dev/ptc... " >&6; }
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16115$as_echo "not set" >&6; }
16116 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16117 fi
16118fi
16119
Matthias Kloseb9621712010-04-24 17:59:49 +000016120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16121$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016122if ${ac_cv_file__dev_ptmx+:} false; then :
16123 $as_echo_n "(cached) " >&6
16124else
16125 test "$cross_compiling" = yes &&
16126 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16127if test -r "/dev/ptmx"; then
16128 ac_cv_file__dev_ptmx=yes
16129else
16130 ac_cv_file__dev_ptmx=no
16131fi
16132fi
16133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16134$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16135if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016136
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016137fi
16138
16139if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016140
Matthias Kloseb9621712010-04-24 17:59:49 +000016141$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016142
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16145$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016146if ${ac_cv_file__dev_ptc+:} false; then :
16147 $as_echo_n "(cached) " >&6
16148else
16149 test "$cross_compiling" = yes &&
16150 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16151if test -r "/dev/ptc"; then
16152 ac_cv_file__dev_ptc=yes
16153else
16154 ac_cv_file__dev_ptc=no
16155fi
16156fi
16157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16158$as_echo "$ac_cv_file__dev_ptc" >&6; }
16159if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016160
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016161fi
16162
16163if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016164
Matthias Kloseb9621712010-04-24 17:59:49 +000016165$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016166
Neal Norwitz865400f2003-03-21 01:42:58 +000016167fi
16168
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016169if test $ac_sys_system = Darwin
16170then
16171 LIBS="$LIBS -framework CoreFoundation"
16172fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016173
Matthias Kloseb9621712010-04-24 17:59:49 +000016174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16175$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016176if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016177 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016178else
Matthias Kloseb9621712010-04-24 17:59:49 +000016179 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016180 ac_cv_have_size_t_format="cross -- assuming yes"
16181
Thomas Wouters477c8d52006-05-27 19:21:47 +000016182else
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016184/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016185
Thomas Wouters477c8d52006-05-27 19:21:47 +000016186#include <stdio.h>
16187#include <stddef.h>
16188#include <string.h>
16189
Christian Heimes2c181612007-12-17 20:04:13 +000016190#ifdef HAVE_SYS_TYPES_H
16191#include <sys/types.h>
16192#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016193
16194#ifdef HAVE_SSIZE_T
16195typedef ssize_t Py_ssize_t;
16196#elif SIZEOF_VOID_P == SIZEOF_LONG
16197typedef long Py_ssize_t;
16198#else
16199typedef int Py_ssize_t;
16200#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016201
Christian Heimes2c181612007-12-17 20:04:13 +000016202int main()
16203{
16204 char buffer[256];
16205
Thomas Wouters477c8d52006-05-27 19:21:47 +000016206 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16207 return 1;
16208
Thomas Wouters89f507f2006-12-13 04:49:30 +000016209 if (strcmp(buffer, "123"))
16210 return 1;
16211
16212 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16213 return 1;
16214
16215 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016216 return 1;
16217
16218 return 0;
16219}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016220
Thomas Wouters477c8d52006-05-27 19:21:47 +000016221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016222if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016223 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016224else
Matthias Kloseb9621712010-04-24 17:59:49 +000016225 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016229fi
16230
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16233$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016234if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016235
Matthias Kloseb9621712010-04-24 17:59:49 +000016236$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016237
16238fi
16239
Matthias Kloseb9621712010-04-24 17:59:49 +000016240ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016241#ifdef HAVE_SYS_TYPES_H
16242#include <sys/types.h>
16243#endif
16244#ifdef HAVE_SYS_SOCKET_H
16245#include <sys/socket.h>
16246#endif
16247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248"
Victor Stinnere0be4232011-10-25 13:06:09 +020016249if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016250
Martin v. Löwis11437992002-04-12 09:54:03 +000016251else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016252
Matthias Kloseb9621712010-04-24 17:59:49 +000016253$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016254
16255fi
16256
Michael W. Hudson54241132001-12-07 15:38:26 +000016257
Matthias Kloseb9621712010-04-24 17:59:49 +000016258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16259$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016260if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016261 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016262else
Matthias Kloseb9621712010-04-24 17:59:49 +000016263 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016264 ac_cv_broken_mbstowcs=no
16265else
Matthias Kloseb9621712010-04-24 17:59:49 +000016266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016267/* end confdefs.h. */
16268
Stefan Krah19c21392012-11-22 23:47:32 +010016269#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016270#include<stdlib.h>
16271int main() {
16272 size_t len = -1;
16273 const char *str = "text";
16274 len = mbstowcs(NULL, str, 0);
16275 return (len != 4);
16276}
16277
16278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016279if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016280 ac_cv_broken_mbstowcs=no
16281else
Matthias Kloseb9621712010-04-24 17:59:49 +000016282 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16285 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016286fi
16287
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016288fi
16289
Matthias Kloseb9621712010-04-24 17:59:49 +000016290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16291$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016292if test "$ac_cv_broken_mbstowcs" = yes
16293then
16294
Matthias Kloseb9621712010-04-24 17:59:49 +000016295$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016296
16297fi
16298
Antoine Pitroub52ec782009-01-25 16:34:23 +000016299# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16301$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016302
16303# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016304if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016305 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016306if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016307then
16308
Matthias Kloseb9621712010-04-24 17:59:49 +000016309$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016310
Matthias Kloseb9621712010-04-24 17:59:49 +000016311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16312$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016313fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016314if test "$withval" = no
16315then
16316
16317$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16318
Matthias Kloseb9621712010-04-24 17:59:49 +000016319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16320$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016321fi
16322
Antoine Pitrou042b1282010-08-13 21:15:58 +000016323else
16324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16325$as_echo "no value specified" >&6; }
16326fi
16327
Antoine Pitroub52ec782009-01-25 16:34:23 +000016328
Matthias Kloseb17289e2012-03-15 19:51:34 +010016329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16330$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16331if ${ac_cv_computed_gotos+:} false; then :
16332 $as_echo_n "(cached) " >&6
16333else
16334 if test "$cross_compiling" = yes; then :
16335 if test "${with_computed_gotos+set}" = set; then
16336 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16337 else
16338 ac_cv_computed_gotos=no
16339 fi
16340else
16341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16342/* end confdefs.h. */
16343
16344int main(int argc, char **argv)
16345{
16346 static void *targets[1] = { &&LABEL1 };
16347 goto LABEL2;
16348LABEL1:
16349 return 0;
16350LABEL2:
16351 goto *targets[0];
16352 return 1;
16353}
16354
16355_ACEOF
16356if ac_fn_c_try_run "$LINENO"; then :
16357 ac_cv_computed_gotos=yes
16358else
16359 ac_cv_computed_gotos=no
16360fi
16361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16362 conftest.$ac_objext conftest.beam conftest.$ac_ext
16363fi
16364
16365fi
16366
16367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16368$as_echo "$ac_cv_computed_gotos" >&6; }
16369case "$ac_cv_computed_gotos" in yes*)
16370
16371$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16372
16373esac
16374
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016375case $ac_sys_system in
16376AIX*)
16377
16378$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16379 ;;
16380esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016381
Michael W. Hudson54241132001-12-07 15:38:26 +000016382
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016383
16384
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016385for h in `(cd $srcdir;echo Python/thread_*.h)`
16386do
16387 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16388done
16389
Michael W. Hudson54241132001-12-07 15:38:26 +000016390
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016391SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16393$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016394for dir in $SRCDIRS; do
16395 if test ! -d $dir; then
16396 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016397 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016398done
Matthias Kloseb9621712010-04-24 17:59:49 +000016399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16400$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016401
Stefan Krah1919b7e2012-03-21 18:25:23 +010016402# Availability of -O2:
16403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16404$as_echo_n "checking for -O2... " >&6; }
16405saved_cflags="$CFLAGS"
16406CFLAGS="-O2"
16407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16408/* end confdefs.h. */
16409
16410int
16411main ()
16412{
16413
16414
16415 ;
16416 return 0;
16417}
16418_ACEOF
16419if ac_fn_c_try_compile "$LINENO"; then :
16420 have_O2=yes
16421else
16422 have_O2=no
16423fi
16424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16426$as_echo "$have_O2" >&6; }
16427CFLAGS="$saved_cflags"
16428
16429# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16430# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16432$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16433saved_cflags="$CFLAGS"
16434CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16435if test "$have_O2" = no; then
16436 CFLAGS=""
16437fi
16438if test "$cross_compiling" = yes; then :
16439 have_glibc_memmove_bug=undefined
16440else
16441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16442/* end confdefs.h. */
16443
16444#include <stdio.h>
16445#include <stdlib.h>
16446#include <string.h>
16447void foo(void *p, void *q) { memmove(p, q, 19); }
16448int main() {
16449 char a[32] = "123456789000000000";
16450 foo(&a[9], a);
16451 if (strcmp(a, "123456789123456789000000000") != 0)
16452 return 1;
16453 foo(a, &a[9]);
16454 if (strcmp(a, "123456789000000000") != 0)
16455 return 1;
16456 return 0;
16457}
16458
16459_ACEOF
16460if ac_fn_c_try_run "$LINENO"; then :
16461 have_glibc_memmove_bug=no
16462else
16463 have_glibc_memmove_bug=yes
16464fi
16465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16466 conftest.$ac_objext conftest.beam conftest.$ac_ext
16467fi
16468
16469CFLAGS="$saved_cflags"
16470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16471$as_echo "$have_glibc_memmove_bug" >&6; }
16472if test "$have_glibc_memmove_bug" = yes; then
16473
16474$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16475
16476fi
16477
16478if test "$have_gcc_asm_for_x87" = yes; then
16479 # Some versions of gcc miscompile inline asm:
16480 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16481 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16482 case $CC in
16483 *gcc*)
16484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16485$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16486 saved_cflags="$CFLAGS"
16487 CFLAGS="-O2"
16488 if test "$cross_compiling" = yes; then :
16489 have_ipa_pure_const_bug=undefined
16490else
16491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16492/* end confdefs.h. */
16493
16494 __attribute__((noinline)) int
16495 foo(int *p) {
16496 int r;
16497 asm ( "movl \$6, (%1)\n\t"
16498 "xorl %0, %0\n\t"
16499 : "=r" (r) : "r" (p) : "memory"
16500 );
16501 return r;
16502 }
16503 int main() {
16504 int p = 8;
16505 if ((foo(&p) ? : p) != 6)
16506 return 1;
16507 return 0;
16508 }
16509
16510_ACEOF
16511if ac_fn_c_try_run "$LINENO"; then :
16512 have_ipa_pure_const_bug=no
16513else
16514 have_ipa_pure_const_bug=yes
16515fi
16516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16517 conftest.$ac_objext conftest.beam conftest.$ac_ext
16518fi
16519
16520 CFLAGS="$saved_cflags"
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16522$as_echo "$have_ipa_pure_const_bug" >&6; }
16523 if test "$have_ipa_pure_const_bug" = yes; then
16524
16525$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16526
16527 fi
16528 ;;
16529 esac
16530fi
16531
Victor Stinner4f5366e2015-01-09 02:13:19 +010016532# Check for stdatomic.h
16533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16534$as_echo_n "checking for stdatomic.h... " >&6; }
16535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16536/* end confdefs.h. */
16537
16538
16539 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016540 atomic_int value = ATOMIC_VAR_INIT(1);
16541 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016542 int main() {
16543 int loaded_value = atomic_load(&value);
16544 return 0;
16545 }
16546
16547
16548_ACEOF
16549if ac_fn_c_try_link "$LINENO"; then :
16550 have_stdatomic_h=yes
16551else
16552 have_stdatomic_h=no
16553fi
16554rm -f core conftest.err conftest.$ac_objext \
16555 conftest$ac_exeext conftest.$ac_ext
16556
16557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16558$as_echo "$have_stdatomic_h" >&6; }
16559
16560if test "$have_stdatomic_h" = yes; then
16561
16562$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16563
16564fi
16565
16566# Check for GCC >= 4.7 __atomic builtins
16567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16568$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16570/* end confdefs.h. */
16571
16572
16573 volatile int val = 1;
16574 int main() {
16575 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16576 return 0;
16577 }
16578
16579
16580_ACEOF
16581if ac_fn_c_try_link "$LINENO"; then :
16582 have_builtin_atomic=yes
16583else
16584 have_builtin_atomic=no
16585fi
16586rm -f core conftest.err conftest.$ac_objext \
16587 conftest$ac_exeext conftest.$ac_ext
16588
16589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16590$as_echo "$have_builtin_atomic" >&6; }
16591
16592if test "$have_builtin_atomic" = yes; then
16593
16594$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16595
16596fi
16597
Ned Deily322f5ba2013-11-21 23:01:59 -080016598# ensurepip option
16599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16600$as_echo_n "checking for ensurepip... " >&6; }
16601
16602# Check whether --with-ensurepip was given.
16603if test "${with_ensurepip+set}" = set; then :
16604 withval=$with_ensurepip;
16605else
16606 with_ensurepip=upgrade
16607fi
16608
16609case $with_ensurepip in #(
16610 yes|upgrade) :
16611 ENSUREPIP=upgrade ;; #(
16612 install) :
16613 ENSUREPIP=install ;; #(
16614 no) :
16615 ENSUREPIP=no ;; #(
16616 *) :
16617 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16618esac
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16620$as_echo "$ENSUREPIP" >&6; }
16621
16622
Victor Stinner35a97c02015-03-08 02:59:09 +010016623# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16625$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627/* end confdefs.h. */
16628
16629
16630 #include <dirent.h>
16631
16632 int main() {
16633 struct dirent entry;
16634 return entry.d_type == DT_UNKNOWN;
16635 }
16636
16637
16638_ACEOF
16639if ac_fn_c_try_link "$LINENO"; then :
16640 have_dirent_d_type=yes
16641else
16642 have_dirent_d_type=no
16643fi
16644rm -f core conftest.err conftest.$ac_objext \
16645 conftest$ac_exeext conftest.$ac_ext
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16647$as_echo "$have_dirent_d_type" >&6; }
16648
16649if test "$have_dirent_d_type" = yes; then
16650
16651$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16652
16653fi
16654
Victor Stinner9eb57c52015-03-19 22:21:49 +010016655# check if the Linux getrandom() syscall is available
16656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16657$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16659/* end confdefs.h. */
16660
16661
Victor Stinner1b80b242016-04-12 22:34:58 +020016662 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016663 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016664 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016665
16666 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016667 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016668 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016669 const int flags = GRND_NONBLOCK;
16670 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016671 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016672 return 0;
16673 }
16674
16675
16676_ACEOF
16677if ac_fn_c_try_link "$LINENO"; then :
16678 have_getrandom_syscall=yes
16679else
16680 have_getrandom_syscall=no
16681fi
16682rm -f core conftest.err conftest.$ac_objext \
16683 conftest$ac_exeext conftest.$ac_ext
16684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16685$as_echo "$have_getrandom_syscall" >&6; }
16686
16687if test "$have_getrandom_syscall" = yes; then
16688
16689$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16690
16691fi
16692
Victor Stinner3abf44e2015-09-18 15:38:37 +020016693# check if the getrandom() function is available
16694# the test was written for the Solaris function of <sys/random.h>
16695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16696$as_echo_n "checking for the getrandom() function... " >&6; }
16697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16698/* end confdefs.h. */
16699
16700
16701 #include <sys/random.h>
16702
16703 int main() {
16704 char buffer[1];
16705 const size_t buflen = sizeof(buffer);
16706 const int flags = 0;
16707 /* ignore the result, Python checks for ENOSYS at runtime */
16708 (void)getrandom(buffer, buflen, flags);
16709 return 0;
16710 }
16711
16712
16713_ACEOF
16714if ac_fn_c_try_link "$LINENO"; then :
16715 have_getrandom=yes
16716else
16717 have_getrandom=no
16718fi
16719rm -f core conftest.err conftest.$ac_objext \
16720 conftest$ac_exeext conftest.$ac_ext
16721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16722$as_echo "$have_getrandom" >&6; }
16723
16724if test "$have_getrandom" = yes; then
16725
16726$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16727
16728fi
16729
Christian Heimesff5be6e2018-01-20 13:19:21 +010016730# Check for usable OpenSSL
16731
16732 found=false
16733
16734# Check whether --with-openssl was given.
16735if test "${with_openssl+set}" = set; then :
16736 withval=$with_openssl;
16737 case "$withval" in
16738 "" | y | ye | yes | n | no)
16739 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16740 ;;
16741 *) ssldirs="$withval"
16742 ;;
16743 esac
16744
16745else
16746
16747 # if pkg-config is installed and openssl has installed a .pc file,
16748 # then use that information and don't search ssldirs
16749 if test -n "$ac_tool_prefix"; then
16750 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16751set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16753$as_echo_n "checking for $ac_word... " >&6; }
16754if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16755 $as_echo_n "(cached) " >&6
16756else
16757 if test -n "$PKG_CONFIG"; then
16758 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16759else
16760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16761for as_dir in $PATH
16762do
16763 IFS=$as_save_IFS
16764 test -z "$as_dir" && as_dir=.
16765 for ac_exec_ext in '' $ac_executable_extensions; do
16766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16767 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16769 break 2
16770 fi
16771done
16772 done
16773IFS=$as_save_IFS
16774
16775fi
16776fi
16777PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16778if test -n "$PKG_CONFIG"; then
16779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16780$as_echo "$PKG_CONFIG" >&6; }
16781else
16782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16783$as_echo "no" >&6; }
16784fi
16785
16786
16787fi
16788if test -z "$ac_cv_prog_PKG_CONFIG"; then
16789 ac_ct_PKG_CONFIG=$PKG_CONFIG
16790 # Extract the first word of "pkg-config", so it can be a program name with args.
16791set dummy pkg-config; ac_word=$2
16792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16793$as_echo_n "checking for $ac_word... " >&6; }
16794if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16795 $as_echo_n "(cached) " >&6
16796else
16797 if test -n "$ac_ct_PKG_CONFIG"; then
16798 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16799else
16800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16801for as_dir in $PATH
16802do
16803 IFS=$as_save_IFS
16804 test -z "$as_dir" && as_dir=.
16805 for ac_exec_ext in '' $ac_executable_extensions; do
16806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16807 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16809 break 2
16810 fi
16811done
16812 done
16813IFS=$as_save_IFS
16814
16815fi
16816fi
16817ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16818if test -n "$ac_ct_PKG_CONFIG"; then
16819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16820$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16821else
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16823$as_echo "no" >&6; }
16824fi
16825
16826 if test "x$ac_ct_PKG_CONFIG" = x; then
16827 PKG_CONFIG=""
16828 else
16829 case $cross_compiling:$ac_tool_warned in
16830yes:)
16831{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16832$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16833ac_tool_warned=yes ;;
16834esac
16835 PKG_CONFIG=$ac_ct_PKG_CONFIG
16836 fi
16837else
16838 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16839fi
16840
16841 if test x"$PKG_CONFIG" != x""; then
16842 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16843 if test $? = 0; then
16844 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16845 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16846 found=true
16847 fi
16848 fi
16849
16850 # no such luck; use some default ssldirs
16851 if ! $found; then
16852 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16853 fi
16854
16855
16856fi
16857
16858
16859
16860 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16861 # an 'openssl' subdirectory
16862
16863 if ! $found; then
16864 OPENSSL_INCLUDES=
16865 for ssldir in $ssldirs; do
16866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16867$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16868 if test -f "$ssldir/include/openssl/ssl.h"; then
16869 OPENSSL_INCLUDES="-I$ssldir/include"
16870 OPENSSL_LDFLAGS="-L$ssldir/lib"
16871 OPENSSL_LIBS="-lssl -lcrypto"
16872 found=true
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16874$as_echo "yes" >&6; }
16875 break
16876 else
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16878$as_echo "no" >&6; }
16879 fi
16880 done
16881
16882 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16883 # it will just work!
16884 fi
16885
16886 # try the preprocessor and linker with our new flags,
16887 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16888
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16890$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16891 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16892 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16893
16894 save_LIBS="$LIBS"
16895 save_LDFLAGS="$LDFLAGS"
16896 save_CPPFLAGS="$CPPFLAGS"
16897 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16898 LIBS="$OPENSSL_LIBS $LIBS"
16899 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16901/* end confdefs.h. */
16902#include <openssl/ssl.h>
16903int
16904main ()
16905{
16906SSL_new(NULL)
16907 ;
16908 return 0;
16909}
16910_ACEOF
16911if ac_fn_c_try_link "$LINENO"; then :
16912
16913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16914$as_echo "yes" >&6; }
16915 have_openssl=yes
16916
16917else
16918
16919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16920$as_echo "no" >&6; }
16921 have_openssl=no
16922
16923fi
16924rm -f core conftest.err conftest.$ac_objext \
16925 conftest$ac_exeext conftest.$ac_ext
16926 CPPFLAGS="$save_CPPFLAGS"
16927 LDFLAGS="$save_LDFLAGS"
16928 LIBS="$save_LIBS"
16929
16930
16931
16932
16933
16934
16935if test "$have_openssl" = yes; then
16936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16937$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16938
16939 save_LIBS="$LIBS"
16940 save_LDFLAGS="$LDFLAGS"
16941 save_CPPFLAGS="$CPPFLAGS"
16942 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16943 LIBS="$OPENSSL_LIBS $LIBS"
16944 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16945
16946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16947/* end confdefs.h. */
16948
16949 #include <openssl/x509_vfy.h>
16950
16951int
16952main ()
16953{
16954
16955 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16956 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16957 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16958 X509_VERIFY_PARAM_set_hostflags(p, 0);
16959
16960 ;
16961 return 0;
16962}
16963
16964_ACEOF
16965if ac_fn_c_try_link "$LINENO"; then :
16966
16967 ac_cv_has_x509_verify_param_set1_host=yes
16968
16969else
16970
16971 ac_cv_has_x509_verify_param_set1_host=no
16972
16973fi
16974rm -f core conftest.err conftest.$ac_objext \
16975 conftest$ac_exeext conftest.$ac_ext
16976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16977$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16978 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16979
16980$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16981
16982 fi
16983
16984 CPPFLAGS="$save_CPPFLAGS"
16985 LDFLAGS="$save_LDFLAGS"
16986 LIBS="$save_LIBS"
16987fi
16988
Christian Heimes892d66e2018-01-29 14:10:18 +010016989# ssl module default cipher suite string
16990
16991
16992
16993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16994$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16995
16996# Check whether --with-ssl-default-suites was given.
16997if test "${with_ssl_default_suites+set}" = set; then :
16998 withval=$with_ssl_default_suites;
16999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17000$as_echo "$withval" >&6; }
17001case "$withval" in
17002 python)
17003 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17004
17005 ;;
17006 openssl)
17007 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17008
17009 ;;
17010 *)
17011 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17012
17013 cat >>confdefs.h <<_ACEOF
17014#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17015_ACEOF
17016
17017 ;;
17018esac
17019
17020else
17021
17022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17023$as_echo "python" >&6; }
17024$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17025
17026
17027fi
17028
17029
17030
Guido van Rossum627b2d71993-12-24 10:39:16 +000017031# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017032ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017033
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017034ac_config_files="$ac_config_files Modules/ld_so_aix"
17035
Martin v. Löwis11437992002-04-12 09:54:03 +000017036cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017037# This file is a shell script that caches the results of configure
17038# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017039# scripts and configure runs, see configure's option --config-cache.
17040# It is not useful on other systems. If it contains results you don't
17041# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017042#
Martin v. Löwis11437992002-04-12 09:54:03 +000017043# config.status only pays attention to the cache file if you give it
17044# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017045#
Skip Montanaro6dead952003-09-25 14:50:04 +000017046# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017047# loading this file, other *unset* `ac_cv_foo' will be assigned the
17048# following values.
17049
17050_ACEOF
17051
Guido van Rossumf78abae1997-01-21 22:02:36 +000017052# The following way of writing the cache mishandles newlines in values,
17053# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017054# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017055# Ultrix sh set writes to stderr and can't be redirected directly,
17056# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057(
17058 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17059 eval ac_val=\$$ac_var
17060 case $ac_val in #(
17061 *${as_nl}*)
17062 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017063 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17064$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065 esac
17066 case $ac_var in #(
17067 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017068 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17069 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017070 esac ;;
17071 esac
17072 done
17073
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17076 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017077 # `set' does not quote correctly, so add quotes: double-quote
17078 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017079 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017080 "s/'/'\\\\''/g;
17081 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017083 *)
17084 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017086 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087 esac |
17088 sort
17089) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017090 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017092 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17095 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017096 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17097 :end' >>confcache
17098if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17099 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017100 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017101 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17102$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017103 if test ! -f "$cache_file" || test -h "$cache_file"; then
17104 cat confcache >"$cache_file"
17105 else
17106 case $cache_file in #(
17107 */* | ?:*)
17108 mv -f confcache "$cache_file"$$ &&
17109 mv -f "$cache_file"$$ "$cache_file" ;; #(
17110 *)
17111 mv -f confcache "$cache_file" ;;
17112 esac
17113 fi
17114 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017115 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017116 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17117$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017118 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017119fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017120rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017121
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017122test "x$prefix" = xNONE && prefix=$ac_default_prefix
17123# Let make expand exec_prefix.
17124test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017125
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017126DEFS=-DHAVE_CONFIG_H
17127
Skip Montanaro6dead952003-09-25 14:50:04 +000017128ac_libobjs=
17129ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017130U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017131for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17132 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017134 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017135 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17136 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017137 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17138 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017139done
17140LIBOBJS=$ac_libobjs
17141
17142LTLIBOBJS=$ac_ltlibobjs
17143
17144
Martin v. Löwis11437992002-04-12 09:54:03 +000017145
Matthias Kloseb9621712010-04-24 17:59:49 +000017146
Victor Stinnere0be4232011-10-25 13:06:09 +020017147: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017148ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017149ac_clean_files_save=$ac_clean_files
17150ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017151{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17152$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17153as_write_fail=0
17154cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017155#! $SHELL
17156# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017157# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017158# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017159# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017160
Martin v. Löwis11437992002-04-12 09:54:03 +000017161debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017162ac_cs_recheck=false
17163ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017164
Matthias Kloseb9621712010-04-24 17:59:49 +000017165SHELL=\${CONFIG_SHELL-$SHELL}
17166export SHELL
17167_ASEOF
17168cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17169## -------------------- ##
17170## M4sh Initialization. ##
17171## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173# Be more Bourne compatible
17174DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017175if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017176 emulate sh
17177 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017178 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017179 # is contrary to our usage. Disable this feature.
17180 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017181 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017182else
Matthias Kloseb9621712010-04-24 17:59:49 +000017183 case `(set -o) 2>/dev/null` in #(
17184 *posix*) :
17185 set -o posix ;; #(
17186 *) :
17187 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017189fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017190
17191
Matthias Kloseb9621712010-04-24 17:59:49 +000017192as_nl='
17193'
17194export as_nl
17195# Printing a long string crashes Solaris 7 /usr/bin/printf.
17196as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17197as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17198as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17199# Prefer a ksh shell builtin over an external printf program on Solaris,
17200# but without wasting forks for bash or zsh.
17201if test -z "$BASH_VERSION$ZSH_VERSION" \
17202 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17203 as_echo='print -r --'
17204 as_echo_n='print -rn --'
17205elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17206 as_echo='printf %s\n'
17207 as_echo_n='printf %s'
17208else
17209 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17210 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17211 as_echo_n='/usr/ucb/echo -n'
17212 else
17213 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17214 as_echo_n_body='eval
17215 arg=$1;
17216 case $arg in #(
17217 *"$as_nl"*)
17218 expr "X$arg" : "X\\(.*\\)$as_nl";
17219 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17220 esac;
17221 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17222 '
17223 export as_echo_n_body
17224 as_echo_n='sh -c $as_echo_n_body as_echo'
17225 fi
17226 export as_echo_body
17227 as_echo='sh -c $as_echo_body as_echo'
17228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017229
17230# The user is always right.
17231if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017232 PATH_SEPARATOR=:
17233 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17234 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17235 PATH_SEPARATOR=';'
17236 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239
17240# IFS
17241# We need space, tab and new line, in precisely that order. Quoting is
17242# there to prevent editors from complaining about space-tab.
17243# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17244# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017245IFS=" "" $as_nl"
17246
17247# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017248as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017249case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250 *[\\/]* ) as_myself=$0 ;;
17251 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017252for as_dir in $PATH
17253do
17254 IFS=$as_save_IFS
17255 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017256 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17257 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260 ;;
17261esac
17262# We did not find ourselves, most probably we were run as `sh COMMAND'
17263# in which case we are not to be found in the path.
17264if test "x$as_myself" = x; then
17265 as_myself=$0
17266fi
17267if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017268 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17269 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270fi
17271
Matthias Kloseb9621712010-04-24 17:59:49 +000017272# Unset variables that we do not need and which cause bugs (e.g. in
17273# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17274# suppresses any "Segmentation fault" message there. '((' could
17275# trigger a bug in pdksh 5.2.14.
17276for as_var in BASH_ENV ENV MAIL MAILPATH
17277do eval test x\${$as_var+set} = xset \
17278 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279done
17280PS1='$ '
17281PS2='> '
17282PS4='+ '
17283
17284# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017285LC_ALL=C
17286export LC_ALL
17287LANGUAGE=C
17288export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289
Matthias Kloseb9621712010-04-24 17:59:49 +000017290# CDPATH.
17291(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17292
17293
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017294# as_fn_error STATUS ERROR [LINENO LOG_FD]
17295# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017296# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17297# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017298# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017299as_fn_error ()
17300{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017301 as_status=$1; test $as_status -eq 0 && as_status=1
17302 if test "$4"; then
17303 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17304 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017305 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017306 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017307 as_fn_exit $as_status
17308} # as_fn_error
17309
17310
17311# as_fn_set_status STATUS
17312# -----------------------
17313# Set $? to STATUS, without forking.
17314as_fn_set_status ()
17315{
17316 return $1
17317} # as_fn_set_status
17318
17319# as_fn_exit STATUS
17320# -----------------
17321# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17322as_fn_exit ()
17323{
17324 set +e
17325 as_fn_set_status $1
17326 exit $1
17327} # as_fn_exit
17328
17329# as_fn_unset VAR
17330# ---------------
17331# Portably unset VAR.
17332as_fn_unset ()
17333{
17334 { eval $1=; unset $1;}
17335}
17336as_unset=as_fn_unset
17337# as_fn_append VAR VALUE
17338# ----------------------
17339# Append the text in VALUE to the end of the definition contained in VAR. Take
17340# advantage of any shell optimizations that allow amortized linear growth over
17341# repeated appends, instead of the typical quadratic growth present in naive
17342# implementations.
17343if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17344 eval 'as_fn_append ()
17345 {
17346 eval $1+=\$2
17347 }'
17348else
17349 as_fn_append ()
17350 {
17351 eval $1=\$$1\$2
17352 }
17353fi # as_fn_append
17354
17355# as_fn_arith ARG...
17356# ------------------
17357# Perform arithmetic evaluation on the ARGs, and store the result in the
17358# global $as_val. Take advantage of shells that can avoid forks. The arguments
17359# must be portable across $(()) and expr.
17360if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17361 eval 'as_fn_arith ()
17362 {
17363 as_val=$(( $* ))
17364 }'
17365else
17366 as_fn_arith ()
17367 {
17368 as_val=`expr "$@" || test $? -eq 1`
17369 }
17370fi # as_fn_arith
17371
17372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373if expr a : '\(a\)' >/dev/null 2>&1 &&
17374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17375 as_expr=expr
17376else
17377 as_expr=false
17378fi
17379
17380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17381 as_basename=basename
17382else
17383 as_basename=false
17384fi
17385
Matthias Kloseb9621712010-04-24 17:59:49 +000017386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17387 as_dirname=dirname
17388else
17389 as_dirname=false
17390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392as_me=`$as_basename -- "$0" ||
17393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17394 X"$0" : 'X\(//\)$' \| \
17395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017396$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 sed '/^.*\/\([^/][^/]*\)\/*$/{
17398 s//\1/
17399 q
17400 }
17401 /^X\/\(\/\/\)$/{
17402 s//\1/
17403 q
17404 }
17405 /^X\/\(\/\).*/{
17406 s//\1/
17407 q
17408 }
17409 s/.*/./; q'`
17410
Matthias Kloseb9621712010-04-24 17:59:49 +000017411# Avoid depending upon Character Ranges.
17412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17415as_cr_digits='0123456789'
17416as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417
17418ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017419case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017421 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017423 xy) ECHO_C='\c';;
17424 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17425 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 esac;;
17427*)
17428 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017430
Martin v. Löwis11437992002-04-12 09:54:03 +000017431rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432if test -d conf$$.dir; then
17433 rm -f conf$$.dir/conf$$.file
17434else
17435 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017436 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017438if (echo >conf$$.file) 2>/dev/null; then
17439 if ln -s conf$$.file conf$$ 2>/dev/null; then
17440 as_ln_s='ln -s'
17441 # ... but there are two gotchas:
17442 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17443 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017444 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017445 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017446 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017447 elif ln conf$$.file conf$$ 2>/dev/null; then
17448 as_ln_s=ln
17449 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017450 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017451 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017452else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017453 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17456rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017457
Matthias Kloseb9621712010-04-24 17:59:49 +000017458
17459# as_fn_mkdir_p
17460# -------------
17461# Create "$as_dir" as a directory, including parents if necessary.
17462as_fn_mkdir_p ()
17463{
17464
17465 case $as_dir in #(
17466 -*) as_dir=./$as_dir;;
17467 esac
17468 test -d "$as_dir" || eval $as_mkdir_p || {
17469 as_dirs=
17470 while :; do
17471 case $as_dir in #(
17472 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17473 *) as_qdir=$as_dir;;
17474 esac
17475 as_dirs="'$as_qdir' $as_dirs"
17476 as_dir=`$as_dirname -- "$as_dir" ||
17477$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17478 X"$as_dir" : 'X\(//\)[^/]' \| \
17479 X"$as_dir" : 'X\(//\)$' \| \
17480 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17481$as_echo X"$as_dir" |
17482 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17483 s//\1/
17484 q
17485 }
17486 /^X\(\/\/\)[^/].*/{
17487 s//\1/
17488 q
17489 }
17490 /^X\(\/\/\)$/{
17491 s//\1/
17492 q
17493 }
17494 /^X\(\/\).*/{
17495 s//\1/
17496 q
17497 }
17498 s/.*/./; q'`
17499 test -d "$as_dir" && break
17500 done
17501 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017502 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017503
17504
17505} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017506if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017507 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017508else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017509 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017510 as_mkdir_p=false
17511fi
17512
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017513
17514# as_fn_executable_p FILE
17515# -----------------------
17516# Test if FILE is an executable regular file.
17517as_fn_executable_p ()
17518{
17519 test -f "$1" && test -x "$1"
17520} # as_fn_executable_p
17521as_test_x='test -x'
17522as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017523
17524# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017525as_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 +000017526
17527# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017528as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017529
17530
Martin v. Löwis11437992002-04-12 09:54:03 +000017531exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017532## ----------------------------------- ##
17533## Main body of $CONFIG_STATUS script. ##
17534## ----------------------------------- ##
17535_ASEOF
17536test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017537
Matthias Kloseb9621712010-04-24 17:59:49 +000017538cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17539# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017540# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017541# values after options handling.
17542ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017543This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017544generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017545
17546 CONFIG_FILES = $CONFIG_FILES
17547 CONFIG_HEADERS = $CONFIG_HEADERS
17548 CONFIG_LINKS = $CONFIG_LINKS
17549 CONFIG_COMMANDS = $CONFIG_COMMANDS
17550 $ $0 $@
17551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552on `(hostname || uname -n) 2>/dev/null | sed 1q`
17553"
17554
Martin v. Löwis11437992002-04-12 09:54:03 +000017555_ACEOF
17556
Matthias Kloseb9621712010-04-24 17:59:49 +000017557case $ac_config_files in *"
17558"*) set x $ac_config_files; shift; ac_config_files=$*;;
17559esac
17560
17561case $ac_config_headers in *"
17562"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17563esac
17564
17565
17566cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017567# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017568config_files="$ac_config_files"
17569config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017572
Matthias Kloseb9621712010-04-24 17:59:49 +000017573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017574ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017575\`$as_me' instantiates files and other configuration actions
17576from templates according to the current configuration. Unless the files
17577and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017578
Matthias Kloseb9621712010-04-24 17:59:49 +000017579Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017580
17581 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017583 --config print configuration, then exit
17584 -q, --quiet, --silent
17585 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017586 -d, --debug don't remove temporary files
17587 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017588 --file=FILE[:TEMPLATE]
17589 instantiate the configuration file FILE
17590 --header=FILE[:TEMPLATE]
17591 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017592
17593Configuration files:
17594$config_files
17595
17596Configuration headers:
17597$config_headers
17598
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017599Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017602cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17603ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017604ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017605python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017606configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017608
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017609Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017610This config.status script is free software; the Free Software Foundation
17611gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612
17613ac_pwd='$ac_pwd'
17614srcdir='$srcdir'
17615INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017616MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017617test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017618_ACEOF
17619
Matthias Kloseb9621712010-04-24 17:59:49 +000017620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17621# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017622ac_need_defaults=:
17623while test $# != 0
17624do
17625 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017626 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017627 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17628 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017629 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017630 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017631 --*=)
17632 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17633 ac_optarg=
17634 ac_shift=:
17635 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017636 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017637 ac_option=$1
17638 ac_optarg=$2
17639 ac_shift=shift
17640 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 esac
17642
Skip Montanaro6dead952003-09-25 14:50:04 +000017643 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017645 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17646 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017648 $as_echo "$ac_cs_version"; exit ;;
17649 --config | --confi | --conf | --con | --co | --c )
17650 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017651 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 debug=: ;;
17653 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017654 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 case $ac_optarg in
17656 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017657 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017658 esac
17659 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017660 ac_need_defaults=false;;
17661 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017662 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017663 case $ac_optarg in
17664 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17665 esac
17666 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668 --he | --h)
17669 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017670 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017671Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017673 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017674 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17675 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17676 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017677
17678 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017679 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017680Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017681
Matthias Kloseb9621712010-04-24 17:59:49 +000017682 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017684
17685 esac
17686 shift
17687done
17688
Skip Montanaro6dead952003-09-25 14:50:04 +000017689ac_configure_extra_args=
17690
17691if $ac_cs_silent; then
17692 exec 6>/dev/null
17693 ac_configure_extra_args="$ac_configure_extra_args --silent"
17694fi
17695
17696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017697cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017698if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017699 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017700 shift
17701 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17702 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017704 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017705fi
17706
Martin v. Löwis11437992002-04-12 09:54:03 +000017707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709exec 5>>config.log
17710{
17711 echo
17712 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17713## Running $as_me. ##
17714_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017715 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017721
Matthias Kloseb9621712010-04-24 17:59:49 +000017722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723
17724# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017725for ac_config_target in $ac_config_targets
17726do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 case $ac_config_target in
17728 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17729 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17730 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017731 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17732 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017734 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017735 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017736 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737
Victor Stinnere0be4232011-10-25 13:06:09 +020017738 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017739 esac
17740done
17741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742
Martin v. Löwis11437992002-04-12 09:54:03 +000017743# If the user did not use the arguments to specify the items to instantiate,
17744# then the envvar interface is used. Set only those that are not.
17745# We use the long form for the default assignment because of an extremely
17746# bizarre bug on SunOS 4.1.3.
17747if $ac_need_defaults; then
17748 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17749 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17750fi
17751
Skip Montanaro6dead952003-09-25 14:50:04 +000017752# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017754# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755# Hook for its removal unless debugging.
17756# Note that there is a small window in which the directory will not be cleaned:
17757# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017758$debug ||
17759{
Victor Stinnere0be4232011-10-25 13:06:09 +020017760 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017762 : "${ac_tmp:=$tmp}"
17763 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017766}
Martin v. Löwis11437992002-04-12 09:54:03 +000017767# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017768
Martin v. Löwis11437992002-04-12 09:54:03 +000017769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017771 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017772} ||
17773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774 tmp=./conf$$-$RANDOM
17775 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017776} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017777ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017778
Matthias Kloseb9621712010-04-24 17:59:49 +000017779# Set up the scripts for CONFIG_FILES section.
17780# No need to generate them if there are no CONFIG_FILES.
17781# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017783
Matthias Kloseb9621712010-04-24 17:59:49 +000017784
17785ac_cr=`echo X | tr X '\015'`
17786# On cygwin, bash can eat \r inside `` if the user requested igncr.
17787# But we know of no other shell where ac_cr would be empty at this
17788# point, so we can use a bashism as a fallback.
17789if test "x$ac_cr" = x; then
17790 eval ac_cr=\$\'\\r\'
17791fi
17792ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17793if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017794 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017795else
17796 ac_cs_awk_cr=$ac_cr
17797fi
17798
Victor Stinnere0be4232011-10-25 13:06:09 +020017799echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017800_ACEOF
17801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802
Matthias Kloseb9621712010-04-24 17:59:49 +000017803{
17804 echo "cat >conf$$subs.awk <<_ACEOF" &&
17805 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17806 echo "_ACEOF"
17807} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017808 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17809ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810ac_delim='%!_!# '
17811for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017812 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017813 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814
Matthias Kloseb9621712010-04-24 17:59:49 +000017815 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17816 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817 break
17818 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017819 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820 else
17821 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017822 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823done
Matthias Kloseb9621712010-04-24 17:59:49 +000017824rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825
Matthias Kloseb9621712010-04-24 17:59:49 +000017826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017827cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017829sed -n '
17830h
17831s/^/S["/; s/!.*/"]=/
17832p
17833g
17834s/^[^!]*!//
17835:repl
17836t repl
17837s/'"$ac_delim"'$//
17838t delim
17839:nl
17840h
17841s/\(.\{148\}\)..*/\1/
17842t more1
17843s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17844p
17845n
17846b repl
17847:more1
17848s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17849p
17850g
17851s/.\{148\}//
17852t nl
17853:delim
17854h
17855s/\(.\{148\}\)..*/\1/
17856t more2
17857s/["\\]/\\&/g; s/^/"/; s/$/"/
17858p
17859b
17860:more2
17861s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17862p
17863g
17864s/.\{148\}//
17865t delim
17866' <conf$$subs.awk | sed '
17867/^[^""]/{
17868 N
17869 s/\n//
17870}
17871' >>$CONFIG_STATUS || ac_write_fail=1
17872rm -f conf$$subs.awk
17873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17874_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017875cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017876 for (key in S) S_is_set[key] = 1
17877 FS = ""
17878
17879}
17880{
17881 line = $ 0
17882 nfields = split(line, field, "@")
17883 substed = 0
17884 len = length(field[1])
17885 for (i = 2; i < nfields; i++) {
17886 key = field[i]
17887 keylen = length(key)
17888 if (S_is_set[key]) {
17889 value = S[key]
17890 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17891 len += length(value) + length(field[++i])
17892 substed = 1
17893 } else
17894 len += 1 + keylen
17895 }
17896
17897 print line
17898}
17899
17900_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017902cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17903if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17904 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17905else
17906 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017907fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017908 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017909_ACEOF
17910
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017911# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17912# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913# trailing colons and then remove the whole line if VPATH becomes empty
17914# (actually we leave an empty line to preserve line numbers).
17915if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017916 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17917h
17918s///
17919s/^/:/
17920s/[ ]*$/:/
17921s/:\$(srcdir):/:/g
17922s/:\${srcdir}:/:/g
17923s/:@srcdir@:/:/g
17924s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017926x
17927s/\(=[ ]*\).*/\1/
17928G
17929s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930s/^[^=]*=[ ]*$//
17931}'
17932fi
17933
Matthias Kloseb9621712010-04-24 17:59:49 +000017934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017935fi # test -n "$CONFIG_FILES"
17936
Matthias Kloseb9621712010-04-24 17:59:49 +000017937# Set up the scripts for CONFIG_HEADERS section.
17938# No need to generate them if there are no CONFIG_HEADERS.
17939# This happens for instance with `./config.status Makefile'.
17940if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017941cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017942BEGIN {
17943_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017944
Matthias Kloseb9621712010-04-24 17:59:49 +000017945# Transform confdefs.h into an awk script `defines.awk', embedded as
17946# here-document in config.status, that substitutes the proper values into
17947# config.h.in to produce config.h.
17948
17949# Create a delimiter string that does not exist in confdefs.h, to ease
17950# handling of long lines.
17951ac_delim='%!_!# '
17952for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017953 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17954 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017955 break
17956 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017957 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017958 else
17959 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17960 fi
17961done
17962
17963# For the awk script, D is an array of macro values keyed by name,
17964# likewise P contains macro parameters if any. Preserve backslash
17965# newline sequences.
17966
17967ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17968sed -n '
17969s/.\{148\}/&'"$ac_delim"'/g
17970t rset
17971:rset
17972s/^[ ]*#[ ]*define[ ][ ]*/ /
17973t def
17974d
17975:def
17976s/\\$//
17977t bsnl
17978s/["\\]/\\&/g
17979s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17980D["\1"]=" \3"/p
17981s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17982d
17983:bsnl
17984s/["\\]/\\&/g
17985s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17986D["\1"]=" \3\\\\\\n"\\/p
17987t cont
17988s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17989t cont
17990d
17991:cont
17992n
17993s/.\{148\}/&'"$ac_delim"'/g
17994t clear
17995:clear
17996s/\\$//
17997t bsnlc
17998s/["\\]/\\&/g; s/^/"/; s/$/"/p
17999d
18000:bsnlc
18001s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18002b cont
18003' <confdefs.h | sed '
18004s/'"$ac_delim"'/"\\\
18005"/g' >>$CONFIG_STATUS || ac_write_fail=1
18006
18007cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18008 for (key in D) D_is_set[key] = 1
18009 FS = ""
18010}
18011/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18012 line = \$ 0
18013 split(line, arg, " ")
18014 if (arg[1] == "#") {
18015 defundef = arg[2]
18016 mac1 = arg[3]
18017 } else {
18018 defundef = substr(arg[1], 2)
18019 mac1 = arg[2]
18020 }
18021 split(mac1, mac2, "(") #)
18022 macro = mac2[1]
18023 prefix = substr(line, 1, index(line, defundef) - 1)
18024 if (D_is_set[macro]) {
18025 # Preserve the white space surrounding the "#".
18026 print prefix "define", macro P[macro] D[macro]
18027 next
18028 } else {
18029 # Replace #undef with comments. This is necessary, for example,
18030 # in the case of _POSIX_SOURCE, which is predefined and required
18031 # on some systems where configure will not decide to define it.
18032 if (defundef == "undef") {
18033 print "/*", prefix defundef, macro, "*/"
18034 next
18035 }
18036 }
18037}
18038{ print }
18039_ACAWK
18040_ACEOF
18041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018042 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018043fi # test -n "$CONFIG_HEADERS"
18044
18045
18046eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18047shift
18048for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049do
18050 case $ac_tag in
18051 :[FHLC]) ac_mode=$ac_tag; continue;;
18052 esac
18053 case $ac_mode$ac_tag in
18054 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018055 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056 :[FH]-) ac_tag=-:-;;
18057 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18058 esac
18059 ac_save_IFS=$IFS
18060 IFS=:
18061 set x $ac_tag
18062 IFS=$ac_save_IFS
18063 shift
18064 ac_file=$1
18065 shift
18066
18067 case $ac_mode in
18068 :L) ac_source=$1;;
18069 :[FH])
18070 ac_file_inputs=
18071 for ac_f
18072 do
18073 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018074 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075 *) # Look for the file first in the build tree, then in the source tree
18076 # (if the path is not absolute). The absolute path cannot be DOS-style,
18077 # because $ac_f cannot contain `:'.
18078 test -f "$ac_f" ||
18079 case $ac_f in
18080 [\\/$]*) false;;
18081 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18082 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018083 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018085 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18086 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087 done
18088
18089 # Let's still pretend it is `configure' which instantiates (i.e., don't
18090 # use $as_me), people would be surprised to read:
18091 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018092 configure_input='Generated from '`
18093 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18094 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095 if test x"$ac_file" != x-; then
18096 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018097 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18098$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018100 # Neutralize special characters interpreted by sed in replacement strings.
18101 case $configure_input in #(
18102 *\&* | *\|* | *\\* )
18103 ac_sed_conf_input=`$as_echo "$configure_input" |
18104 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18105 *) ac_sed_conf_input=$configure_input;;
18106 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107
18108 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018109 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18110 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111 esac
18112 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018113 esac
18114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018116$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018117 X"$ac_file" : 'X\(//\)[^/]' \| \
18118 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018120$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18122 s//\1/
18123 q
18124 }
18125 /^X\(\/\/\)[^/].*/{
18126 s//\1/
18127 q
18128 }
18129 /^X\(\/\/\)$/{
18130 s//\1/
18131 q
18132 }
18133 /^X\(\/\).*/{
18134 s//\1/
18135 q
18136 }
18137 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018138 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 ac_builddir=.
18140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141case "$ac_dir" in
18142.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18143*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018144 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018145 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018146 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147 case $ac_top_builddir_sub in
18148 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18149 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18150 esac ;;
18151esac
18152ac_abs_top_builddir=$ac_pwd
18153ac_abs_builddir=$ac_pwd$ac_dir_suffix
18154# for backward compatibility:
18155ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018156
18157case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018159 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160 ac_top_srcdir=$ac_top_builddir_sub
18161 ac_abs_top_srcdir=$ac_pwd ;;
18162 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018163 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018164 ac_top_srcdir=$srcdir
18165 ac_abs_top_srcdir=$srcdir ;;
18166 *) # Relative name.
18167 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18168 ac_top_srcdir=$ac_top_build_prefix$srcdir
18169 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018170esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018172
Martin v. Löwis11437992002-04-12 09:54:03 +000018173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174 case $ac_mode in
18175 :F)
18176 #
18177 # CONFIG_FILE
18178 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018179
18180 case $INSTALL in
18181 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018183 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018184 ac_MKDIR_P=$MKDIR_P
18185 case $MKDIR_P in
18186 [\\/$]* | ?:[\\/]* ) ;;
18187 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18188 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018189_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018190
Matthias Kloseb9621712010-04-24 17:59:49 +000018191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192# If the template does not know about datarootdir, expand it.
18193# FIXME: This hack should be removed a few years after 2.60.
18194ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018195ac_sed_dataroot='
18196/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197 p
18198 q
18199}
18200/@datadir@/p
18201/@docdir@/p
18202/@infodir@/p
18203/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018204/@mandir@/p'
18205case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206*datarootdir*) ac_datarootdir_seen=yes;;
18207*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18209$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018211cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212 ac_datarootdir_hack='
18213 s&@datadir@&$datadir&g
18214 s&@docdir@&$docdir&g
18215 s&@infodir@&$infodir&g
18216 s&@localedir@&$localedir&g
18217 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018218 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018219esac
18220_ACEOF
18221
18222# Neutralize VPATH when `$srcdir' = `.'.
18223# Shell code in configure.ac might set extrasub.
18224# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18226ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018227$extrasub
18228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018229cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018230:t
18231/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018232s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018234s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235s&@srcdir@&$ac_srcdir&;t t
18236s&@abs_srcdir@&$ac_abs_srcdir&;t t
18237s&@top_srcdir@&$ac_top_srcdir&;t t
18238s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18239s&@builddir@&$ac_builddir&;t t
18240s&@abs_builddir@&$ac_abs_builddir&;t t
18241s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18242s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018243s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018244$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018245"
Victor Stinnere0be4232011-10-25 13:06:09 +020018246eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18247 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018250 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18251 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18252 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018254which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018255$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018256which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018257
Victor Stinnere0be4232011-10-25 13:06:09 +020018258 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018259 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018260 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18261 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018262 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018263 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018264 ;;
18265 :H)
18266 #
18267 # CONFIG_HEADER
18268 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018269 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018270 {
18271 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018272 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18273 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018274 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018275 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018276 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18277$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018279 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018280 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018281 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018282 fi
18283 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018284 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018285 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018286 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018287 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018290
18291 esac
18292
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018293
18294 case $ac_file$ac_mode in
18295 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18296
18297 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298done # for ac_tag
18299
Guido van Rossum627b2d71993-12-24 10:39:16 +000018300
Matthias Kloseb9621712010-04-24 17:59:49 +000018301as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018302_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018303ac_clean_files=$ac_clean_files_save
18304
Matthias Kloseb9621712010-04-24 17:59:49 +000018305test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018306 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018307
Martin v. Löwis11437992002-04-12 09:54:03 +000018308
18309# configure is writing to config.log, and then calls config.status.
18310# config.status does its own redirection, appending to config.log.
18311# Unfortunately, on DOS this fails, as config.log is still kept open
18312# by configure, so config.status won't be able to write to it; its
18313# output is simply discarded. So we exec the FD to /dev/null,
18314# effectively closing config.log, so it can be properly (re)opened and
18315# appended to by config.status. When coming back to configure, we
18316# need to make the FD available again.
18317if test "$no_create" != yes; then
18318 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018319 ac_config_status_args=
18320 test "$silent" = yes &&
18321 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018322 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018323 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018324 exec 5>>config.log
18325 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18326 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018327 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018328fi
18329if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18330 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18331$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018332fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018333
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018334
Christian Heimes75ed8902013-11-20 01:11:18 +010018335echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018336if test ! -f Modules/Setup
18337then
18338 cp $srcdir/Modules/Setup.dist Modules/Setup
18339fi
18340
Christian Heimes75ed8902013-11-20 01:11:18 +010018341echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018342if test ! -f Modules/Setup.local
18343then
18344 echo "# Edit this file for local setup changes" >Modules/Setup.local
18345fi
18346
Christian Heimes75ed8902013-11-20 01:11:18 +010018347echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018348$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018349 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018350 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018351mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018352
18353if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18354 echo "" >&6
18355 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018356 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 +000018357 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018358 echo "" >&6
18359 echo "" >&6
18360fi
18361