blob: afffc19075133bba6f1608eeba8cb0f2ad8936cc [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200669CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000670OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700671LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700672target_os
673target_vendor
674target_cpu
675target
676LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_ERR
678LLVM_PROF_FILE
679LLVM_PROF_MERGER
680PGO_PROF_USE_FLAG
681PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700682DEF_MAKE_RULE
683DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000684ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000685LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100686MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000687INSTALL_DATA
688INSTALL_SCRIPT
689INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200690ac_ct_READELF
691READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000692ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200693ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000694AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000695GNULD
696LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000697LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000698RUNSHARED
699INSTSONAME
700LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000701PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000702BLDLIBRARY
703DLLLIBRARY
704LDLIBRARY
705LIBRARY
706BUILDEXEEXT
707EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200708NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200709MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710PLATFORM_TRIPLET
711MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200712ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000713MAINCC
714CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700715SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716GREP
717CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000718OBJEXT
719EXEEXT
720ac_ct_CC
721CPPFLAGS
722LDFLAGS
723CFLAGS
724CC
725EXPORT_MACOSX_DEPLOYMENT_TARGET
726CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200727_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000728MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000729FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000730FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800731FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000732FRAMEWORKALTINSTALLLAST
733FRAMEWORKALTINSTALLFIRST
734FRAMEWORKINSTALLLAST
735FRAMEWORKINSTALLFIRST
736PYTHONFRAMEWORKINSTALLDIR
737PYTHONFRAMEWORKPREFIX
738PYTHONFRAMEWORKDIR
739PYTHONFRAMEWORKIDENTIFIER
740PYTHONFRAMEWORK
741LIPO_32BIT_FLAGS
742ARCH_RUN_32BIT
743UNIVERSALSDK
744CONFIG_ARGS
745SOVERSION
746VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200747PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200748PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100749host_os
750host_vendor
751host_cpu
752host
753build_os
754build_vendor
755build_cpu
756build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500757HAS_GIT
758GITBRANCH
759GITTAG
760GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400761BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000762target_alias
763host_alias
764build_alias
765LIBS
766ECHO_T
767ECHO_N
768ECHO_C
769DEFS
770mandir
771localedir
772libdir
773psdir
774pdfdir
775dvidir
776htmldir
777infodir
778docdir
779oldincludedir
780includedir
Benjamin Peterson62ed6be2017-12-21 21:43:09 -0800781runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000782localstatedir
783sharedstatedir
784sysconfdir
785datadir
786datarootdir
787libexecdir
788sbindir
789bindir
790program_transform_name
791prefix
792exec_prefix
793PACKAGE_URL
794PACKAGE_BUGREPORT
795PACKAGE_STRING
796PACKAGE_VERSION
797PACKAGE_TARNAME
798PACKAGE_NAME
799PATH_SEPARATOR
800SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000801ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000802ac_user_opts='
803enable_option_checking
804enable_universalsdk
805with_universal_archs
806with_framework_name
807enable_framework
808with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600809with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_cxx_main
811with_suffix
812enable_shared
813enable_profiling
814with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200815with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000816enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700817with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100818with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100819with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_libs
821with_system_expat
822with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100823with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000824enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700825with_tcltk_includes
826with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000828enable_ipv6
829with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000831with_c_locale_coercion
832with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700834with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_libm
836with_libc
837enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800839with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000840'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 ac_precious_vars='build_alias
842host_alias
843target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100844MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845CC
846CFLAGS
847LDFLAGS
848LIBS
849CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100850CPP
851PKG_CONFIG
852PKG_CONFIG_PATH
853PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854
Guido van Rossum627b2d71993-12-24 10:39:16 +0000855
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000857ac_init_help=
858ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000859ac_unrecognized_opts=
860ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# The variables have the same names as the options, with
862# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866no_recursion=
867prefix=NONE
868program_prefix=NONE
869program_suffix=NONE
870program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875x_includes=NONE
876x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000877
878# Installation directory options.
879# These are left unexpanded so users can "make install exec_prefix=/foo"
880# and all the variables that are supposed to be based on exec_prefix
881# by default will actually change.
882# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884bindir='${exec_prefix}/bin'
885sbindir='${exec_prefix}/sbin'
886libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887datarootdir='${prefix}/share'
888datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889sysconfdir='${prefix}/etc'
890sharedstatedir='${prefix}/com'
891localstatedir='${prefix}/var'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -0800892runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893includedir='${prefix}/include'
894oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
896infodir='${datarootdir}/info'
897htmldir='${docdir}'
898dvidir='${docdir}'
899pdfdir='${docdir}'
900psdir='${docdir}'
901libdir='${exec_prefix}/lib'
902localedir='${datarootdir}/locale'
903mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000908do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 # If the previous option needs an argument, assign it.
910 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 ac_prev=
913 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
918 *=) ac_optarg= ;;
919 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # Accept the important Cygnus configure options, so we can diagnose typos.
923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_dashdash$ac_option in
925 --)
926 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 -bindir | --bindir | --bindi | --bind | --bin | --bi)
929 ac_prev=bindir ;;
930 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
933 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 -cache-file | --cache-file | --cache-fil | --cache-fi \
939 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
940 ac_prev=cache_file ;;
941 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
942 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 cache_file=$ac_optarg ;;
944
945 --config-cache | -C)
946 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
954 | --dataroo | --dataro | --datar)
955 ac_prev=datarootdir ;;
956 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
957 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
958 datarootdir=$ac_optarg ;;
959
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200964 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt_orig=$ac_useropt
966 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967 case $ac_user_opts in
968 *"
969"enable_$ac_useropt"
970"*) ;;
971 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
972 ac_unrecognized_sep=', ';;
973 esac
974 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975
976 -docdir | --docdir | --docdi | --doc | --do)
977 ac_prev=docdir ;;
978 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
979 docdir=$ac_optarg ;;
980
981 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
982 ac_prev=dvidir ;;
983 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
984 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200990 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt_orig=$ac_useropt
992 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993 case $ac_user_opts in
994 *"
995"enable_$ac_useropt"
996"*) ;;
997 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
998 ac_unrecognized_sep=', ';;
999 esac
1000 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1003 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1004 | --exec | --exe | --ex)
1005 ac_prev=exec_prefix ;;
1006 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1007 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1008 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 # Obsolete; use --with-gas.
1013 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 -help | --help | --hel | --he | -h)
1016 ac_init_help=long ;;
1017 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1018 ac_init_help=recursive ;;
1019 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1020 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001027 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1028 ac_prev=htmldir ;;
1029 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1030 | --ht=*)
1031 htmldir=$ac_optarg ;;
1032
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033 -includedir | --includedir | --includedi | --included | --include \
1034 | --includ | --inclu | --incl | --inc)
1035 ac_prev=includedir ;;
1036 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1037 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -infodir | --infodir | --infodi | --infod | --info | --inf)
1041 ac_prev=infodir ;;
1042 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -libdir | --libdir | --libdi | --libd)
1046 ac_prev=libdir ;;
1047 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1051 | --libexe | --libex | --libe)
1052 ac_prev=libexecdir ;;
1053 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1054 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001057 -localedir | --localedir | --localedi | --localed | --locale)
1058 ac_prev=localedir ;;
1059 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1060 localedir=$ac_optarg ;;
1061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 ac_prev=localstatedir ;;
1065 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1070 ac_prev=mandir ;;
1071 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Obsolete; use --without-fp.
1076 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 no_create=yes ;;
1081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1083 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1084 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1087 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1088 | --oldin | --oldi | --old | --ol | --o)
1089 ac_prev=oldincludedir ;;
1090 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1091 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1092 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1096 ac_prev=prefix ;;
1097 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1101 | --program-pre | --program-pr | --program-p)
1102 ac_prev=program_prefix ;;
1103 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1104 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1108 | --program-suf | --program-su | --program-s)
1109 ac_prev=program_suffix ;;
1110 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1111 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-transform-name | --program-transform-name \
1115 | --program-transform-nam | --program-transform-na \
1116 | --program-transform-n | --program-transform- \
1117 | --program-transform | --program-transfor \
1118 | --program-transfo | --program-transf \
1119 | --program-trans | --program-tran \
1120 | --progr-tra | --program-tr | --program-t)
1121 ac_prev=program_transform_name ;;
1122 -program-transform-name=* | --program-transform-name=* \
1123 | --program-transform-nam=* | --program-transform-na=* \
1124 | --program-transform-n=* | --program-transform-=* \
1125 | --program-transform=* | --program-transfor=* \
1126 | --program-transfo=* | --program-transf=* \
1127 | --program-trans=* | --program-tran=* \
1128 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001131 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1132 ac_prev=pdfdir ;;
1133 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1134 pdfdir=$ac_optarg ;;
1135
1136 -psdir | --psdir | --psdi | --psd | --ps)
1137 ac_prev=psdir ;;
1138 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1139 psdir=$ac_optarg ;;
1140
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1142 | -silent | --silent | --silen | --sile | --sil)
1143 silent=yes ;;
1144
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08001145 -runstatedir | --runstatedir | --runstatedi | --runstated \
1146 | --runstate | --runstat | --runsta | --runst | --runs \
1147 | --run | --ru | --r)
1148 ac_prev=runstatedir ;;
1149 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1150 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1151 | --run=* | --ru=* | --r=*)
1152 runstatedir=$ac_optarg ;;
1153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1155 ac_prev=sbindir ;;
1156 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1157 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
1160 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1161 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1162 | --sharedst | --shareds | --shared | --share | --shar \
1163 | --sha | --sh)
1164 ac_prev=sharedstatedir ;;
1165 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1166 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1167 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1168 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 -site | --site | --sit)
1172 ac_prev=site ;;
1173 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1177 ac_prev=srcdir ;;
1178 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1182 | --syscon | --sysco | --sysc | --sys | --sy)
1183 ac_prev=sysconfdir ;;
1184 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1185 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1194 verbose=yes ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 -version | --version | --versio | --versi | --vers | -V)
1197 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt_orig=$ac_useropt
1205 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206 case $ac_user_opts in
1207 *"
1208"with_$ac_useropt"
1209"*) ;;
1210 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1211 ac_unrecognized_sep=', ';;
1212 esac
1213 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt_orig=$ac_useropt
1221 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222 case $ac_user_opts in
1223 *"
1224"with_$ac_useropt"
1225"*) ;;
1226 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1227 ac_unrecognized_sep=', ';;
1228 esac
1229 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231 --x)
1232 # Obsolete; use --with-x.
1233 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1236 | --x-incl | --x-inc | --x-in | --x-i)
1237 ac_prev=x_includes ;;
1238 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1239 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1243 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1244 ac_prev=x_libraries ;;
1245 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1246 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1250Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ;;
1252
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 *=*)
1254 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1255 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 case $ac_envvar in #(
1257 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 export $ac_envvar ;;
1262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001263 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001268 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 ;;
1270
1271 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272done
1273
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001276 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277fi
1278
Matthias Kloseb9621712010-04-24 17:59:49 +00001279if test -n "$ac_unrecognized_opts"; then
1280 case $enable_option_checking in
1281 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001283 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1284 esac
1285fi
1286
1287# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1289 datadir sysconfdir sharedstatedir localstatedir includedir \
1290 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08001291 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001294 # Remove trailing slashes.
1295 case $ac_val in
1296 */ )
1297 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1298 eval $ac_var=\$ac_val;;
1299 esac
1300 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001301 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 [\\/$]* | ?:[\\/]* ) continue;;
1303 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001306done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# There might be people who depend on the old broken behavior: `$host'
1309# used to hold the argument of --host etc.
1310# FIXME: To remove some day.
1311build=$build_alias
1312host=$host_alias
1313target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# FIXME: To remove some day.
1316if test "x$host_alias" != x; then
1317 if test "x$build_alias" = x; then
1318 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 elif test "x$build_alias" != "x$host_alias"; then
1320 cross_compiling=yes
1321 fi
1322fi
1323
1324ac_tool_prefix=
1325test -n "$host_alias" && ac_tool_prefix=$host_alias-
1326
1327test "$silent" = yes && exec 6>/dev/null
1328
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_pwd=`pwd` && test -n "$ac_pwd" &&
1331ac_ls_di=`ls -di .` &&
1332ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336
1337
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338# Find the source files, if location was not specified.
1339if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 ac_confdir=`$as_dirname -- "$as_myself" ||
1343$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1344 X"$as_myself" : 'X\(//\)[^/]' \| \
1345 X"$as_myself" : 'X\(//\)$' \| \
1346 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1347$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)[^/].*/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\).*/{
1361 s//\1/
1362 q
1363 }
1364 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001365 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367 srcdir=..
1368 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369else
1370 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372if test ! -r "$srcdir/$ac_unique_file"; then
1373 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1377ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379 pwd)`
1380# When building in place, set srcdir=.
1381if test "$ac_abs_confdir" = "$ac_pwd"; then
1382 srcdir=.
1383fi
1384# Remove unnecessary trailing slashes from srcdir.
1385# Double slashes in file names in object file debugging info
1386# mess up M-x gdb in Emacs.
1387case $srcdir in
1388*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1389esac
1390for ac_var in $ac_precious_vars; do
1391 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_env_${ac_var}_value=\$${ac_var}
1393 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1395done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397#
1398# Report the --help message.
1399#
1400if test "$ac_init_help" = "long"; then
1401 # Omit some internal or obsolete options to make the list less imposing.
1402 # This message is too long to be a string in the A/UX 3.1 sh.
1403 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001404\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Usage: $0 [OPTION]... [VAR=VALUE]...
1407
1408To assign environment variables (e.g., CC, CFLAGS...), specify them as
1409VAR=VALUE. See below for descriptions of some of the useful variables.
1410
1411Defaults for the options are specified in brackets.
1412
1413Configuration:
1414 -h, --help display this help and exit
1415 --help=short display options specific to this package
1416 --help=recursive display the short help of all the included packages
1417 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001418 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 --cache-file=FILE cache test results in FILE [disabled]
1420 -C, --config-cache alias for \`--cache-file=config.cache'
1421 -n, --no-create do not create output files
1422 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1423
Martin v. Löwis11437992002-04-12 09:54:03 +00001424Installation directories:
1425 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430By default, \`make install' will install all the files in
1431\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1432an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1433for instance \`--prefix=\$HOME'.
1434
1435For better control, use the options below.
1436
1437Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001438 --bindir=DIR user executables [EPREFIX/bin]
1439 --sbindir=DIR system admin executables [EPREFIX/sbin]
1440 --libexecdir=DIR program executables [EPREFIX/libexec]
1441 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1442 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1443 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08001444 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --libdir=DIR object code libraries [EPREFIX/lib]
1446 --includedir=DIR C header files [PREFIX/include]
1447 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1448 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1449 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1450 --infodir=DIR info documentation [DATAROOTDIR/info]
1451 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1452 --mandir=DIR man documentation [DATAROOTDIR/man]
1453 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1454 --htmldir=DIR html documentation [DOCDIR]
1455 --dvidir=DIR dvi documentation [DOCDIR]
1456 --pdfdir=DIR pdf documentation [DOCDIR]
1457 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
1459
1460 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001461
1462System types:
1463 --build=BUILD configure for building on BUILD [guessed]
1464 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001465 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466_ACEOF
1467fi
1468
1469if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001470 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001471 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001472 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 cat <<\_ACEOF
1474
1475Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1478 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001479 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001480 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --enable-framework[=INSTALLDIR]
1482 Build (MacOSX|Darwin) framework
1483 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001484 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001485 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1486 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001487 --enable-loadable-sqlite-extensions
1488 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --enable-ipv6 Enable ipv6 (with ipv4) support
1490 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001491 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001492 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001493
1494Optional Packages:
1495 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1496 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001497 --with-universal-archs=ARCH
1498 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001499 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001500 --with-framework-name=FRAMEWORK
1501 specify an alternate name of the framework built
1502 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001504 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001505 --with-cxx-main=<compiler>
1506 compile main() and link python executable with C++
1507 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --with-suffix=.exe set executable suffix
1509 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001510 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001511 --with-lto Enable Link Time Optimization in any build. Disabled
1512 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001513 --with-hash-algorithm=[fnv|siphash24]
1514 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001515 --with-address-sanitizer
1516 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001518 --with-system-expat build pyexpat module using an installed expat
1519 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001520 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001521 --with-system-libmpdec build _decimal module using an installed libmpdec
1522 library
Ned Deilyd819b932013-09-06 01:07:05 -07001523 --with-tcltk-includes='-I...'
1524 override search for Tcl and Tk include files
1525 --with-tcltk-libs='-L...'
1526 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001527 --with-dbmliborder=db1:db2:...
1528 order to check db backends for dbm. Valid value is a
1529 colon separated string with the backend names
1530 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
1532 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001533 --with(out)-c-locale-coercion
1534 disable/enable C locale coercion to a UTF-8 based
1535 locale
1536 --with(out)-c-locale-warning
1537 disable/enable locale compatibility warning in the C
1538 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001539 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001540 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001541 --with-libm=STRING math library
1542 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001543 --with(out)-computed-gotos
1544 Use computed gotos in evaluation loop (enabled by
1545 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001546 --with(out)-ensurepip=[=upgrade]
1547 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001550 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001559 PKG_CONFIG path to pkg-config utility
1560 PKG_CONFIG_PATH
1561 directories to add to pkg-config's search path
1562 PKG_CONFIG_LIBDIR
1563 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565Use these variables to override the choices made by `configure' or to help
1566it to find libraries and programs with nonstandard names/locations.
1567
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001568Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001569_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001571fi
1572
1573if test "$ac_init_help" = "recursive"; then
1574 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 test -d "$ac_dir" ||
1577 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1578 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_builddir=.
1580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581case "$ac_dir" in
1582.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 case $ac_top_builddir_sub in
1588 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1589 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1590 esac ;;
1591esac
1592ac_abs_top_builddir=$ac_pwd
1593ac_abs_builddir=$ac_pwd$ac_dir_suffix
1594# for backward compatibility:
1595ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
1597case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 ac_top_srcdir=$ac_top_builddir_sub
1601 ac_abs_top_srcdir=$ac_pwd ;;
1602 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$srcdir
1605 ac_abs_top_srcdir=$srcdir ;;
1606 *) # Relative name.
1607 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1608 ac_top_srcdir=$ac_top_build_prefix$srcdir
1609 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001610esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 cd "$ac_dir" || { ac_status=$?; continue; }
1614 # Check for guested configure.
1615 if test -f "$ac_srcdir/configure.gnu"; then
1616 echo &&
1617 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1618 elif test -f "$ac_srcdir/configure"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 fi || ac_status=$?
1624 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 done
1626fi
1627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001629if $ac_init_version; then
1630 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001631python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001633
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635This configure script is free software; the Free Software Foundation
1636gives unlimited permission to copy, distribute and modify it.
1637_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001640
1641## ------------------------ ##
1642## Autoconf initialization. ##
1643## ------------------------ ##
1644
1645# ac_fn_c_try_compile LINENO
1646# --------------------------
1647# Try to compile conftest.$ac_ext, and return whether this succeeded.
1648ac_fn_c_try_compile ()
1649{
1650 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1651 rm -f conftest.$ac_objext
1652 if { { ac_try="$ac_compile"
1653case "(($ac_try" in
1654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1655 *) ac_try_echo=$ac_try;;
1656esac
1657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1658$as_echo "$ac_try_echo"; } >&5
1659 (eval "$ac_compile") 2>conftest.err
1660 ac_status=$?
1661 if test -s conftest.err; then
1662 grep -v '^ *+' conftest.err >conftest.er1
1663 cat conftest.er1 >&5
1664 mv -f conftest.er1 conftest.err
1665 fi
1666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1667 test $ac_status = 0; } && {
1668 test -z "$ac_c_werror_flag" ||
1669 test ! -s conftest.err
1670 } && test -s conftest.$ac_objext; then :
1671 ac_retval=0
1672else
1673 $as_echo "$as_me: failed program was:" >&5
1674sed 's/^/| /' conftest.$ac_ext >&5
1675
1676 ac_retval=1
1677fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 as_fn_set_status $ac_retval
1680
1681} # ac_fn_c_try_compile
1682
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001683# ac_fn_c_try_cpp LINENO
1684# ----------------------
1685# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1686ac_fn_c_try_cpp ()
1687{
1688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689 if { { ac_try="$ac_cpp conftest.$ac_ext"
1690case "(($ac_try" in
1691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1692 *) ac_try_echo=$ac_try;;
1693esac
1694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1695$as_echo "$ac_try_echo"; } >&5
1696 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1697 ac_status=$?
1698 if test -s conftest.err; then
1699 grep -v '^ *+' conftest.err >conftest.er1
1700 cat conftest.er1 >&5
1701 mv -f conftest.er1 conftest.err
1702 fi
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } > conftest.i && {
1705 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1706 test ! -s conftest.err
1707 }; then :
1708 ac_retval=0
1709else
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=1
1714fi
1715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1716 as_fn_set_status $ac_retval
1717
1718} # ac_fn_c_try_cpp
1719
Matthias Kloseb9621712010-04-24 17:59:49 +00001720# ac_fn_c_try_link LINENO
1721# -----------------------
1722# Try to link conftest.$ac_ext, and return whether this succeeded.
1723ac_fn_c_try_link ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 rm -f conftest.$ac_objext conftest$ac_exeext
1727 if { { ac_try="$ac_link"
1728case "(($ac_try" in
1729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730 *) ac_try_echo=$ac_try;;
1731esac
1732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733$as_echo "$ac_try_echo"; } >&5
1734 (eval "$ac_link") 2>conftest.err
1735 ac_status=$?
1736 if test -s conftest.err; then
1737 grep -v '^ *+' conftest.err >conftest.er1
1738 cat conftest.er1 >&5
1739 mv -f conftest.er1 conftest.err
1740 fi
1741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1742 test $ac_status = 0; } && {
1743 test -z "$ac_c_werror_flag" ||
1744 test ! -s conftest.err
1745 } && test -s conftest$ac_exeext && {
1746 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001747 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001748 }; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=1
1755fi
1756 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1757 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1758 # interfere with the next link command; also delete a directory that is
1759 # left behind by Apple's compiler. We do this before executing the actions.
1760 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 as_fn_set_status $ac_retval
1763
1764} # ac_fn_c_try_link
1765
Matthias Kloseb9621712010-04-24 17:59:49 +00001766# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1767# -------------------------------------------------------
1768# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1769# the include files in INCLUDES and setting the cache variable VAR
1770# accordingly.
1771ac_fn_c_check_header_mongrel ()
1772{
1773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001774 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1776$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001777if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 $as_echo_n "(cached) " >&6
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783else
1784 # Is the header compilable?
1785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1786$as_echo_n "checking $2 usability... " >&6; }
1787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1788/* end confdefs.h. */
1789$4
1790#include <$2>
1791_ACEOF
1792if ac_fn_c_try_compile "$LINENO"; then :
1793 ac_header_compiler=yes
1794else
1795 ac_header_compiler=no
1796fi
1797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1799$as_echo "$ac_header_compiler" >&6; }
1800
1801# Is the header present?
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1803$as_echo_n "checking $2 presence... " >&6; }
1804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1805/* end confdefs.h. */
1806#include <$2>
1807_ACEOF
1808if ac_fn_c_try_cpp "$LINENO"; then :
1809 ac_header_preproc=yes
1810else
1811 ac_header_preproc=no
1812fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001813rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1815$as_echo "$ac_header_preproc" >&6; }
1816
1817# So? What about this header?
1818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1819 yes:no: )
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1821$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1823$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1824 ;;
1825 no:yes:* )
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1827$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1829$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1831$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1833$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&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;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001836( $as_echo "## --------------------------------------- ##
1837## Report this to https://bugs.python.org/ ##
1838## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 ) | sed "s/^/$as_me: WARNING: /" >&2
1840 ;;
1841esac
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1843$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001844if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001845 $as_echo_n "(cached) " >&6
1846else
1847 eval "$3=\$ac_header_compiler"
1848fi
1849eval ac_res=\$$3
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1851$as_echo "$ac_res" >&6; }
1852fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001853 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001854
1855} # ac_fn_c_check_header_mongrel
1856
1857# ac_fn_c_try_run LINENO
1858# ----------------------
1859# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1860# that executables *can* be run.
1861ac_fn_c_try_run ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 if { { ac_try="$ac_link"
1865case "(($ac_try" in
1866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1867 *) ac_try_echo=$ac_try;;
1868esac
1869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1870$as_echo "$ac_try_echo"; } >&5
1871 (eval "$ac_link") 2>&5
1872 ac_status=$?
1873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1875 { { case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880$as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_try") 2>&5
1882 ac_status=$?
1883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1884 test $ac_status = 0; }; }; then :
1885 ac_retval=0
1886else
1887 $as_echo "$as_me: program exited with status $ac_status" >&5
1888 $as_echo "$as_me: failed program was:" >&5
1889sed 's/^/| /' conftest.$ac_ext >&5
1890
1891 ac_retval=$ac_status
1892fi
1893 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001895 as_fn_set_status $ac_retval
1896
1897} # ac_fn_c_try_run
1898
1899# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1900# -------------------------------------------------------
1901# Tests whether HEADER exists and can be compiled using the include files in
1902# INCLUDES, setting the cache variable VAR accordingly.
1903ac_fn_c_check_header_compile ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914#include <$2>
1915_ACEOF
1916if ac_fn_c_try_compile "$LINENO"; then :
1917 eval "$3=yes"
1918else
1919 eval "$3=no"
1920fi
1921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001927
1928} # ac_fn_c_check_header_compile
1929
Matthias Kloseb9621712010-04-24 17:59:49 +00001930# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1931# -------------------------------------------
1932# Tests whether TYPE exists after having included INCLUDES, setting cache
1933# variable VAR accordingly.
1934ac_fn_c_check_type ()
1935{
1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001939if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=no"
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$4
1946int
1947main ()
1948{
1949if (sizeof ($2))
1950 return 0;
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$4
1959int
1960main ()
1961{
1962if (sizeof (($2)))
1963 return 0;
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969
1970else
1971 eval "$3=yes"
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977eval ac_res=\$$3
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1979$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001980 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982} # ac_fn_c_check_type
1983
Matthias Kloseb9621712010-04-24 17:59:49 +00001984# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1985# --------------------------------------------
1986# Tries to find the compile-time value of EXPR in a program that includes
1987# INCLUDES, setting VAR accordingly. Returns whether the value could be
1988# computed
1989ac_fn_c_compute_int ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 if test "$cross_compiling" = yes; then
1993 # Depending upon the size, compute the lo and hi bounds.
1994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 ac_lo=0 ac_mid=0
2010 while :; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002018test_array [0] = 0;
2019return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_hi=$ac_mid; break
2027else
2028 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2029 if test $ac_lo -le $ac_mid; then
2030 ac_lo= ac_hi=
2031 break
2032 fi
2033 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 done
2037else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002097test_array [0] = 0;
2098return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002099
2100 ;
2101 return 0;
2102}
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105 ac_hi=$ac_mid
2106else
2107 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110done
2111case $ac_lo in #((
2112?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2113'') ac_retval=1 ;;
2114esac
2115 else
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119static long int longval () { return $2; }
2120static unsigned long int ulongval () { return $2; }
2121#include <stdio.h>
2122#include <stdlib.h>
2123int
2124main ()
2125{
2126
2127 FILE *f = fopen ("conftest.val", "w");
2128 if (! f)
2129 return 1;
2130 if (($2) < 0)
2131 {
2132 long int i = longval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%ld", i);
2136 }
2137 else
2138 {
2139 unsigned long int i = ulongval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%lu", i);
2143 }
2144 /* Do not output a trailing newline, as this causes \r\n confusion
2145 on some platforms. */
2146 return ferror (f) || fclose (f) != 0;
2147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_run "$LINENO"; then :
2153 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2154else
2155 ac_retval=1
2156fi
2157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2158 conftest.$ac_objext conftest.beam conftest.$ac_ext
2159rm -f conftest.val
2160
2161 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002162 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002163 as_fn_set_status $ac_retval
2164
2165} # ac_fn_c_compute_int
2166
2167# ac_fn_c_check_func LINENO FUNC VAR
2168# ----------------------------------
2169# Tests whether FUNC exists, setting the cache variable VAR accordingly
2170ac_fn_c_check_func ()
2171{
2172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2174$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002175if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 $as_echo_n "(cached) " >&6
2177else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2181 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2182#define $2 innocuous_$2
2183
2184/* System header to define __stub macros and hopefully few prototypes,
2185 which can conflict with char $2 (); below.
2186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2187 <limits.h> exists even on freestanding compilers. */
2188
2189#ifdef __STDC__
2190# include <limits.h>
2191#else
2192# include <assert.h>
2193#endif
2194
2195#undef $2
2196
2197/* Override any GCC internal prototype to avoid an error.
2198 Use char because int might match the return type of a GCC
2199 builtin and then its argument prototype would still apply. */
2200#ifdef __cplusplus
2201extern "C"
2202#endif
2203char $2 ();
2204/* The GNU C library defines this for functions which it implements
2205 to always fail with ENOSYS. Some functions are actually named
2206 something starting with __ and the normal name is an alias. */
2207#if defined __stub_$2 || defined __stub___$2
2208choke me
2209#endif
2210
2211int
2212main ()
2213{
2214return $2 ();
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219if ac_fn_c_try_link "$LINENO"; then :
2220 eval "$3=yes"
2221else
2222 eval "$3=no"
2223fi
2224rm -f core conftest.err conftest.$ac_objext \
2225 conftest$ac_exeext conftest.$ac_ext
2226fi
2227eval ac_res=\$$3
2228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2229$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002230 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002231
2232} # ac_fn_c_check_func
2233
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002234# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2235# ---------------------------------------------
2236# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2237# accordingly.
2238ac_fn_c_check_decl ()
2239{
2240 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241 as_decl_name=`echo $2|sed 's/ *(.*//'`
2242 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2244$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2245if eval \${$3+:} false; then :
2246 $as_echo_n "(cached) " >&6
2247else
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
2250$4
2251int
2252main ()
2253{
2254#ifndef $as_decl_name
2255#ifdef __cplusplus
2256 (void) $as_decl_use;
2257#else
2258 (void) $as_decl_name;
2259#endif
2260#endif
2261
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266if ac_fn_c_try_compile "$LINENO"; then :
2267 eval "$3=yes"
2268else
2269 eval "$3=no"
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272fi
2273eval ac_res=\$$3
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2275$as_echo "$ac_res" >&6; }
2276 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2277
2278} # ac_fn_c_check_decl
2279
Matthias Kloseb9621712010-04-24 17:59:49 +00002280# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2281# ----------------------------------------------------
2282# Tries to find if the field MEMBER exists in type AGGR, after including
2283# INCLUDES, setting cache variable VAR accordingly.
2284ac_fn_c_check_member ()
2285{
2286 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2288$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002289if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002290 $as_echo_n "(cached) " >&6
2291else
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h. */
2294$5
2295int
2296main ()
2297{
2298static $2 ac_aggr;
2299if (ac_aggr.$3)
2300return 0;
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_compile "$LINENO"; then :
2306 eval "$4=yes"
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$5
2311int
2312main ()
2313{
2314static $2 ac_aggr;
2315if (sizeof ac_aggr.$3)
2316return 0;
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$4=yes"
2323else
2324 eval "$4=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330eval ac_res=\$$4
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2332$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002333 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002334
2335} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002337This file contains any messages produced by compilers while
2338running configure, to aid debugging if configure makes a mistake.
2339
Ned Deily4829bc62016-09-12 17:29:04 -04002340It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002341generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002342
2343 $ $0 $@
2344
2345_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002347{
2348cat <<_ASUNAME
2349## --------- ##
2350## Platform. ##
2351## --------- ##
2352
2353hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2354uname -m = `(uname -m) 2>/dev/null || echo unknown`
2355uname -r = `(uname -r) 2>/dev/null || echo unknown`
2356uname -s = `(uname -s) 2>/dev/null || echo unknown`
2357uname -v = `(uname -v) 2>/dev/null || echo unknown`
2358
2359/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2360/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2361
2362/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2363/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2364/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002366/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2367/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2368/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2369
2370_ASUNAME
2371
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo "PATH: $as_dir"
2378 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381} >&5
2382
2383cat >&5 <<_ACEOF
2384
2385
2386## ----------- ##
2387## Core tests. ##
2388## ----------- ##
2389
2390_ACEOF
2391
2392
2393# Keep a trace of the command line.
2394# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_configure_args0=
2400ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_must_keep_next=false
2402for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002403do
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 for ac_arg
2405 do
2406 case $ac_arg in
2407 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2408 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2409 | -silent | --silent | --silen | --sile | --sil)
2410 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 esac
2414 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 case $ac_arg in
2422 *=* | --config-cache | -C | -disable-* | --disable-* \
2423 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2424 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2425 | -with-* | --with-* | -without-* | --without-* | --x)
2426 case "$ac_configure_args0 " in
2427 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2428 esac
2429 ;;
2430 -* ) ac_must_keep_next=true ;;
2431 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 ;;
2435 esac
2436 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002437done
Matthias Kloseb9621712010-04-24 17:59:49 +00002438{ ac_configure_args0=; unset ac_configure_args0;}
2439{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441# When interrupted or exit'd, cleanup temporary files, and complete
2442# config.log. We remove comments because anyway the quotes in there
2443# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444# WARNING: Use '\'' to represent an apostrophe within the trap.
2445# 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 +00002446trap 'exit_status=$?
2447 # Save into config.log some information that might help in debugging.
2448 {
2449 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002450
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002452## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 echo
2455 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456(
2457 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2458 eval ac_val=\$$ac_var
2459 case $ac_val in #(
2460 *${as_nl}*)
2461 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2463$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac
2465 case $ac_var in #(
2466 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2468 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2474 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 "s/'\''/'\''\\\\'\'''\''/g;
2477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2478 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac |
2483 sort
2484)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002488## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 echo
2491 for ac_var in $ac_subst_vars
2492 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 eval ac_val=\$$ac_var
2494 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 done | sort
2499 echo
2500
2501 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_files
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515 fi
2516
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002519## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575 # We do not want a PATH search for config.site.
2576 case $CONFIG_SITE in #((
2577 -*) ac_site_file1=./$CONFIG_SITE;;
2578 */*) ac_site_file1=$CONFIG_SITE;;
2579 *) ac_site_file1=./$CONFIG_SITE;;
2580 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$prefix/share/config.site
2583 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584else
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$ac_default_prefix/share/config.site
2586 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002588for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 test "x$ac_site_file" = xNONE && continue
2591 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2593$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002595 . "$ac_site_file" \
2596 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2598as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002599See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600 fi
2601done
2602
2603if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 # Some versions of bash will fail to source /dev/null (special files
2605 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2606 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2608$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2611 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 esac
2613 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614else
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2616$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 >$cache_file
2618fi
2619
2620# Check that the precious variables saved in the cache have kept the same
2621# value.
2622ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2625 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2627 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 case $ac_old_set,$ac_new_set in
2629 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2631$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 +00002632 ac_cache_corrupted=: ;;
2633 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2635$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_cache_corrupted=: ;;
2637 ,);;
2638 *)
2639 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 # differences in whitespace do not lead to failure.
2641 ac_old_val_w=`echo x $ac_old_val`
2642 ac_new_val_w=`echo x $ac_new_val`
2643 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2645$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2646 ac_cache_corrupted=:
2647 else
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2649$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2650 eval $ac_var=\$ac_old_val
2651 fi
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2653$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2655$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 fi;;
2657 esac
2658 # Pass precious variables to config.status.
2659 if test "$ac_new_set" = set; then
2660 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 *) ac_arg=$ac_var=$ac_new_val ;;
2663 esac
2664 case " $ac_configure_args " in
2665 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 esac
2668 fi
2669done
2670if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2674$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002675 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002677## -------------------- ##
2678## Main body of script. ##
2679## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680
Guido van Rossum7f43da71994-08-01 12:15:30 +00002681ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2685ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686
Guido van Rossum627b2d71993-12-24 10:39:16 +00002687
Michael W. Hudson54241132001-12-07 15:38:26 +00002688
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002690if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691 # If we're building out-of-tree, we need to make sure the following
2692 # resources get picked up before their $srcdir counterparts.
2693 # Objects/ -> typeslots.inc
2694 # Include/ -> Python-ast.h, graminit.h
2695 # Python/ -> importlib.h
2696 # (A side effect of this is that these resources will automatically be
2697 # regenerated when building out-of-tree, regardless of whether or not
2698 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2699 # off.)
2700 BASECPPFLAGS="-IObjects -IInclude -IPython"
2701else
2702 BASECPPFLAGS=""
2703fi
2704
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705
2706
2707
2708
Victor Stinner9ed34a82017-05-02 22:35:58 +02002709if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002711# Extract the first word of "git", so it can be a program name with args.
2712set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2714$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716 $as_echo_n "(cached) " >&6
2717else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718 if test -n "$HAS_GIT"; then
2719 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720else
2721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722for as_dir in $PATH
2723do
2724 IFS=$as_save_IFS
2725 test -z "$as_dir" && as_dir=.
2726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2730 break 2
2731 fi
2732done
2733 done
2734IFS=$as_save_IFS
2735
Ned Deily5c4b0d02017-03-04 00:19:55 -05002736 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002737fi
2738fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739HAS_GIT=$ac_cv_prog_HAS_GIT
2740if test -n "$HAS_GIT"; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2742$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743else
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2745$as_echo "no" >&6; }
2746fi
2747
2748
2749else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002750HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753then
Ned Deily554626a2017-03-20 23:41:52 -04002754 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2755 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITVERSION=""
2759 GITTAG=""
2760 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761fi
2762
2763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002765
2766
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002767ac_aux_dir=
2768for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2769 if test -f "$ac_dir/install-sh"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/install-sh -c"
2772 break
2773 elif test -f "$ac_dir/install.sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install.sh -c"
2776 break
2777 elif test -f "$ac_dir/shtool"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/shtool install -c"
2780 break
2781 fi
2782done
2783if test -z "$ac_aux_dir"; then
2784 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2785fi
2786
2787# These three variables are undocumented and unsupported,
2788# and are intended to be withdrawn in a future Autoconf release.
2789# They can cause serious problems if a builder's source tree is in a directory
2790# whose full name contains unusual characters.
2791ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2792ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2793ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2794
2795
2796# Make sure we can run config.sub.
2797$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2798 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2799
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2801$as_echo_n "checking build system type... " >&6; }
2802if ${ac_cv_build+:} false; then :
2803 $as_echo_n "(cached) " >&6
2804else
2805 ac_build_alias=$build_alias
2806test "x$ac_build_alias" = x &&
2807 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2808test "x$ac_build_alias" = x &&
2809 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2810ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2811 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2812
2813fi
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2815$as_echo "$ac_cv_build" >&6; }
2816case $ac_cv_build in
2817*-*-*) ;;
2818*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2819esac
2820build=$ac_cv_build
2821ac_save_IFS=$IFS; IFS='-'
2822set x $ac_cv_build
2823shift
2824build_cpu=$1
2825build_vendor=$2
2826shift; shift
2827# Remember, the first character of IFS is used to create $*,
2828# except with old shells:
2829build_os=$*
2830IFS=$ac_save_IFS
2831case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2832
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2835$as_echo_n "checking host system type... " >&6; }
2836if ${ac_cv_host+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 if test "x$host_alias" = x; then
2840 ac_cv_host=$ac_cv_build
2841else
2842 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2843 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2844fi
2845
2846fi
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2848$as_echo "$ac_cv_host" >&6; }
2849case $ac_cv_host in
2850*-*-*) ;;
2851*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2852esac
2853host=$ac_cv_host
2854ac_save_IFS=$IFS; IFS='-'
2855set x $ac_cv_host
2856shift
2857host_cpu=$1
2858host_vendor=$2
2859shift; shift
2860# Remember, the first character of IFS is used to create $*,
2861# except with old shells:
2862host_os=$*
2863IFS=$ac_save_IFS
2864case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2865
2866
2867
doko@python.orga10e4a92013-01-25 18:45:12 +01002868
2869
Ned Deilyfcbc2462014-08-22 13:32:49 -07002870# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2871rm -f pybuilddir.txt
2872
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002873for ac_prog in python$PACKAGE_VERSION python3 python
2874do
2875 # Extract the first word of "$ac_prog", so it can be a program name with args.
2876set dummy $ac_prog; ac_word=$2
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2878$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002879if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002880 $as_echo_n "(cached) " >&6
2881else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882 if test -n "$PYTHON_FOR_REGEN"; then
2883 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002884else
2885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2886for as_dir in $PATH
2887do
2888 IFS=$as_save_IFS
2889 test -z "$as_dir" && as_dir=.
2890 for ac_exec_ext in '' $ac_executable_extensions; do
2891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2894 break 2
2895 fi
2896done
2897 done
2898IFS=$as_save_IFS
2899
2900fi
2901fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2903if test -n "$PYTHON_FOR_REGEN"; then
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2905$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906else
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2908$as_echo "no" >&6; }
2909fi
2910
2911
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
2917
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002918if test "$cross_compiling" = yes; then
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2920$as_echo_n "checking for python interpreter for cross build... " >&6; }
2921 if test -z "$PYTHON_FOR_BUILD"; then
2922 for interp in python$PACKAGE_VERSION python3 python; do
2923 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002924 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 +02002925 break
2926 fi
2927 interp=
2928 done
2929 if test x$interp = x; then
2930 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2931 fi
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2933$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002934 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 +02002935 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Benjamin Petersond23f8222009-04-05 19:13:16 +00002944if test "$prefix" != "/"; then
2945 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
2950
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002951# We don't use PACKAGE_ variables, and they cause conflicts
2952# with other autoconf-based packages that include Python.h
2953grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2954rm confdefs.h
2955mv confdefs.h.new confdefs.h
2956
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002957
Ned Deily4829bc62016-09-12 17:29:04 -04002958VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002959
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002960# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002961
2962SOVERSION=1.0
2963
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002964# The later defininition of _XOPEN_SOURCE disables certain features
2965# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2966
Matthias Kloseb9621712010-04-24 17:59:49 +00002967$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968
2969
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002970# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2971# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2972# them.
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975
2976
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982
2983
Martin v. Löwisd6320502004-08-12 13:45:08 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002985# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989
2990
2991
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002992define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002993
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002994# Arguments passed to configure.
2995
2996CONFIG_ARGS="$ac_configure_args"
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2999$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003001if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003003 case $enableval in
3004 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003005 # Locate the best usable SDK, see Mac/README.txt for more
3006 # information
3007 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003008 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003009 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003010 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3011 if test ! -d "${enableval}"
3012 then
3013 enableval=/
3014 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 ;;
3017 esac
3018 case $enableval in
3019 no)
3020 UNIVERSALSDK=
3021 enable_universalsdk=
3022 ;;
3023 *)
3024 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 if test ! -d "${UNIVERSALSDK}"
3026 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003027 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033else
3034
3035 UNIVERSALSDK=
3036 enable_universalsdk=
3037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040if test -n "${UNIVERSALSDK}"
3041then
Matthias Kloseb9621712010-04-24 17:59:49 +00003042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3043$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044else
Matthias Kloseb9621712010-04-24 17:59:49 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3046$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003050
Ned Deily87adb6e2013-10-18 21:09:56 -07003051ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053# For backward compatibility reasons we prefer to select '32-bit' if available,
3054# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003055UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056if test "`uname -s`" = "Darwin"
3057then
3058 if test -n "${UNIVERSALSDK}"
3059 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003060 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061 then
3062 UNIVERSAL_ARCHS="intel"
3063 fi
3064 fi
3065fi
3066
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3069$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070
3071# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003072if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 UNIVERSAL_ARCHS="$withval"
3075
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076fi
3077
Ned Deily87adb6e2013-10-18 21:09:56 -07003078if test -n "${UNIVERSALSDK}"
3079then
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3081$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3082else
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
3085fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003087
3088# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003089if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003090 withval=$with_framework_name;
3091 PYTHONFRAMEWORK=${withval}
3092 PYTHONFRAMEWORKDIR=${withval}.framework
3093 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3094
3095else
3096
3097 PYTHONFRAMEWORK=Python
3098 PYTHONFRAMEWORKDIR=Python.framework
3099 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3100
3101fi
3102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003104if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003106 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003107 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003108 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003109 esac
3110 case $enableval in
3111 no)
3112 PYTHONFRAMEWORK=
3113 PYTHONFRAMEWORKDIR=no-framework
3114 PYTHONFRAMEWORKPREFIX=
3115 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116 FRAMEWORKINSTALLFIRST=
3117 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003118 FRAMEWORKALTINSTALLFIRST=
3119 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003120 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003121 if test "x${prefix}" = "xNONE"; then
3122 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3123 else
3124 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3125 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003127 ;;
3128 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003129 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003132 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003133 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3134 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003135 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003137
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003138 if test "x${prefix}" = "xNONE" ; then
3139 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144
3145 case "${enableval}" in
3146 /System*)
3147 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3148 if test "${prefix}" = "NONE" ; then
3149 # See below
3150 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3151 fi
3152 ;;
3153
3154 /Library*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 ;;
3157
3158 */Library/Frameworks)
3159 MDIR="`dirname "${enableval}"`"
3160 MDIR="`dirname "${MDIR}"`"
3161 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3162
3163 if test "${prefix}" = "NONE"; then
3164 # User hasn't specified the
3165 # --prefix option, but wants to install
3166 # the framework in a non-default location,
3167 # ensure that the compatibility links get
3168 # installed relative to that prefix as well
3169 # instead of in /usr/local.
3170 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3171 fi
3172 ;;
3173
3174 *)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177 esac
3178
Jack Jansen127e56e2001-09-11 14:41:54 +00003179 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003181 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003187 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3188
3189 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3190
Jack Jansene578a632001-08-15 01:27:14 +00003191 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Guido van Rossum563e7081996-09-10 18:20:48 +00003193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Jack Jansene578a632001-08-15 01:27:14 +00003195 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORKPREFIX=
3198 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199 FRAMEWORKINSTALLFIRST=
3200 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 FRAMEWORKALTINSTALLFIRST=
3202 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003203 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 if test "x${prefix}" = "xNONE" ; then
3205 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3206 else
3207 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3208 fi
Jack Jansene578a632001-08-15 01:27:14 +00003209 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003210
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212fi
3213
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
3215
Michael W. Hudson54241132001-12-07 15:38:26 +00003216
3217
3218
3219
Jack Jansene578a632001-08-15 01:27:14 +00003220
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221
3222
3223
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003224
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003225
Ned Deilyb8f944f2013-11-21 22:42:25 -08003226
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003227
3228cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003229#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003230_ACEOF
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003234## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003235## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003236##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003237# Set name for machine-dependent library files
3238
Matthias Kloseb9621712010-04-24 17:59:49 +00003239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3240$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241if test -z "$MACHDEP"
3242then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 # avoid using uname for cross builds
3244 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003245 # ac_sys_system and ac_sys_release are used for setting
3246 # a lot of different things including 'define_xopen_source'
3247 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003249 *-*-linux-android*)
3250 ac_sys_system=Linux-android
3251 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 *-*-linux*)
3253 ac_sys_system=Linux
3254 ;;
3255 *-*-cygwin*)
3256 ac_sys_system=Cygwin
3257 ;;
3258 *)
3259 # for now, limit cross builds to known configurations
3260 MACHDEP="unknown"
3261 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3262 esac
3263 ac_sys_release=
3264 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003265 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003266 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003267 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 fi
3273 ac_md_system=`echo $ac_sys_system |
3274 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3275 ac_md_release=`echo $ac_sys_release |
3276 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3277 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003278
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003280 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003281 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003282 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 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 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On FreeBSD 4, the math functions C89 does not cover are never defined
3364 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3365 FreeBSD/4.*)
3366 define_xopen_source=no;;
3367 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3368 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3369 # identifies itself as Darwin/7.*
3370 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # disables platform specific features beyond repair.
3372 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # has no effect, don't bother defining them
3374 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003375 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003376 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003377 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003378 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3379 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3380 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003381 AIX/4)
3382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 AIX/5)
3384 if test `uname -r` -eq 1; then
3385 define_xopen_source=no
3386 fi
3387 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003388 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3389 # defining NI_NUMERICHOST.
3390 QNX/6.3.2)
3391 define_xopen_source=no
3392 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394esac
3395
3396if test $define_xopen_source = yes
3397then
Victor Stinner14d098d2011-09-07 22:29:43 +02003398 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Victor Stinner14d098d2011-09-07 22:29:43 +02003400$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
3403 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3404 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3405 # several APIs are not declared. Since this is also needed in some
3406 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Matthias Kloseb9621712010-04-24 17:59:49 +00003408$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
3410
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003411
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003412$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414fi
3415
Christian Heimes647cd872013-12-07 23:39:33 +01003416# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3417case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003418 hp*|HP*)
3419 define_stdc_a1=yes;;
3420 *)
3421 define_stdc_a1=no;;
3422esac
3423
3424if test $define_stdc_a1 = yes
3425then
Christian Heimes647cd872013-12-07 23:39:33 +01003426
3427$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3428
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429fi
Christian Heimes647cd872013-12-07 23:39:33 +01003430
Jack Jansen6b08a402004-06-03 12:41:45 +00003431# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3432# it may influence the way we can build extensions, so distutils
3433# needs to check it
3434
Thomas Wouters477c8d52006-05-27 19:21:47 +00003435
Jack Jansen6b08a402004-06-03 12:41:45 +00003436CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003437EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003438
Guido van Rossum627b2d71993-12-24 10:39:16 +00003439# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003440
3441# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3442# for debug/optimization stuff. BASECFLAGS is for flags that are required
3443# just to get things to compile and link. Users are free to override OPT
3444# when running configure or make. The build should not break if they do.
3445# BASECFLAGS should generally not be messed with, however.
3446
3447# XXX shouldn't some/most/all of this code be merged with the stuff later
3448# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3450$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003453if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003455 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003456 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003457 without_gcc=yes;;
3458 yes) CC=gcc
3459 without_gcc=no;;
3460 *) CC=$withval
3461 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003462 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003463else
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003465 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003466 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003467 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003468 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003469 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470fi
3471
Matthias Kloseb9621712010-04-24 17:59:49 +00003472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3473$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003474
Zachary Ware5af85642015-12-21 12:09:17 -06003475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3476$as_echo_n "checking for --with-icc... " >&6; }
3477
3478# Check whether --with-icc was given.
3479if test "${with_icc+set}" = set; then :
3480 withval=$with_icc;
3481 case $withval in
3482 no) CC=${CC:-cc}
3483 with_icc=no;;
3484 yes) CC=icc
3485 CXX=icpc
3486 with_icc=yes;;
3487 *) CC=$withval
3488 with_icc=$withval;;
3489 esac
3490else
3491
3492 with_icc=no
3493fi
3494
3495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3496$as_echo "$with_icc" >&6; }
3497
Guido van Rossum8b131c51995-03-09 14:10:13 +00003498# If the user switches compilers, we can't believe the cache
3499if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3500then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003501 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003502(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003503fi
3504
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003505# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3506# when the compiler supports them, but we don't always want -O2, and
3507# we set -g later.
3508if test -z "$CFLAGS"; then
3509 CFLAGS=
3510fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003511
3512if test "$ac_sys_system" = "Darwin"
3513then
3514 # Compiler selection on MacOSX is more complicated than
3515 # AC_PROG_CC can handle, see Mac/README.txt for more
3516 # information
3517 if test -z "${CC}"
3518 then
3519 found_gcc=
3520 found_clang=
3521 as_save_IFS=$IFS; IFS=:
3522 for as_dir in $PATH
3523 do
3524 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003525 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003526 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003527 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003528 fi
3529 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003530 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003531 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003532 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003533 fi
3534 fi
3535 done
3536 IFS=$as_save_IFS
3537
3538 if test -n "$found_gcc" -a -n "$found_clang"
3539 then
3540 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3541 then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3543$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3544 CC="$found_clang"
3545 CXX="$found_clang++"
3546 fi
3547
3548
3549 elif test -z "$found_gcc" -a -n "$found_clang"
3550 then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3552$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3553 CC="$found_clang"
3554 CXX="$found_clang++"
3555
3556 elif test -z "$found_gcc" -a -z "$found_clang"
3557 then
3558 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3559 if test -n "${found_clang}"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3562$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3563 CC="${found_clang}"
3564 CXX="`/usr/bin/xcrun -find clang++`"
3565
3566 # else: use default behaviour
3567 fi
3568 fi
3569 fi
3570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003571ac_ext=c
3572ac_cpp='$CPP $CPPFLAGS'
3573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3575ac_compiler_gnu=$ac_cv_c_compiler_gnu
3576if test -n "$ac_tool_prefix"; then
3577 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3578set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003581if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003583else
3584 if test -n "$CC"; then
3585 ac_cv_prog_CC="$CC" # Let the user override the test.
3586else
Martin v. Löwis11437992002-04-12 09:54:03 +00003587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3588for as_dir in $PATH
3589do
3590 IFS=$as_save_IFS
3591 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $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 +00003596 break 2
3597 fi
3598done
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003601
Jack Jansendd19cf82001-12-06 22:36:17 +00003602fi
3603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003604CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003605if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3607$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003608else
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3610$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615if test -z "$ac_cv_prog_CC"; then
3616 ac_ct_CC=$CC
3617 # Extract the first word of "gcc", so it can be a program name with args.
3618set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3620$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003621if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003623else
3624 if test -n "$ac_ct_CC"; then
3625 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3626else
3627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3628for as_dir in $PATH
3629do
3630 IFS=$as_save_IFS
3631 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $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 +00003636 break 2
3637 fi
3638done
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003641
3642fi
3643fi
3644ac_ct_CC=$ac_cv_prog_ac_ct_CC
3645if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3647$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003648else
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651fi
3652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 if test "x$ac_ct_CC" = x; then
3654 CC=""
3655 else
3656 case $cross_compiling:$ac_tool_warned in
3657yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660ac_tool_warned=yes ;;
3661esac
3662 CC=$ac_ct_CC
3663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003664else
3665 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003666fi
3667
Jack Jansendd19cf82001-12-06 22:36:17 +00003668if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 if test -n "$ac_tool_prefix"; then
3670 # 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 +00003671set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3673$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003674if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003676else
3677 if test -n "$CC"; then
3678 ac_cv_prog_CC="$CC" # Let the user override the test.
3679else
Martin v. Löwis11437992002-04-12 09:54:03 +00003680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 $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 +00003689 break 2
3690 fi
3691done
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003694
3695fi
3696fi
3697CC=$ac_cv_prog_CC
3698if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3700$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3703$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704fi
3705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706
Martin v. Löwis11437992002-04-12 09:54:03 +00003707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003708fi
3709if test -z "$CC"; then
3710 # Extract the first word of "cc", so it can be a program name with args.
3711set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3713$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003714if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003716else
3717 if test -n "$CC"; then
3718 ac_cv_prog_CC="$CC" # Let the user override the test.
3719else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3722for as_dir in $PATH
3723do
3724 IFS=$as_save_IFS
3725 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3729 ac_prog_rejected=yes
3730 continue
3731 fi
3732 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $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 +00003734 break 2
3735 fi
3736done
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740if test $ac_prog_rejected = yes; then
3741 # We found a bogon in the path, so make sure we never use it.
3742 set dummy $ac_cv_prog_CC
3743 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745 # We chose a different compiler from the bogus one.
3746 # However, it has the same basename, so the bogon will be chosen
3747 # first if we set CC to just the basename; use the full file name.
3748 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003749 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750 fi
3751fi
3752fi
3753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3757$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761fi
3762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764fi
3765if test -z "$CC"; then
3766 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 do
3769 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3770set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003773if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003775else
3776 if test -n "$CC"; then
3777 ac_cv_prog_CC="$CC" # Let the user override the test.
3778else
Martin v. Löwis11437992002-04-12 09:54:03 +00003779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780for as_dir in $PATH
3781do
3782 IFS=$as_save_IFS
3783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $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 +00003788 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003789 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003790done
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003793
3794fi
3795fi
3796CC=$ac_cv_prog_CC
3797if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800else
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003803fi
3804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 test -n "$CC" && break
3807 done
3808fi
3809if test -z "$CC"; then
3810 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003812do
3813 # Extract the first word of "$ac_prog", so it can be a program name with args.
3814set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3816$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003817if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
3820 if test -n "$ac_ct_CC"; then
3821 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3822else
3823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3824for as_dir in $PATH
3825do
3826 IFS=$as_save_IFS
3827 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $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 +00003832 break 2
3833 fi
3834done
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
3839fi
3840ac_ct_CC=$ac_cv_prog_ac_ct_CC
3841if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3843$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003844else
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3846$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003847fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850 test -n "$ac_ct_CC" && break
3851done
Michael W. Hudson54241132001-12-07 15:38:26 +00003852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853 if test "x$ac_ct_CC" = x; then
3854 CC=""
3855 else
3856 case $cross_compiling:$ac_tool_warned in
3857yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860ac_tool_warned=yes ;;
3861esac
3862 CC=$ac_ct_CC
3863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003864fi
3865
3866fi
3867
3868
Matthias Kloseb9621712010-04-24 17:59:49 +00003869test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003871as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003872See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003873
3874# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3876set X $ac_compile
3877ac_compiler=$2
3878for ac_option in --version -v -V -qversion; do
3879 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880case "(($ac_try" in
3881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3882 *) ac_try_echo=$ac_try;;
3883esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3885$as_echo "$ac_try_echo"; } >&5
3886 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003887 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 if test -s conftest.err; then
3889 sed '10a\
3890... rest of stderr output deleted ...
3891 10q' conftest.err >conftest.er1
3892 cat conftest.er1 >&5
3893 fi
3894 rm -f conftest.er1 conftest.err
3895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3896 test $ac_status = 0; }
3897done
Martin v. Löwis11437992002-04-12 09:54:03 +00003898
Matthias Kloseb9621712010-04-24 17:59:49 +00003899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003900/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003901
Martin v. Löwis11437992002-04-12 09:54:03 +00003902int
3903main ()
3904{
3905
3906 ;
3907 return 0;
3908}
3909_ACEOF
3910ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003911ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003912# Try to create an executable without -o first, disregard a.out.
3913# It will help us diagnose broken compilers, and finding out an intuition
3914# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3916$as_echo_n "checking whether the C compiler works... " >&6; }
3917ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3918
3919# The possible output files:
3920ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922ac_rmfiles=
3923for ac_file in $ac_files
3924do
3925 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3928 esac
3929done
3930rm -f $ac_rmfiles
3931
Matthias Kloseb9621712010-04-24 17:59:49 +00003932if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933case "(($ac_try" in
3934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935 *) ac_try_echo=$ac_try;;
3936esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003940 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3944# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3945# in a Makefile. We should not override ac_cv_exeext if it was cached,
3946# so that the user can short-circuit this test for compilers unknown to
3947# Autoconf.
3948for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003949do
3950 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 ;;
3954 [ab].out )
3955 # We found the default executable, but exeext='' is most
3956 # certainly right.
3957 break;;
3958 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 then :; else
3961 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3962 fi
3963 # We set ac_cv_exeext here because the later test for it is not
3964 # safe: cross compilers may not add the suffix if given an `-o'
3965 # argument, so we may need to know it at that point already.
3966 # Even if this section looks crufty: it has the advantage of
3967 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003968 break;;
3969 * )
3970 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 esac
3972done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973test "$ac_cv_exeext" = no && ac_cv_exeext=
3974
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003975else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976 ac_file=''
3977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003978if test -z "$ac_file"; then :
3979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3980$as_echo "no" >&6; }
3981$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003982sed 's/^/| /' conftest.$ac_ext >&5
3983
Matthias Kloseb9621712010-04-24 17:59:49 +00003984{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003986as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003987See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003988else
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3990$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3993$as_echo_n "checking for C compiler default output file name... " >&6; }
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3995$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997
Matthias Kloseb9621712010-04-24 17:59:49 +00003998rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4001$as_echo_n "checking for suffix of executables... " >&6; }
4002if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4008$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004010 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4012 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4014# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4015# work properly (i.e., refer to `conftest.exe'), while it won't with
4016# `rm'.
4017for ac_file in conftest.exe conftest conftest.*; do
4018 test -f "$ac_file" || continue
4019 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4022 break;;
4023 * ) break;;
4024 esac
4025done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026else
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004029as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004030See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004032rm -f conftest conftest$ac_cv_exeext
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4034$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035
4036rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004037EXEEXT=$ac_cv_exeext
4038ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4040/* end confdefs.h. */
4041#include <stdio.h>
4042int
4043main ()
4044{
4045FILE *f = fopen ("conftest.out", "w");
4046 return ferror (f) || fclose (f) != 0;
4047
4048 ;
4049 return 0;
4050}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004052ac_clean_files="$ac_clean_files conftest.out"
4053# Check that the compiler produces executables we can run. If not, either
4054# the compiler is broken, or we cross compile.
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4056$as_echo_n "checking whether we are cross compiling... " >&6; }
4057if test "$cross_compiling" != yes; then
4058 { { ac_try="$ac_link"
4059case "(($ac_try" in
4060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4061 *) ac_try_echo=$ac_try;;
4062esac
4063eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4064$as_echo "$ac_try_echo"; } >&5
4065 (eval "$ac_link") 2>&5
4066 ac_status=$?
4067 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4068 test $ac_status = 0; }
4069 if { ac_try='./conftest$ac_cv_exeext'
4070 { { case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
4076 (eval "$ac_try") 2>&5
4077 ac_status=$?
4078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }; }; then
4080 cross_compiling=no
4081 else
4082 if test "$cross_compiling" = maybe; then
4083 cross_compiling=yes
4084 else
4085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004087as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004088If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004089See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 fi
4091 fi
4092fi
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4094$as_echo "$cross_compiling" >&6; }
4095
4096rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4097ac_clean_files=$ac_clean_files_save
4098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4099$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004100if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 $as_echo_n "(cached) " >&6
4102else
4103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004104/* end confdefs.h. */
4105
4106int
4107main ()
4108{
4109
4110 ;
4111 return 0;
4112}
4113_ACEOF
4114rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004115if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116case "(($ac_try" in
4117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4118 *) ac_try_echo=$ac_try;;
4119esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4121$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4125 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126 for ac_file in conftest.o conftest.obj conftest.*; do
4127 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4131 break;;
4132 esac
4133done
4134else
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004136sed 's/^/| /' conftest.$ac_ext >&5
4137
Matthias Kloseb9621712010-04-24 17:59:49 +00004138{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004140as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004141See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004143rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4146$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004147OBJEXT=$ac_cv_objext
4148ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4150$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004151if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
Martin v. Löwis11437992002-04-12 09:54:03 +00004157int
4158main ()
4159{
4160#ifndef __GNUC__
4161 choke me
4162#endif
4163
4164 ;
4165 return 0;
4166}
4167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 ac_compiler_gnu=yes
4170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004174ac_cv_c_compiler_gnu=$ac_compiler_gnu
4175
4176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4178$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4179if test $ac_compiler_gnu = yes; then
4180 GCC=yes
4181else
4182 GCC=
4183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004184ac_test_CFLAGS=${CFLAGS+set}
4185ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4187$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004188if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004190else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191 ac_save_c_werror_flag=$ac_c_werror_flag
4192 ac_c_werror_flag=yes
4193 ac_cv_prog_cc_g=no
4194 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004197
Martin v. Löwis11437992002-04-12 09:54:03 +00004198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004207 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208else
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 CFLAGS=""
4210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004211/* end confdefs.h. */
4212
4213int
4214main ()
4215{
4216
4217 ;
4218 return 0;
4219}
4220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004221if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222
Matthias Kloseb9621712010-04-24 17:59:49 +00004223else
4224 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227/* end confdefs.h. */
4228
4229int
4230main ()
4231{
4232
4233 ;
4234 return 0;
4235}
4236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004237if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245 ac_c_werror_flag=$ac_save_c_werror_flag
4246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4248$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004250 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251elif test $ac_cv_prog_cc_g = yes; then
4252 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253 CFLAGS="-g -O2"
4254 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004255 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256 fi
4257else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258 if test "$GCC" = yes; then
4259 CFLAGS="-O2"
4260 else
4261 CFLAGS=
4262 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4265$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004266if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004268else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004270ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004272/* end confdefs.h. */
4273#include <stdarg.h>
4274#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004275struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004276/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4277struct buf { int x; };
4278FILE * (*rcsopen) (struct buf *, struct stat *, int);
4279static char *e (p, i)
4280 char **p;
4281 int i;
4282{
4283 return p[i];
4284}
4285static char *f (char * (*g) (char **, int), char **p, ...)
4286{
4287 char *s;
4288 va_list v;
4289 va_start (v,p);
4290 s = g (p, va_arg (v,int));
4291 va_end (v);
4292 return s;
4293}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294
4295/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4296 function prototypes and stuff, but not '\xHH' hex character constants.
4297 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004299 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4300 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4305 inside strings and character constants. */
4306#define FOO(x) 'x'
4307int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4308
Skip Montanaro6dead952003-09-25 14:50:04 +00004309int test (int i, double x);
4310struct s1 {int (*f) (int a);};
4311struct s2 {int (*f) (double a);};
4312int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4313int argc;
4314char **argv;
4315int
4316main ()
4317{
4318return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4319 ;
4320 return 0;
4321}
4322_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4324 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004325do
4326 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330rm -f core conftest.err conftest.$ac_objext
4331 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004332done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004334CC=$ac_save_CC
4335
4336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337# AC_CACHE_VAL
4338case "x$ac_cv_prog_cc_c89" in
4339 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4341$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4344$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004345 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4348$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004349esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004350if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004353
Martin v. Löwis11437992002-04-12 09:54:03 +00004354ac_ext=c
4355ac_cpp='$CPP $CPPFLAGS'
4356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4358ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004360ac_ext=c
4361ac_cpp='$CPP $CPPFLAGS'
4362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4364ac_compiler_gnu=$ac_cv_c_compiler_gnu
4365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4366$as_echo_n "checking how to run the C preprocessor... " >&6; }
4367# On Suns, sometimes $CPP names a directory.
4368if test -n "$CPP" && test -d "$CPP"; then
4369 CPP=
4370fi
4371if test -z "$CPP"; then
4372 if ${ac_cv_prog_CPP+:} false; then :
4373 $as_echo_n "(cached) " >&6
4374else
4375 # Double quotes because CPP needs to be expanded
4376 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4377 do
4378 ac_preproc_ok=false
4379for ac_c_preproc_warn_flag in '' yes
4380do
4381 # Use a header file that comes with gcc, so configuring glibc
4382 # with a fresh cross-compiler works.
4383 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4384 # <limits.h> exists even on freestanding compilers.
4385 # On the NeXT, cc -E runs the code through the compiler's parser,
4386 # not just through cpp. "Syntax error" is here to catch this case.
4387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4388/* end confdefs.h. */
4389#ifdef __STDC__
4390# include <limits.h>
4391#else
4392# include <assert.h>
4393#endif
4394 Syntax error
4395_ACEOF
4396if ac_fn_c_try_cpp "$LINENO"; then :
4397
4398else
4399 # Broken: fails on valid input.
4400continue
4401fi
4402rm -f conftest.err conftest.i conftest.$ac_ext
4403
4404 # OK, works on sane cases. Now check whether nonexistent headers
4405 # can be detected and how.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#include <ac_nonexistent.h>
4409_ACEOF
4410if ac_fn_c_try_cpp "$LINENO"; then :
4411 # Broken: success on invalid input.
4412continue
4413else
4414 # Passes both tests.
4415ac_preproc_ok=:
4416break
4417fi
4418rm -f conftest.err conftest.i conftest.$ac_ext
4419
4420done
4421# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4422rm -f conftest.i conftest.err conftest.$ac_ext
4423if $ac_preproc_ok; then :
4424 break
4425fi
4426
4427 done
4428 ac_cv_prog_CPP=$CPP
4429
4430fi
4431 CPP=$ac_cv_prog_CPP
4432else
4433 ac_cv_prog_CPP=$CPP
4434fi
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4436$as_echo "$CPP" >&6; }
4437ac_preproc_ok=false
4438for ac_c_preproc_warn_flag in '' yes
4439do
4440 # Use a header file that comes with gcc, so configuring glibc
4441 # with a fresh cross-compiler works.
4442 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4443 # <limits.h> exists even on freestanding compilers.
4444 # On the NeXT, cc -E runs the code through the compiler's parser,
4445 # not just through cpp. "Syntax error" is here to catch this case.
4446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447/* end confdefs.h. */
4448#ifdef __STDC__
4449# include <limits.h>
4450#else
4451# include <assert.h>
4452#endif
4453 Syntax error
4454_ACEOF
4455if ac_fn_c_try_cpp "$LINENO"; then :
4456
4457else
4458 # Broken: fails on valid input.
4459continue
4460fi
4461rm -f conftest.err conftest.i conftest.$ac_ext
4462
4463 # OK, works on sane cases. Now check whether nonexistent headers
4464 # can be detected and how.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#include <ac_nonexistent.h>
4468_ACEOF
4469if ac_fn_c_try_cpp "$LINENO"; then :
4470 # Broken: success on invalid input.
4471continue
4472else
4473 # Passes both tests.
4474ac_preproc_ok=:
4475break
4476fi
4477rm -f conftest.err conftest.i conftest.$ac_ext
4478
4479done
4480# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4481rm -f conftest.i conftest.err conftest.$ac_ext
4482if $ac_preproc_ok; then :
4483
4484else
4485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4487as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4488See \`config.log' for more details" "$LINENO" 5; }
4489fi
4490
4491ac_ext=c
4492ac_cpp='$CPP $CPPFLAGS'
4493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495ac_compiler_gnu=$ac_cv_c_compiler_gnu
4496
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4498$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4499if ${ac_cv_path_GREP+:} false; then :
4500 $as_echo_n "(cached) " >&6
4501else
4502 if test -z "$GREP"; then
4503 ac_path_GREP_found=false
4504 # Loop through the user's path and test for each of PROGNAME-LIST
4505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4506for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4507do
4508 IFS=$as_save_IFS
4509 test -z "$as_dir" && as_dir=.
4510 for ac_prog in grep ggrep; do
4511 for ac_exec_ext in '' $ac_executable_extensions; do
4512 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4513 as_fn_executable_p "$ac_path_GREP" || continue
4514# Check for GNU ac_path_GREP and select it if it is found.
4515 # Check for GNU $ac_path_GREP
4516case `"$ac_path_GREP" --version 2>&1` in
4517*GNU*)
4518 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4519*)
4520 ac_count=0
4521 $as_echo_n 0123456789 >"conftest.in"
4522 while :
4523 do
4524 cat "conftest.in" "conftest.in" >"conftest.tmp"
4525 mv "conftest.tmp" "conftest.in"
4526 cp "conftest.in" "conftest.nl"
4527 $as_echo 'GREP' >> "conftest.nl"
4528 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4529 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4530 as_fn_arith $ac_count + 1 && ac_count=$as_val
4531 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4532 # Best one so far, save it but keep looking for a better one
4533 ac_cv_path_GREP="$ac_path_GREP"
4534 ac_path_GREP_max=$ac_count
4535 fi
4536 # 10*(2^10) chars as input seems more than enough
4537 test $ac_count -gt 10 && break
4538 done
4539 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4540esac
4541
4542 $ac_path_GREP_found && break 3
4543 done
4544 done
4545 done
4546IFS=$as_save_IFS
4547 if test -z "$ac_cv_path_GREP"; then
4548 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4549 fi
4550else
4551 ac_cv_path_GREP=$GREP
4552fi
4553
4554fi
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4556$as_echo "$ac_cv_path_GREP" >&6; }
4557 GREP="$ac_cv_path_GREP"
4558
4559
Łukasz Langaa785c872016-09-09 17:37:37 -07004560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4561$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4562if ${ac_cv_path_SED+:} false; then :
4563 $as_echo_n "(cached) " >&6
4564else
4565 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4566 for ac_i in 1 2 3 4 5 6 7; do
4567 ac_script="$ac_script$as_nl$ac_script"
4568 done
4569 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4570 { ac_script=; unset ac_script;}
4571 if test -z "$SED"; then
4572 ac_path_SED_found=false
4573 # Loop through the user's path and test for each of PROGNAME-LIST
4574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575for as_dir in $PATH
4576do
4577 IFS=$as_save_IFS
4578 test -z "$as_dir" && as_dir=.
4579 for ac_prog in sed gsed; do
4580 for ac_exec_ext in '' $ac_executable_extensions; do
4581 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4582 as_fn_executable_p "$ac_path_SED" || continue
4583# Check for GNU ac_path_SED and select it if it is found.
4584 # Check for GNU $ac_path_SED
4585case `"$ac_path_SED" --version 2>&1` in
4586*GNU*)
4587 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4588*)
4589 ac_count=0
4590 $as_echo_n 0123456789 >"conftest.in"
4591 while :
4592 do
4593 cat "conftest.in" "conftest.in" >"conftest.tmp"
4594 mv "conftest.tmp" "conftest.in"
4595 cp "conftest.in" "conftest.nl"
4596 $as_echo '' >> "conftest.nl"
4597 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4598 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4599 as_fn_arith $ac_count + 1 && ac_count=$as_val
4600 if test $ac_count -gt ${ac_path_SED_max-0}; then
4601 # Best one so far, save it but keep looking for a better one
4602 ac_cv_path_SED="$ac_path_SED"
4603 ac_path_SED_max=$ac_count
4604 fi
4605 # 10*(2^10) chars as input seems more than enough
4606 test $ac_count -gt 10 && break
4607 done
4608 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4609esac
4610
4611 $ac_path_SED_found && break 3
4612 done
4613 done
4614 done
4615IFS=$as_save_IFS
4616 if test -z "$ac_cv_path_SED"; then
4617 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4618 fi
4619else
4620 ac_cv_path_SED=$SED
4621fi
4622
4623fi
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4625$as_echo "$ac_cv_path_SED" >&6; }
4626 SED="$ac_cv_path_SED"
4627 rm -f conftest.sed
4628
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004629
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004630
4631
Matthias Kloseb9621712010-04-24 17:59:49 +00004632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4633$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004636if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004637 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004638
4639 case $withval in
4640 no) with_cxx_main=no
4641 MAINCC='$(CC)';;
4642 yes) with_cxx_main=yes
4643 MAINCC='$(CXX)';;
4644 *) with_cxx_main=yes
4645 MAINCC=$withval
4646 if test -z "$CXX"
4647 then
4648 CXX=$withval
4649 fi;;
4650 esac
4651else
4652
4653 with_cxx_main=no
4654 MAINCC='$(CC)'
4655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656fi
4657
Matthias Kloseb9621712010-04-24 17:59:49 +00004658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4659$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660
4661preset_cxx="$CXX"
4662if test -z "$CXX"
4663then
4664 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004665 gcc) if test -n "$ac_tool_prefix"; then
4666 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4667set dummy ${ac_tool_prefix}g++; ac_word=$2
4668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669$as_echo_n "checking for $ac_word... " >&6; }
4670if ${ac_cv_path_CXX+:} false; then :
4671 $as_echo_n "(cached) " >&6
4672else
4673 case $CXX in
4674 [\\/]* | ?:[\\/]*)
4675 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4676 ;;
4677 *)
4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679for as_dir in notfound
4680do
4681 IFS=$as_save_IFS
4682 test -z "$as_dir" && as_dir=.
4683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004685 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687 break 2
4688 fi
4689done
4690 done
4691IFS=$as_save_IFS
4692
4693 ;;
4694esac
4695fi
4696CXX=$ac_cv_path_CXX
4697if test -n "$CXX"; then
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4699$as_echo "$CXX" >&6; }
4700else
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702$as_echo "no" >&6; }
4703fi
4704
4705
4706fi
4707if test -z "$ac_cv_path_CXX"; then
4708 ac_pt_CXX=$CXX
4709 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4712$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004713if ${ac_cv_path_ac_pt_CXX+:} false; then :
4714 $as_echo_n "(cached) " >&6
4715else
4716 case $ac_pt_CXX in
4717 [\\/]* | ?:[\\/]*)
4718 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4719 ;;
4720 *)
4721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4722for as_dir in notfound
4723do
4724 IFS=$as_save_IFS
4725 test -z "$as_dir" && as_dir=.
4726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4730 break 2
4731 fi
4732done
4733 done
4734IFS=$as_save_IFS
4735
4736 ;;
4737esac
4738fi
4739ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4740if test -n "$ac_pt_CXX"; then
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4742$as_echo "$ac_pt_CXX" >&6; }
4743else
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745$as_echo "no" >&6; }
4746fi
4747
4748 if test "x$ac_pt_CXX" = x; then
4749 CXX="g++"
4750 else
4751 case $cross_compiling:$ac_tool_warned in
4752yes:)
4753{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4754$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4755ac_tool_warned=yes ;;
4756esac
4757 CXX=$ac_pt_CXX
4758 fi
4759else
4760 CXX="$ac_cv_path_CXX"
4761fi
4762 ;;
4763 cc) if test -n "$ac_tool_prefix"; then
4764 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4765set dummy ${ac_tool_prefix}c++; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004768if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770else
4771 case $CXX in
4772 [\\/]* | ?:[\\/]*)
4773 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4774 ;;
4775 *)
4776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in notfound
4778do
4779 IFS=$as_save_IFS
4780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 break 2
4786 fi
4787done
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004789IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 ;;
4792esac
4793fi
4794CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4797$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798else
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803
4804fi
4805if test -z "$ac_cv_path_CXX"; then
4806 ac_pt_CXX=$CXX
4807 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 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 +00004817 ;;
4818 *)
4819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4820for as_dir in notfound
4821do
4822 IFS=$as_save_IFS
4823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 break 2
4829 fi
4830done
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004832IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834 ;;
4835esac
4836fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4838if test -n "$ac_pt_CXX"; then
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4840$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004841else
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004845
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 if test "x$ac_pt_CXX" = x; then
4847 CXX="c++"
4848 else
4849 case $cross_compiling:$ac_tool_warned in
4850yes:)
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4853ac_tool_warned=yes ;;
4854esac
4855 CXX=$ac_pt_CXX
4856 fi
4857else
4858 CXX="$ac_cv_path_CXX"
4859fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004861 clang|*/clang) if test -n "$ac_tool_prefix"; then
4862 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4863set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865$as_echo_n "checking for $ac_word... " >&6; }
4866if ${ac_cv_path_CXX+:} false; then :
4867 $as_echo_n "(cached) " >&6
4868else
4869 case $CXX in
4870 [\\/]* | ?:[\\/]*)
4871 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4872 ;;
4873 *)
4874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4875for as_dir in notfound
4876do
4877 IFS=$as_save_IFS
4878 test -z "$as_dir" && as_dir=.
4879 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004881 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4883 break 2
4884 fi
4885done
4886 done
4887IFS=$as_save_IFS
4888
Ned Deilycbfb9a52012-06-23 16:02:19 -07004889 ;;
4890esac
4891fi
4892CXX=$ac_cv_path_CXX
4893if test -n "$CXX"; then
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4895$as_echo "$CXX" >&6; }
4896else
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4898$as_echo "no" >&6; }
4899fi
4900
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004901
4902fi
4903if test -z "$ac_cv_path_CXX"; then
4904 ac_pt_CXX=$CXX
4905 # Extract the first word of "clang++", so it can be a program name with args.
4906set dummy clang++; ac_word=$2
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908$as_echo_n "checking for $ac_word... " >&6; }
4909if ${ac_cv_path_ac_pt_CXX+:} false; then :
4910 $as_echo_n "(cached) " >&6
4911else
4912 case $ac_pt_CXX in
4913 [\\/]* | ?:[\\/]*)
4914 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4915 ;;
4916 *)
4917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in notfound
4919do
4920 IFS=$as_save_IFS
4921 test -z "$as_dir" && as_dir=.
4922 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004924 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926 break 2
4927 fi
4928done
4929 done
4930IFS=$as_save_IFS
4931
4932 ;;
4933esac
4934fi
4935ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4936if test -n "$ac_pt_CXX"; then
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4938$as_echo "$ac_pt_CXX" >&6; }
4939else
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944 if test "x$ac_pt_CXX" = x; then
4945 CXX="clang++"
4946 else
4947 case $cross_compiling:$ac_tool_warned in
4948yes:)
4949{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4950$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4951ac_tool_warned=yes ;;
4952esac
4953 CXX=$ac_pt_CXX
4954 fi
4955else
4956 CXX="$ac_cv_path_CXX"
4957fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004958 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004959 icc|*/icc) if test -n "$ac_tool_prefix"; then
4960 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4961set dummy ${ac_tool_prefix}icpc; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
4964if ${ac_cv_path_CXX+:} false; then :
4965 $as_echo_n "(cached) " >&6
4966else
4967 case $CXX in
4968 [\\/]* | ?:[\\/]*)
4969 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4970 ;;
4971 *)
4972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in notfound
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
4977 for ac_exec_ext in '' $ac_executable_extensions; do
4978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4979 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981 break 2
4982 fi
4983done
4984 done
4985IFS=$as_save_IFS
4986
4987 ;;
4988esac
4989fi
4990CXX=$ac_cv_path_CXX
4991if test -n "$CXX"; then
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4993$as_echo "$CXX" >&6; }
4994else
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
4997fi
4998
4999
5000fi
5001if test -z "$ac_cv_path_CXX"; then
5002 ac_pt_CXX=$CXX
5003 # Extract the first word of "icpc", so it can be a program name with args.
5004set dummy icpc; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
5007if ${ac_cv_path_ac_pt_CXX+:} false; then :
5008 $as_echo_n "(cached) " >&6
5009else
5010 case $ac_pt_CXX in
5011 [\\/]* | ?:[\\/]*)
5012 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5013 ;;
5014 *)
5015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in notfound
5017do
5018 IFS=$as_save_IFS
5019 test -z "$as_dir" && as_dir=.
5020 for ac_exec_ext in '' $ac_executable_extensions; do
5021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5022 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024 break 2
5025 fi
5026done
5027 done
5028IFS=$as_save_IFS
5029
5030 ;;
5031esac
5032fi
5033ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5034if test -n "$ac_pt_CXX"; then
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5036$as_echo "$ac_pt_CXX" >&6; }
5037else
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
5040fi
5041
5042 if test "x$ac_pt_CXX" = x; then
5043 CXX="icpc"
5044 else
5045 case $cross_compiling:$ac_tool_warned in
5046yes:)
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5048$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5049ac_tool_warned=yes ;;
5050esac
5051 CXX=$ac_pt_CXX
5052 fi
5053else
5054 CXX="$ac_cv_path_CXX"
5055fi
5056 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057 esac
5058 if test "$CXX" = "notfound"
5059 then
5060 CXX=""
5061 fi
5062fi
5063if test -z "$CXX"
5064then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005065 if test -n "$ac_tool_prefix"; then
5066 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5067 do
5068 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5069set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005072if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005074else
5075 if test -n "$CXX"; then
5076 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5077else
5078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081 IFS=$as_save_IFS
5082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005085 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087 break 2
5088 fi
5089done
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005092
5093fi
5094fi
5095CXX=$ac_cv_prog_CXX
5096if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5098$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099else
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102fi
5103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005105 test -n "$CXX" && break
5106 done
5107fi
5108if test -z "$CXX"; then
5109 ac_ct_CXX=$CXX
5110 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5111do
5112 # Extract the first word of "$ac_prog", so it can be a program name with args.
5113set dummy $ac_prog; ac_word=$2
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5115$as_echo_n "checking for $ac_word... " >&6; }
5116if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5117 $as_echo_n "(cached) " >&6
5118else
5119 if test -n "$ac_ct_CXX"; then
5120 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5121else
5122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125 IFS=$as_save_IFS
5126 test -z "$as_dir" && as_dir=.
5127 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005129 ac_cv_prog_ac_ct_CXX="$ac_prog"
5130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5131 break 2
5132 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 done
5135IFS=$as_save_IFS
5136
5137fi
5138fi
5139ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5140if test -n "$ac_ct_CXX"; then
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5142$as_echo "$ac_ct_CXX" >&6; }
5143else
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145$as_echo "no" >&6; }
5146fi
5147
5148
5149 test -n "$ac_ct_CXX" && break
5150done
5151
5152 if test "x$ac_ct_CXX" = x; then
5153 CXX="notfound"
5154 else
5155 case $cross_compiling:$ac_tool_warned in
5156yes:)
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5159ac_tool_warned=yes ;;
5160esac
5161 CXX=$ac_ct_CXX
5162 fi
5163fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005164
5165 if test "$CXX" = "notfound"
5166 then
5167 CXX=""
5168 fi
5169fi
5170if test "$preset_cxx" != "$CXX"
5171then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005172 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005173
5174 By default, distutils will build C++ extension modules with \"$CXX\".
5175 If this is not intended, then set CXX on the configure command line.
5176 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005177$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005178
5179 By default, distutils will build C++ extension modules with \"$CXX\".
5180 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005181 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182fi
5183
5184
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005185MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5186
5187
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5189$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5190cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005191#undef bfin
5192#undef cris
5193#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005194#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005195#undef hppa
5196#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005199#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005200#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005201#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005202#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005203 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005204#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005205# if defined(__x86_64__) && defined(__LP64__)
5206 x86_64-linux-gnu
5207# elif defined(__x86_64__) && defined(__ILP32__)
5208 x86_64-linux-gnux32
5209# elif defined(__i386__)
5210 i386-linux-gnu
5211# elif defined(__aarch64__) && defined(__AARCH64EL__)
5212# if defined(__ILP32__)
5213 aarch64_ilp32-linux-gnu
5214# else
5215 aarch64-linux-gnu
5216# endif
5217# elif defined(__aarch64__) && defined(__AARCH64EB__)
5218# if defined(__ILP32__)
5219 aarch64_be_ilp32-linux-gnu
5220# else
5221 aarch64_be-linux-gnu
5222# endif
5223# elif defined(__alpha__)
5224 alpha-linux-gnu
5225# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5226# if defined(__ARMEL__)
5227 arm-linux-gnueabihf
5228# else
5229 armeb-linux-gnueabihf
5230# endif
5231# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5232# if defined(__ARMEL__)
5233 arm-linux-gnueabi
5234# else
5235 armeb-linux-gnueabi
5236# endif
5237# elif defined(__hppa__)
5238 hppa-linux-gnu
5239# elif defined(__ia64__)
5240 ia64-linux-gnu
5241# elif defined(__m68k__) && !defined(__mcoldfire__)
5242 m68k-linux-gnu
5243# elif defined(__mips_hard_float) && defined(_MIPSEL)
5244# if _MIPS_SIM == _ABIO32
5245 mipsel-linux-gnu
5246# elif _MIPS_SIM == _ABIN32
5247 mips64el-linux-gnuabin32
5248# elif _MIPS_SIM == _ABI64
5249 mips64el-linux-gnuabi64
5250# else
5251# error unknown platform triplet
5252# endif
5253# elif defined(__mips_hard_float)
5254# if _MIPS_SIM == _ABIO32
5255 mips-linux-gnu
5256# elif _MIPS_SIM == _ABIN32
5257 mips64-linux-gnuabin32
5258# elif _MIPS_SIM == _ABI64
5259 mips64-linux-gnuabi64
5260# else
5261# error unknown platform triplet
5262# endif
5263# elif defined(__or1k__)
5264 or1k-linux-gnu
5265# elif defined(__powerpc__) && defined(__SPE__)
5266 powerpc-linux-gnuspe
5267# elif defined(__powerpc64__)
5268# if defined(__LITTLE_ENDIAN__)
5269 powerpc64le-linux-gnu
5270# else
5271 powerpc64-linux-gnu
5272# endif
5273# elif defined(__powerpc__)
5274 powerpc-linux-gnu
5275# elif defined(__s390x__)
5276 s390x-linux-gnu
5277# elif defined(__s390__)
5278 s390-linux-gnu
5279# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5280 sh4-linux-gnu
5281# elif defined(__sparc__) && defined(__arch64__)
5282 sparc64-linux-gnu
5283# elif defined(__sparc__)
5284 sparc-linux-gnu
5285# else
5286# error unknown platform triplet
5287# endif
5288#elif defined(__FreeBSD_kernel__)
5289# if defined(__LP64__)
5290 x86_64-kfreebsd-gnu
5291# elif defined(__i386__)
5292 i386-kfreebsd-gnu
5293# else
5294# error unknown platform triplet
5295# endif
5296#elif defined(__gnu_hurd__)
5297 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005298#elif defined(__APPLE__)
5299 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300#else
5301# error unknown platform triplet
5302#endif
5303
5304EOF
5305
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005306if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005307 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5309$as_echo "$PLATFORM_TRIPLET" >&6; }
5310else
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5312$as_echo "none" >&6; }
5313fi
5314rm -f conftest.c conftest.out
5315
5316if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5317 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5318 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5319 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005320elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5321 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005323
doko@ubuntu.com55532312016-06-14 08:55:19 +02005324if test x$MULTIARCH != x; then
5325 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5326fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327
5328
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5330$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5331save_LDFLAGS="$LDFLAGS"
5332LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005333
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335/* end confdefs.h. */
5336
5337int
5338main ()
5339{
5340
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345if ac_fn_c_try_link "$LINENO"; then :
5346 NO_AS_NEEDED="-Wl,--no-as-needed"
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5348$as_echo "yes" >&6; }
5349else
5350 NO_AS_NEEDED=""
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354rm -f core conftest.err conftest.$ac_objext \
5355 conftest$ac_exeext conftest.$ac_ext
5356LDFLAGS="$save_LDFLAGS"
5357
5358
5359
5360# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5363$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005364if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366else
5367 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5368 then ac_cv_path_EGREP="$GREP -E"
5369 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 # Loop through the user's path and test for each of PROGNAME-LIST
5373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5375do
5376 IFS=$as_save_IFS
5377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 for ac_prog in egrep; do
5379 for ac_exec_ext in '' $ac_executable_extensions; do
5380 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005381 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005382# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 # Check for GNU $ac_path_EGREP
5384case `"$ac_path_EGREP" --version 2>&1` in
5385*GNU*)
5386 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5387*)
5388 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 while :
5391 do
5392 cat "conftest.in" "conftest.in" >"conftest.tmp"
5393 mv "conftest.tmp" "conftest.in"
5394 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5397 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5400 # Best one so far, save it but keep looking for a better one
5401 ac_cv_path_EGREP="$ac_path_EGREP"
5402 ac_path_EGREP_max=$ac_count
5403 fi
5404 # 10*(2^10) chars as input seems more than enough
5405 test $ac_count -gt 10 && break
5406 done
5407 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5408esac
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $ac_path_EGREP_found && break 3
5411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005416 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 +00005417 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418else
5419 ac_cv_path_EGREP=$EGREP
5420fi
5421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 fi
5423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5425$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005427
5428
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5430$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005431if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $as_echo_n "(cached) " >&6
5433else
5434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005435/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005436#include <stdlib.h>
5437#include <stdarg.h>
5438#include <string.h>
5439#include <float.h>
5440
5441int
5442main ()
5443{
5444
5445 ;
5446 return 0;
5447}
5448_ACEOF
5449if ac_fn_c_try_compile "$LINENO"; then :
5450 ac_cv_header_stdc=yes
5451else
5452 ac_cv_header_stdc=no
5453fi
5454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h. */
5460#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005461
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005462_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005466else
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005469rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
Matthias Kloseb9621712010-04-24 17:59:49 +00005471fi
5472
5473if test $ac_cv_header_stdc = yes; then
5474 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476/* end confdefs.h. */
5477#include <stdlib.h>
5478
5479_ACEOF
5480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5481 $EGREP "free" >/dev/null 2>&1; then :
5482
5483else
5484 ac_cv_header_stdc=no
5485fi
5486rm -f conftest*
5487
5488fi
5489
5490if test $ac_cv_header_stdc = yes; then
5491 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5492 if test "$cross_compiling" = yes; then :
5493 :
5494else
5495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5496/* end confdefs.h. */
5497#include <ctype.h>
5498#include <stdlib.h>
5499#if ((' ' & 0x0FF) == 0x020)
5500# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5501# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5502#else
5503# define ISLOWER(c) \
5504 (('a' <= (c) && (c) <= 'i') \
5505 || ('j' <= (c) && (c) <= 'r') \
5506 || ('s' <= (c) && (c) <= 'z'))
5507# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5508#endif
5509
5510#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5511int
5512main ()
5513{
5514 int i;
5515 for (i = 0; i < 256; i++)
5516 if (XOR (islower (i), ISLOWER (i))
5517 || toupper (i) != TOUPPER (i))
5518 return 2;
5519 return 0;
5520}
5521_ACEOF
5522if ac_fn_c_try_run "$LINENO"; then :
5523
5524else
5525 ac_cv_header_stdc=no
5526fi
5527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5528 conftest.$ac_objext conftest.beam conftest.$ac_ext
5529fi
5530
5531fi
5532fi
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5534$as_echo "$ac_cv_header_stdc" >&6; }
5535if test $ac_cv_header_stdc = yes; then
5536
5537$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5538
5539fi
5540
5541# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5542for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5543 inttypes.h stdint.h unistd.h
5544do :
5545 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5546ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5547"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005548if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 cat >>confdefs.h <<_ACEOF
5550#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5551_ACEOF
5552
5553fi
5554
5555done
5556
5557
5558
5559 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 +02005560if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 MINIX=yes
5562else
5563 MINIX=
5564fi
5565
5566
5567 if test "$MINIX" = yes; then
5568
5569$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5570
5571
5572$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5573
5574
5575$as_echo "#define _MINIX 1" >>confdefs.h
5576
5577 fi
5578
5579
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5581$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005582if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005583 $as_echo_n "(cached) " >&6
5584else
5585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5586/* end confdefs.h. */
5587
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005588# define __EXTENSIONS__ 1
5589 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005590int
5591main ()
5592{
5593
5594 ;
5595 return 0;
5596}
5597_ACEOF
5598if ac_fn_c_try_compile "$LINENO"; then :
5599 ac_cv_safe_to_define___extensions__=yes
5600else
5601 ac_cv_safe_to_define___extensions__=no
5602fi
5603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5604fi
5605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5606$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5607 test $ac_cv_safe_to_define___extensions__ = yes &&
5608 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5609
5610 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5611
5612 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5613
5614 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5615
5616 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5617
5618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619
Xavier de Gaye95750b12016-07-09 11:05:42 +02005620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5621$as_echo_n "checking for the Android API level... " >&6; }
5622cat >> conftest.c <<EOF
5623#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005624android_api = __ANDROID_API__
5625arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005626#else
5627#error not Android
5628#endif
5629EOF
5630
5631if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005632 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5633 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5635$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005636 if test -z "$ANDROID_API_LEVEL"; then
5637 echo 'Fatal: you must define __ANDROID_API__'
5638 exit 1
5639 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005640
5641cat >>confdefs.h <<_ACEOF
5642#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5643_ACEOF
5644
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005645
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5647$as_echo_n "checking for the Android arm ABI... " >&6; }
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5649$as_echo "$_arm_arch" >&6; }
5650 if test "$_arm_arch" = 7; then
5651 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5652 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5653 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005654else
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5656$as_echo "not Android" >&6; }
5657fi
5658rm -f conftest.c conftest.out
5659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660# Check for unsupported systems
5661case $ac_sys_system/$ac_sys_release in
5662atheos*|Linux*/1*)
5663 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5664 echo See README for details.
5665 exit 1;;
5666esac
5667
5668
Matthias Kloseb9621712010-04-24 17:59:49 +00005669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5670$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005673if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 withval=$with_suffix;
5675 case $withval in
5676 no) EXEEXT=;;
5677 yes) EXEEXT=.exe;;
5678 *) EXEEXT=$withval;;
5679 esac
5680fi
5681
Matthias Kloseb9621712010-04-24 17:59:49 +00005682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5683$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
5685# Test whether we're running on a non-case-sensitive system, in which
5686# case we give a warning if no ext is given
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5689$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690if test ! -d CaseSensitiveTestDir; then
5691mkdir CaseSensitiveTestDir
5692fi
5693
5694if test -d casesensitivetestdir
5695then
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5697$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698 BUILDEXEEXT=.exe
5699else
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5701$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 BUILDEXEEXT=$EXEEXT
5703fi
5704rmdir CaseSensitiveTestDir
5705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706case $ac_sys_system in
5707hp*|HP*)
5708 case $CC in
5709 cc|*/cc) CC="$CC -Ae";;
5710 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711esac
5712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5715$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716if test -z "$LIBRARY"
5717then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005718 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5721$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722
5723# LDLIBRARY is the name of the library to link against (as opposed to the
5724# name of the library into which to insert object files). BLDLIBRARY is also
5725# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5726# is blank as the main program is not linked directly against LDLIBRARY.
5727# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5728# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5729# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5730# DLLLIBRARY is the shared (i.e., DLL) library.
5731#
5732# RUNSHARED is used to run shared python without installed libraries
5733#
5734# INSTSONAME is the name of the shared library that will be use to install
5735# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005736#
5737# LDVERSION is the shared library version number, normally the Python version
5738# with the ABI build flags appended.
5739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740
5741
5742
5743
5744
5745
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747LDLIBRARY="$LIBRARY"
5748BLDLIBRARY='$(LDLIBRARY)'
5749INSTSONAME='$(LDLIBRARY)'
5750DLLLIBRARY=''
5751LDLIBRARYDIR=''
5752RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005753LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755# LINKCC is the command that links the python executable -- default is $(CC).
5756# If CXX is set, and if it is needed to link a main function that was
5757# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5758# python might then depend on the C++ runtime
5759# This is altered for AIX in order to build the export list before
5760# linking.
5761
Matthias Kloseb9621712010-04-24 17:59:49 +00005762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5763$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764if test -z "$LINKCC"
5765then
5766 LINKCC='$(PURIFY) $(MAINCC)'
5767 case $ac_sys_system in
5768 AIX*)
5769 exp_extra="\"\""
5770 if test $ac_sys_release -ge 5 -o \
5771 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5772 exp_extra="."
5773 fi
5774 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775 QNX*)
5776 # qcc must be used because the other compilers do not
5777 # support -N.
5778 LINKCC=qcc;;
5779 esac
5780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5782$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5785# make sure we default having it set to "no": this is used by
5786# distutils.unixccompiler to know if it should add --enable-new-dtags
5787# to linker command lines, and failing to detect GNU ld simply results
5788# in the same bahaviour as before.
5789
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5791$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792ac_prog=ld
5793if test "$GCC" = yes; then
5794 ac_prog=`$CC -print-prog-name=ld`
5795fi
5796case `"$ac_prog" -V 2>&1 < /dev/null` in
5797 *GNU*)
5798 GNULD=yes;;
5799 *)
5800 GNULD=no;;
5801esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5803$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5806$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005808if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 enableval=$enable_shared;
5810fi
5811
5812
5813if test -z "$enable_shared"
5814then
5815 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005816 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817 enable_shared="yes";;
5818 *)
5819 enable_shared="no";;
5820 esac
5821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5823$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824
Matthias Kloseb9621712010-04-24 17:59:49 +00005825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5826$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005828if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829 enableval=$enable_profiling;
5830fi
5831
5832if test "x$enable_profiling" = xyes; then
5833 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005834 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836/* end confdefs.h. */
5837int main() { return 0; }
5838_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005839if ac_fn_c_try_link "$LINENO"; then :
5840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005842 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844rm -f core conftest.err conftest.$ac_objext \
5845 conftest$ac_exeext conftest.$ac_ext
5846 CC="$ac_save_cc"
5847else
5848 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5851$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852
doko@ubuntu.comba015832012-06-30 16:52:05 +02005853if test "x$enable_profiling" = xyes; then
5854 BASECFLAGS="-pg $BASECFLAGS"
5855 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856fi
5857
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5859$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
5861# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5862# library that we build, but we do not want to link against it (we
5863# will find it with a -framework option). For this reason there is an
5864# extra variable BLDLIBRARY against which Python and the extension
5865# modules are linked, BLDLIBRARY. This is normally the same as
5866# LDLIBRARY, but empty for MacOSX framework builds.
5867if test "$enable_framework"
5868then
5869 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005870 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871 BLDLIBRARY=''
5872else
5873 BLDLIBRARY='$(LDLIBRARY)'
5874fi
5875
5876# Other platforms follow
5877if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005878 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
Matthias Kloseb9621712010-04-24 17:59:49 +00005880$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
5882 case $ac_sys_system in
5883 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005884 LDLIBRARY='libpython$(LDVERSION).dll.a'
5885 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ;;
5887 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005888 LDLIBRARY='libpython$(LDVERSION).so'
5889 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005890 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005892 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005893 then
5894 PY3LIBRARY=libpython3.so
5895 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005897 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).so'
5899 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005900 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005902 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005903 then
5904 PY3LIBRARY=libpython3.so
5905 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
5907 hp*|HP*)
5908 case `uname -m` in
5909 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
5912 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ;;
5915 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005916 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).dylib'
5921 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005924 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005927 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928
5929 esac
5930else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005931 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 case $ac_sys_system in
5933 CYGWIN*)
5934 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 ;;
5937 esac
5938fi
5939
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005940if test "$cross_compiling" = yes; then
5941 RUNSHARED=
5942fi
5943
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5945$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005948if test -n "$ac_tool_prefix"; then
5949 for ac_prog in ar aal
5950 do
5951 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5952set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5954$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005955if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005956 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957else
5958 if test -n "$AR"; then
5959 ac_cv_prog_AR="$AR" # Let the user override the test.
5960else
5961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5962for as_dir in $PATH
5963do
5964 IFS=$as_save_IFS
5965 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005968 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 break 2
5971 fi
5972done
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974IFS=$as_save_IFS
5975
5976fi
5977fi
5978AR=$ac_cv_prog_AR
5979if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5981$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982else
Matthias Kloseb9621712010-04-24 17:59:49 +00005983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5984$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
5986
5987
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005988 test -n "$AR" && break
5989 done
5990fi
5991if test -z "$AR"; then
5992 ac_ct_AR=$AR
5993 for ac_prog in ar aal
5994do
5995 # Extract the first word of "$ac_prog", so it can be a program name with args.
5996set dummy $ac_prog; ac_word=$2
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998$as_echo_n "checking for $ac_word... " >&6; }
5999if ${ac_cv_prog_ac_ct_AR+:} false; then :
6000 $as_echo_n "(cached) " >&6
6001else
6002 if test -n "$ac_ct_AR"; then
6003 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6004else
6005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008 IFS=$as_save_IFS
6009 test -z "$as_dir" && as_dir=.
6010 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006012 ac_cv_prog_ac_ct_AR="$ac_prog"
6013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6014 break 2
6015 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006017 done
6018IFS=$as_save_IFS
6019
6020fi
6021fi
6022ac_ct_AR=$ac_cv_prog_ac_ct_AR
6023if test -n "$ac_ct_AR"; then
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6025$as_echo "$ac_ct_AR" >&6; }
6026else
6027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
6029fi
6030
6031
6032 test -n "$ac_ct_AR" && break
6033done
6034
6035 if test "x$ac_ct_AR" = x; then
6036 AR="ar"
6037 else
6038 case $cross_compiling:$ac_tool_warned in
6039yes:)
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6042ac_tool_warned=yes ;;
6043esac
6044 AR=$ac_ct_AR
6045 fi
6046fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047
6048
6049# tweak ARFLAGS only if the user didn't set it on the command line
6050
6051if test -z "$ARFLAGS"
6052then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006053 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054fi
6055
doko@ubuntu.com58844492012-06-30 18:25:32 +02006056if test -n "$ac_tool_prefix"; then
6057 for ac_prog in readelf
6058 do
6059 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6060set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6062$as_echo_n "checking for $ac_word... " >&6; }
6063if ${ac_cv_prog_READELF+:} false; then :
6064 $as_echo_n "(cached) " >&6
6065else
6066 if test -n "$READELF"; then
6067 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6068else
6069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6070for as_dir in $PATH
6071do
6072 IFS=$as_save_IFS
6073 test -z "$as_dir" && as_dir=.
6074 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006076 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6078 break 2
6079 fi
6080done
6081 done
6082IFS=$as_save_IFS
6083
6084fi
6085fi
6086READELF=$ac_cv_prog_READELF
6087if test -n "$READELF"; then
6088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6089$as_echo "$READELF" >&6; }
6090else
6091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6092$as_echo "no" >&6; }
6093fi
6094
6095
6096 test -n "$READELF" && break
6097 done
6098fi
6099if test -z "$READELF"; then
6100 ac_ct_READELF=$READELF
6101 for ac_prog in readelf
6102do
6103 # Extract the first word of "$ac_prog", so it can be a program name with args.
6104set dummy $ac_prog; ac_word=$2
6105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6106$as_echo_n "checking for $ac_word... " >&6; }
6107if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6108 $as_echo_n "(cached) " >&6
6109else
6110 if test -n "$ac_ct_READELF"; then
6111 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6112else
6113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6114for as_dir in $PATH
6115do
6116 IFS=$as_save_IFS
6117 test -z "$as_dir" && as_dir=.
6118 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006120 ac_cv_prog_ac_ct_READELF="$ac_prog"
6121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6122 break 2
6123 fi
6124done
6125 done
6126IFS=$as_save_IFS
6127
6128fi
6129fi
6130ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6131if test -n "$ac_ct_READELF"; then
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6133$as_echo "$ac_ct_READELF" >&6; }
6134else
6135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6136$as_echo "no" >&6; }
6137fi
6138
6139
6140 test -n "$ac_ct_READELF" && break
6141done
6142
6143 if test "x$ac_ct_READELF" = x; then
6144 READELF=":"
6145 else
6146 case $cross_compiling:$ac_tool_warned in
6147yes:)
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6150ac_tool_warned=yes ;;
6151esac
6152 READELF=$ac_ct_READELF
6153 fi
6154fi
6155
6156if test "$cross_compiling" = yes; then
6157 case "$READELF" in
6158 readelf|:)
6159 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6160 ;;
6161 esac
6162fi
6163
6164
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006167hp*|HP*)
6168 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169 if test -z "$INSTALL"
6170 then
6171 INSTALL="${srcdir}/install-sh -c"
6172 fi
6173esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174# Find a good install program. We prefer a C program (faster),
6175# so one script is as good as another. But avoid the broken or
6176# incompatible versions:
6177# SysV /etc/install, /usr/sbin/install
6178# SunOS /usr/etc/install
6179# IRIX /sbin/install
6180# AIX /bin/install
6181# AmigaOS /C/install, which installs bootblocks on floppy discs
6182# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6183# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6184# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6185# OS/2's system install, which has a completely different semantic
6186# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006187# Reject install programs that cannot install multiple files.
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6189$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006191if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006192 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193else
6194 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195for as_dir in $PATH
6196do
6197 IFS=$as_save_IFS
6198 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 # Account for people who put trailing slashes in PATH elements.
6200case $as_dir/ in #((
6201 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006203 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204 /usr/ucb/* ) ;;
6205 *)
6206 # OSF1 and SCO ODT 3.0 have their own names for install.
6207 # Don't use installbsd from OSF since it installs stuff as root
6208 # by default.
6209 for ac_prog in ginstall scoinst install; do
6210 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006211 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212 if test $ac_prog = install &&
6213 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6214 # AIX install. It has an incompatible calling convention.
6215 :
6216 elif test $ac_prog = install &&
6217 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6218 # program-specific install script used by HP pwplus--don't use.
6219 :
6220 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006221 rm -rf conftest.one conftest.two conftest.dir
6222 echo one > conftest.one
6223 echo two > conftest.two
6224 mkdir conftest.dir
6225 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6226 test -s conftest.one && test -s conftest.two &&
6227 test -s conftest.dir/conftest.one &&
6228 test -s conftest.dir/conftest.two
6229 then
6230 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6231 break 3
6232 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233 fi
6234 fi
6235 done
6236 done
6237 ;;
6238esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006239
6240 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241IFS=$as_save_IFS
6242
Matthias Kloseb9621712010-04-24 17:59:49 +00006243rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244
6245fi
6246 if test "${ac_cv_path_install+set}" = set; then
6247 INSTALL=$ac_cv_path_install
6248 else
6249 # As a last resort, use the slow shell script. Don't cache a
6250 # value for INSTALL within a source directory, because that will
6251 # break other packages using the cache if that directory is
6252 # removed, or if the value is a relative name.
6253 INSTALL=$ac_install_sh
6254 fi
6255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6257$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258
6259# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6260# It thinks the first close brace ends the variable substitution.
6261test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6262
6263test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6264
6265test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6266
Matthias Klose93a0ef12012-03-15 18:08:34 +01006267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6268$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6269if test -z "$MKDIR_P"; then
6270 if ${ac_cv_path_mkdir+:} false; then :
6271 $as_echo_n "(cached) " >&6
6272else
6273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6275do
6276 IFS=$as_save_IFS
6277 test -z "$as_dir" && as_dir=.
6278 for ac_prog in mkdir gmkdir; do
6279 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006280 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006281 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6282 'mkdir (GNU coreutils) '* | \
6283 'mkdir (coreutils) '* | \
6284 'mkdir (fileutils) '4.1*)
6285 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6286 break 3;;
6287 esac
6288 done
6289 done
6290 done
6291IFS=$as_save_IFS
6292
6293fi
6294
6295 test -d ./--version && rmdir ./--version
6296 if test "${ac_cv_path_mkdir+set}" = set; then
6297 MKDIR_P="$ac_cv_path_mkdir -p"
6298 else
6299 # As a last resort, use the slow shell script. Don't cache a
6300 # value for MKDIR_P within a source directory, because that will
6301 # break other packages using the cache if that directory is
6302 # removed, or if the value is a relative name.
6303 MKDIR_P="$ac_install_sh -d"
6304 fi
6305fi
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6307$as_echo "$MKDIR_P" >&6; }
6308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309
6310# Not every filesystem supports hard links
6311
6312if test -z "$LN" ; then
6313 case $ac_sys_system in
6314 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315 *) LN=ln;;
6316 esac
6317fi
6318
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006319# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006320
6321ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006322
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6325$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326
6327# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006328if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 withval=$with_pydebug;
6330if test "$withval" != no
6331then
6332
Matthias Kloseb9621712010-04-24 17:59:49 +00006333$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334
Matthias Kloseb9621712010-04-24 17:59:49 +00006335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6336$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006338 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006339else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6340$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341fi
6342else
Matthias Kloseb9621712010-04-24 17:59:49 +00006343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6344$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345fi
6346
6347
T. Woutersddbfa2c2017-05-23 01:30:49 +02006348# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6349# the ABI. This allows enabling assertions without changing the ABI.
6350assertions='false'
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6352$as_echo_n "checking for --with-assertions... " >&6; }
6353
6354# Check whether --with-assertions was given.
6355if test "${with_assertions+set}" = set; then :
6356 withval=$with_assertions;
6357if test "$withval" != no
6358then
6359 assertions='true'
6360fi
6361fi
6362
6363if test "$assertions" = 'true'; then
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6365$as_echo "yes" >&6; }
6366elif test "$Py_DEBUG" = 'true'; then
6367 assertions='true'
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6369$as_echo "implied by --with-pydebug" >&6; }
6370else
6371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6372$as_echo "no" >&6; }
6373fi
6374
Brett Cannon63d98bc2016-09-06 17:12:40 -07006375# Enable optimization flags
6376
6377
6378Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6380$as_echo_n "checking for --enable-optimizations... " >&6; }
6381# Check whether --enable-optimizations was given.
6382if test "${enable_optimizations+set}" = set; then :
6383 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006384if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006385then
6386 Py_OPT='true'
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6388$as_echo "yes" >&6; };
6389else
6390 Py_OPT='false'
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; };
6393fi
6394else
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
6397fi
6398
6399if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006400 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6401 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006402 # 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 +00006403 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006404 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006405 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006406 DEF_MAKE_RULE="build_all"
6407else
6408 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006409 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006410 DEF_MAKE_RULE="all"
6411fi
6412
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006413# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6415$as_echo_n "checking for --with-lto... " >&6; }
6416
6417# Check whether --with-lto was given.
6418if test "${with_lto+set}" = set; then :
6419 withval=$with_lto;
6420if test "$withval" != no
6421then
6422 Py_LTO='true'
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6424$as_echo "yes" >&6; };
6425else
6426 Py_LTO='false'
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428$as_echo "no" >&6; };
6429fi
6430else
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435if test "$Py_LTO" = 'true' ; then
6436 case $CC in
6437 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006438 case $ac_sys_system in
6439 Darwin*)
6440 # Any changes made here should be reflected in the GCC+Darwin case below
6441 LTOFLAGS="-flto -Wl,-export_dynamic"
6442 ;;
6443 *)
6444 LTOFLAGS="-flto"
6445 ;;
6446 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006447 ;;
6448 *gcc*)
6449 case $ac_sys_system in
6450 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006451 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006452 ;;
6453 *)
6454 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6455 ;;
6456 esac
6457 ;;
6458 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006459 CFLAGS="$CFLAGS $LTOFLAGS"
6460 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006461fi
6462
Brett Cannon7188a3e2015-09-18 15:13:44 -07006463# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006464
6465
6466
6467
6468
Gregory P. Smith799520c2016-09-07 16:10:00 -07006469# Make this work on systems where llvm tools are not installed with their
6470# normal names in the default $PATH (ie: Ubuntu). They exist under the
6471# non-suffixed name in their versioned llvm directory.
6472llvm_bin_dir=''
6473llvm_path="${PATH}"
6474if test "${CC}" = "clang"
6475then
6476 clang_bin=`which clang`
6477 # Some systems install clang elsewhere as a symlink to the real path
6478 # which is where the related llvm tools are located.
6479 if test -L "${clang_bin}"
6480 then
6481 clang_dir=`dirname "${clang_bin}"`
6482 clang_bin=`readlink "${clang_bin}"`
6483 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6484 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6485 fi
6486fi
Zachary Ware5af85642015-12-21 12:09:17 -06006487
Gregory P. Smith799520c2016-09-07 16:10:00 -07006488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6489$as_echo_n "checking target system type... " >&6; }
6490if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006491 $as_echo_n "(cached) " >&6
6492else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006493 if test "x$target_alias" = x; then
6494 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006495else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006496 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6497 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6498fi
6499
6500fi
6501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6502$as_echo "$ac_cv_target" >&6; }
6503case $ac_cv_target in
6504*-*-*) ;;
6505*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6506esac
6507target=$ac_cv_target
6508ac_save_IFS=$IFS; IFS='-'
6509set x $ac_cv_target
6510shift
6511target_cpu=$1
6512target_vendor=$2
6513shift; shift
6514# Remember, the first character of IFS is used to create $*,
6515# except with old shells:
6516target_os=$*
6517IFS=$ac_save_IFS
6518case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6519
6520
6521# The aliases save the names the user supplied, while $host etc.
6522# will get canonicalized.
6523test -n "$target_alias" &&
6524 test "$program_prefix$program_suffix$program_transform_name" = \
6525 NONENONEs,x,x, &&
6526 program_prefix=${target_alias}-
6527# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6528set dummy $target_alias-llvm-profdata; ac_word=$2
6529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6530$as_echo_n "checking for $ac_word... " >&6; }
6531if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6532 $as_echo_n "(cached) " >&6
6533else
6534 case $LLVM_PROFDATA in
6535 [\\/]* | ?:[\\/]*)
6536 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6537 ;;
6538 *)
6539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6540for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006541do
6542 IFS=$as_save_IFS
6543 test -z "$as_dir" && as_dir=.
6544 for ac_exec_ext in '' $ac_executable_extensions; do
6545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006546 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6548 break 2
6549 fi
6550done
6551 done
6552IFS=$as_save_IFS
6553
Gregory P. Smith799520c2016-09-07 16:10:00 -07006554 ;;
6555esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006556fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006557LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6558if test -n "$LLVM_PROFDATA"; then
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6560$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006561else
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563$as_echo "no" >&6; }
6564fi
6565
6566
Gregory P. Smith799520c2016-09-07 16:10:00 -07006567if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6568 if test "$build" = "$target"; then
6569 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6570 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6571set dummy llvm-profdata; ac_word=$2
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6573$as_echo_n "checking for $ac_word... " >&6; }
6574if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6575 $as_echo_n "(cached) " >&6
6576else
6577 case $ac_pt_LLVM_PROFDATA in
6578 [\\/]* | ?:[\\/]*)
6579 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6580 ;;
6581 *)
6582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6583for as_dir in ${llvm_path}
6584do
6585 IFS=$as_save_IFS
6586 test -z "$as_dir" && as_dir=.
6587 for ac_exec_ext in '' $ac_executable_extensions; do
6588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6589 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6591 break 2
6592 fi
6593done
6594 done
6595IFS=$as_save_IFS
6596
6597 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6598 ;;
6599esac
6600fi
6601ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6602if test -n "$ac_pt_LLVM_PROFDATA"; then
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6604$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6605else
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6611 else
6612 LLVM_PROFDATA="''"
6613 fi
6614else
6615 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6616fi
6617
6618
6619if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6620then
6621 LLVM_PROF_FOUND="found"
6622else
6623 LLVM_PROF_FOUND="not-found"
6624fi
6625if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6626then
6627 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6628 if test -n "${found_llvm_profdata}"
6629 then
6630 # llvm-profdata isn't directly in $PATH in some cases.
6631 # https://apple.stackexchange.com/questions/197053/
6632 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6633 LLVM_PROF_FOUND=found
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6635$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6636 fi
6637fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006638LLVM_PROF_ERR=no
6639case $CC in
6640 *clang*)
6641 # Any changes made here should be reflected in the GCC+Darwin case below
6642 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6643 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006644 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006645 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6646 if test $LLVM_PROF_FOUND = not-found
6647 then
6648 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006649 if test "${REQUIRE_PGO}" = "yes"
6650 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006651 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 -07006652 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006653 fi
6654 ;;
6655 *gcc*)
6656 case $ac_sys_system in
6657 Darwin*)
6658 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6659 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006660 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006663 then
6664 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006665 if test "${REQUIRE_PGO}" = "yes"
6666 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006667 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 -07006668 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006669 fi
6670 ;;
6671 *)
6672 PGO_PROF_GEN_FLAG="-fprofile-generate"
6673 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6674 LLVM_PROF_MERGER="true"
6675 LLVM_PROF_FILE=""
6676 ;;
6677 esac
6678 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006679 *icc*)
6680 PGO_PROF_GEN_FLAG="-prof-gen"
6681 PGO_PROF_USE_FLAG="-prof-use"
6682 LLVM_PROF_MERGER="true"
6683 LLVM_PROF_FILE=""
6684 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006685esac
6686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6688# merged with this chunk of code?
6689
6690# Optimizer/debugger flags
6691# ------------------------
6692# (The following bit of code is complicated enough - please keep things
6693# indented properly. Just pretend you're editing Python code. ;-)
6694
6695# There are two parallel sets of case statements below, one that checks to
6696# see if OPT was set and one that does BASECFLAGS setting based upon
6697# compiler and platform. BASECFLAGS tweaks need to be made even if the
6698# user set OPT.
6699
6700# tweak OPT based on compiler and platform, only if the user didn't set
6701# it on the command line
6702
Victor Stinner9ed34a82017-05-02 22:35:58 +02006703
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006704if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705then
6706 case $GCC in
6707 yes)
6708 if test "$CC" != 'g++' ; then
6709 STRICT_PROTO="-Wstrict-prototypes"
6710 fi
6711 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6712 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6713 WRAP="-fwrapv"
6714 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006715
Stefan Krahaf04ff22011-12-08 22:20:31 +01006716 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006717 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006718 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006719 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006720 *)
6721 if $CC --version 2>&1 | grep -q clang
6722 then
6723 cc_is_clang=1
6724 else
6725 cc_is_clang=
6726 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006727 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006728
Victor Stinner35f3d242017-04-21 12:35:24 +02006729 if test -n "${cc_is_clang}"
6730 then
6731 # Clang also needs -fwrapv
6732 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006733 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6734 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006735 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006736 fi
6737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 case $ac_cv_prog_cc_g in
6739 yes)
6740 if test "$Py_DEBUG" = 'true' ; then
6741 # Optimization messes up debuggers, so turn it off for
6742 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006743 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006744 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006745 else
Victor Stinner28205b22017-04-21 11:24:34 +02006746 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006747 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006748 else
Victor Stinner28205b22017-04-21 11:24:34 +02006749 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750 fi
6751 ;;
6752 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006753 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754 ;;
6755 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006756
Victor Stinner826f83f2017-04-28 15:07:10 +02006757 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006758
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759 case $ac_sys_system in
6760 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6761 ;;
6762 esac
6763 ;;
6764
6765 *)
6766 OPT="-O"
6767 ;;
6768 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769fi
6770
6771
6772
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006774# The -arch flags for universal builds on OSX
6775UNIVERSAL_ARCH_FLAGS=
6776
6777
6778# tweak BASECFLAGS based on compiler and platform
6779case $GCC in
6780yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006781 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006782
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6784$as_echo_n "checking for -Wextra... " >&6; }
6785 ac_save_cc="$CC"
6786 CC="$CC -Wextra -Werror"
6787 if ${ac_cv_extra_warnings+:} false; then :
6788 $as_echo_n "(cached) " >&6
6789else
6790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6791/* end confdefs.h. */
6792
6793
6794int
6795main ()
6796{
6797
6798 ;
6799 return 0;
6800}
6801
6802_ACEOF
6803if ac_fn_c_try_compile "$LINENO"; then :
6804
6805 ac_cv_extra_warnings=yes
6806
6807else
6808
6809 ac_cv_extra_warnings=no
6810
6811fi
6812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6813fi
6814
6815 CC="$ac_save_cc"
6816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6817$as_echo "$ac_cv_extra_warnings" >&6; }
6818
6819 if test $ac_cv_extra_warnings = yes
6820 then
6821 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6822 fi
6823
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006824 # Python doesn't violate C99 aliasing rules, but older versions of
6825 # GCC produce warnings for legal Python code. Enable
6826 # -fno-strict-aliasing on versions of GCC that support but produce
6827 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6829$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830 ac_save_cc="$CC"
6831 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006832 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006833 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006838
Matthias Kloseb159a552010-04-25 21:00:44 +00006839
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006840int
6841main ()
6842{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006843
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006844 ;
6845 return 0;
6846}
Matthias Kloseb159a552010-04-25 21:00:44 +00006847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006849if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006850
6851 CC="$ac_save_cc -fstrict-aliasing"
6852 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006854/* end confdefs.h. */
6855
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006856 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006857int
6858main ()
6859{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006860double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006861 ;
6862 return 0;
6863}
Matthias Kloseb159a552010-04-25 21:00:44 +00006864
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006866if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006867
6868 ac_cv_no_strict_aliasing=no
6869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870else
Matthias Kloseb159a552010-04-25 21:00:44 +00006871
6872 ac_cv_no_strict_aliasing=yes
6873
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006874fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006876
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006877else
Matthias Kloseb159a552010-04-25 21:00:44 +00006878
6879 ac_cv_no_strict_aliasing=no
6880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006883fi
6884
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006885 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6888$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006889 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890 then
6891 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6892 fi
6893
Zachary Ware5af85642015-12-21 12:09:17 -06006894 # ICC doesn't recognize the option, but only emits a warning
6895 ## XXX does it emit an unused result warning and can it be disabled?
6896 case "$CC" in
6897 *icc*)
6898 ac_cv_disable_unused_result_warning=no
6899 ;;
6900 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6902$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6903 ac_save_cc="$CC"
6904 CC="$CC -Wunused-result -Werror"
6905 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006906 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006907 $as_echo_n "(cached) " >&6
6908else
6909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6910/* end confdefs.h. */
6911
6912
6913int
6914main ()
6915{
6916
6917 ;
6918 return 0;
6919}
6920
6921_ACEOF
6922if ac_fn_c_try_compile "$LINENO"; then :
6923
6924 ac_cv_disable_unused_result_warning=yes
6925
6926else
6927
6928 ac_cv_disable_unused_result_warning=no
6929
6930fi
6931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6932fi
6933
6934 CFLAGS="$save_CFLAGS"
6935 CC="$ac_save_cc"
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6937$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006938 ;;
6939 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006940
6941 if test $ac_cv_disable_unused_result_warning = yes
6942 then
6943 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006944 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6945 fi
6946
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6948$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6949 ac_save_cc="$CC"
6950 CC="$CC -Wunused-parameter -Werror"
6951 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6952 $as_echo_n "(cached) " >&6
6953else
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955/* end confdefs.h. */
6956
6957
6958int
6959main ()
6960{
6961
6962 ;
6963 return 0;
6964}
6965
6966_ACEOF
6967if ac_fn_c_try_compile "$LINENO"; then :
6968
6969 ac_cv_disable_unused_parameter_warning=yes
6970
6971else
6972
6973 ac_cv_disable_unused_parameter_warning=no
6974
6975fi
6976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6977fi
6978
6979 CC="$ac_save_cc"
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6981$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6982
6983 if test $ac_cv_disable_unused_parameter_warning = yes
6984 then
6985 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6986 fi
6987
6988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6989$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6990 ac_save_cc="$CC"
6991 CC="$CC -Wmissing-field-initializers -Werror"
6992 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6993 $as_echo_n "(cached) " >&6
6994else
6995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6996/* end confdefs.h. */
6997
6998
6999int
7000main ()
7001{
7002
7003 ;
7004 return 0;
7005}
7006
7007_ACEOF
7008if ac_fn_c_try_compile "$LINENO"; then :
7009
7010 ac_cv_disable_missing_field_initializers=yes
7011
7012else
7013
7014 ac_cv_disable_missing_field_initializers=no
7015
7016fi
7017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7018fi
7019
7020 CC="$ac_save_cc"
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7022$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7023
7024 if test $ac_cv_disable_missing_field_initializers = yes
7025 then
7026 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007027 fi
7028
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7030$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7031 ac_save_cc="$CC"
7032 CC="$CC -Wsign-compare"
7033 save_CFLAGS="$CFLAGS"
7034 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7035 $as_echo_n "(cached) " >&6
7036else
7037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7038/* end confdefs.h. */
7039
7040
7041int
7042main ()
7043{
7044
7045 ;
7046 return 0;
7047}
7048
7049_ACEOF
7050if ac_fn_c_try_compile "$LINENO"; then :
7051
7052 ac_cv_enable_sign_compare_warning=yes
7053
7054else
7055
7056 ac_cv_enable_sign_compare_warning=no
7057
7058fi
7059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7060fi
7061
7062 CFLAGS="$save_CFLAGS"
7063 CC="$ac_save_cc"
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7065$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7066
7067 if test $ac_cv_enable_sign_compare_warning = yes
7068 then
7069 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7070 fi
7071
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7073$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7074 ac_save_cc="$CC"
7075 CC="$CC -Wunreachable-code"
7076 save_CFLAGS="$CFLAGS"
7077 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7078 $as_echo_n "(cached) " >&6
7079else
7080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7081/* end confdefs.h. */
7082
7083
7084int
7085main ()
7086{
7087
7088 ;
7089 return 0;
7090}
7091
7092_ACEOF
7093if ac_fn_c_try_compile "$LINENO"; then :
7094
7095 ac_cv_enable_unreachable_code_warning=yes
7096
7097else
7098
7099 ac_cv_enable_unreachable_code_warning=no
7100
7101fi
7102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7103fi
7104
7105 CFLAGS="$save_CFLAGS"
7106 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007107
7108 # Don't enable unreachable code warning in debug mode, since it usually
7109 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007110 # Issue #24324: Unfortunately, the unreachable code warning does not work
7111 # correctly on gcc and has been silently removed from the compiler.
7112 # It is supported on clang but on OS X systems gcc may be an alias
7113 # for clang. Try to determine if the compiler is not really gcc and,
7114 # if so, only then enable the warning.
7115 if test $ac_cv_enable_unreachable_code_warning = yes && \
7116 test "$Py_DEBUG" != "true" && \
7117 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007118 then
7119 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007120 else
7121 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007122 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7124$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007125
Victor Stinner193ee0a2017-02-06 14:24:00 +01007126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7127$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7128 ac_save_cc="$CC"
7129 CC="$CC -Werror=implicit-function-declaration"
7130 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7131 $as_echo_n "(cached) " >&6
7132else
7133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7134/* end confdefs.h. */
7135
7136
7137int
7138main ()
7139{
7140
7141 ;
7142 return 0;
7143}
7144
7145_ACEOF
7146if ac_fn_c_try_compile "$LINENO"; then :
7147
7148 ac_cv_enable_implicit_function_declaration_error=yes
7149
7150else
7151
7152 ac_cv_enable_implicit_function_declaration_error=no
7153
7154fi
7155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7156fi
7157
7158 CC="$ac_save_cc"
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7160$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7161
7162 if test $ac_cv_enable_implicit_function_declaration_error = yes
7163 then
7164 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7165 fi
7166
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007167 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7168 # support. Without this, treatment of subnormals doesn't follow
7169 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007170 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007171 alpha*)
7172 BASECFLAGS="$BASECFLAGS -mieee"
7173 ;;
7174 esac
7175
7176 case $ac_sys_system in
7177 SCO_SV*)
7178 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7179 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007180
7181 # is there any other compiler on Darwin besides gcc?
7182 Darwin*)
7183 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7184 # used to be here, but non-Apple gcc doesn't accept them.
7185 if test "${CC}" = gcc
7186 then
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007188$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007189 case "${UNIVERSALSDK}" in
7190 */MacOSX10.4u.sdk)
7191 # Build using 10.4 SDK, force usage of gcc when the
7192 # compiler is gcc, otherwise the user will get very
7193 # confusing error messages when building on OSX 10.6
7194 CC=gcc-4.0
7195 CPP=cpp-4.0
7196 ;;
7197 esac
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007199$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007200 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007201
Ned Deily87adb6e2013-10-18 21:09:56 -07007202 if test "${enable_universalsdk}"
7203 then
7204 case "$UNIVERSAL_ARCHS" in
7205 32-bit)
7206 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7207 LIPO_32BIT_FLAGS=""
7208 ARCH_RUN_32BIT=""
7209 ;;
7210 64-bit)
7211 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7212 LIPO_32BIT_FLAGS=""
7213 ARCH_RUN_32BIT="true"
7214 ;;
7215 all)
7216 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7217 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7218 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7219 ;;
7220 intel)
7221 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7222 LIPO_32BIT_FLAGS="-extract i386"
7223 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7224 ;;
7225 intel-32)
7226 UNIVERSAL_ARCH_FLAGS="-arch i386"
7227 LIPO_32BIT_FLAGS=""
7228 ARCH_RUN_32BIT=""
7229 ;;
7230 3-way)
7231 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7232 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7233 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7234 ;;
7235 *)
7236 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7237 ;;
7238 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239
Ned Deily87adb6e2013-10-18 21:09:56 -07007240 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7241 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7242 if test "${UNIVERSALSDK}" != "/"
7243 then
7244 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7245 fi
7246 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247
Ned Deily87adb6e2013-10-18 21:09:56 -07007248 # Calculate an appropriate deployment target for this build:
7249 # The deployment target value is used explicitly to enable certain
7250 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007251 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007252 # component of the string returned by distutils.get_platform().
7253 #
7254 # Use the value from:
7255 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7256 # 2. the operating system version of the build machine if >= 10.6
7257 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7258 # below to pick either 10.3, 10.4, or 10.5 as the target.
7259 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260
Ned Deily87adb6e2013-10-18 21:09:56 -07007261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7262$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007263 cur_target_major=`sw_vers -productVersion | \
7264 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7265 cur_target_minor=`sw_vers -productVersion | \
7266 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7267 cur_target="${cur_target_major}.${cur_target_minor}"
7268 if test ${cur_target_major} -eq 10 && \
7269 test ${cur_target_minor} -ge 3 && \
7270 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007271 then
Ned Deily36820b62014-06-25 13:44:22 -07007272 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007273 cur_target=10.3
7274 if test ${enable_universalsdk}
7275 then
7276 case "$UNIVERSAL_ARCHS" in
7277 all|3-way|intel|64-bit)
7278 # These configurations were first supported in 10.5
7279 cur_target='10.5'
7280 ;;
7281 esac
7282 else
7283 if test `/usr/bin/arch` = "i386"
7284 then
7285 # 10.4 was the first release to support Intel archs
7286 cur_target="10.4"
7287 fi
7288 fi
7289 fi
7290 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007291
Ned Deily87adb6e2013-10-18 21:09:56 -07007292 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7293 # environment with a value that is the same as what we'll use
7294 # in the Makefile to ensure that we'll get the same compiler
7295 # environment during configure and build time.
7296 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7297 export MACOSX_DEPLOYMENT_TARGET
7298 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7300$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007301
Ned Deily87adb6e2013-10-18 21:09:56 -07007302 # end of Darwin* tests
7303 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007304 esac
7305 ;;
7306
7307*)
7308 case $ac_sys_system in
7309 OpenUNIX*|UnixWare*)
7310 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7311 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007312 SCO_SV*)
7313 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7314 ;;
7315 esac
7316 ;;
7317esac
7318
Zachary Ware5af85642015-12-21 12:09:17 -06007319# ICC needs -fp-model strict or floats behave badly
7320case "$CC" in
7321*icc*)
7322 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7323 ;;
7324esac
7325
T. Woutersddbfa2c2017-05-23 01:30:49 +02007326if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007327 :
7328else
7329 OPT="-DNDEBUG $OPT"
7330fi
7331
7332if test "$ac_arch_flags"
7333then
7334 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7335fi
7336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007337# On some compilers, pthreads are available without further options
7338# (e.g. MacOS X). On some of these systems, the compiler will not
7339# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7340# So we have to see first whether pthreads are available without
7341# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7343$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007344if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007345 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346else
Matthias Kloseb9621712010-04-24 17:59:49 +00007347 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348 ac_cv_pthread_is_default=no
7349else
Matthias Kloseb9621712010-04-24 17:59:49 +00007350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351/* end confdefs.h. */
7352
Stefan Krah7dba5942012-11-22 22:49:11 +01007353#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007354#include <pthread.h>
7355
7356void* routine(void* p){return NULL;}
7357
7358int main(){
7359 pthread_t p;
7360 if(pthread_create(&p,NULL,routine,NULL)!=0)
7361 return 1;
7362 (void)pthread_detach(p);
7363 return 0;
7364}
7365
7366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007367if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368
7369 ac_cv_pthread_is_default=yes
7370 ac_cv_kthread=no
7371 ac_cv_pthread=no
7372
7373else
Matthias Kloseb9621712010-04-24 17:59:49 +00007374 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7377 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378fi
7379
7380
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381fi
7382
Matthias Kloseb9621712010-04-24 17:59:49 +00007383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7384$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007385
7386
7387if test $ac_cv_pthread_is_default = yes
7388then
7389 ac_cv_kpthread=no
7390else
7391# -Kpthread, if available, provides the right #defines
7392# and linker options to make pthread_create available
7393# Some compilers won't report that they do not support -Kpthread,
7394# so we need to run a program to see whether it really made the
7395# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7397$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007398if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007399 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400else
7401 ac_save_cc="$CC"
7402CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007403if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404 ac_cv_kpthread=no
7405else
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407/* end confdefs.h. */
7408
Stefan Krah7dba5942012-11-22 22:49:11 +01007409#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410#include <pthread.h>
7411
7412void* routine(void* p){return NULL;}
7413
7414int main(){
7415 pthread_t p;
7416 if(pthread_create(&p,NULL,routine,NULL)!=0)
7417 return 1;
7418 (void)pthread_detach(p);
7419 return 0;
7420}
7421
7422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007423if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424 ac_cv_kpthread=yes
7425else
Matthias Kloseb9621712010-04-24 17:59:49 +00007426 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430fi
7431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432CC="$ac_save_cc"
7433fi
7434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7436$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437fi
7438
7439if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7440then
7441# -Kthread, if available, provides the right #defines
7442# and linker options to make pthread_create available
7443# Some compilers won't report that they do not support -Kthread,
7444# so we need to run a program to see whether it really made the
7445# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7447$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007448if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450else
7451 ac_save_cc="$CC"
7452CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007453if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454 ac_cv_kthread=no
7455else
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457/* end confdefs.h. */
7458
Stefan Krah7dba5942012-11-22 22:49:11 +01007459#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460#include <pthread.h>
7461
7462void* routine(void* p){return NULL;}
7463
7464int main(){
7465 pthread_t p;
7466 if(pthread_create(&p,NULL,routine,NULL)!=0)
7467 return 1;
7468 (void)pthread_detach(p);
7469 return 0;
7470}
7471
7472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007473if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474 ac_cv_kthread=yes
7475else
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7479 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480fi
7481
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482CC="$ac_save_cc"
7483fi
7484
Matthias Kloseb9621712010-04-24 17:59:49 +00007485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7486$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487fi
7488
7489if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7490then
7491# -pthread, if available, provides the right #defines
7492# and linker options to make pthread_create available
7493# Some compilers won't report that they do not support -pthread,
7494# so we need to run a program to see whether it really made the
7495# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7497$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007498if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007499 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500else
7501 ac_save_cc="$CC"
7502CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007503if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504 ac_cv_pthread=no
7505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507/* end confdefs.h. */
7508
Stefan Krah7dba5942012-11-22 22:49:11 +01007509#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510#include <pthread.h>
7511
7512void* routine(void* p){return NULL;}
7513
7514int main(){
7515 pthread_t p;
7516 if(pthread_create(&p,NULL,routine,NULL)!=0)
7517 return 1;
7518 (void)pthread_detach(p);
7519 return 0;
7520}
7521
7522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007523if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524 ac_cv_pthread=yes
7525else
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7529 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530fi
7531
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532CC="$ac_save_cc"
7533fi
7534
Matthias Kloseb9621712010-04-24 17:59:49 +00007535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7536$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537fi
7538
7539# If we have set a CC compiler flag for thread support then
7540# check if it works for CXX, too.
7541ac_cv_cxx_thread=no
7542if test ! -z "$CXX"
7543then
Matthias Kloseb9621712010-04-24 17:59:49 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7545$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546ac_save_cxx="$CXX"
7547
7548if test "$ac_cv_kpthread" = "yes"
7549then
7550 CXX="$CXX -Kpthread"
7551 ac_cv_cxx_thread=yes
7552elif test "$ac_cv_kthread" = "yes"
7553then
7554 CXX="$CXX -Kthread"
7555 ac_cv_cxx_thread=yes
7556elif test "$ac_cv_pthread" = "yes"
7557then
7558 CXX="$CXX -pthread"
7559 ac_cv_cxx_thread=yes
7560fi
7561
7562if test $ac_cv_cxx_thread = yes
7563then
7564 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7565 $CXX -c conftest.$ac_ext 2>&5
7566 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7567 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7568 then
7569 ac_cv_cxx_thread=yes
7570 else
7571 ac_cv_cxx_thread=no
7572 fi
7573 rm -fr conftest*
7574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7576$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577fi
7578CXX="$ac_save_cxx"
7579
7580
7581# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7583$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007584if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586else
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588/* end confdefs.h. */
7589#include <stdlib.h>
7590#include <stdarg.h>
7591#include <string.h>
7592#include <float.h>
7593
7594int
7595main ()
7596{
7597
7598 ;
7599 return 0;
7600}
7601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007602if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603 ac_cv_header_stdc=yes
7604else
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7608
7609if test $ac_cv_header_stdc = yes; then
7610 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612/* end confdefs.h. */
7613#include <string.h>
7614
7615_ACEOF
7616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 $EGREP "memchr" >/dev/null 2>&1; then :
7618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619else
7620 ac_cv_header_stdc=no
7621fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007622rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623
7624fi
7625
7626if test $ac_cv_header_stdc = yes; then
7627 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629/* end confdefs.h. */
7630#include <stdlib.h>
7631
7632_ACEOF
7633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 $EGREP "free" >/dev/null 2>&1; then :
7635
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636else
7637 ac_cv_header_stdc=no
7638fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007639rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640
7641fi
7642
7643if test $ac_cv_header_stdc = yes; then
7644 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007645 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646 :
7647else
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649/* end confdefs.h. */
7650#include <ctype.h>
7651#include <stdlib.h>
7652#if ((' ' & 0x0FF) == 0x020)
7653# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7654# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7655#else
7656# define ISLOWER(c) \
7657 (('a' <= (c) && (c) <= 'i') \
7658 || ('j' <= (c) && (c) <= 'r') \
7659 || ('s' <= (c) && (c) <= 'z'))
7660# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7661#endif
7662
7663#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7664int
7665main ()
7666{
7667 int i;
7668 for (i = 0; i < 256; i++)
7669 if (XOR (islower (i), ISLOWER (i))
7670 || toupper (i) != TOUPPER (i))
7671 return 2;
7672 return 0;
7673}
7674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007675if ac_fn_c_try_run "$LINENO"; then :
7676
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682fi
7683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
7685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7687$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688if test $ac_cv_header_stdc = yes; then
7689
Matthias Kloseb9621712010-04-24 17:59:49 +00007690$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691
7692fi
7693
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007694for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007695fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007696ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007697sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007698unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007699poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007700sys/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 +01007701sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007702sys/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 +01007703sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007704sys/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 -07007705libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007706linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007707sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007708do :
7709 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7710ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007711if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007712 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007713#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007714_ACEOF
7715
7716fi
7717
Guido van Rossum627b2d71993-12-24 10:39:16 +00007718done
7719
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007720ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007721for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007722 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7724$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007725if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007729/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007730#include <sys/types.h>
7731#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007732
Martin v. Löwis11437992002-04-12 09:54:03 +00007733int
7734main ()
7735{
7736if ((DIR *) 0)
7737return 0;
7738 ;
7739 return 0;
7740}
7741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007742if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007749eval ac_res=\$$as_ac_Header
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7751$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007752if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007754#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007755_ACEOF
7756
7757ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007758fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007759
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760done
7761# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7762if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7764$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007765if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007766 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767else
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772/* Override any GCC internal prototype to avoid an error.
7773 Use char because int might match the return type of a GCC
7774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007775#ifdef __cplusplus
7776extern "C"
7777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007778char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007779int
7780main ()
7781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 ;
7784 return 0;
7785}
7786_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787for ac_lib in '' dir; do
7788 if test -z "$ac_lib"; then
7789 ac_res="none required"
7790 else
7791 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007792 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797rm -f core conftest.err conftest.$ac_objext \
7798 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007799 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802done
Victor Stinnere0be4232011-10-25 13:06:09 +02007803if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805else
7806 ac_cv_search_opendir=no
7807fi
7808rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007809LIBS=$ac_func_search_save_LIBS
7810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7812$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007814if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007816
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007818
Michael W. Hudson54241132001-12-07 15:38:26 +00007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7821$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007822if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007824else
7825 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829/* Override any GCC internal prototype to avoid an error.
7830 Use char because int might match the return type of a GCC
7831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007832#ifdef __cplusplus
7833extern "C"
7834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007835char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007836int
7837main ()
7838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ;
7841 return 0;
7842}
7843_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844for ac_lib in '' x; do
7845 if test -z "$ac_lib"; then
7846 ac_res="none required"
7847 else
7848 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007849 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007854rm -f core conftest.err conftest.$ac_objext \
7855 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007856 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859done
Victor Stinnere0be4232011-10-25 13:06:09 +02007860if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862else
7863 ac_cv_search_opendir=no
7864fi
7865rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007866LIBS=$ac_func_search_save_LIBS
7867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7869$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007871if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007874fi
7875
7876fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007877
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7879$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007880if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007884/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007885#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007886int
7887main ()
7888{
7889return makedev(0, 0);
7890 ;
7891 return 0;
7892}
7893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007895 ac_cv_header_sys_types_h_makedev=yes
7896else
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007899rm -f core conftest.err conftest.$ac_objext \
7900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007901
7902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7904$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007905
7906if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007907ac_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 +02007908if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007911
7912fi
7913
7914
7915
7916 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 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 +02007918if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007919
Matthias Kloseb9621712010-04-24 17:59:49 +00007920$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007921
7922fi
7923
7924
7925 fi
7926fi
7927
Michael W. Hudson54241132001-12-07 15:38:26 +00007928
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007929# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7930# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7931SAVE_CFLAGS=$CFLAGS
7932CFLAGS="-std=c99 $CFLAGS"
7933for ac_header in bluetooth/bluetooth.h
7934do :
7935 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7936if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7937 cat >>confdefs.h <<_ACEOF
7938#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7939_ACEOF
7940
7941fi
7942
7943done
7944
7945CFLAGS=$SAVE_CFLAGS
7946
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007947# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7948for ac_header in net/if.h
7949do :
7950 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7951#ifdef STDC_HEADERS
7952# include <stdlib.h>
7953# include <stddef.h>
7954#else
7955# ifdef HAVE_STDLIB_H
7956# include <stdlib.h>
7957# endif
7958#endif
7959#ifdef HAVE_SYS_SOCKET_H
7960# include <sys/socket.h>
7961#endif
7962
7963"
Victor Stinnere0be4232011-10-25 13:06:09 +02007964if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007965 cat >>confdefs.h <<_ACEOF
7966#define HAVE_NET_IF_H 1
7967_ACEOF
7968
7969fi
7970
7971done
7972
7973
Martin v. Löwis11017b12006-01-14 18:12:57 +00007974# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007975for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007976do :
7977 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 +00007978#ifdef HAVE_ASM_TYPES_H
7979#include <asm/types.h>
7980#endif
7981#ifdef HAVE_SYS_SOCKET_H
7982#include <sys/socket.h>
7983#endif
7984
Matthias Kloseb9621712010-04-24 17:59:49 +00007985"
Victor Stinnere0be4232011-10-25 13:06:09 +02007986if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007987 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007988#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007989_ACEOF
7990
7991fi
7992
7993done
7994
7995
caaveryeffc12f2017-09-06 18:18:10 -04007996for ac_header in linux/vm_sockets.h
7997do :
7998 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7999#ifdef HAVE_SYS_SOCKET_H
8000#include <sys/socket.h>
8001#endif
8002
8003"
8004if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8005 cat >>confdefs.h <<_ACEOF
8006#define HAVE_LINUX_VM_SOCKETS_H 1
8007_ACEOF
8008
8009fi
8010
8011done
8012
8013
Charles-François Natali47413c12011-10-06 19:47:44 +02008014# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008015for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008016do :
8017 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8018ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8019#ifdef HAVE_SYS_SOCKET_H
8020#include <sys/socket.h>
8021#endif
8022
8023"
8024if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8025 cat >>confdefs.h <<_ACEOF
8026#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8027_ACEOF
8028
8029fi
8030
8031done
8032
8033
Guido van Rossum627b2d71993-12-24 10:39:16 +00008034# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008035was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8037$as_echo_n "checking for clock_t in time.h... " >&6; }
8038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008040#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008041
8042_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008045 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008046else
Martin v. Löwis11437992002-04-12 09:54:03 +00008047
8048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008050
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008051
Guido van Rossum627b2d71993-12-24 10:39:16 +00008052fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008053rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008054
Matthias Kloseb9621712010-04-24 17:59:49 +00008055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8056$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008057
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8059$as_echo_n "checking for makedev... " >&6; }
8060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008061/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008062
Jesus Cea740f53a2010-04-28 11:35:30 +00008063#if defined(MAJOR_IN_MKDEV)
8064#include <sys/mkdev.h>
8065#elif defined(MAJOR_IN_SYSMACROS)
8066#include <sys/sysmacros.h>
8067#else
8068#include <sys/types.h>
8069#endif
8070
Neal Norwitz11690112002-07-30 01:08:28 +00008071int
8072main ()
8073{
Jesus Cea740f53a2010-04-28 11:35:30 +00008074
8075 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008076 ;
8077 return 0;
8078}
Matthias Kloseb159a552010-04-25 21:00:44 +00008079
Neal Norwitz11690112002-07-30 01:08:28 +00008080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008081if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008082 ac_cv_has_makedev=yes
8083else
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008086rm -f core conftest.err conftest.$ac_objext \
8087 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8089$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008090if test "$ac_cv_has_makedev" = "yes"; then
8091
Matthias Kloseb9621712010-04-24 17:59:49 +00008092$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008093
8094fi
8095
Christian Heimes985ecdc2013-11-20 11:46:18 +01008096# byte swapping
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8098$as_echo_n "checking for le64toh... " >&6; }
8099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8100/* end confdefs.h. */
8101
8102#ifdef HAVE_ENDIAN_H
8103#include <endian.h>
8104#elif defined(HAVE_SYS_ENDIAN_H)
8105#include <sys/endian.h>
8106#endif
8107
8108int
8109main ()
8110{
8111
8112 le64toh(1)
8113 ;
8114 return 0;
8115}
8116
8117_ACEOF
8118if ac_fn_c_try_link "$LINENO"; then :
8119 ac_cv_has_le64toh=yes
8120else
8121 ac_cv_has_le64toh=no
8122fi
8123rm -f core conftest.err conftest.$ac_objext \
8124 conftest$ac_exeext conftest.$ac_ext
8125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8126$as_echo "$ac_cv_has_le64toh" >&6; }
8127if test "$ac_cv_has_le64toh" = "yes"; then
8128
8129$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8130
8131fi
8132
Martin v. Löwis399a6892002-10-04 10:22:02 +00008133use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008134# Don't use largefile support for GNU/Hurd
8135case $ac_sys_system in GNU*)
8136 use_lfs=no
8137esac
8138
Martin v. Löwis399a6892002-10-04 10:22:02 +00008139if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008140# Two defines needed to enable largefile support on various platforms
8141# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008142case $ac_sys_system/$ac_sys_release in
8143AIX*)
8144
8145$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8146
8147 ;;
8148esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008151
8152
Matthias Kloseb9621712010-04-24 17:59:49 +00008153$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008154
Martin v. Löwis399a6892002-10-04 10:22:02 +00008155fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008156
Guido van Rossum84e7b241996-08-19 21:59:00 +00008157# Add some code to confdefs.h so that the test for off_t works on SCO
8158cat >> confdefs.h <<\EOF
8159#if defined(SCO_DS)
8160#undef _OFF_T
8161#endif
8162EOF
8163
Guido van Rossumef2255b2000-03-10 22:30:29 +00008164# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008165ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008166if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008168else
Martin v. Löwis11437992002-04-12 09:54:03 +00008169
8170cat >>confdefs.h <<_ACEOF
8171#define mode_t int
8172_ACEOF
8173
8174fi
8175
Matthias Kloseb9621712010-04-24 17:59:49 +00008176ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008177if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008179else
Martin v. Löwis11437992002-04-12 09:54:03 +00008180
8181cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008182#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008183_ACEOF
8184
8185fi
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008188if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008190else
Martin v. Löwis11437992002-04-12 09:54:03 +00008191
8192cat >>confdefs.h <<_ACEOF
8193#define pid_t int
8194_ACEOF
8195
8196fi
8197
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008198
Martin v. Löwis11437992002-04-12 09:54:03 +00008199cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008200#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008201_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008202
Matthias Kloseb9621712010-04-24 17:59:49 +00008203ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008204if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008206else
Martin v. Löwis11437992002-04-12 09:54:03 +00008207
8208cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
8211
8212fi
8213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8215$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008216if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008218else
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008220/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008221#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008222
8223_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008226 ac_cv_type_uid_t=yes
8227else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008228 ac_cv_type_uid_t=no
8229fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008230rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8234$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008235if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008236
Matthias Kloseb9621712010-04-24 17:59:49 +00008237$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
8239
Matthias Kloseb9621712010-04-24 17:59:49 +00008240$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008241
8242fi
8243
Mark Dickinson983bc162012-12-02 12:11:38 +00008244
Matthias Kloseb9621712010-04-24 17:59:49 +00008245ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008246if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008249
8250fi
8251
Stefan Krah1919b7e2012-03-21 18:25:23 +01008252ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8253if test "x$ac_cv_type___uint128_t" = xyes; then :
8254
8255$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8256
8257fi
8258
Jack Jansendd19cf82001-12-06 22:36:17 +00008259
Michael W. Hudson54241132001-12-07 15:38:26 +00008260# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008261# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262# The cast to long int works around a bug in the HP C Compiler
8263# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8264# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8265# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8267$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008268if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008270else
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 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 +00008272
Martin v. Löwis11437992002-04-12 09:54:03 +00008273else
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 if test "$ac_cv_type_int" = yes; then
8275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008277as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008278See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279 else
8280 ac_cv_sizeof_int=0
8281 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8286$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287
8288
8289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008291#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008292_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008293
8294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295# The cast to long int works around a bug in the HP C Compiler
8296# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8297# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8298# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8300$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008301if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008303else
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 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 +00008305
Martin v. Löwis11437992002-04-12 09:54:03 +00008306else
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 if test "$ac_cv_type_long" = yes; then
8308 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008310as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008311See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312 else
8313 ac_cv_sizeof_long=0
8314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316
Martin v. Löwis11437992002-04-12 09:54:03 +00008317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8319$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320
8321
8322
Martin v. Löwis11437992002-04-12 09:54:03 +00008323cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008324#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008325_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008326
8327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328# The cast to long int works around a bug in the HP C Compiler
8329# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8330# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8331# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8333$as_echo_n "checking size of long long... " >&6; }
8334if ${ac_cv_sizeof_long_long+:} false; then :
8335 $as_echo_n "(cached) " >&6
8336else
8337 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8338
8339else
8340 if test "$ac_cv_type_long_long" = yes; then
8341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8343as_fn_error 77 "cannot compute sizeof (long long)
8344See \`config.log' for more details" "$LINENO" 5; }
8345 else
8346 ac_cv_sizeof_long_long=0
8347 fi
8348fi
8349
8350fi
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8352$as_echo "$ac_cv_sizeof_long_long" >&6; }
8353
8354
8355
8356cat >>confdefs.h <<_ACEOF
8357#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8358_ACEOF
8359
8360
8361# The cast to long int works around a bug in the HP C Compiler
8362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8364# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8366$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008367if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 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 +00008371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 if test "$ac_cv_type_void_p" = yes; then
8374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008376as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008377See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378 else
8379 ac_cv_sizeof_void_p=0
8380 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8385$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386
8387
8388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008390#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008392
8393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394# The cast to long int works around a bug in the HP C Compiler
8395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8397# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8399$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008400if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 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 +00008404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405else
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 if test "$ac_cv_type_short" = yes; then
8407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008409as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008410See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411 else
8412 ac_cv_sizeof_short=0
8413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8418$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419
8420
8421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008423#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008424_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008425
8426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427# The cast to long int works around a bug in the HP C Compiler
8428# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8429# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8430# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8432$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008433if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008435else
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 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 +00008437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438else
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 if test "$ac_cv_type_float" = yes; then
8440 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008442as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008443See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444 else
8445 ac_cv_sizeof_float=0
8446 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448
Martin v. Löwis11437992002-04-12 09:54:03 +00008449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8451$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452
8453
8454
Martin v. Löwis11437992002-04-12 09:54:03 +00008455cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008456#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008457_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008458
8459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460# The cast to long int works around a bug in the HP C Compiler
8461# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8462# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8463# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8465$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008466if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 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 +00008470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471else
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 if test "$ac_cv_type_double" = yes; then
8473 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008475as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008476See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477 else
8478 ac_cv_sizeof_double=0
8479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8484$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485
8486
8487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008489#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008490_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008491
8492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493# The cast to long int works around a bug in the HP C Compiler
8494# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8495# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8496# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8498$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008499if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 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 +00008503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504else
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 if test "$ac_cv_type_fpos_t" = yes; then
8506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008508as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008509See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510 else
8511 ac_cv_sizeof_fpos_t=0
8512 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8517$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518
8519
8520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008522#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008523_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008524
Michael W. Hudson54241132001-12-07 15:38:26 +00008525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526# The cast to long int works around a bug in the HP C Compiler
8527# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8528# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8529# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8531$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008532if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 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 +00008536
Martin v. Löwis18e16552006-02-15 17:27:45 +00008537else
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 if test "$ac_cv_type_size_t" = yes; then
8539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008541as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008542See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 else
8544 ac_cv_sizeof_size_t=0
8545 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008547
Martin v. Löwis18e16552006-02-15 17:27:45 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8550$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551
8552
8553
Martin v. Löwis18e16552006-02-15 17:27:45 +00008554cat >>confdefs.h <<_ACEOF
8555#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8556_ACEOF
8557
8558
Christian Heimes400adb02008-02-01 08:12:03 +00008559# The cast to long int works around a bug in the HP C Compiler
8560# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8561# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8562# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8564$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008565if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 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 +00008569
Christian Heimes400adb02008-02-01 08:12:03 +00008570else
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 if test "$ac_cv_type_pid_t" = yes; then
8572 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8573$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008574as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008575See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008576 else
8577 ac_cv_sizeof_pid_t=0
8578 fi
8579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580
Christian Heimes400adb02008-02-01 08:12:03 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8583$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008584
8585
8586
8587cat >>confdefs.h <<_ACEOF
8588#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8589_ACEOF
8590
8591
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008592# The cast to long int works around a bug in the HP C Compiler
8593# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8594# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8595# This bug is HP SR number 8606223364.
8596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8597$as_echo_n "checking size of uintptr_t... " >&6; }
8598if ${ac_cv_sizeof_uintptr_t+:} false; then :
8599 $as_echo_n "(cached) " >&6
8600else
8601 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8602
8603else
8604 if test "$ac_cv_type_uintptr_t" = yes; then
8605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8607as_fn_error 77 "cannot compute sizeof (uintptr_t)
8608See \`config.log' for more details" "$LINENO" 5; }
8609 else
8610 ac_cv_sizeof_uintptr_t=0
8611 fi
8612fi
8613
8614fi
8615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8616$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8617
8618
8619
8620cat >>confdefs.h <<_ACEOF
8621#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8622_ACEOF
8623
8624
Michael W. Hudson54241132001-12-07 15:38:26 +00008625
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8627$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008628have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008630/* end confdefs.h. */
8631
8632int
8633main ()
8634{
8635long double x; x = (long double)0;
8636 ;
8637 return 0;
8638}
8639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008640if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008641
8642
Matthias Kloseb9621712010-04-24 17:59:49 +00008643$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008644
8645 have_long_double=yes
8646
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8650$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008651if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008652# The cast to long int works around a bug in the HP C Compiler
8653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8655# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8657$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008658if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 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 +00008662
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 if test "$ac_cv_type_long_double" = yes; then
8665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008667as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008668See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008669 else
8670 ac_cv_sizeof_long_double=0
8671 fi
8672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8676$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008677
8678
8679
8680cat >>confdefs.h <<_ACEOF
8681#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8682_ACEOF
8683
8684
8685fi
8686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687# The cast to long int works around a bug in the HP C Compiler
8688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8690# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8692$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008693if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008695else
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 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 +00008697
Thomas Woutersb2137042007-02-01 18:02:27 +00008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 if test "$ac_cv_type__Bool" = yes; then
8700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008702as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008703See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704 else
8705 ac_cv_sizeof__Bool=0
8706 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708
Thomas Woutersb2137042007-02-01 18:02:27 +00008709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8711$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712
8713
8714
Thomas Woutersb2137042007-02-01 18:02:27 +00008715cat >>confdefs.h <<_ACEOF
8716#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8717_ACEOF
8718
8719
Thomas Woutersb2137042007-02-01 18:02:27 +00008720
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008721# The cast to long int works around a bug in the HP C Compiler
8722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8726$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008727if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008731#ifdef HAVE_SYS_TYPES_H
8732#include <sys/types.h>
8733#endif
8734
Matthias Kloseb9621712010-04-24 17:59:49 +00008735"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008736
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 if test "$ac_cv_type_off_t" = yes; then
8739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008741as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008742See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008743 else
8744 ac_cv_sizeof_off_t=0
8745 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008747
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8750$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008752
8753
Martin v. Löwis11437992002-04-12 09:54:03 +00008754cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008755#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008756_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008757
Michael W. Hudson54241132001-12-07 15:38:26 +00008758
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008759
Matthias Kloseb9621712010-04-24 17:59:49 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8761$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008762if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008763 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008764
Matthias Kloseb9621712010-04-24 17:59:49 +00008765$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8768$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8771$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008772fi
8773
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774# The cast to long int works around a bug in the HP C Compiler
8775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8777# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8779$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008780if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008784#ifdef HAVE_SYS_TYPES_H
8785#include <sys/types.h>
8786#endif
8787#ifdef HAVE_TIME_H
8788#include <time.h>
8789#endif
8790
Matthias Kloseb9621712010-04-24 17:59:49 +00008791"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008792
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 if test "$ac_cv_type_time_t" = yes; then
8795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008797as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008798See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008799 else
8800 ac_cv_sizeof_time_t=0
8801 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008803
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8806$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008807
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008808
8809
Martin v. Löwis11437992002-04-12 09:54:03 +00008810cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008811#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008812_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008813
Michael W. Hudson54241132001-12-07 15:38:26 +00008814
8815
Trent Mick635f6fb2000-08-23 21:33:05 +00008816# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008817ac_save_cc="$CC"
8818if test "$ac_cv_kpthread" = "yes"
8819then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008820elif test "$ac_cv_kthread" = "yes"
8821then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008822elif test "$ac_cv_pthread" = "yes"
8823then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008824fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8827$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008828have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008830/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008831
8832 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008833int
8834main ()
8835{
Guido van Rossum12580492000-09-24 16:47:19 +00008836pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ;
8838 return 0;
8839}
Matthias Kloseb159a552010-04-25 21:00:44 +00008840
Martin v. Löwis11437992002-04-12 09:54:03 +00008841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008842if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008843 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8847$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008848if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8852# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8854$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008855if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008857else
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859#ifdef HAVE_PTHREAD_H
8860#include <pthread.h>
8861#endif
8862
Matthias Kloseb9621712010-04-24 17:59:49 +00008863"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008864
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008865else
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 if test "$ac_cv_type_pthread_t" = yes; then
8867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008869as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008870See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871 else
8872 ac_cv_sizeof_pthread_t=0
8873 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008875
Trent Mick635f6fb2000-08-23 21:33:05 +00008876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8878$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008879
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880
8881
Martin v. Löwis11437992002-04-12 09:54:03 +00008882cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008883#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008884_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008886
Trent Mick635f6fb2000-08-23 21:33:05 +00008887fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008888
8889# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8890# This checking will be unnecessary after removing deprecated TLS API.
8891# The cast to long int works around a bug in the HP C Compiler
8892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8894# This bug is HP SR number 8606223364.
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8896$as_echo_n "checking size of pthread_key_t... " >&6; }
8897if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8898 $as_echo_n "(cached) " >&6
8899else
8900 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8901"; then :
8902
8903else
8904 if test "$ac_cv_type_pthread_key_t" = yes; then
8905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8907as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8908See \`config.log' for more details" "$LINENO" 5; }
8909 else
8910 ac_cv_sizeof_pthread_key_t=0
8911 fi
8912fi
8913
8914fi
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8916$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8917
8918
8919
8920cat >>confdefs.h <<_ACEOF
8921#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8922_ACEOF
8923
8924
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8926$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8927if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8929/* end confdefs.h. */
8930#include <pthread.h>
8931int
8932main ()
8933{
8934pthread_key_t k; k * 1;
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939if ac_fn_c_try_compile "$LINENO"; then :
8940 ac_pthread_key_t_is_arithmetic_type=yes
8941else
8942 ac_pthread_key_t_is_arithmetic_type=no
8943
8944fi
8945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8947$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8948 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8949
8950$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8951
8952 fi
8953else
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955$as_echo "no" >&6; }
8956fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008957CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008958
Michael W. Hudson54241132001-12-07 15:38:26 +00008959
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008960case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008961 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008962 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8963 ;;
8964 Darwin/*)
8965 OTHER_LIBTOOL_OPT=""
8966 ;;
8967esac
8968
8969
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008970
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008971case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008972 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008973 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8974 if test "${enable_universalsdk}"; then
8975 :
8976 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008977 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008978 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008979 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008980 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008981 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008982 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008983 if test ${gcc_version} '<' 4.0
8984 then
8985 LIBTOOL_CRUFT="-lcc_dynamic"
8986 else
8987 LIBTOOL_CRUFT=""
8988 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008990 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008991else
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008993/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008994
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008995 #include <unistd.h>
8996 int main(int argc, char*argv[])
8997 {
8998 if (sizeof(long) == 4) {
8999 return 0;
9000 } else {
9001 return 1;
9002 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009003 }
9004
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009006if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009007 ac_osx_32bit=yes
9008else
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9012 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009013fi
9014
9015
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009016 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009017 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018 i386)
9019 MACOSX_DEFAULT_ARCH="i386"
9020 ;;
9021 ppc)
9022 MACOSX_DEFAULT_ARCH="ppc"
9023 ;;
9024 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009025 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009026 ;;
9027 esac
9028 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009029 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009030 i386)
9031 MACOSX_DEFAULT_ARCH="x86_64"
9032 ;;
9033 ppc)
9034 MACOSX_DEFAULT_ARCH="ppc64"
9035 ;;
9036 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009037 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038 ;;
9039 esac
9040
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009041 fi
9042
9043 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009044 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009045 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009046esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9048$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009049if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009050then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009051 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009053 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009056
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9058$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009059 if test $enable_shared = "yes"
9060 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009061 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 +00009062 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009063else
Matthias Kloseb9621712010-04-24 17:59:49 +00009064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009066fi
9067
Matthias Kloseb9621712010-04-24 17:59:49 +00009068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9069$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009070case $ac_sys_system/$ac_sys_release in
9071 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009072
Matthias Kloseb9621712010-04-24 17:59:49 +00009073$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9076$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009077 ;;
9078 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009081 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009082esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009083
Guido van Rossum0a516c91994-09-12 10:58:40 +00009084# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009085
Michael W. Hudson54241132001-12-07 15:38:26 +00009086
9087
9088
9089
Benjamin Peterson99f03762010-04-11 22:15:28 +00009090
Thomas Wouters477c8d52006-05-27 19:21:47 +00009091
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009092# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9093# -- usually .so, .sl on HP-UX, .dll on Cygwin
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9095$as_echo_n "checking the extension of shared libraries... " >&6; }
9096if test -z "$SHLIB_SUFFIX"; then
9097 case $ac_sys_system in
9098 hp*|HP*)
9099 case `uname -m` in
9100 ia64) SHLIB_SUFFIX=.so;;
9101 *) SHLIB_SUFFIX=.sl;;
9102 esac
9103 ;;
9104 CYGWIN*) SHLIB_SUFFIX=.dll;;
9105 *) SHLIB_SUFFIX=.so;;
9106 esac
9107fi
9108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9109$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009110
Guido van Rossum0a516c91994-09-12 10:58:40 +00009111# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009112# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009113# (Shared libraries in this instance are shared modules to be loaded into
9114# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9116$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009117if test -z "$LDSHARED"
9118then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009119 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009120 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009121 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009122 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009123 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009125 if test "$GCC" = "yes" ; then
9126 LDSHARED='$(CC) -shared'
9127 LDCXXSHARED='$(CXX) -shared'
9128 else
9129 LDSHARED='$(CC) -G'
9130 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009131 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009132 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009133 if test "$GCC" = "yes" ; then
9134 LDSHARED='$(CC) -shared'
9135 LDCXXSHARED='$(CXX) -shared'
9136 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009137 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009138 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009139 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009140 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009141 LDSHARED='$(CC) -bundle'
9142 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009143 if test "$enable_framework" ; then
9144 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009145 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9146 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009147 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009148 else
9149 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009150 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009151 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009152 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009153 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009154 LDSHARED='$(CC) -bundle'
9155 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009156 if test "$enable_framework" ; then
9157 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009158 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9159 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009160 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009161 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009162 # No framework, use the Python app as bundle-loader
9163 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009164 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009165 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009166 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009167 Darwin/*)
9168 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9169 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009170
Ned Deily36820b62014-06-25 13:44:22 -07009171 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9172 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9173 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9174 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9175 if test ${dep_target_major} -eq 10 && \
9176 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009177 then
Ned Deily36820b62014-06-25 13:44:22 -07009178 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009179 LDSHARED='$(CC) -bundle'
9180 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009181 if test "$enable_framework" ; then
9182 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009183 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9184 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009185 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009186 else
9187 # No framework, use the Python app as bundle-loader
9188 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9189 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009190 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009191 fi
Ned Deily36820b62014-06-25 13:44:22 -07009192 else
9193 # building for OS X 10.3 and later
9194 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9195 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9196 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009197 fi
9198 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009199 Linux*|GNU*|QNX*)
9200 LDSHARED='$(CC) -shared'
9201 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009202 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009203 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009204 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009205 LDSHARED='$(CC) -shared'
9206 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009207 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009208 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009209 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009210 OpenBSD*)
9211 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9212 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009213 LDSHARED='$(CC) -shared $(CCSHARED)'
9214 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009215 else
9216 case `uname -r` in
9217 [01].* | 2.[0-7] | 2.[0-7].*)
9218 LDSHARED="ld -Bshareable ${LDFLAGS}"
9219 ;;
9220 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009221 LDSHARED='$(CC) -shared $(CCSHARED)'
9222 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009223 ;;
9224 esac
9225 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009226 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009227 LDSHARED='$(CC) -shared'
9228 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009229 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009230 if test "$GCC" = "yes" ; then
9231 LDSHARED='$(CC) -shared'
9232 LDCXXSHARED='$(CXX) -shared'
9233 else
9234 LDSHARED='$(CC) -G'
9235 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009236 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009237 SCO_SV*)
9238 LDSHARED='$(CC) -Wl,-G,-Bexport'
9239 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9240 CYGWIN*)
9241 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9242 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009243 *) LDSHARED="ld";;
9244 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9247$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009248LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009249BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009250# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009251# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9253$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009254if test -z "$CCSHARED"
9255then
Guido van Rossum07397971997-04-29 21:49:50 +00009256 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009257 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009258 then CCSHARED="-fPIC";
9259 elif test `uname -p` = sparc;
9260 then CCSHARED="-xcode=pic32";
9261 else CCSHARED="-Kpic";
9262 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009263 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009264 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009265 else CCSHARED="+z";
9266 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009267 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009268 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009269 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009270 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009271 if test "$GCC" = "yes"
9272 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009273 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009274 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009275 SCO_SV*)
9276 if test "$GCC" = "yes"
9277 then CCSHARED="-fPIC"
9278 else CCSHARED="-Kpic -belf"
9279 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9283$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009284# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009285# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9287$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009288if test -z "$LINKFORSHARED"
9289then
Guido van Rossum07397971997-04-29 21:49:50 +00009290 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009291 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009292 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009293 LINKFORSHARED="-Wl,-E -Wl,+s";;
9294# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009295 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009296 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009299 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009300
9301 # Issue #18075: the default maximum stack size (8MBytes) is too
9302 # small for the default recursion limit. Increase the stack size
9303 # to ensure that tests don't crash
9304 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9305
Jack Jansene578a632001-08-15 01:27:14 +00009306 if test "$enable_framework"
9307 then
Jack Jansenda49e192005-01-07 13:08:22 +00009308 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009309 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009310 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009311 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009312 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009313 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009314 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009315 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9316 then
9317 LINKFORSHARED="-Wl,--export-dynamic"
9318 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009319 SunOS/5*) case $CC in
9320 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009321 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009322 then
9323 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009324 fi;;
9325 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009326 CYGWIN*)
9327 if test $enable_shared = "no"
9328 then
9329 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9330 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009331 QNX*)
9332 # -Wl,-E causes the symbols to be added to the dynamic
9333 # symbol table so that they can be found when a module
9334 # is loaded. -N 2048K causes the stack size to be set
9335 # to 2048 kilobytes so that the stack doesn't overflow
9336 # when running test_compile.py.
9337 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009338 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9341$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009342
Michael W. Hudson54241132001-12-07 15:38:26 +00009343
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9346$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009347if test ! "$LIBRARY" = "$LDLIBRARY"
9348then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009349 case $ac_sys_system in
9350 CYGWIN*)
9351 # Cygwin needs CCSHARED when building extension DLLs
9352 # but not when building the interpreter DLL.
9353 CFLAGSFORSHARED='';;
9354 *)
9355 CFLAGSFORSHARED='$(CCSHARED)'
9356 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9359$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009360
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009361# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9362# library (with --enable-shared).
9363# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009364# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9365# if it is not required, since it creates a dependency of the shared library
9366# to LIBS. This, in turn, means that applications linking the shared libpython
9367# don't need to link LIBS explicitly. The default should be only changed
9368# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009369
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9371$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009372case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009373 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009374 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009375esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9377$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009378
9379
Guido van Rossum627b2d71993-12-24 10:39:16 +00009380# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9382$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009383if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009384 $as_echo_n "(cached) " >&6
9385else
9386 ac_check_lib_save_LIBS=$LIBS
9387LIBS="-lsendfile $LIBS"
9388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9389/* end confdefs.h. */
9390
9391/* Override any GCC internal prototype to avoid an error.
9392 Use char because int might match the return type of a GCC
9393 builtin and then its argument prototype would still apply. */
9394#ifdef __cplusplus
9395extern "C"
9396#endif
9397char sendfile ();
9398int
9399main ()
9400{
9401return sendfile ();
9402 ;
9403 return 0;
9404}
9405_ACEOF
9406if ac_fn_c_try_link "$LINENO"; then :
9407 ac_cv_lib_sendfile_sendfile=yes
9408else
9409 ac_cv_lib_sendfile_sendfile=no
9410fi
9411rm -f core conftest.err conftest.$ac_objext \
9412 conftest$ac_exeext conftest.$ac_ext
9413LIBS=$ac_check_lib_save_LIBS
9414fi
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9416$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009417if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009418 cat >>confdefs.h <<_ACEOF
9419#define HAVE_LIBSENDFILE 1
9420_ACEOF
9421
9422 LIBS="-lsendfile $LIBS"
9423
9424fi
9425
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9427$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009428if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009429 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009430else
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009432LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436/* Override any GCC internal prototype to avoid an error.
9437 Use char because int might match the return type of a GCC
9438 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009439#ifdef __cplusplus
9440extern "C"
9441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009442char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009443int
9444main ()
9445{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ;
9448 return 0;
9449}
9450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009451if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009453else
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009456rm -f core conftest.err conftest.$ac_objext \
9457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009458LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9461$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009462if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 cat >>confdefs.h <<_ACEOF
9464#define HAVE_LIBDL 1
9465_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009466
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009467 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009469fi
9470 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9472$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009474 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009475else
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009477LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481/* Override any GCC internal prototype to avoid an error.
9482 Use char because int might match the return type of a GCC
9483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009484#ifdef __cplusplus
9485extern "C"
9486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009487char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009488int
9489main ()
9490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009491return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 ;
9493 return 0;
9494}
9495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009498else
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009501rm -f core conftest.err conftest.$ac_objext \
9502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009503LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9506$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009507if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 cat >>confdefs.h <<_ACEOF
9509#define HAVE_LIBDLD 1
9510_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009512 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009513
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009514fi
9515 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009516
Michael Felt0d3ccb42017-12-30 22:39:20 +01009517# checks for uuid.h location
9518for ac_header in uuid/uuid.h uuid.h
9519do :
9520 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9521ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9522if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9523 cat >>confdefs.h <<_ACEOF
9524#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9525_ACEOF
9526
9527fi
9528
9529done
9530
9531
Berker Peksag9a10ff42017-11-08 23:09:16 +03009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9533$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9535/* end confdefs.h. */
9536#include <uuid/uuid.h>
9537int
9538main ()
9539{
9540
9541#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009542void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009543#endif
9544
9545 ;
9546 return 0;
9547}
9548_ACEOF
9549if ac_fn_c_try_compile "$LINENO"; then :
9550
9551$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9552
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9554$as_echo "yes" >&6; }
9555else
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9557$as_echo "no" >&6; }
9558
9559fi
9560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9561
Michael Felt0d3ccb42017-12-30 22:39:20 +01009562# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RFC4122 - uuid support on AIX" >&5
9564$as_echo_n "checking for RFC4122 - uuid support on AIX... " >&6; }
9565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9566/* end confdefs.h. */
9567#include <uuid.h>
9568int
9569main ()
9570{
9571
9572#ifndef uuid_create
9573void *x = uuid_create
9574#endif
9575
9576 ;
9577 return 0;
9578}
9579_ACEOF
9580if ac_fn_c_try_compile "$LINENO"; then :
9581
9582$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9583
9584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9585$as_echo "yes" >&6; }
9586else
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9588$as_echo "no" >&6; }
9589
9590fi
9591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9592
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009593# 'Real Time' functions on Solaris
9594# posix4 on Solaris 2.6
9595# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009597$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009598if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009599 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009600else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009601 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605/* Override any GCC internal prototype to avoid an error.
9606 Use char because int might match the return type of a GCC
9607 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009608#ifdef __cplusplus
9609extern "C"
9610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009611char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009612int
9613main ()
9614{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 ;
9617 return 0;
9618}
9619_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620for ac_lib in '' pthread rt posix4; do
9621 if test -z "$ac_lib"; then
9622 ac_res="none required"
9623 else
9624 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009625 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009630rm -f core conftest.err conftest.$ac_objext \
9631 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009632 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635done
Victor Stinnere0be4232011-10-25 13:06:09 +02009636if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638else
9639 ac_cv_search_sem_init=no
9640fi
9641rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009642LIBS=$ac_func_search_save_LIBS
9643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9645$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009647if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009649
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009650fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009651
Martin v. Löwis519adae2003-09-20 10:47:47 +00009652
Martin v. Löwis19d17342003-06-14 21:03:05 +00009653# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9655$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009656if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658else
9659 ac_check_lib_save_LIBS=$LIBS
9660LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009662/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664/* Override any GCC internal prototype to avoid an error.
9665 Use char because int might match the return type of a GCC
9666 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009667#ifdef __cplusplus
9668extern "C"
9669#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009670char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009671int
9672main ()
9673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009675 ;
9676 return 0;
9677}
9678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009680 ac_cv_lib_intl_textdomain=yes
9681else
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009684rm -f core conftest.err conftest.$ac_objext \
9685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009686LIBS=$ac_check_lib_save_LIBS
9687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9689$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009690if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009691
Matthias Kloseb9621712010-04-24 17:59:49 +00009692$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009693
Brett Cannonc6d936e2009-06-07 20:09:53 +00009694 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009695fi
9696
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009697
9698# checks for system dependent C++ extensions support
9699case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9701$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009704
Georg Brandl59e87bd2011-02-15 19:48:59 +00009705 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009706int
9707main ()
9708{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009709loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 ;
9711 return 0;
9712}
Matthias Kloseb159a552010-04-25 21:00:44 +00009713
Martin v. Löwis11437992002-04-12 09:54:03 +00009714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009715if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009716
Matthias Kloseb159a552010-04-25 21:00:44 +00009717
Matthias Kloseb9621712010-04-24 17:59:49 +00009718$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009719
Matthias Kloseb159a552010-04-25 21:00:44 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009721$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009722
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009723else
Matthias Kloseb159a552010-04-25 21:00:44 +00009724
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009726$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009727
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009729rm -f core conftest.err conftest.$ac_objext \
9730 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009731 *) ;;
9732esac
9733
Christian Heimes985ecdc2013-11-20 11:46:18 +01009734# check for systems that require aligned memory access
9735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9736$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009737if ${ac_cv_aligned_required+:} false; then :
9738 $as_echo_n "(cached) " >&6
9739else
9740 if test "$cross_compiling" = yes; then :
9741 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009742else
9743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9744/* end confdefs.h. */
9745
9746int main()
9747{
9748 char s[16];
9749 int i, *p1, *p2;
9750 for (i=0; i < 16; i++)
9751 s[i] = i;
9752 p1 = (int*)(s+1);
9753 p2 = (int*)(s+2);
9754 if (*p1 == *p2)
9755 return 1;
9756 return 0;
9757}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009758_ACEOF
9759if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009760 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009761else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009762 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009763fi
9764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9765 conftest.$ac_objext conftest.beam conftest.$ac_ext
9766fi
9767
9768
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009769fi
9770
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9772$as_echo "$ac_cv_aligned_required" >&6; }
9773if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009774
9775$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9776
9777fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009778
9779# str, bytes and memoryview hash algorithm
9780
9781
9782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9783$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9784
9785# Check whether --with-hash_algorithm was given.
9786if test "${with_hash_algorithm+set}" = set; then :
9787 withval=$with_hash_algorithm;
9788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9789$as_echo "$withval" >&6; }
9790case "$withval" in
9791 siphash24)
9792 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9793
9794 ;;
9795 fnv)
9796 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9797
9798 ;;
9799 *)
9800 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9801 ;;
9802esac
9803
9804else
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9806$as_echo "default" >&6; }
9807fi
9808
9809
Charles-François Natalid30b0222014-05-08 23:08:51 +01009810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9811$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9812
9813# Check whether --with-address_sanitizer was given.
9814if test "${with_address_sanitizer+set}" = set; then :
9815 withval=$with_address_sanitizer;
9816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9817$as_echo "$withval" >&6; }
9818BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9819LDFLAGS="-fsanitize=address $LDFLAGS"
9820
9821else
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9823$as_echo "no" >&6; }
9824fi
9825
9826
Guido van Rossum70c7f481998-03-26 18:44:10 +00009827# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9829$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009830if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009832else
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009834LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009844char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009860LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9863$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009865 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009866fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009867 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9869$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009870if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009871 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009872else
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009874LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878/* Override any GCC internal prototype to avoid an error.
9879 Use char because int might match the return type of a GCC
9880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009881#ifdef __cplusplus
9882extern "C"
9883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009884char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009885int
9886main ()
9887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 ;
9890 return 0;
9891}
9892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009895else
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898rm -f core conftest.err conftest.$ac_objext \
9899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009900LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9903$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009904if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009905 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009906fi
9907 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009908
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9910$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009913if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9916$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009917LIBS="$withval $LIBS"
9918
9919else
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9921$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922fi
9923
Guido van Rossum7f43da71994-08-01 12:15:30 +00009924
Victor Stinner8291b5e2015-03-20 16:03:14 +01009925
9926
9927
9928
9929
9930
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009931
Victor Stinner8291b5e2015-03-20 16:03:14 +01009932if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9933 if test -n "$ac_tool_prefix"; then
9934 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9935set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9937$as_echo_n "checking for $ac_word... " >&6; }
9938if ${ac_cv_path_PKG_CONFIG+:} false; then :
9939 $as_echo_n "(cached) " >&6
9940else
9941 case $PKG_CONFIG in
9942 [\\/]* | ?:[\\/]*)
9943 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9944 ;;
9945 *)
9946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9947for as_dir in $PATH
9948do
9949 IFS=$as_save_IFS
9950 test -z "$as_dir" && as_dir=.
9951 for ac_exec_ext in '' $ac_executable_extensions; do
9952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9953 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9955 break 2
9956 fi
9957done
9958 done
9959IFS=$as_save_IFS
9960
9961 ;;
9962esac
9963fi
9964PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9965if test -n "$PKG_CONFIG"; then
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9967$as_echo "$PKG_CONFIG" >&6; }
9968else
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9970$as_echo "no" >&6; }
9971fi
9972
9973
9974fi
9975if test -z "$ac_cv_path_PKG_CONFIG"; then
9976 ac_pt_PKG_CONFIG=$PKG_CONFIG
9977 # Extract the first word of "pkg-config", so it can be a program name with args.
9978set dummy pkg-config; ac_word=$2
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9980$as_echo_n "checking for $ac_word... " >&6; }
9981if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9982 $as_echo_n "(cached) " >&6
9983else
9984 case $ac_pt_PKG_CONFIG in
9985 [\\/]* | ?:[\\/]*)
9986 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9987 ;;
9988 *)
9989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9990for as_dir in $PATH
9991do
9992 IFS=$as_save_IFS
9993 test -z "$as_dir" && as_dir=.
9994 for ac_exec_ext in '' $ac_executable_extensions; do
9995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9996 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9998 break 2
9999 fi
10000done
10001 done
10002IFS=$as_save_IFS
10003
10004 ;;
10005esac
10006fi
10007ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10008if test -n "$ac_pt_PKG_CONFIG"; then
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10010$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10011else
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
10014fi
10015
10016 if test "x$ac_pt_PKG_CONFIG" = x; then
10017 PKG_CONFIG=""
10018 else
10019 case $cross_compiling:$ac_tool_warned in
10020yes:)
10021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10023ac_tool_warned=yes ;;
10024esac
10025 PKG_CONFIG=$ac_pt_PKG_CONFIG
10026 fi
10027else
10028 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10029fi
10030
10031fi
10032if test -n "$PKG_CONFIG"; then
10033 _pkg_min_version=0.9.0
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10035$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10036 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10038$as_echo "yes" >&6; }
10039 else
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041$as_echo "no" >&6; }
10042 PKG_CONFIG=""
10043 fi
10044fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010045
10046# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10048$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010049
10050# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010051if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010052 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010053else
10054 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010055fi
10056
10057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10059$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010060
10061# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10063$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010064
10065# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010066if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010067 withval=$with_system_ffi;
10068fi
10069
10070
Zachary Waref40d4dd2016-09-17 01:25:24 -050010071if test "$ac_sys_system" = "Darwin"
10072then
10073 case "$with_system_ffi" in
10074 "")
10075 with_system_ffi="no"
10076 ;;
10077 yes|no)
10078 ;;
10079 *)
10080 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10081 ;;
10082 esac
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10084$as_echo "$with_system_ffi" >&6; }
10085else
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10087$as_echo "yes" >&6; }
10088 if test "$with_system_ffi" != ""
10089 then
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10091$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10092 fi
10093 with_system_ffi="yes"
10094fi
Zachary Ware935043d2016-09-09 17:01:21 -070010095
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010096if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010097 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10098else
10099 LIBFFI_INCLUDEDIR=""
10100fi
10101
10102
Stefan Krah60187b52012-03-23 19:06:27 +010010103# Check for use of the system libmpdec library
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10105$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10106
10107# Check whether --with-system_libmpdec was given.
10108if test "${with_system_libmpdec+set}" = set; then :
10109 withval=$with_system_libmpdec;
10110else
10111 with_system_libmpdec="no"
10112fi
10113
10114
10115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10116$as_echo "$with_system_libmpdec" >&6; }
10117
Benjamin Peterson076ed002010-10-31 17:11:02 +000010118# Check for support for loadable sqlite extensions
10119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10120$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10121# Check whether --enable-loadable-sqlite-extensions was given.
10122if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10123 enableval=$enable_loadable_sqlite_extensions;
10124else
10125 enable_loadable_sqlite_extensions="no"
10126fi
10127
10128
10129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10130$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10131
Ned Deilyd819b932013-09-06 01:07:05 -070010132# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10133
10134
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10136$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10137
10138# Check whether --with-tcltk-includes was given.
10139if test "${with_tcltk_includes+set}" = set; then :
10140 withval=$with_tcltk_includes;
10141else
10142 with_tcltk_includes="default"
10143fi
10144
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10146$as_echo "$with_tcltk_includes" >&6; }
10147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10148$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10149
10150# Check whether --with-tcltk-libs was given.
10151if test "${with_tcltk_libs+set}" = set; then :
10152 withval=$with_tcltk_libs;
10153else
10154 with_tcltk_libs="default"
10155fi
10156
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10158$as_echo "$with_tcltk_libs" >&6; }
10159if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10160then
10161 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10162 then
10163 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10164 fi
10165 TCLTK_INCLUDES=""
10166 TCLTK_LIBS=""
10167else
10168 TCLTK_INCLUDES="$with_tcltk_includes"
10169 TCLTK_LIBS="$with_tcltk_libs"
10170fi
10171
Matthias Klose55708cc2009-04-30 08:06:49 +000010172# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10174$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010175
10176# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010177if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010178 withval=$with_dbmliborder;
10179if test x$with_dbmliborder = xyes
10180then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010181as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010182else
10183 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10184 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10185 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010186 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010187 fi
10188 done
10189fi
10190fi
10191
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10193$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195
Martin v. Löwis11437992002-04-12 09:54:03 +000010196
10197# Templates for things AC_DEFINEd more than once.
10198# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010199
10200
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010201if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010202then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010203 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205
10206 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010207elif test "$ac_cv_kpthread" = "yes"
10208then
10209 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010210 if test "$ac_cv_cxx_thread" = "yes"; then
10211 CXX="$CXX -Kpthread"
10212 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010213 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010214elif test "$ac_cv_kthread" = "yes"
10215then
10216 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010217 if test "$ac_cv_cxx_thread" = "yes"; then
10218 CXX="$CXX -Kthread"
10219 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010220 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010221elif test "$ac_cv_pthread" = "yes"
10222then
10223 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010224 if test "$ac_cv_cxx_thread" = "yes"; then
10225 CXX="$CXX -pthread"
10226 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010227 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010228else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010229 if test ! -z "$withval" -a -d "$withval"
10230 then LDFLAGS="$LDFLAGS -L$withval"
10231 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010232
10233 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010234 # define _POSIX_THREADS in unistd.h. Some apparently don't
10235 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10237$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010239/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010240
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010242#ifdef _POSIX_THREADS
10243yes
10244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
10246_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010249 unistd_defines_pthreads=yes
10250else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251 unistd_defines_pthreads=no
10252fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010253rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010254
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10256$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010259
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010260 # Just looking for pthread_create in libpthread is not enough:
10261 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10262 # So we really have to include pthread.h, and then link.
10263 _libs=$LIBS
10264 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10266$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010269
10270#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010271#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010272
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010273void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010274int
10275main ()
10276{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010277
10278pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ;
10280 return 0;
10281}
10282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010284
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10286$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010287 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010288
Guido van Rossum02a1c402000-02-25 19:26:31 +000010289else
Martin v. Löwis11437992002-04-12 09:54:03 +000010290
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010291 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010292 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010293if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010294
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010295 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010296
Guido van Rossumad678af1998-10-02 14:42:15 +000010297else
Guido van Rossumad678af1998-10-02 14:42:15 +000010298
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10300$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010301if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010303else
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010305LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309/* Override any GCC internal prototype to avoid an error.
10310 Use char because int might match the return type of a GCC
10311 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010312#ifdef __cplusplus
10313extern "C"
10314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010315char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010316int
10317main ()
10318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010326else
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010329rm -f core conftest.err conftest.$ac_objext \
10330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010331LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10334$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010335if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010336
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010337 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010338 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010339
Greg Steinadf63d62000-07-05 10:38:09 +000010340else
Greg Steinadf63d62000-07-05 10:38:09 +000010341
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10343$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010344if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010346else
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010348LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352/* Override any GCC internal prototype to avoid an error.
10353 Use char because int might match the return type of a GCC
10354 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010355#ifdef __cplusplus
10356extern "C"
10357#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010358char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010359int
10360main ()
10361{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010362return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ;
10364 return 0;
10365}
10366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010367if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010369else
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010372rm -f core conftest.err conftest.$ac_objext \
10373 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010374LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10377$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010378if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010380 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010381 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010382
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010383else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010384
Matthias Kloseb9621712010-04-24 17:59:49 +000010385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10386$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010387if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010389else
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010391LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395/* Override any GCC internal prototype to avoid an error.
10396 Use char because int might match the return type of a GCC
10397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010398#ifdef __cplusplus
10399extern "C"
10400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010401char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010402int
10403main ()
10404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 ;
10407 return 0;
10408}
10409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010410if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010412else
Matthias Kloseb9621712010-04-24 17:59:49 +000010413 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010415rm -f core conftest.err conftest.$ac_objext \
10416 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010417LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10420$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010421if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010422
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010423 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010424 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010425
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010426else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10429$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010430if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010432else
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010434LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438/* Override any GCC internal prototype to avoid an error.
10439 Use char because int might match the return type of a GCC
10440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010441#ifdef __cplusplus
10442extern "C"
10443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010444char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010445int
10446main ()
10447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ;
10450 return 0;
10451}
10452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010455else
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010458rm -f core conftest.err conftest.$ac_objext \
10459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010460LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10463$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010464if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010465
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010466 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010467 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010468
Guido van Rossumb93a8621998-05-07 13:27:32 +000010469else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010470
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010471 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10472
Guido van Rossum2d38f911996-06-26 19:47:01 +000010473fi
10474
Guido van Rossum627b2d71993-12-24 10:39:16 +000010475
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010476fi
10477
Guido van Rossum0be3e491997-05-22 20:33:33 +000010478fi
10479
Guido van Rossum49545951997-12-02 19:28:29 +000010480fi
10481
Guido van Rossumb93a8621998-05-07 13:27:32 +000010482fi
10483
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010485rm -f core conftest.err conftest.$ac_objext \
10486 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010487
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10489$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010490if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010492else
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010494LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498/* Override any GCC internal prototype to avoid an error.
10499 Use char because int might match the return type of a GCC
10500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010501#ifdef __cplusplus
10502extern "C"
10503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010504char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010505int
10506main ()
10507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ;
10510 return 0;
10511}
10512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010514 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010515else
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010518rm -f core conftest.err conftest.$ac_objext \
10519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010520LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10523$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010524if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010525
Martin v. Löwis130fb172001-07-19 11:00:41 +000010526 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010527
Guido van Rossum627b2d71993-12-24 10:39:16 +000010528fi
10529
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010530
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010531fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010532
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010533if test "$posix_threads" = "yes"; then
10534 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010537
10538 fi
10539
10540 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10541 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010542 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010543$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010544
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010545 ;;
10546 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010547$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010548
10549 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010550 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010551$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010552
10553 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554 esac
10555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10557$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010558 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010559 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010560else
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010562 ac_cv_pthread_system_supported=no
10563else
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010565/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010566
10567 #include <stdio.h>
10568 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010569 void *foo(void *parm) {
10570 return NULL;
10571 }
10572 main() {
10573 pthread_attr_t attr;
10574 pthread_t id;
10575 if (pthread_attr_init(&attr)) exit(-1);
10576 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10577 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10578 exit(0);
10579 }
10580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010581if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010582 ac_cv_pthread_system_supported=yes
10583else
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010588fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590
Guido van Rossum627b2d71993-12-24 10:39:16 +000010591fi
10592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10594$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595 if test "$ac_cv_pthread_system_supported" = "yes"; then
10596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010598
10599 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 for ac_func in pthread_sigmask
10601do :
10602 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010603if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010606_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010607 case $ac_sys_system in
10608 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609
Matthias Kloseb9621712010-04-24 17:59:49 +000010610$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010611
10612 ;;
10613 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010614fi
10615done
10616
pdoxe14679c2017-10-05 00:01:56 -070010617 for ac_func in pthread_getcpuclockid
10618do :
10619 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10620if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10621 cat >>confdefs.h <<_ACEOF
10622#define HAVE_PTHREAD_GETCPUCLOCKID 1
10623_ACEOF
10624
10625fi
10626done
10627
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628fi
10629
10630
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010631# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010632
Matthias Kloseb9621712010-04-24 17:59:49 +000010633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10634$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010636if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10640$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010641 ipv6=no
10642 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10644$as_echo "yes" >&6; }
10645 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646
10647 ipv6=yes
10648 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010650else
Martin v. Löwis11437992002-04-12 09:54:03 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010653/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010654 /* AF_INET6 available check */
10655#include <sys/types.h>
10656#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010657int
10658main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010660int domain = AF_INET6;
10661 ;
10662 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010663}
Martin v. Löwis11437992002-04-12 09:54:03 +000010664_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010665if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10668$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010670
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010671else
Matthias Kloseb159a552010-04-25 21:00:44 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10674$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010675 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010676
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010677fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010680if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10682$as_echo_n "checking if RFC2553 API is available... " >&6; }
10683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010684/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010685
10686 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010687#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010688int
10689main ()
10690{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010691struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010692 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 ;
10694 return 0;
10695}
Matthias Kloseb159a552010-04-25 21:00:44 +000010696
Martin v. Löwis11437992002-04-12 09:54:03 +000010697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010698if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010699
10700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010701$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010702 ipv6=yes
10703
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010704else
Matthias Kloseb159a552010-04-25 21:00:44 +000010705
10706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010708 ipv6=no
10709
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010712fi
10713
10714if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010716
10717fi
10718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719fi
10720
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010721
10722ipv6type=unknown
10723ipv6lib=none
10724ipv6trylibc=no
10725
10726if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10728$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010729 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10730 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731 case $i in
10732 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010734/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010735
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010736#include <netinet/in.h>
10737#ifdef IPV6_INRIA_VERSION
10738yes
10739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010740_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010743 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010745rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010746
10747 ;;
10748 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010751
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752#include <netinet/in.h>
10753#ifdef __KAME__
10754yes
10755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010756_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759 ipv6type=$i;
10760 ipv6lib=inet6
10761 ipv6libdir=/usr/local/v6/lib
10762 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010764rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765
10766 ;;
10767 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010769/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771#include <features.h>
10772#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10773yes
10774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010775_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010777 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778 ipv6type=$i;
10779 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010781rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782
10783 ;;
10784 linux-inet6)
10785 if test -d /usr/inet6; then
10786 ipv6type=$i
10787 ipv6lib=inet6
10788 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010789 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790 fi
10791 ;;
10792 solaris)
10793 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010794 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6type=$i
10796 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797 fi
10798 fi
10799 ;;
10800 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010802/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010803
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804#include <sys/param.h>
10805#ifdef _TOSHIBA_INET6
10806yes
10807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010808_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811 ipv6type=$i;
10812 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010813 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010815rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816
10817 ;;
10818 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010821
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822#include </usr/local/v6/include/sys/v6config.h>
10823#ifdef __V6D__
10824yes
10825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010826_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829 ipv6type=$i;
10830 ipv6lib=v6;
10831 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010832 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010834rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835
10836 ;;
10837 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841#include <sys/param.h>
10842#ifdef _ZETA_MINAMI_INET6
10843yes
10844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 ipv6type=$i;
10849 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010850 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010852rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853
10854 ;;
10855 esac
10856 if test "$ipv6type" != "unknown"; then
10857 break
10858 fi
10859 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10861$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862fi
10863
10864if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10865 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10866 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10867 echo "using lib$ipv6lib"
10868 else
10869 if test $ipv6trylibc = "yes"; then
10870 echo "using libc"
10871 else
10872 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10873 echo "You need to fetch lib$ipv6lib.a from appropriate"
10874 echo 'ipv6 kit and compile beforehand.'
10875 exit 1
10876 fi
10877 fi
10878fi
10879
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10881$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10883/* end confdefs.h. */
10884 /* CAN_RAW_FD_FRAMES available check */
10885#include <linux/can/raw.h>
10886int
10887main ()
10888{
10889int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10890 ;
10891 return 0;
10892}
10893_ACEOF
10894if ac_fn_c_try_compile "$LINENO"; then :
10895
10896
10897$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10898
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10900$as_echo "yes" >&6; }
10901
10902else
10903
10904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10905$as_echo "no" >&6; }
10906
10907fi
10908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010910# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10912$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010915if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916 withval=$with_doc_strings;
10917fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010918
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010919
10920if test -z "$with_doc_strings"
10921then with_doc_strings="yes"
10922fi
10923if test "$with_doc_strings" != "no"
10924then
10925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010927
10928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10930$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010931
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010932# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10934$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010937if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938 withval=$with_pymalloc;
10939fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010940
Neil Schemenauera35c6882001-02-27 04:45:05 +000010941
Neil Schemenauer16c22972002-03-22 15:34:49 +000010942if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010943then
10944 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010945fi
10946if test "$with_pymalloc" != "no"
10947then
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010950
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010951 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10954$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010955
Nick Coghlan6ea41862017-06-11 13:16:15 +100010956# Check for --with-c-locale-coercion
10957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10958$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10959
10960# Check whether --with-c-locale-coercion was given.
10961if test "${with_c_locale_coercion+set}" = set; then :
10962 withval=$with_c_locale_coercion;
10963fi
10964
10965
10966if test -z "$with_c_locale_coercion"
10967then
10968 with_c_locale_coercion="yes"
10969fi
10970if test "$with_c_locale_coercion" != "no"
10971then
10972
10973$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10974
10975fi
10976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10977$as_echo "$with_c_locale_coercion" >&6; }
10978
10979# Check for --with-c-locale-warning
10980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10981$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10982
10983# Check whether --with-c-locale-warning was given.
10984if test "${with_c_locale_warning+set}" = set; then :
10985 withval=$with_c_locale_warning;
10986fi
10987
10988
10989if test -z "$with_c_locale_warning"
10990then
10991 with_c_locale_warning="yes"
10992fi
10993if test "$with_c_locale_warning" != "no"
10994then
10995
10996$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10997
10998fi
10999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11000$as_echo "$with_c_locale_warning" >&6; }
11001
Benjamin Peterson05159c42009-12-03 03:01:27 +000011002# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11004$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011005
11006# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011007if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011008 withval=$with_valgrind;
11009else
11010 with_valgrind=no
11011fi
11012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11014$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011015if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 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 +020011017if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011020
11021else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011022 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011023
11024fi
11025
11026
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011027 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011028fi
11029
Łukasz Langaa785c872016-09-09 17:37:37 -070011030# Check for DTrace support
11031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11032$as_echo_n "checking for --with-dtrace... " >&6; }
11033
11034# Check whether --with-dtrace was given.
11035if test "${with_dtrace+set}" = set; then :
11036 withval=$with_dtrace;
11037else
11038 with_dtrace=no
11039fi
11040
11041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11042$as_echo "$with_dtrace" >&6; }
11043
11044
11045
11046
11047
11048DTRACE=
11049DFLAGS=
11050DTRACE_HEADERS=
11051DTRACE_OBJS=
11052
11053if test "$with_dtrace" = "yes"
11054then
11055 # Extract the first word of "dtrace", so it can be a program name with args.
11056set dummy dtrace; ac_word=$2
11057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11058$as_echo_n "checking for $ac_word... " >&6; }
11059if ${ac_cv_path_DTRACE+:} false; then :
11060 $as_echo_n "(cached) " >&6
11061else
11062 case $DTRACE in
11063 [\\/]* | ?:[\\/]*)
11064 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11065 ;;
11066 *)
11067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11068for as_dir in $PATH
11069do
11070 IFS=$as_save_IFS
11071 test -z "$as_dir" && as_dir=.
11072 for ac_exec_ext in '' $ac_executable_extensions; do
11073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11074 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11076 break 2
11077 fi
11078done
11079 done
11080IFS=$as_save_IFS
11081
11082 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11083 ;;
11084esac
11085fi
11086DTRACE=$ac_cv_path_DTRACE
11087if test -n "$DTRACE"; then
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11089$as_echo "$DTRACE" >&6; }
11090else
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
11093fi
11094
11095
11096 if test "$DTRACE" = "not found"; then
11097 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11098 fi
11099
11100$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11101
11102 DTRACE_HEADERS="Include/pydtrace_probes.h"
11103
11104 # On OS X, DTrace providers do not need to be explicitly compiled and
11105 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11106 # generation flag '-G'. We check for presence of this flag, rather than
11107 # hardcoding support by OS, in the interest of robustness.
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11109$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11110if ${ac_cv_dtrace_link+:} false; then :
11111 $as_echo_n "(cached) " >&6
11112else
11113 ac_cv_dtrace_link=no
11114 echo 'BEGIN' > conftest.d
11115 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11116 ac_cv_dtrace_link=yes
11117
11118fi
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11120$as_echo "$ac_cv_dtrace_link" >&6; }
11121 if test "$ac_cv_dtrace_link" = "yes"; then
11122 DTRACE_OBJS="Python/pydtrace.o"
11123 fi
11124fi
11125
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011126# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011127
Guido van Rossum98935bf2001-09-05 19:13:16 +000011128DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011129
Guido van Rossume97ee181999-12-20 21:27:22 +000011130# the dlopen() function means we might want to use dynload_shlib.o. some
11131# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011132for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011133do :
11134 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011135if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011137#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011139
Guido van Rossume97ee181999-12-20 21:27:22 +000011140fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011141done
Guido van Rossume97ee181999-12-20 21:27:22 +000011142
Michael W. Hudson54241132001-12-07 15:38:26 +000011143
Guido van Rossume97ee181999-12-20 21:27:22 +000011144# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11145# loading of modules.
11146
Matthias Kloseb9621712010-04-24 17:59:49 +000011147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11148$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011149if test -z "$DYNLOADFILE"
11150then
11151 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011152 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11153 if test "$ac_cv_func_dlopen" = yes
11154 then DYNLOADFILE="dynload_shlib.o"
11155 else DYNLOADFILE="dynload_aix.o"
11156 fi
11157 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011158 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011159 *)
11160 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11161 # out any dynamic loading
11162 if test "$ac_cv_func_dlopen" = yes
11163 then DYNLOADFILE="dynload_shlib.o"
11164 else DYNLOADFILE="dynload_stub.o"
11165 fi
11166 ;;
11167 esac
11168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11170$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011171if test "$DYNLOADFILE" != "dynload_stub.o"
11172then
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011175
11176fi
11177
Neil Schemenauer4e425612001-06-19 15:44:15 +000011178# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11179
Michael W. Hudson54241132001-12-07 15:38:26 +000011180
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11182$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011183if test -z "$MACHDEP_OBJS"
11184then
Jack Jansene578a632001-08-15 01:27:14 +000011185 MACHDEP_OBJS=$extra_machdep_objs
11186else
11187 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011188fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011189if test -z "$MACHDEP_OBJS"; then
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11191$as_echo "none" >&6; }
11192else
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11194$as_echo "$MACHDEP_OBJS" >&6; }
11195fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011196
Guido van Rossum627b2d71993-12-24 10:39:16 +000011197# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011198for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011199 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011200 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011201 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011202 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011203 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011204 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011205 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011206 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011207 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011208 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011209 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011210 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011211 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011212 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011213 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11214 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011215 sigaction sigaltstack siginterrupt sigpending sigrelse \
11216 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011217 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011218 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011219 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011220do :
11221 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11222ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011223if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011225#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011226_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011227
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011228fi
11229done
11230
Michael W. Hudson54241132001-12-07 15:38:26 +000011231
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011232ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11233 #include <dirent.h>
11234"
11235if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11236
11237$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11238
11239fi
11240
11241
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011242# For some functions, having a definition is not sufficient, since
11243# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11245$as_echo_n "checking for chroot... " >&6; }
11246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011247/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011248#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011249int
11250main ()
11251{
11252void *x=chroot
11253 ;
11254 return 0;
11255}
11256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011258
Matthias Kloseb9621712010-04-24 17:59:49 +000011259$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011260
Matthias Kloseb159a552010-04-25 21:00:44 +000011261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011262$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011263else
Matthias Kloseb9621712010-04-24 17:59:49 +000011264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11265$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011266
11267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11270$as_echo_n "checking for link... " >&6; }
11271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011272/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011273#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011274int
11275main ()
11276{
11277void *x=link
11278 ;
11279 return 0;
11280}
11281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011285
Matthias Kloseb159a552010-04-25 21:00:44 +000011286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011288else
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11290$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011291
11292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11295$as_echo_n "checking for symlink... " >&6; }
11296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011297/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011298#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011299int
11300main ()
11301{
11302void *x=symlink
11303 ;
11304 return 0;
11305}
11306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310
Matthias Kloseb159a552010-04-25 21:00:44 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011312$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011313else
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011316
11317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11320$as_echo_n "checking for fchdir... " >&6; }
11321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011322/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011323#include <unistd.h>
11324int
11325main ()
11326{
11327void *x=fchdir
11328 ;
11329 return 0;
11330}
11331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011333
Matthias Kloseb9621712010-04-24 17:59:49 +000011334$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011335
Matthias Kloseb159a552010-04-25 21:00:44 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011337$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011338else
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11340$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011341
11342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11345$as_echo_n "checking for fsync... " >&6; }
11346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011347/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011348#include <unistd.h>
11349int
11350main ()
11351{
11352void *x=fsync
11353 ;
11354 return 0;
11355}
11356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011358
Matthias Kloseb9621712010-04-24 17:59:49 +000011359$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011360
Matthias Kloseb159a552010-04-25 21:00:44 +000011361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011362$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011363else
Matthias Kloseb9621712010-04-24 17:59:49 +000011364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11365$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011366
11367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11370$as_echo_n "checking for fdatasync... " >&6; }
11371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011373#include <unistd.h>
11374int
11375main ()
11376{
11377void *x=fdatasync
11378 ;
11379 return 0;
11380}
11381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011385
Matthias Kloseb159a552010-04-25 21:00:44 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011387$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011388else
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11390$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011391
11392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11395$as_echo_n "checking for epoll... " >&6; }
11396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011397/* end confdefs.h. */
11398#include <sys/epoll.h>
11399int
11400main ()
11401{
11402void *x=epoll_create
11403 ;
11404 return 0;
11405}
11406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011408
Matthias Kloseb9621712010-04-24 17:59:49 +000011409$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011410
Matthias Kloseb159a552010-04-25 21:00:44 +000011411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011412$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011413else
Matthias Kloseb9621712010-04-24 17:59:49 +000011414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11415$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011416
11417fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11420$as_echo_n "checking for epoll_create1... " >&6; }
11421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422/* end confdefs.h. */
11423#include <sys/epoll.h>
11424int
11425main ()
11426{
11427void *x=epoll_create1
11428 ;
11429 return 0;
11430}
11431_ACEOF
11432if ac_fn_c_try_compile "$LINENO"; then :
11433
11434$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11435
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11437$as_echo "yes" >&6; }
11438else
11439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11440$as_echo "no" >&6; }
11441
11442fi
11443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11445$as_echo_n "checking for kqueue... " >&6; }
11446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011447/* end confdefs.h. */
11448
11449#include <sys/types.h>
11450#include <sys/event.h>
11451
11452int
11453main ()
11454{
11455int x=kqueue()
11456 ;
11457 return 0;
11458}
11459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011460if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011463
Matthias Kloseb159a552010-04-25 21:00:44 +000011464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011465$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011466else
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11468$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011469
11470fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11473$as_echo_n "checking for prlimit... " >&6; }
11474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475/* end confdefs.h. */
11476
11477#include <sys/time.h>
11478#include <sys/resource.h>
11479
11480int
11481main ()
11482{
11483void *x=prlimit
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488if ac_fn_c_try_compile "$LINENO"; then :
11489
11490$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11491
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11493$as_echo "yes" >&6; }
11494else
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
11497
11498fi
11499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11500
Martin v. Löwisd5843682002-11-21 20:41:28 +000011501# On some systems (eg. FreeBSD 5), we would find a definition of the
11502# functions ctermid_r, setgroups in the library, but no prototype
11503# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11504# address to avoid compiler warnings and potential miscompilations
11505# because of the missing prototypes.
11506
Matthias Kloseb9621712010-04-24 17:59:49 +000011507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11508$as_echo_n "checking for ctermid_r... " >&6; }
11509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011510/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011511
Martin v. Löwisd5843682002-11-21 20:41:28 +000011512#include <stdio.h>
11513
Martin v. Löwisd5843682002-11-21 20:41:28 +000011514int
11515main ()
11516{
11517void* p = ctermid_r
11518 ;
11519 return 0;
11520}
11521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011523
Matthias Kloseb9621712010-04-24 17:59:49 +000011524$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011525
Matthias Kloseb159a552010-04-25 21:00:44 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011527$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011528else
Matthias Kloseb9621712010-04-24 17:59:49 +000011529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11530$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011531
11532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11534
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11536$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011537if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011538 $as_echo_n "(cached) " >&6
11539else
11540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011541/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011542#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011543int
11544main ()
11545{
11546void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011547
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011548 ;
11549 return 0;
11550}
11551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011553 ac_cv_flock_decl=yes
11554else
11555 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011556
11557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011559
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011560fi
11561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11562$as_echo "$ac_cv_flock_decl" >&6; }
11563if test "x${ac_cv_flock_decl}" = xyes; then
11564 for ac_func in flock
11565do :
11566 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011567if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011568 cat >>confdefs.h <<_ACEOF
11569#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011570_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011571
Antoine Pitroua3000072010-09-07 14:52:42 +000011572else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011574$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011575if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011576 $as_echo_n "(cached) " >&6
11577else
11578 ac_check_lib_save_LIBS=$LIBS
11579LIBS="-lbsd $LIBS"
11580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11581/* end confdefs.h. */
11582
11583/* Override any GCC internal prototype to avoid an error.
11584 Use char because int might match the return type of a GCC
11585 builtin and then its argument prototype would still apply. */
11586#ifdef __cplusplus
11587extern "C"
11588#endif
11589char flock ();
11590int
11591main ()
11592{
11593return flock ();
11594 ;
11595 return 0;
11596}
11597_ACEOF
11598if ac_fn_c_try_link "$LINENO"; then :
11599 ac_cv_lib_bsd_flock=yes
11600else
11601 ac_cv_lib_bsd_flock=no
11602fi
11603rm -f core conftest.err conftest.$ac_objext \
11604 conftest$ac_exeext conftest.$ac_ext
11605LIBS=$ac_check_lib_save_LIBS
11606fi
11607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11608$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011609if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011610 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011611
11612
11613$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11614
11615
11616fi
11617
11618
11619fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011620done
11621
Antoine Pitroua3000072010-09-07 14:52:42 +000011622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623
Matthias Kloseb9621712010-04-24 17:59:49 +000011624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11625$as_echo_n "checking for getpagesize... " >&6; }
11626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011627/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011628
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011629#include <unistd.h>
11630
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011631int
11632main ()
11633{
11634void* p = getpagesize
11635 ;
11636 return 0;
11637}
11638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011642
Matthias Kloseb159a552010-04-25 21:00:44 +000011643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011644$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011645else
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011648
11649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011651
Victor Stinner984890f2011-11-24 13:53:38 +010011652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11653$as_echo_n "checking for broken unsetenv... " >&6; }
11654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11655/* end confdefs.h. */
11656
11657#include <stdlib.h>
11658
11659int
11660main ()
11661{
11662int res = unsetenv("DUMMY")
11663 ;
11664 return 0;
11665}
11666_ACEOF
11667if ac_fn_c_try_compile "$LINENO"; then :
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11669$as_echo "no" >&6; }
11670else
11671
11672$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11673
11674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11675$as_echo "yes" >&6; }
11676
11677fi
11678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11679
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011680for ac_prog in true
11681do
11682 # Extract the first word of "$ac_prog", so it can be a program name with args.
11683set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11685$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011686if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011687 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011688else
11689 if test -n "$TRUE"; then
11690 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11691else
11692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11693for as_dir in $PATH
11694do
11695 IFS=$as_save_IFS
11696 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011699 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 $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 +000011701 break 2
11702 fi
11703done
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011705IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011706
11707fi
11708fi
11709TRUE=$ac_cv_prog_TRUE
11710if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11712$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011713else
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11715$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011716fi
11717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011718
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011719 test -n "$TRUE" && break
11720done
11721test -n "$TRUE" || TRUE="/bin/true"
11722
11723
Matthias Kloseb9621712010-04-24 17:59:49 +000011724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11725$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011726if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011728else
11729 ac_check_lib_save_LIBS=$LIBS
11730LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011732/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011734/* Override any GCC internal prototype to avoid an error.
11735 Use char because int might match the return type of a GCC
11736 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011737#ifdef __cplusplus
11738extern "C"
11739#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011740char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011741int
11742main ()
11743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011745 ;
11746 return 0;
11747}
11748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011750 ac_cv_lib_c_inet_aton=yes
11751else
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011754rm -f core conftest.err conftest.$ac_objext \
11755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011756LIBS=$ac_check_lib_save_LIBS
11757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11759$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011760if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011761 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11764$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011765if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011767else
11768 ac_check_lib_save_LIBS=$LIBS
11769LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011771/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011773/* Override any GCC internal prototype to avoid an error.
11774 Use char because int might match the return type of a GCC
11775 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776#ifdef __cplusplus
11777extern "C"
11778#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011779char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780int
11781main ()
11782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011783return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784 ;
11785 return 0;
11786}
11787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789 ac_cv_lib_resolv_inet_aton=yes
11790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011793rm -f core conftest.err conftest.$ac_objext \
11794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011795LIBS=$ac_check_lib_save_LIBS
11796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11798$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011799if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800 cat >>confdefs.h <<_ACEOF
11801#define HAVE_LIBRESOLV 1
11802_ACEOF
11803
11804 LIBS="-lresolv $LIBS"
11805
11806fi
11807
11808
11809fi
11810
11811
Christian Heimesd0764e22007-12-04 15:00:33 +000011812# On Tru64, chflags seems to be present, but calling it will
11813# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11815$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011816if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011818else
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011820 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011821else
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011823/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011824
Christian Heimesd0764e22007-12-04 15:00:33 +000011825#include <sys/stat.h>
11826#include <unistd.h>
11827int main(int argc, char*argv[])
11828{
11829 if(chflags(argv[0], 0) != 0)
11830 return 1;
11831 return 0;
11832}
Ned Deily3eb67d52011-06-28 00:00:28 -070011833
Christian Heimesd0764e22007-12-04 15:00:33 +000011834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011836 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011842fi
11843
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11847$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011848if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011850if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011851 ac_cv_have_chflags="yes"
11852else
11853 ac_cv_have_chflags="no"
11854fi
11855
11856fi
11857if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011860
11861fi
11862
Matthias Kloseb9621712010-04-24 17:59:49 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11864$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011865if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011867else
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011869 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011872/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011873
Christian Heimesd0764e22007-12-04 15:00:33 +000011874#include <sys/stat.h>
11875#include <unistd.h>
11876int main(int argc, char*argv[])
11877{
11878 if(lchflags(argv[0], 0) != 0)
11879 return 1;
11880 return 0;
11881}
Ned Deily3eb67d52011-06-28 00:00:28 -070011882
Christian Heimesd0764e22007-12-04 15:00:33 +000011883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011885 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011891fi
11892
11893
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11896$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011897if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011899if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011900 ac_cv_have_lchflags="yes"
11901else
11902 ac_cv_have_lchflags="no"
11903fi
11904
11905fi
11906if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011907
Matthias Kloseb9621712010-04-24 17:59:49 +000011908$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011909
11910fi
11911
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011912case $ac_sys_system/$ac_sys_release in
11913Darwin/*)
11914 _CUR_CFLAGS="${CFLAGS}"
11915 _CUR_LDFLAGS="${LDFLAGS}"
11916 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11917 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11918 ;;
11919esac
11920
Matthias Kloseb9621712010-04-24 17:59:49 +000011921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11922$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011923if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011925else
11926 ac_check_lib_save_LIBS=$LIBS
11927LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011929/* end confdefs.h. */
11930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011931/* Override any GCC internal prototype to avoid an error.
11932 Use char because int might match the return type of a GCC
11933 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011934#ifdef __cplusplus
11935extern "C"
11936#endif
11937char inflateCopy ();
11938int
11939main ()
11940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011941return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011942 ;
11943 return 0;
11944}
11945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011946if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011947 ac_cv_lib_z_inflateCopy=yes
11948else
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011951rm -f core conftest.err conftest.$ac_objext \
11952 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011953LIBS=$ac_check_lib_save_LIBS
11954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11956$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011957if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011958
Matthias Kloseb9621712010-04-24 17:59:49 +000011959$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011960
11961fi
11962
11963
11964case $ac_sys_system/$ac_sys_release in
11965Darwin/*)
11966 CFLAGS="${_CUR_CFLAGS}"
11967 LDFLAGS="${_CUR_LDFLAGS}"
11968 ;;
11969esac
11970
Matthias Kloseb9621712010-04-24 17:59:49 +000011971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11972$as_echo_n "checking for hstrerror... " >&6; }
11973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011974/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011975
Martin v. Löwise9416172003-05-03 10:12:45 +000011976#include <netdb.h>
11977
Martin v. Löwise9416172003-05-03 10:12:45 +000011978int
11979main ()
11980{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011981void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011982 ;
11983 return 0;
11984}
11985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011986if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011989
Matthias Kloseb159a552010-04-25 21:00:44 +000011990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011991$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011992else
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011995
11996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011997rm -f core conftest.err conftest.$ac_objext \
11998 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12001$as_echo_n "checking for inet_aton... " >&6; }
12002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012003/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012004
Martin v. Löwis86d66262006-02-17 08:40:11 +000012005#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012006#include <sys/socket.h>
12007#include <netinet/in.h>
12008#include <arpa/inet.h>
12009
Martin v. Löwise9416172003-05-03 10:12:45 +000012010int
12011main ()
12012{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012013void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012014 ;
12015 return 0;
12016}
12017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012018if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012021
Matthias Kloseb159a552010-04-25 21:00:44 +000012022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012024else
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12026$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012027
12028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012029rm -f core conftest.err conftest.$ac_objext \
12030 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12033$as_echo_n "checking for inet_pton... " >&6; }
12034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012035/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012036
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012037#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012038#include <sys/socket.h>
12039#include <netinet/in.h>
12040#include <arpa/inet.h>
12041
Martin v. Löwise9416172003-05-03 10:12:45 +000012042int
12043main ()
12044{
12045void* p = inet_pton
12046 ;
12047 return 0;
12048}
12049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012050if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012053
Matthias Kloseb159a552010-04-25 21:00:44 +000012054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012055$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012059
12060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012062
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012063# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12065$as_echo_n "checking for setgroups... " >&6; }
12066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012067/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012068
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012069#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012070#ifdef HAVE_GRP_H
12071#include <grp.h>
12072#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012073
Martin v. Löwisd5843682002-11-21 20:41:28 +000012074int
12075main ()
12076{
12077void* p = setgroups
12078 ;
12079 return 0;
12080}
12081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012085
Matthias Kloseb159a552010-04-25 21:00:44 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012087$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12090$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012091
12092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012094
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012095# check for openpty and forkpty
12096
12097for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012098do :
12099 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012100if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012103_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012104
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012105else
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12107$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012108if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012110else
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012112LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116/* Override any GCC internal prototype to avoid an error.
12117 Use char because int might match the return type of a GCC
12118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012119#ifdef __cplusplus
12120extern "C"
12121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012122char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012123int
12124main ()
12125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 ;
12128 return 0;
12129}
12130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012133else
Matthias Kloseb9621712010-04-24 17:59:49 +000012134 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012136rm -f core conftest.err conftest.$ac_objext \
12137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012138LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12141$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012142if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012144 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12147$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012148if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012150else
12151 ac_check_lib_save_LIBS=$LIBS
12152LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012154/* end confdefs.h. */
12155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156/* Override any GCC internal prototype to avoid an error.
12157 Use char because int might match the return type of a GCC
12158 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012159#ifdef __cplusplus
12160extern "C"
12161#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012162char openpty ();
12163int
12164main ()
12165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012167 ;
12168 return 0;
12169}
12170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012172 ac_cv_lib_bsd_openpty=yes
12173else
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176rm -f core conftest.err conftest.$ac_objext \
12177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012178LIBS=$ac_check_lib_save_LIBS
12179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12181$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012182if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012184 LIBS="$LIBS -lbsd"
12185fi
12186
12187
12188fi
12189
Fred Drake8cef4cf2000-06-28 16:40:38 +000012190
12191fi
12192done
12193
12194for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012195do :
12196 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012199#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012200_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012201
Fred Drake8cef4cf2000-06-28 16:40:38 +000012202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12204$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012205if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012207else
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012209LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012213/* Override any GCC internal prototype to avoid an error.
12214 Use char because int might match the return type of a GCC
12215 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012216#ifdef __cplusplus
12217extern "C"
12218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012219char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012220int
12221main ()
12222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 ;
12225 return 0;
12226}
12227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012230else
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233rm -f core conftest.err conftest.$ac_objext \
12234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012235LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12238$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012239if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012241 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012242else
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12244$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012245if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012247else
12248 ac_check_lib_save_LIBS=$LIBS
12249LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012251/* end confdefs.h. */
12252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253/* Override any GCC internal prototype to avoid an error.
12254 Use char because int might match the return type of a GCC
12255 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012256#ifdef __cplusplus
12257extern "C"
12258#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012259char forkpty ();
12260int
12261main ()
12262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012269 ac_cv_lib_bsd_forkpty=yes
12270else
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273rm -f core conftest.err conftest.$ac_objext \
12274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012275LIBS=$ac_check_lib_save_LIBS
12276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12278$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012279if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012281 LIBS="$LIBS -lbsd"
12282fi
12283
12284
12285fi
12286
Fred Drake8cef4cf2000-06-28 16:40:38 +000012287
12288fi
12289done
12290
Jack Jansendd19cf82001-12-06 22:36:17 +000012291
Michael W. Hudson54241132001-12-07 15:38:26 +000012292# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012293for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012294do :
12295 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12296ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012297if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012299#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012300_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012301
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012302fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012303done
12304
Michael W. Hudson54241132001-12-07 15:38:26 +000012305
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012306ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012307if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012308 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012309
Martin v. Löwis1142de32002-03-29 16:28:31 +000012310else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012312 *" dup2.$ac_objext "* ) ;;
12313 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012315esac
12316
Martin v. Löwis1142de32002-03-29 16:28:31 +000012317fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012318
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012319ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012320if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012321 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12322
12323else
12324 case " $LIBOBJS " in
12325 *" strdup.$ac_objext "* ) ;;
12326 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12327 ;;
12328esac
12329
12330fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012331
12332
12333for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012334do :
12335 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012336if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012341/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012342#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012343int
12344main ()
12345{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 ;
12348 return 0;
12349}
12350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012354
Guido van Rossum627b2d71993-12-24 10:39:16 +000012355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012357
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012359done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012360
Jack Jansen150753c2003-03-29 22:07:47 +000012361for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012362do :
12363 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012364if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012365 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012369/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012370#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012371int
12372main ()
12373{
12374setpgrp(0,0);
12375 ;
12376 return 0;
12377}
12378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012382
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012385
12386fi
12387done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012388
Thomas Wouters3a584202000-08-05 23:28:51 +000012389for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012390do :
12391 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012392if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012397/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012398#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012399int
12400main ()
12401{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 ;
12404 return 0;
12405}
12406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012407if ac_fn_c_try_compile "$LINENO"; then :
12408
Guido van Rossum627b2d71993-12-24 10:39:16 +000012409else
Skip Montanaro6dead952003-09-25 14:50:04 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012412
Martin v. Löwis11437992002-04-12 09:54:03 +000012413
Guido van Rossum627b2d71993-12-24 10:39:16 +000012414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012416
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012418done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419
Michael W. Hudson54241132001-12-07 15:38:26 +000012420
Victor Stinnere0be4232011-10-25 13:06:09 +020012421for ac_func in clock_gettime
12422do :
12423 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12424if test "x$ac_cv_func_clock_gettime" = xyes; then :
12425 cat >>confdefs.h <<_ACEOF
12426#define HAVE_CLOCK_GETTIME 1
12427_ACEOF
12428
12429else
12430
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12432$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12433if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12434 $as_echo_n "(cached) " >&6
12435else
12436 ac_check_lib_save_LIBS=$LIBS
12437LIBS="-lrt $LIBS"
12438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12439/* end confdefs.h. */
12440
12441/* Override any GCC internal prototype to avoid an error.
12442 Use char because int might match the return type of a GCC
12443 builtin and then its argument prototype would still apply. */
12444#ifdef __cplusplus
12445extern "C"
12446#endif
12447char clock_gettime ();
12448int
12449main ()
12450{
12451return clock_gettime ();
12452 ;
12453 return 0;
12454}
12455_ACEOF
12456if ac_fn_c_try_link "$LINENO"; then :
12457 ac_cv_lib_rt_clock_gettime=yes
12458else
12459 ac_cv_lib_rt_clock_gettime=no
12460fi
12461rm -f core conftest.err conftest.$ac_objext \
12462 conftest$ac_exeext conftest.$ac_ext
12463LIBS=$ac_check_lib_save_LIBS
12464fi
12465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12466$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12467if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12468
Victor Stinner7efb8332014-08-29 15:41:08 +020012469 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012470 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12471
12472
12473$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12474
12475
12476fi
12477
12478
12479fi
12480done
12481
12482
12483for ac_func in clock_getres
12484do :
12485 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12486if test "x$ac_cv_func_clock_getres" = xyes; then :
12487 cat >>confdefs.h <<_ACEOF
12488#define HAVE_CLOCK_GETRES 1
12489_ACEOF
12490
12491else
12492
12493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12494$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12495if ${ac_cv_lib_rt_clock_getres+:} false; then :
12496 $as_echo_n "(cached) " >&6
12497else
12498 ac_check_lib_save_LIBS=$LIBS
12499LIBS="-lrt $LIBS"
12500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501/* end confdefs.h. */
12502
12503/* Override any GCC internal prototype to avoid an error.
12504 Use char because int might match the return type of a GCC
12505 builtin and then its argument prototype would still apply. */
12506#ifdef __cplusplus
12507extern "C"
12508#endif
12509char clock_getres ();
12510int
12511main ()
12512{
12513return clock_getres ();
12514 ;
12515 return 0;
12516}
12517_ACEOF
12518if ac_fn_c_try_link "$LINENO"; then :
12519 ac_cv_lib_rt_clock_getres=yes
12520else
12521 ac_cv_lib_rt_clock_getres=no
12522fi
12523rm -f core conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
12525LIBS=$ac_check_lib_save_LIBS
12526fi
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12528$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12529if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12530
12531 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12532
12533
12534fi
12535
12536
12537fi
12538done
12539
12540
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012541for ac_func in clock_settime
12542do :
12543 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12544if test "x$ac_cv_func_clock_settime" = xyes; then :
12545 cat >>confdefs.h <<_ACEOF
12546#define HAVE_CLOCK_SETTIME 1
12547_ACEOF
12548
12549else
12550
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12552$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12553if ${ac_cv_lib_rt_clock_settime+:} false; then :
12554 $as_echo_n "(cached) " >&6
12555else
12556 ac_check_lib_save_LIBS=$LIBS
12557LIBS="-lrt $LIBS"
12558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12559/* end confdefs.h. */
12560
12561/* Override any GCC internal prototype to avoid an error.
12562 Use char because int might match the return type of a GCC
12563 builtin and then its argument prototype would still apply. */
12564#ifdef __cplusplus
12565extern "C"
12566#endif
12567char clock_settime ();
12568int
12569main ()
12570{
12571return clock_settime ();
12572 ;
12573 return 0;
12574}
12575_ACEOF
12576if ac_fn_c_try_link "$LINENO"; then :
12577 ac_cv_lib_rt_clock_settime=yes
12578else
12579 ac_cv_lib_rt_clock_settime=no
12580fi
12581rm -f core conftest.err conftest.$ac_objext \
12582 conftest$ac_exeext conftest.$ac_ext
12583LIBS=$ac_check_lib_save_LIBS
12584fi
12585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12586$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12587if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12588
12589 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12590
12591
12592fi
12593
12594
12595fi
12596done
12597
12598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12600$as_echo_n "checking for major... " >&6; }
12601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012602/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012603
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012604#if defined(MAJOR_IN_MKDEV)
12605#include <sys/mkdev.h>
12606#elif defined(MAJOR_IN_SYSMACROS)
12607#include <sys/sysmacros.h>
12608#else
12609#include <sys/types.h>
12610#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012611
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012612int
12613main ()
12614{
12615
12616 makedev(major(0),minor(0));
12617
12618 ;
12619 return 0;
12620}
12621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012622if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012623
12624
Matthias Kloseb9621712010-04-24 17:59:49 +000012625$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012626
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12628$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012629
12630else
Skip Montanaro6dead952003-09-25 14:50:04 +000012631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12633$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012634
12635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012636rm -f core conftest.err conftest.$ac_objext \
12637 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012638
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012639# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012640# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12642$as_echo_n "checking for getaddrinfo... " >&6; }
12643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012644/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012645
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012646#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012647#include <sys/socket.h>
12648#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012649#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012650
Martin v. Löwis11437992002-04-12 09:54:03 +000012651int
12652main ()
12653{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012654getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 ;
12656 return 0;
12657}
12658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012659if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012660 have_getaddrinfo=yes
12661else
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012664rm -f core conftest.err conftest.$ac_objext \
12665 conftest$ac_exeext conftest.$ac_ext
12666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12667$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012668if test $have_getaddrinfo = yes
12669then
Matthias Kloseb9621712010-04-24 17:59:49 +000012670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12671$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012672 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012674else
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012676
12677if test "${enable_ipv6+set}" = set; then
12678 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12679else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012680 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012681fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012682else
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012685
Stefan Krah19c21392012-11-22 23:47:32 +010012686#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012687#include <sys/types.h>
12688#include <netdb.h>
12689#include <string.h>
12690#include <sys/socket.h>
12691#include <netinet/in.h>
12692
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012693int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012694{
12695 int passive, gaierr, inet4 = 0, inet6 = 0;
12696 struct addrinfo hints, *ai, *aitop;
12697 char straddr[INET6_ADDRSTRLEN], strport[16];
12698
12699 for (passive = 0; passive <= 1; passive++) {
12700 memset(&hints, 0, sizeof(hints));
12701 hints.ai_family = AF_UNSPEC;
12702 hints.ai_flags = passive ? AI_PASSIVE : 0;
12703 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012704 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012705 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12706 (void)gai_strerror(gaierr);
12707 goto bad;
12708 }
12709 for (ai = aitop; ai; ai = ai->ai_next) {
12710 if (ai->ai_addr == NULL ||
12711 ai->ai_addrlen == 0 ||
12712 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12713 straddr, sizeof(straddr), strport, sizeof(strport),
12714 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12715 goto bad;
12716 }
12717 switch (ai->ai_family) {
12718 case AF_INET:
12719 if (strcmp(strport, "54321") != 0) {
12720 goto bad;
12721 }
12722 if (passive) {
12723 if (strcmp(straddr, "0.0.0.0") != 0) {
12724 goto bad;
12725 }
12726 } else {
12727 if (strcmp(straddr, "127.0.0.1") != 0) {
12728 goto bad;
12729 }
12730 }
12731 inet4++;
12732 break;
12733 case AF_INET6:
12734 if (strcmp(strport, "54321") != 0) {
12735 goto bad;
12736 }
12737 if (passive) {
12738 if (strcmp(straddr, "::") != 0) {
12739 goto bad;
12740 }
12741 } else {
12742 if (strcmp(straddr, "::1") != 0) {
12743 goto bad;
12744 }
12745 }
12746 inet6++;
12747 break;
12748 case AF_UNSPEC:
12749 goto bad;
12750 break;
12751 default:
12752 /* another family support? */
12753 break;
12754 }
12755 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012756 freeaddrinfo(aitop);
12757 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012758 }
12759
12760 if (!(inet4 == 0 || inet4 == 2))
12761 goto bad;
12762 if (!(inet6 == 0 || inet6 == 2))
12763 goto bad;
12764
12765 if (aitop)
12766 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012767 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012768
12769 bad:
12770 if (aitop)
12771 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012772 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012773}
12774
Martin v. Löwis11437992002-04-12 09:54:03 +000012775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012777 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012778else
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012785fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012786
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12790$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12791
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012792if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012793then
12794 if test $ipv6 = yes
12795 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012796 echo 'Fatal: You must get working getaddrinfo() function.'
12797 echo ' or you can specify "--disable-ipv6"'.
12798 exit 1
12799 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012800else
Martin v. Löwis11437992002-04-12 09:54:03 +000012801
Matthias Kloseb9621712010-04-24 17:59:49 +000012802$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012803
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012804fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012805
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012806for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012807do :
12808 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012809if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012812_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012813
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012814fi
12815done
12816
Michael W. Hudson54241132001-12-07 15:38:26 +000012817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012818# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12820$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012821if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012823else
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012825/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012826#include <sys/types.h>
12827#include <sys/time.h>
12828#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012829
Martin v. Löwis11437992002-04-12 09:54:03 +000012830int
12831main ()
12832{
12833if ((struct tm *) 0)
12834return 0;
12835 ;
12836 return 0;
12837}
12838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012840 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012841else
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12847$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012848if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012851
12852fi
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12855$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012856if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012858else
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012860/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861#include <sys/types.h>
12862#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012863
Martin v. Löwis11437992002-04-12 09:54:03 +000012864int
12865main ()
12866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867struct tm tm;
12868 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012870 ;
12871 return 0;
12872}
12873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012874if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012875 ac_cv_struct_tm=time.h
12876else
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12882$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012883if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012886
12887fi
12888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889ac_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 +000012890#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892"
Victor Stinnere0be4232011-10-25 13:06:09 +020012893if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012894
12895cat >>confdefs.h <<_ACEOF
12896#define HAVE_STRUCT_TM_TM_ZONE 1
12897_ACEOF
12898
12899
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012900fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012901
Martin v. Löwis11437992002-04-12 09:54:03 +000012902if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905
12906else
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12908"
Victor Stinnere0be4232011-10-25 13:06:09 +020012909if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911else
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913fi
12914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012916#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917_ACEOF
12918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12920$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012921if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923else
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012925/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012926#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927#if !HAVE_DECL_TZNAME
12928extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Martin v. Löwis11437992002-04-12 09:54:03 +000012931int
12932main ()
12933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 ;
12936 return 0;
12937}
12938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012939if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012940 ac_cv_var_tzname=yes
12941else
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012944rm -f core conftest.err conftest.$ac_objext \
12945 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12948$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012949 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012952
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953 fi
12954fi
12955
Matthias Kloseb9621712010-04-24 17:59:49 +000012956ac_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 +020012957if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012958
12959cat >>confdefs.h <<_ACEOF
12960#define HAVE_STRUCT_STAT_ST_RDEV 1
12961_ACEOF
12962
12963
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012964fi
12965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966ac_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 +020012967if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969cat >>confdefs.h <<_ACEOF
12970#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12971_ACEOF
12972
12973
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012974fi
12975
Matthias Kloseb9621712010-04-24 17:59:49 +000012976ac_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 +020012977if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012978
12979cat >>confdefs.h <<_ACEOF
12980#define HAVE_STRUCT_STAT_ST_FLAGS 1
12981_ACEOF
12982
12983
12984fi
12985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986ac_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 +020012987if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012988
12989cat >>confdefs.h <<_ACEOF
12990#define HAVE_STRUCT_STAT_ST_GEN 1
12991_ACEOF
12992
12993
12994fi
12995
Matthias Kloseb9621712010-04-24 17:59:49 +000012996ac_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 +020012997if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012998
12999cat >>confdefs.h <<_ACEOF
13000#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13001_ACEOF
13002
13003
13004fi
13005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006ac_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 +020013007if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009cat >>confdefs.h <<_ACEOF
13010#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13011_ACEOF
13012
13013
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013014fi
13015
Stefan Krah267b6392016-04-26 01:09:18 +020013016ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13017 #include <sys/types.h>
13018 #include <pwd.h>
13019
13020"
13021if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13022
13023cat >>confdefs.h <<_ACEOF
13024#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13025_ACEOF
13026
13027
13028fi
13029ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13030 #include <sys/types.h>
13031 #include <pwd.h>
13032
13033"
13034if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13035
13036cat >>confdefs.h <<_ACEOF
13037#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13038_ACEOF
13039
13040
13041fi
13042
Zachary Ware6a6967e2016-10-01 00:47:27 -050013043# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13044ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13045"
13046if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13047
13048cat >>confdefs.h <<_ACEOF
13049#define HAVE_SIGINFO_T_SI_BAND 1
13050_ACEOF
13051
13052
13053fi
13054
Michael W. Hudson54241132001-12-07 15:38:26 +000013055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13057$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013058if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013060else
Matthias Kloseb159a552010-04-25 21:00:44 +000013061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013063/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013064#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013065int
13066main ()
13067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ;
13070 return 0;
13071}
13072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013073if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013074 ac_cv_header_time_altzone=yes
13075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080fi
13081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13083$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013084if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013085
Matthias Kloseb9621712010-04-24 17:59:49 +000013086$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013087
13088fi
13089
Guido van Rossumda88dad1995-01-26 00:46:29 +000013090was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13092$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013094/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013095
13096#include <sys/types.h>
13097#include <sys/select.h>
13098#include <sys/time.h>
13099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100int
13101main ()
13102{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013103;
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 ;
13105 return 0;
13106}
13107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013112
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013113 was_it_defined=yes
13114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13118$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13121$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013122if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013124else
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013126/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013127#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013128int
13129main ()
13130{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013131struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 ;
13133 return 0;
13134}
13135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013136if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013137 ac_cv_struct_addrinfo=yes
13138else
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13142fi
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13145$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013146if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013149
13150fi
13151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13153$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013154if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013158/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159
13160# include <sys/types.h>
13161# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013162int
13163main ()
13164{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013165struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 ;
13167 return 0;
13168}
13169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013171 ac_cv_struct_sockaddr_storage=yes
13172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13176fi
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13179$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013181
Matthias Kloseb9621712010-04-24 17:59:49 +000013182$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183
13184fi
13185
Christian Heimesdffa3942016-09-05 23:54:41 +020013186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13187$as_echo_n "checking for sockaddr_alg... " >&6; }
13188if ${ac_cv_struct_sockaddr_alg+:} false; then :
13189 $as_echo_n "(cached) " >&6
13190else
13191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13192/* end confdefs.h. */
13193
13194# include <sys/types.h>
13195# include <sys/socket.h>
13196# include <linux/if_alg.h>
13197int
13198main ()
13199{
13200struct sockaddr_alg s
13201 ;
13202 return 0;
13203}
13204_ACEOF
13205if ac_fn_c_try_compile "$LINENO"; then :
13206 ac_cv_struct_sockaddr_alg=yes
13207else
13208 ac_cv_struct_sockaddr_alg=no
13209fi
13210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13211fi
13212
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13214$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13215if test $ac_cv_struct_sockaddr_alg = yes; then
13216
13217$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13218
13219fi
13220
Guido van Rossum627b2d71993-12-24 10:39:16 +000013221# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13224$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013225if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013230$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013231int
13232main ()
13233{
13234static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013235test_array [0] = 0;
13236return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
13238 ;
13239 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013240}
Martin v. Löwis11437992002-04-12 09:54:03 +000013241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013242if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013243 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013244else
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13250$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013251if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013253
13254fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13257$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013258if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013262/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264int
13265main ()
13266{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013267
Martin v. Löwis11437992002-04-12 09:54:03 +000013268#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013269 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013271 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013272 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013273 char const *const *pcpcc;
13274 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 /* NEC SVR4.0.2 mips cc rejects this. */
13276 struct point {int x, y;};
13277 static struct point const zero = {0,0};
13278 /* AIX XL C 1.02.0.0 rejects this.
13279 It does not let you subtract one const X* pointer from another in
13280 an arm of an if-expression whose if-part is not a constant
13281 expression */
13282 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013285 ++pcpcc;
13286 ppc = (char**) pcpcc;
13287 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013288 { /* SCO 3.2v4 cc rejects this sort of thing. */
13289 char tx;
13290 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013292
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 }
13296 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13297 int x[] = {25, 17};
13298 const int *foo = &x[0];
13299 ++foo;
13300 }
13301 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13302 typedef const int *iptr;
13303 iptr p = 0;
13304 ++p;
13305 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013306 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013308 struct s { int j; const int *ap[3]; } bx;
13309 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 }
13311 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13312 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013313 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013316#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013317
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 ;
13319 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013320}
Martin v. Löwis11437992002-04-12 09:54:03 +000013321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013322if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323 ac_cv_c_const=yes
13324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13330$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
Matthias Kloseb9621712010-04-24 17:59:49 +000013333$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334
13335fi
13336
Michael W. Hudson54241132001-12-07 15:38:26 +000013337
Guido van Rossumda88dad1995-01-26 00:46:29 +000013338works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13340$as_echo_n "checking for working signed char... " >&6; }
13341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013342/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013343
Martin v. Löwis11437992002-04-12 09:54:03 +000013344int
13345main ()
13346{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013347signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 ;
13349 return 0;
13350}
13351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013352if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013353 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013354else
Skip Montanaro6dead952003-09-25 14:50:04 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013357
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013358
Guido van Rossum7f43da71994-08-01 12:15:30 +000013359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13362$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013363
Guido van Rossumda88dad1995-01-26 00:46:29 +000013364have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13366$as_echo_n "checking for prototypes... " >&6; }
13367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013368/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013369int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013370int
13371main ()
13372{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
Matthias Kloseb159a552010-04-25 21:00:44 +000013382 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13386$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387
Guido van Rossumda88dad1995-01-26 00:46:29 +000013388works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13390$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013392/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013393
13394#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013395int foo(int x, ...) {
13396 va_list va;
13397 va_start(va, x);
13398 va_arg(va, int);
13399 va_arg(va, char *);
13400 va_arg(va, double);
13401 return 0;
13402}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404int
13405main ()
13406{
Guido van Rossum90eea071996-08-30 20:58:57 +000013407return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 ;
13409 return 0;
13410}
13411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013413
13414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013417 works=yes
13418
Guido van Rossum627b2d71993-12-24 10:39:16 +000013419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13422$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013423
Martin v. Löwisd6320502004-08-12 13:45:08 +000013424# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13426$as_echo_n "checking for socketpair... " >&6; }
13427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013428/* end confdefs.h. */
13429
13430#include <sys/types.h>
13431#include <sys/socket.h>
13432
13433int
13434main ()
13435{
13436void *x=socketpair
13437 ;
13438 return 0;
13439}
13440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013444
Matthias Kloseb159a552010-04-25 21:00:44 +000013445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013446$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13449$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013450
13451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013453
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013454# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13456$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013458/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013459#include <sys/types.h>
13460#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013461int
13462main ()
13463{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013464struct sockaddr x;
13465x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if ac_fn_c_try_compile "$LINENO"; then :
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13472$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013475
13476else
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13478$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013479
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013483# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
13485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013487if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13492$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013493 OLD_CFLAGS=$CFLAGS
13494 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013496/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013497
13498# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
Martin v. Löwis11437992002-04-12 09:54:03 +000013500int
13501main ()
13502{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013503
13504 char *name;
13505 struct hostent *he, *res;
13506 char buffer[2048];
13507 int buflen = 2048;
13508 int h_errnop;
13509
13510 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013511
13512 ;
13513 return 0;
13514}
13515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013519
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13524$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013526else
Skip Montanaro6dead952003-09-25 14:50:04 +000013527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13529$as_echo "no" >&6; }
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13531$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013533/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013534
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013535# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
Martin v. Löwis11437992002-04-12 09:54:03 +000013537int
13538main ()
13539{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013540
13541 char *name;
13542 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013543 char buffer[2048];
13544 int buflen = 2048;
13545 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013546
Matthias Kloseb159a552010-04-25 21:00:44 +000013547 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
13549 ;
13550 return 0;
13551}
13552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013556
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
Matthias Kloseb159a552010-04-25 21:00:44 +000013558$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13561$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013563else
Skip Montanaro6dead952003-09-25 14:50:04 +000013564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13566$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13568$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13570/* end confdefs.h. */
13571
13572# include <netdb.h>
13573
13574int
13575main ()
13576{
13577
13578 char *name;
13579 struct hostent *he;
13580 struct hostent_data data;
13581
13582 (void) gethostbyname_r(name, he, &data);
13583
13584 ;
13585 return 0;
13586}
13587_ACEOF
13588if ac_fn_c_try_compile "$LINENO"; then :
13589
13590 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13591
13592
13593$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13594
13595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13596$as_echo "yes" >&6; }
13597
13598else
13599
13600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013602
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013605
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013611 CFLAGS=$OLD_CFLAGS
13612
13613else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 for ac_func in gethostbyname
13616do :
13617 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013618if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013620#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013621_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013623fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013624done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013625
Michael W. Hudson54241132001-12-07 15:38:26 +000013626
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013627fi
13628
Michael W. Hudson54241132001-12-07 15:38:26 +000013629
13630
13631
13632
13633
13634
Guido van Rossum627b2d71993-12-24 10:39:16 +000013635# checks for system services
13636# (none yet)
13637
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013638# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013639ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013640if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013641
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13644$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013645if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013647else
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013649LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013653/* Override any GCC internal prototype to avoid an error.
13654 Use char because int might match the return type of a GCC
13655 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013656#ifdef __cplusplus
13657extern "C"
13658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013659char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013660int
13661main ()
13662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013663return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013664 ;
13665 return 0;
13666}
13667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013668if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013670else
Matthias Kloseb9621712010-04-24 17:59:49 +000013671 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013673rm -f core conftest.err conftest.$ac_objext \
13674 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013675LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13678$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013679if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013680 cat >>confdefs.h <<_ACEOF
13681#define HAVE_LIBIEEE 1
13682_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013683
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013684 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685
Guido van Rossum627b2d71993-12-24 10:39:16 +000013686fi
13687
Michael W. Hudson54241132001-12-07 15:38:26 +000013688
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013689fi
13690
Michael W. Hudson54241132001-12-07 15:38:26 +000013691
Guido van Rossum7f43da71994-08-01 12:15:30 +000013692# check for --with-libm=...
13693
Guido van Rossum563e7081996-09-10 18:20:48 +000013694case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013695Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013696*) LIBM=-lm
13697esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13699$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013703 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013704if test "$withval" = no
13705then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13707$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013708elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013709then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13711$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013712else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013713fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13716$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717fi
13718
Guido van Rossum7f43da71994-08-01 12:15:30 +000013719
13720# check for --with-libc=...
13721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13723$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013726if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013728if test "$withval" = no
13729then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13731$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013732elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013733then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13735$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013736else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013737fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013738else
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13740$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741fi
13742
Guido van Rossum7f43da71994-08-01 12:15:30 +000013743
Stefan Krah1919b7e2012-03-21 18:25:23 +010013744# **************************************
13745# * Check for gcc x64 inline assembler *
13746# **************************************
13747
13748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13749$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13751/* end confdefs.h. */
13752
13753int
13754main ()
13755{
13756
13757 __asm__ __volatile__ ("movq %rcx, %rax");
13758
13759 ;
13760 return 0;
13761}
13762_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013763if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013764 have_gcc_asm_for_x64=yes
13765else
13766 have_gcc_asm_for_x64=no
13767fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013768rm -f core conftest.err conftest.$ac_objext \
13769 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13771$as_echo "$have_gcc_asm_for_x64" >&6; }
13772if test "$have_gcc_asm_for_x64" = yes
13773then
13774
13775$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13776
13777fi
13778
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779# **************************************************
13780# * Check for various properties of floating point *
13781# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13784$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013785if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013787else
13788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013790 ac_cv_little_endian_double=no
13791else
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013793/* end confdefs.h. */
13794
13795#include <string.h>
13796int main() {
13797 double x = 9006104071832581.0;
13798 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13799 return 0;
13800 else
13801 return 1;
13802}
13803
13804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013805if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806 ac_cv_little_endian_double=yes
13807else
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13811 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013812fi
13813
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013814fi
13815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13817$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013818if test "$ac_cv_little_endian_double" = yes
13819then
13820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013822
13823fi
13824
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13826$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013827if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829else
13830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013832 ac_cv_big_endian_double=no
13833else
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013835/* end confdefs.h. */
13836
13837#include <string.h>
13838int main() {
13839 double x = 9006104071832581.0;
13840 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13841 return 0;
13842 else
13843 return 1;
13844}
13845
13846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013847if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013848 ac_cv_big_endian_double=yes
13849else
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854fi
13855
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856fi
13857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13859$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860if test "$ac_cv_big_endian_double" = yes
13861then
13862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013864
13865fi
13866
13867# Some ARM platforms use a mixed-endian representation for doubles.
13868# While Python doesn't currently have full support for these platforms
13869# (see e.g., issue 1762561), we can at least make sure that float <-> string
13870# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13872$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013873if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013875else
13876
Matthias Kloseb9621712010-04-24 17:59:49 +000013877if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013878 ac_cv_mixed_endian_double=no
13879else
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013881/* end confdefs.h. */
13882
13883#include <string.h>
13884int main() {
13885 double x = 9006104071832581.0;
13886 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13887 return 0;
13888 else
13889 return 1;
13890}
13891
13892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013893if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013894 ac_cv_mixed_endian_double=yes
13895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013900fi
13901
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902fi
13903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13905$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906if test "$ac_cv_mixed_endian_double" = yes
13907then
13908
Matthias Kloseb9621712010-04-24 17:59:49 +000013909$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013910
13911fi
13912
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013913# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013914# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013915# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013916# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013917# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013918# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013919
13920# This inline assembler syntax may also work for suncc and icc,
13921# so we try it on all platforms.
13922
Matthias Kloseb9621712010-04-24 17:59:49 +000013923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13924$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013926/* end confdefs.h. */
13927
13928int
13929main ()
13930{
13931
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013932 unsigned short cw;
13933 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13934 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013935
13936 ;
13937 return 0;
13938}
13939_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013940if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013941 have_gcc_asm_for_x87=yes
13942else
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013944fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013945rm -f core conftest.err conftest.$ac_objext \
13946 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13948$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013949if test "$have_gcc_asm_for_x87" = yes
13950then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951
Matthias Kloseb9621712010-04-24 17:59:49 +000013952$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013953
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13957$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959/* end confdefs.h. */
13960
13961int
13962main ()
13963{
13964
13965 unsigned int fpcr;
13966 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13967 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13968
13969 ;
13970 return 0;
13971}
13972_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013973if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013974 have_gcc_asm_for_mc68881=yes
13975else
13976 have_gcc_asm_for_mc68881=no
13977fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013978rm -f core conftest.err conftest.$ac_objext \
13979 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13981$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13982if test "$have_gcc_asm_for_mc68881" = yes
13983then
13984
13985$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13986
13987fi
13988
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013989# Detect whether system arithmetic is subject to x87-style double
13990# rounding issues. The result of this test has little meaning on non
13991# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13992# mode is round-to-nearest and double rounding issues are present, and
13993# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13995$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996# $BASECFLAGS may affect the result
13997ac_save_cc="$CC"
13998CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013999if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014000 ac_cv_x87_double_rounding=no
14001else
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014003/* end confdefs.h. */
14004
14005#include <stdlib.h>
14006#include <math.h>
14007int main() {
14008 volatile double x, y, z;
14009 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14010 x = 0.99999999999999989; /* 1-2**-53 */
14011 y = 1./x;
14012 if (y != 1.)
14013 exit(0);
14014 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14015 x = 1e16;
14016 y = 2.99999;
14017 z = x + y;
14018 if (z != 1e16+4.)
14019 exit(0);
14020 /* both tests show evidence of double rounding */
14021 exit(1);
14022}
14023
14024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014025if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014026 ac_cv_x87_double_rounding=no
14027else
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14031 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014032fi
14033
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014034CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14036$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014037if test "$ac_cv_x87_double_rounding" = yes
14038then
14039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014041
14042fi
14043
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014044# ************************************
14045# * Check for mathematical functions *
14046# ************************************
14047
14048LIBS_SAVE=$LIBS
14049LIBS="$LIBS $LIBM"
14050
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014051for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14052do :
14053 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14054ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014055if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014056 cat >>confdefs.h <<_ACEOF
14057#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14058_ACEOF
14059
14060fi
14061done
14062
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014063for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014064do :
14065 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14066ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014067if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014068 cat >>confdefs.h <<_ACEOF
14069#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14070_ACEOF
14071
14072fi
14073done
14074
14075ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14076"
Victor Stinnere0be4232011-10-25 13:06:09 +020014077if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014078 ac_have_decl=1
14079else
14080 ac_have_decl=0
14081fi
14082
14083cat >>confdefs.h <<_ACEOF
14084#define HAVE_DECL_ISINF $ac_have_decl
14085_ACEOF
14086ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14087"
Victor Stinnere0be4232011-10-25 13:06:09 +020014088if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014089 ac_have_decl=1
14090else
14091 ac_have_decl=0
14092fi
14093
14094cat >>confdefs.h <<_ACEOF
14095#define HAVE_DECL_ISNAN $ac_have_decl
14096_ACEOF
14097ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14098"
Victor Stinnere0be4232011-10-25 13:06:09 +020014099if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014100 ac_have_decl=1
14101else
14102 ac_have_decl=0
14103fi
14104
14105cat >>confdefs.h <<_ACEOF
14106#define HAVE_DECL_ISFINITE $ac_have_decl
14107_ACEOF
14108
14109
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014110# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14111# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14113$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014114if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014116else
14117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014119 ac_cv_tanh_preserves_zero_sign=no
14120else
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014122/* end confdefs.h. */
14123
14124#include <math.h>
14125#include <stdlib.h>
14126int main() {
14127 /* return 0 if either negative zeros don't exist
14128 on this platform or if negative zeros exist
14129 and tanh(-0.) == -0. */
14130 if (atan2(0., -1.) == atan2(-0., -1.) ||
14131 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14132 else exit(1);
14133}
14134
14135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014136if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014137 ac_cv_tanh_preserves_zero_sign=yes
14138else
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014143fi
14144
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014145fi
14146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14148$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014149if test "$ac_cv_tanh_preserves_zero_sign" = yes
14150then
14151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014153
14154fi
14155
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014156if test "$ac_cv_func_log1p" = yes
14157then
14158 # On some versions of AIX, log1p(-0.) returns 0. instead of
14159 # -0. See issue #9920.
14160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14161$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014162 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014163 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014164else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014165
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014166 if test "$cross_compiling" = yes; then :
14167 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014168else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14170/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014171
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014172 #include <math.h>
14173 #include <stdlib.h>
14174 int main() {
14175 /* Fail if the signs of log1p(-0.) and -0. can be
14176 distinguished. */
14177 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14178 return 0;
14179 else
14180 return 1;
14181 }
14182
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014183_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014184if ac_fn_c_try_run "$LINENO"; then :
14185 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014186else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014187 ac_cv_log1p_drops_zero_sign=yes
14188fi
14189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014191fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014192
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014193fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014194
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14196$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14197fi
14198if test "$ac_cv_log1p_drops_zero_sign" = yes
14199then
14200
14201$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14202
14203fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014204
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014205LIBS=$LIBS_SAVE
14206
Mark Dickinsona614f042009-11-28 12:48:43 +000014207# For multiprocessing module, check that sem_open
14208# actually works. For FreeBSD versions <= 7.2,
14209# the kernel module that provides POSIX semaphores
14210# isn't loaded by default, so an attempt to call
14211# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14213$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014214if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014216else
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014218 ac_cv_posix_semaphores_enabled=yes
14219else
Matthias Kloseb9621712010-04-24 17:59:49 +000014220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014221/* end confdefs.h. */
14222
14223#include <unistd.h>
14224#include <fcntl.h>
14225#include <stdio.h>
14226#include <semaphore.h>
14227#include <sys/stat.h>
14228
14229int main(void) {
14230 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14231 if (a == SEM_FAILED) {
14232 perror("sem_open");
14233 return 1;
14234 }
14235 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014236 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014237 return 0;
14238}
14239
14240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014241if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014242 ac_cv_posix_semaphores_enabled=yes
14243else
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014248fi
14249
14250
Mark Dickinsona614f042009-11-28 12:48:43 +000014251fi
14252
Matthias Kloseb9621712010-04-24 17:59:49 +000014253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14254$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014255if test $ac_cv_posix_semaphores_enabled = no
14256then
14257
Matthias Kloseb9621712010-04-24 17:59:49 +000014258$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014259
14260fi
14261
Mark Dickinson10683072009-04-18 21:18:19 +000014262# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14264$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014265if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014269 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014270else
Matthias Kloseb9621712010-04-24 17:59:49 +000014271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014272/* end confdefs.h. */
14273
14274#include <unistd.h>
14275#include <fcntl.h>
14276#include <stdio.h>
14277#include <semaphore.h>
14278#include <sys/stat.h>
14279
14280int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014281 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014282 int count;
14283 int res;
14284 if(a==SEM_FAILED){
14285 perror("sem_open");
14286 return 1;
14287
14288 }
14289 res = sem_getvalue(a, &count);
14290 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014291 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014292 return res==-1 ? 1 : 0;
14293}
14294
Mark Dickinson10683072009-04-18 21:18:19 +000014295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014296if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014297 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014298else
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14302 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014303fi
14304
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014305
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014306fi
14307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14309$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014310if test $ac_cv_broken_sem_getvalue = yes
14311then
14312
Matthias Kloseb9621712010-04-24 17:59:49 +000014313$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014314
14315fi
14316
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014317ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14318"
14319if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14320 ac_have_decl=1
14321else
14322 ac_have_decl=0
14323fi
14324
14325cat >>confdefs.h <<_ACEOF
14326#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14327_ACEOF
14328ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14329"
14330if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14331 ac_have_decl=1
14332else
14333 ac_have_decl=0
14334fi
14335
14336cat >>confdefs.h <<_ACEOF
14337#define HAVE_DECL_RTLD_NOW $ac_have_decl
14338_ACEOF
14339ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14340"
14341if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14342 ac_have_decl=1
14343else
14344 ac_have_decl=0
14345fi
14346
14347cat >>confdefs.h <<_ACEOF
14348#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14349_ACEOF
14350ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14351"
14352if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14353 ac_have_decl=1
14354else
14355 ac_have_decl=0
14356fi
14357
14358cat >>confdefs.h <<_ACEOF
14359#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14360_ACEOF
14361ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14362"
14363if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14364 ac_have_decl=1
14365else
14366 ac_have_decl=0
14367fi
14368
14369cat >>confdefs.h <<_ACEOF
14370#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14371_ACEOF
14372ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14373"
14374if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14375 ac_have_decl=1
14376else
14377 ac_have_decl=0
14378fi
14379
14380cat >>confdefs.h <<_ACEOF
14381#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14382_ACEOF
14383ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14384"
14385if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14386 ac_have_decl=1
14387else
14388 ac_have_decl=0
14389fi
14390
14391cat >>confdefs.h <<_ACEOF
14392#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14393_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014394ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14395"
14396if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14397 ac_have_decl=1
14398else
14399 ac_have_decl=0
14400fi
14401
14402cat >>confdefs.h <<_ACEOF
14403#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14404_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014405
14406
Mark Dickinsonbd792642009-03-18 20:06:12 +000014407# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14409$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014410# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014411if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014412 enableval=$enable_big_digits; case $enable_big_digits in
14413yes)
14414 enable_big_digits=30 ;;
14415no)
14416 enable_big_digits=15 ;;
1441715|30)
14418 ;;
14419*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014420 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 +000014421esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14423$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014424
14425cat >>confdefs.h <<_ACEOF
14426#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14427_ACEOF
14428
14429
14430else
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14432$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014433fi
14434
14435
Guido van Rossumef2255b2000-03-10 22:30:29 +000014436# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014437ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014438if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014439
14440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014443 wchar_h="yes"
14444
Guido van Rossumef2255b2000-03-10 22:30:29 +000014445else
Martin v. Löwis11437992002-04-12 09:54:03 +000014446 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014447
14448fi
14449
Michael W. Hudson54241132001-12-07 15:38:26 +000014450
Martin v. Löwis11437992002-04-12 09:54:03 +000014451
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014452# determine wchar_t size
14453if test "$wchar_h" = yes
14454then
Matthias Kloseb9621712010-04-24 17:59:49 +000014455 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14458# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14460$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014461if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014463else
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14465"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Martin v. Löwis11437992002-04-12 09:54:03 +000014467else
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 if test "$ac_cv_type_wchar_t" = yes; then
14469 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014471as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014472See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473 else
14474 ac_cv_sizeof_wchar_t=0
14475 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014477
Martin v. Löwis11437992002-04-12 09:54:03 +000014478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14480$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481
14482
14483
Martin v. Löwis11437992002-04-12 09:54:03 +000014484cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014485#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014486_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014487
Michael W. Hudson54241132001-12-07 15:38:26 +000014488
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014489fi
14490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14492$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014493have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014495/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014496
14497#include <tcl.h>
14498#if TCL_UTF_MAX != 6
14499# error "NOT UCS4_TCL"
14500#endif
14501int
14502main ()
14503{
14504
14505 ;
14506 return 0;
14507}
14508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014510
14511
Matthias Kloseb9621712010-04-24 17:59:49 +000014512$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014513
14514 have_ucs4_tcl=yes
14515
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14519$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014520
Skip Montanaro6dead952003-09-25 14:50:04 +000014521# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014522if test "$wchar_h" = yes
14523then
14524 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14526$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014527 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014529else
14530
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014532 ac_cv_wchar_t_signed=yes
14533else
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014535/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014536
14537 #include <wchar.h>
14538 int main()
14539 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014540 /* Success: exit code 0 */
14541 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014542 }
14543
14544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014546 ac_cv_wchar_t_signed=yes
14547else
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14551 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014552fi
14553
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014554fi
14555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14557$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558fi
14559
Georg Brandl52d168a2008-01-07 18:10:24 +000014560# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014561if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014562 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014563then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014564 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014567
Georg Brandl52d168a2008-01-07 18:10:24 +000014568else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014569 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014570fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14572$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573
14574# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14576$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014577if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014579else
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 ac_cv_c_bigendian=unknown
14581 # See if we're dealing with a universal compiler.
14582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14583/* end confdefs.h. */
14584#ifndef __APPLE_CC__
14585 not a universal capable compiler
14586 #endif
14587 typedef int dummy;
14588
Skip Montanaro6dead952003-09-25 14:50:04 +000014589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014590if ac_fn_c_try_compile "$LINENO"; then :
14591
14592 # Check for potential -arch flags. It is not universal unless
14593 # there are at least two -arch flags with different values.
14594 ac_arch=
14595 ac_prev=
14596 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14597 if test -n "$ac_prev"; then
14598 case $ac_word in
14599 i?86 | x86_64 | ppc | ppc64)
14600 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14601 ac_arch=$ac_word
14602 else
14603 ac_cv_c_bigendian=universal
14604 break
14605 fi
14606 ;;
14607 esac
14608 ac_prev=
14609 elif test "x$ac_word" = "x-arch"; then
14610 ac_prev=arch
14611 fi
14612 done
14613fi
14614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14615 if test $ac_cv_c_bigendian = unknown; then
14616 # See if sys/param.h defines the BYTE_ORDER macro.
14617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014618/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014619#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014621
Martin v. Löwis11437992002-04-12 09:54:03 +000014622int
14623main ()
14624{
Matthias Kloseb9621712010-04-24 17:59:49 +000014625#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14626 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14627 && LITTLE_ENDIAN)
14628 bogus endian macros
14629 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
14631 ;
14632 return 0;
14633}
14634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014635if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014636 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014638/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014639#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014641
Martin v. Löwis11437992002-04-12 09:54:03 +000014642int
14643main ()
14644{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014645#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 not big endian
14647 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014648
14649 ;
14650 return 0;
14651}
14652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014653if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014654 ac_cv_c_bigendian=yes
14655else
Matthias Kloseb9621712010-04-24 17:59:49 +000014656 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014659fi
14660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14661 fi
14662 if test $ac_cv_c_bigendian = unknown; then
14663 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014665/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014666#include <limits.h>
14667
Martin v. Löwis11437992002-04-12 09:54:03 +000014668int
14669main ()
14670{
Matthias Kloseb9621712010-04-24 17:59:49 +000014671#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14672 bogus endian macros
14673 #endif
14674
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 ;
14676 return 0;
14677}
14678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014679if ac_fn_c_try_compile "$LINENO"; then :
14680 # It does; now see whether it defined to _BIG_ENDIAN or not.
14681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14682/* end confdefs.h. */
14683#include <limits.h>
14684
14685int
14686main ()
14687{
14688#ifndef _BIG_ENDIAN
14689 not big endian
14690 #endif
14691
14692 ;
14693 return 0;
14694}
14695_ACEOF
14696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014698else
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14702fi
14703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14704 fi
14705 if test $ac_cv_c_bigendian = unknown; then
14706 # Compile a test program.
14707 if test "$cross_compiling" = yes; then :
14708 # Try to guess by grepping values from an object file.
14709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14710/* end confdefs.h. */
14711short int ascii_mm[] =
14712 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14713 short int ascii_ii[] =
14714 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14715 int use_ascii (int i) {
14716 return ascii_mm[i] + ascii_ii[i];
14717 }
14718 short int ebcdic_ii[] =
14719 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14720 short int ebcdic_mm[] =
14721 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14722 int use_ebcdic (int i) {
14723 return ebcdic_mm[i] + ebcdic_ii[i];
14724 }
14725 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726
Matthias Kloseb9621712010-04-24 17:59:49 +000014727int
14728main ()
14729{
14730return use_ascii (foo) == use_ebcdic (foo);
14731 ;
14732 return 0;
14733}
14734_ACEOF
14735if ac_fn_c_try_compile "$LINENO"; then :
14736 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14737 ac_cv_c_bigendian=yes
14738 fi
14739 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14740 if test "$ac_cv_c_bigendian" = unknown; then
14741 ac_cv_c_bigendian=no
14742 else
14743 # finding both strings is unlikely to happen, but who knows?
14744 ac_cv_c_bigendian=unknown
14745 fi
14746 fi
14747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014749else
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014753int
14754main ()
14755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014756
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 /* Are we little or big endian? From Harbison&Steele. */
14758 union
14759 {
14760 long int l;
14761 char c[sizeof (long int)];
14762 } u;
14763 u.l = 1;
14764 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014765
14766 ;
14767 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014768}
Martin v. Löwis11437992002-04-12 09:54:03 +000014769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014770if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014771 ac_cv_c_bigendian=no
14772else
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14782$as_echo "$ac_cv_c_bigendian" >&6; }
14783 case $ac_cv_c_bigendian in #(
14784 yes)
14785 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14786;; #(
14787 no)
14788 ;; #(
14789 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 ;; #(
14794 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014795 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014796 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014798
Michael W. Hudson54241132001-12-07 15:38:26 +000014799
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014800# ABI version string for Python extension modules. This appears between the
14801# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14802# from the following attributes which affect the ABI of this Python build (in
14803# this order):
14804#
14805# * The Python implementation (always 'cpython-' for us)
14806# * The major and minor version numbers
14807# * --with-pydebug (adds a 'd')
14808# * --with-pymalloc (adds a 'm')
14809# * --with-wide-unicode (adds a 'u')
14810#
14811# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014812# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14813# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014814
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14816$as_echo_n "checking ABIFLAGS... " >&6; }
14817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14818$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14820$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014821SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14823$as_echo "$SOABI" >&6; }
14824
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014825
14826case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014827 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014828 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14829 *)
14830 EXT_SUFFIX=${SHLIB_SUFFIX};;
14831esac
14832
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14834$as_echo_n "checking LDVERSION... " >&6; }
14835LDVERSION='$(VERSION)$(ABIFLAGS)'
14836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14837$as_echo "$LDVERSION" >&6; }
14838
doko@python.org87421192013-01-26 11:39:31 +010014839
doko@ubuntu.com55532312016-06-14 08:55:19 +020014840if test x$PLATFORM_TRIPLET = x; then
14841 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14842else
14843 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14844fi
doko@python.org87421192013-01-26 11:39:31 +010014845
14846
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014847# Check whether right shifting a negative integer extends the sign bit
14848# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14850$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014851if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014853else
Martin v. Löwis11437992002-04-12 09:54:03 +000014854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014856 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014857else
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014859/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014860
14861int main()
14862{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014863 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014864}
14865
Martin v. Löwis11437992002-04-12 09:54:03 +000014866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014867if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014868 ac_cv_rshift_extends_sign=yes
14869else
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014874fi
14875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876fi
14877
Matthias Kloseb9621712010-04-24 17:59:49 +000014878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14879$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014880if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014881then
Martin v. Löwis11437992002-04-12 09:54:03 +000014882
Matthias Kloseb9621712010-04-24 17:59:49 +000014883$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014884
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014885fi
14886
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014887# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14889$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014890if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014892else
Martin v. Löwis11437992002-04-12 09:54:03 +000014893
Matthias Kloseb9621712010-04-24 17:59:49 +000014894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014895/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014896#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014897int
14898main ()
14899{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014900
14901 FILE *f = fopen("/dev/null", "r");
14902 flockfile(f);
14903 getc_unlocked(f);
14904 funlockfile(f);
14905
Martin v. Löwis11437992002-04-12 09:54:03 +000014906 ;
14907 return 0;
14908}
14909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014910if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014911 ac_cv_have_getc_unlocked=yes
14912else
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 ac_cv_have_getc_unlocked=no
14914fi
14915rm -f core conftest.err conftest.$ac_objext \
14916 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14920$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014921if test "$ac_cv_have_getc_unlocked" = yes
14922then
Martin v. Löwis11437992002-04-12 09:54:03 +000014923
Matthias Kloseb9621712010-04-24 17:59:49 +000014924$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014925
14926fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014927
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014928# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014929# save the value of LIBS so we don't actually link Python with readline
14930LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014931
Gregory P. Smith18820942008-09-07 06:24:49 +000014932# On some systems we need to link readline to a termcap compatible
14933# library. NOTE: Keep the precedence of listed libraries synchronised
14934# with setup.py.
14935py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14937$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014938for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014939 if test -z "$py_libtermcap"; then
14940 READLINE_LIBS="-lreadline"
14941 else
14942 READLINE_LIBS="-lreadline -l$py_libtermcap"
14943 fi
14944 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014946/* end confdefs.h. */
14947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948/* Override any GCC internal prototype to avoid an error.
14949 Use char because int might match the return type of a GCC
14950 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014951#ifdef __cplusplus
14952extern "C"
14953#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014954char readline ();
14955int
14956main ()
14957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014959 ;
14960 return 0;
14961}
14962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014963if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014964 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014966rm -f core conftest.err conftest.$ac_objext \
14967 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014968 if test $py_cv_lib_readline = yes; then
14969 break
14970 fi
14971done
14972# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14973#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014974if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14976$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014977else
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14979$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014980
Matthias Kloseb9621712010-04-24 17:59:49 +000014981$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014982
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014983fi
14984
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014985# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014987/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014988#include <readline/readline.h>
14989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014990if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014991 have_readline=yes
14992else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014993 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014994
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014995fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014996rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014997if test $have_readline = yes
14998then
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015000/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015001#include <readline/readline.h>
15002
15003_ACEOF
15004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015006
Matthias Kloseb9621712010-04-24 17:59:49 +000015007$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015008
15009fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015010rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015013/* end confdefs.h. */
15014#include <readline/readline.h>
15015
15016_ACEOF
15017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015019
Matthias Kloseb9621712010-04-24 17:59:49 +000015020$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015021
15022fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015023rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015024
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015025fi
15026
Martin v. Löwis0daad592001-09-30 21:09:59 +000015027# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15029$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015030if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015032else
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015034LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038/* Override any GCC internal prototype to avoid an error.
15039 Use char because int might match the return type of a GCC
15040 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015041#ifdef __cplusplus
15042extern "C"
15043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015044char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015045int
15046main ()
15047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ;
15050 return 0;
15051}
15052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015055else
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015058rm -f core conftest.err conftest.$ac_objext \
15059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015060LIBS=$ac_check_lib_save_LIBS
15061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15063$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015064if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015065
Matthias Kloseb9621712010-04-24 17:59:49 +000015066$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015067
Martin v. Löwis0daad592001-09-30 21:09:59 +000015068fi
15069
Michael W. Hudson54241132001-12-07 15:38:26 +000015070
Thomas Wouters89d996e2007-09-08 17:39:28 +000015071# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15073$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015074if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015076else
15077 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015078LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015080/* end confdefs.h. */
15081
15082/* Override any GCC internal prototype to avoid an error.
15083 Use char because int might match the return type of a GCC
15084 builtin and then its argument prototype would still apply. */
15085#ifdef __cplusplus
15086extern "C"
15087#endif
15088char rl_completion_display_matches_hook ();
15089int
15090main ()
15091{
15092return rl_completion_display_matches_hook ();
15093 ;
15094 return 0;
15095}
15096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015097if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015098 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15099else
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015102rm -f core conftest.err conftest.$ac_objext \
15103 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015104LIBS=$ac_check_lib_save_LIBS
15105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15107$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015108if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015111
15112fi
15113
15114
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015115# also in 4.0, but not in editline
15116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15117$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15118if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15119 $as_echo_n "(cached) " >&6
15120else
15121 ac_check_lib_save_LIBS=$LIBS
15122LIBS="-lreadline $READLINE_LIBS $LIBS"
15123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15124/* end confdefs.h. */
15125
15126/* Override any GCC internal prototype to avoid an error.
15127 Use char because int might match the return type of a GCC
15128 builtin and then its argument prototype would still apply. */
15129#ifdef __cplusplus
15130extern "C"
15131#endif
15132char rl_resize_terminal ();
15133int
15134main ()
15135{
15136return rl_resize_terminal ();
15137 ;
15138 return 0;
15139}
15140_ACEOF
15141if ac_fn_c_try_link "$LINENO"; then :
15142 ac_cv_lib_readline_rl_resize_terminal=yes
15143else
15144 ac_cv_lib_readline_rl_resize_terminal=no
15145fi
15146rm -f core conftest.err conftest.$ac_objext \
15147 conftest$ac_exeext conftest.$ac_ext
15148LIBS=$ac_check_lib_save_LIBS
15149fi
15150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15151$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15152if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15153
15154$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15155
15156fi
15157
15158
Martin v. Löwis0daad592001-09-30 21:09:59 +000015159# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15161$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015162if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015164else
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015166LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170/* Override any GCC internal prototype to avoid an error.
15171 Use char because int might match the return type of a GCC
15172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015173#ifdef __cplusplus
15174extern "C"
15175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015176char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015177int
15178main ()
15179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 ;
15182 return 0;
15183}
15184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015187else
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015190rm -f core conftest.err conftest.$ac_objext \
15191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015192LIBS=$ac_check_lib_save_LIBS
15193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15195$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015196if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015197
Matthias Kloseb9621712010-04-24 17:59:49 +000015198$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015199
Guido van Rossum353ae582001-07-10 16:45:32 +000015200fi
15201
Jack Jansendd19cf82001-12-06 22:36:17 +000015202
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015203# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015205/* end confdefs.h. */
15206#include <readline/readline.h>
15207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015208if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209 have_readline=yes
15210else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015211 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015212
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015213fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015214rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015215if test $have_readline = yes
15216then
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015218/* end confdefs.h. */
15219#include <readline/readline.h>
15220
15221_ACEOF
15222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015226
15227fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015228rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015229
15230fi
15231
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15233$as_echo_n "checking for append_history in -lreadline... " >&6; }
15234if ${ac_cv_lib_readline_append_history+:} false; then :
15235 $as_echo_n "(cached) " >&6
15236else
15237 ac_check_lib_save_LIBS=$LIBS
15238LIBS="-lreadline $READLINE_LIBS $LIBS"
15239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15240/* end confdefs.h. */
15241
15242/* Override any GCC internal prototype to avoid an error.
15243 Use char because int might match the return type of a GCC
15244 builtin and then its argument prototype would still apply. */
15245#ifdef __cplusplus
15246extern "C"
15247#endif
15248char append_history ();
15249int
15250main ()
15251{
15252return append_history ();
15253 ;
15254 return 0;
15255}
15256_ACEOF
15257if ac_fn_c_try_link "$LINENO"; then :
15258 ac_cv_lib_readline_append_history=yes
15259else
15260 ac_cv_lib_readline_append_history=no
15261fi
15262rm -f core conftest.err conftest.$ac_objext \
15263 conftest$ac_exeext conftest.$ac_ext
15264LIBS=$ac_check_lib_save_LIBS
15265fi
15266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15267$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15268if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15269
15270$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15271
15272fi
15273
15274
Martin v. Löwis82bca632006-02-10 20:49:30 +000015275# End of readline checks: restore LIBS
15276LIBS=$LIBS_no_readline
15277
Matthias Kloseb9621712010-04-24 17:59:49 +000015278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15279$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015280if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015282else
Martin v. Löwis11437992002-04-12 09:54:03 +000015283
Matthias Kloseb9621712010-04-24 17:59:49 +000015284if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015285 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015286else
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015288/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015289
15290int main()
15291{
15292 int val1 = nice(1);
15293 if (val1 != -1 && val1 == nice(2))
15294 exit(0);
15295 exit(1);
15296}
15297
Martin v. Löwis11437992002-04-12 09:54:03 +000015298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015299if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015300 ac_cv_broken_nice=yes
15301else
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015306fi
15307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308fi
15309
Matthias Kloseb9621712010-04-24 17:59:49 +000015310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15311$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015312if test "$ac_cv_broken_nice" = yes
15313then
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
Matthias Kloseb9621712010-04-24 17:59:49 +000015315$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015316
15317fi
15318
Matthias Kloseb9621712010-04-24 17:59:49 +000015319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15320$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015321if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015323else
Matthias Kloseb9621712010-04-24 17:59:49 +000015324 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015325 ac_cv_broken_poll=no
15326else
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328/* end confdefs.h. */
15329
15330#include <poll.h>
15331
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015332int main()
15333{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015334 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015335 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336
15337 close (42);
15338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015339 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015341 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015342 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015343 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015344 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015345 return 1;
15346}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015347
15348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015349if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015350 ac_cv_broken_poll=yes
15351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15355 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015358fi
15359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15361$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015362if test "$ac_cv_broken_poll" = yes
15363then
15364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015366
15367fi
15368
Brett Cannon43802422005-02-10 20:48:03 +000015369# 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 +000015370# (which is not required by ISO C or UNIX spec) and/or if we support
15371# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015372ac_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 +000015373#include <$ac_cv_struct_tm>
15374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375"
Victor Stinnere0be4232011-10-25 13:06:09 +020015376if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015377
15378cat >>confdefs.h <<_ACEOF
15379#define HAVE_STRUCT_TM_TM_ZONE 1
15380_ACEOF
15381
15382
15383fi
15384
15385if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015388
15389else
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15391"
Victor Stinnere0be4232011-10-25 13:06:09 +020015392if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396fi
15397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015399#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400_ACEOF
15401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15403$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015404if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406else
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015408/* end confdefs.h. */
15409#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015410#if !HAVE_DECL_TZNAME
15411extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015412#endif
15413
15414int
15415main ()
15416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015418 ;
15419 return 0;
15420}
15421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015422if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015423 ac_cv_var_tzname=yes
15424else
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015427rm -f core conftest.err conftest.$ac_objext \
15428 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15431$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015432 if test $ac_cv_var_tzname = yes; then
15433
Matthias Kloseb9621712010-04-24 17:59:49 +000015434$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015435
15436 fi
15437fi
15438
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015439
Martin v. Löwis1d459062005-03-14 21:23:33 +000015440# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15442$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015443if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015444 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015445else
15446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015448 ac_cv_working_tzset=no
15449else
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015451/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015452
15453#include <stdlib.h>
15454#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015455#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015456
15457#if HAVE_TZNAME
15458extern char *tzname[];
15459#endif
15460
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015461int main()
15462{
Brett Cannon18367812003-09-19 00:59:16 +000015463 /* Note that we need to ensure that not only does tzset(3)
15464 do 'something' with localtime, but it works as documented
15465 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015466 This includes making sure that tzname is set properly if
15467 tm->tm_zone does not exist since it is the alternative way
15468 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015469
15470 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015471 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015472 */
15473
Martin v. Löwis1d459062005-03-14 21:23:33 +000015474 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015475 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15476
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015477 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015478 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015479 if (localtime(&groundhogday)->tm_hour != 0)
15480 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015481#if HAVE_TZNAME
15482 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15483 if (strcmp(tzname[0], "UTC") ||
15484 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15485 exit(1);
15486#endif
Brett Cannon18367812003-09-19 00:59:16 +000015487
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015488 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015489 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015490 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015491 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015492#if HAVE_TZNAME
15493 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15494 exit(1);
15495#endif
Brett Cannon18367812003-09-19 00:59:16 +000015496
15497 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15498 tzset();
15499 if (localtime(&groundhogday)->tm_hour != 11)
15500 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015501#if HAVE_TZNAME
15502 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15503 exit(1);
15504#endif
15505
15506#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015507 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15508 exit(1);
15509 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15510 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015511#endif
Brett Cannon18367812003-09-19 00:59:16 +000015512
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015513 exit(0);
15514}
15515
15516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015517if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015518 ac_cv_working_tzset=yes
15519else
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15523 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015524fi
15525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526fi
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15529$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015530if test "$ac_cv_working_tzset" = yes
15531then
15532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015534
15535fi
15536
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015537# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15539$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015540if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015544/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015545#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015546int
15547main ()
15548{
15549
15550struct stat st;
15551st.st_mtim.tv_nsec = 1;
15552
15553 ;
15554 return 0;
15555}
15556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015558 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015559else
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15563fi
15564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15566$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015567if test "$ac_cv_stat_tv_nsec" = yes
15568then
15569
Matthias Kloseb9621712010-04-24 17:59:49 +000015570$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015571
15572fi
15573
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015574# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15576$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015577if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015579else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015581/* end confdefs.h. */
15582#include <sys/stat.h>
15583int
15584main ()
15585{
15586
15587struct stat st;
15588st.st_mtimespec.tv_nsec = 1;
15589
15590 ;
15591 return 0;
15592}
15593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015595 ac_cv_stat_tv_nsec2=yes
15596else
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15600fi
15601
Matthias Kloseb9621712010-04-24 17:59:49 +000015602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15603$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015604if test "$ac_cv_stat_tv_nsec2" = yes
15605then
15606
Matthias Kloseb9621712010-04-24 17:59:49 +000015607$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015608
15609fi
15610
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015611# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015612ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015613if test "$cross_compiling" = no; then
15614 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15615fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015616
15617for ac_header in curses.h ncurses.h
15618do :
15619 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15620ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15621if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15622 cat >>confdefs.h <<_ACEOF
15623#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15624_ACEOF
15625
15626fi
15627
15628done
15629
15630
15631# On Solaris, term.h requires curses.h
15632for ac_header in term.h
15633do :
15634 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15635#ifdef HAVE_CURSES_H
15636#include <curses.h>
15637#endif
15638
15639"
15640if test "x$ac_cv_header_term_h" = xyes; then :
15641 cat >>confdefs.h <<_ACEOF
15642#define HAVE_TERM_H 1
15643_ACEOF
15644
15645fi
15646
15647done
15648
15649
Jack Jansen666b1e72001-10-31 12:11:48 +000015650# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15652$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015653if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015655else
Matthias Kloseb9621712010-04-24 17:59:49 +000015656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015657/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015658#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015659int
15660main ()
15661{
Jack Jansen666b1e72001-10-31 12:11:48 +000015662
15663 int rtn;
15664 rtn = mvwdelch(0,0,0);
15665
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 ;
15667 return 0;
15668}
15669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015670if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015671 ac_cv_mvwdelch_is_expression=yes
15672else
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15676fi
15677
Matthias Kloseb9621712010-04-24 17:59:49 +000015678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15679$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015680
15681if test "$ac_cv_mvwdelch_is_expression" = yes
15682then
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015685
15686fi
15687
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015688# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15689# structs since version 5.7. If the macro is defined as zero before including
15690# [n]curses.h, ncurses will expose fields of the structs regardless of the
15691# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15693$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015694if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015698/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015699
15700 #define NCURSES_OPAQUE 0
15701 #include <curses.h>
15702
Martin v. Löwis11437992002-04-12 09:54:03 +000015703int
15704main ()
15705{
Jack Jansen666b1e72001-10-31 12:11:48 +000015706
15707 WINDOW *w;
15708 w->_flags = 0;
15709
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 ;
15711 return 0;
15712}
15713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015714if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015715 ac_cv_window_has_flags=yes
15716else
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15720fi
15721
Matthias Kloseb9621712010-04-24 17:59:49 +000015722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15723$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015724
Jack Jansen666b1e72001-10-31 12:11:48 +000015725
15726if test "$ac_cv_window_has_flags" = yes
15727then
Martin v. Löwis11437992002-04-12 09:54:03 +000015728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015730
15731fi
15732
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15734$as_echo_n "checking for is_pad... " >&6; }
15735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15736/* end confdefs.h. */
15737#include <curses.h>
15738int
15739main ()
15740{
15741
15742#ifndef is_pad
15743void *x=is_pad
15744#endif
15745
15746 ;
15747 return 0;
15748}
15749_ACEOF
15750if ac_fn_c_try_compile "$LINENO"; then :
15751
15752$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15753
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15755$as_echo "yes" >&6; }
15756else
15757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15758$as_echo "no" >&6; }
15759
15760fi
15761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15762
Matthias Kloseb9621712010-04-24 17:59:49 +000015763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15764$as_echo_n "checking for is_term_resized... " >&6; }
15765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015766/* end confdefs.h. */
15767#include <curses.h>
15768int
15769main ()
15770{
15771void *x=is_term_resized
15772 ;
15773 return 0;
15774}
15775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015776if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015777
Matthias Kloseb9621712010-04-24 17:59:49 +000015778$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015779
Matthias Kloseb159a552010-04-25 21:00:44 +000015780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015781$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015782else
Matthias Kloseb9621712010-04-24 17:59:49 +000015783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15784$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015785
15786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15788
Matthias Kloseb9621712010-04-24 17:59:49 +000015789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15790$as_echo_n "checking for resize_term... " >&6; }
15791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015792/* end confdefs.h. */
15793#include <curses.h>
15794int
15795main ()
15796{
15797void *x=resize_term
15798 ;
15799 return 0;
15800}
15801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015802if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015803
Matthias Kloseb9621712010-04-24 17:59:49 +000015804$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015805
Matthias Kloseb159a552010-04-25 21:00:44 +000015806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015807$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015808else
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15810$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015811
15812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15816$as_echo_n "checking for resizeterm... " >&6; }
15817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015818/* end confdefs.h. */
15819#include <curses.h>
15820int
15821main ()
15822{
15823void *x=resizeterm
15824 ;
15825 return 0;
15826}
15827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015828if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015831
Matthias Kloseb159a552010-04-25 21:00:44 +000015832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015833$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015834else
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15836$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015837
15838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015840
15841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15842$as_echo_n "checking for immedok... " >&6; }
15843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15844/* end confdefs.h. */
15845#include <curses.h>
15846int
15847main ()
15848{
15849
15850#ifndef immedok
15851void *x=immedok
15852#endif
15853
15854 ;
15855 return 0;
15856}
15857_ACEOF
15858if ac_fn_c_try_compile "$LINENO"; then :
15859
15860$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15861
15862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15863$as_echo "yes" >&6; }
15864else
15865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15866$as_echo "no" >&6; }
15867
15868fi
15869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15870
15871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15872$as_echo_n "checking for syncok... " >&6; }
15873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15874/* end confdefs.h. */
15875#include <curses.h>
15876int
15877main ()
15878{
15879
15880#ifndef syncok
15881void *x=syncok
15882#endif
15883
15884 ;
15885 return 0;
15886}
15887_ACEOF
15888if ac_fn_c_try_compile "$LINENO"; then :
15889
15890$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15891
15892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15893$as_echo "yes" >&6; }
15894else
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15896$as_echo "no" >&6; }
15897
15898fi
15899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15900
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15902$as_echo_n "checking for wchgat... " >&6; }
15903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15904/* end confdefs.h. */
15905#include <curses.h>
15906int
15907main ()
15908{
15909
15910#ifndef wchgat
15911void *x=wchgat
15912#endif
15913
15914 ;
15915 return 0;
15916}
15917_ACEOF
15918if ac_fn_c_try_compile "$LINENO"; then :
15919
15920$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15921
15922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15923$as_echo "yes" >&6; }
15924else
15925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15926$as_echo "no" >&6; }
15927
15928fi
15929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15930
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15932$as_echo_n "checking for filter... " >&6; }
15933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15934/* end confdefs.h. */
15935#include <curses.h>
15936int
15937main ()
15938{
15939
15940#ifndef filter
15941void *x=filter
15942#endif
15943
15944 ;
15945 return 0;
15946}
15947_ACEOF
15948if ac_fn_c_try_compile "$LINENO"; then :
15949
15950$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15951
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15953$as_echo "yes" >&6; }
15954else
15955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15956$as_echo "no" >&6; }
15957
15958fi
15959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15960
15961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15962$as_echo_n "checking for has_key... " >&6; }
15963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15964/* end confdefs.h. */
15965#include <curses.h>
15966int
15967main ()
15968{
15969
15970#ifndef has_key
15971void *x=has_key
15972#endif
15973
15974 ;
15975 return 0;
15976}
15977_ACEOF
15978if ac_fn_c_try_compile "$LINENO"; then :
15979
15980$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15981
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15983$as_echo "yes" >&6; }
15984else
15985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15986$as_echo "no" >&6; }
15987
15988fi
15989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15990
15991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15992$as_echo_n "checking for typeahead... " >&6; }
15993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15994/* end confdefs.h. */
15995#include <curses.h>
15996int
15997main ()
15998{
15999
16000#ifndef typeahead
16001void *x=typeahead
16002#endif
16003
16004 ;
16005 return 0;
16006}
16007_ACEOF
16008if ac_fn_c_try_compile "$LINENO"; then :
16009
16010$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16011
16012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16013$as_echo "yes" >&6; }
16014else
16015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16016$as_echo "no" >&6; }
16017
16018fi
16019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16020
16021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16022$as_echo_n "checking for use_env... " >&6; }
16023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16024/* end confdefs.h. */
16025#include <curses.h>
16026int
16027main ()
16028{
16029
16030#ifndef use_env
16031void *x=use_env
16032#endif
16033
16034 ;
16035 return 0;
16036}
16037_ACEOF
16038if ac_fn_c_try_compile "$LINENO"; then :
16039
16040$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16041
16042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16043$as_echo "yes" >&6; }
16044else
16045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16046$as_echo "no" >&6; }
16047
16048fi
16049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016050# last curses configure check
16051CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016052
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16054$as_echo "$as_me: checking for device files" >&6;}
16055
16056if test "x$cross_compiling" = xyes; then
16057 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16059$as_echo_n "checking for /dev/ptmx... " >&6; }
16060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16061$as_echo "not set" >&6; }
16062 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16063 fi
16064 if test "${ac_cv_file__dev_ptc+set}" != set; then
16065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16066$as_echo_n "checking for /dev/ptc... " >&6; }
16067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16068$as_echo "not set" >&6; }
16069 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16070 fi
16071fi
16072
Matthias Kloseb9621712010-04-24 17:59:49 +000016073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16074$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016075if ${ac_cv_file__dev_ptmx+:} false; then :
16076 $as_echo_n "(cached) " >&6
16077else
16078 test "$cross_compiling" = yes &&
16079 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16080if test -r "/dev/ptmx"; then
16081 ac_cv_file__dev_ptmx=yes
16082else
16083 ac_cv_file__dev_ptmx=no
16084fi
16085fi
16086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16087$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16088if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016089
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016090fi
16091
16092if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016093
Matthias Kloseb9621712010-04-24 17:59:49 +000016094$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016095
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16098$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016099if ${ac_cv_file__dev_ptc+:} false; then :
16100 $as_echo_n "(cached) " >&6
16101else
16102 test "$cross_compiling" = yes &&
16103 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16104if test -r "/dev/ptc"; then
16105 ac_cv_file__dev_ptc=yes
16106else
16107 ac_cv_file__dev_ptc=no
16108fi
16109fi
16110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16111$as_echo "$ac_cv_file__dev_ptc" >&6; }
16112if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016113
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016114fi
16115
16116if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016117
Matthias Kloseb9621712010-04-24 17:59:49 +000016118$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016119
Neal Norwitz865400f2003-03-21 01:42:58 +000016120fi
16121
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016122if test $ac_sys_system = Darwin
16123then
16124 LIBS="$LIBS -framework CoreFoundation"
16125fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016126
Matthias Kloseb9621712010-04-24 17:59:49 +000016127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16128$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016129if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016131else
Matthias Kloseb9621712010-04-24 17:59:49 +000016132 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016133 ac_cv_have_size_t_format="cross -- assuming yes"
16134
Thomas Wouters477c8d52006-05-27 19:21:47 +000016135else
Matthias Kloseb9621712010-04-24 17:59:49 +000016136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016137/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016138
Thomas Wouters477c8d52006-05-27 19:21:47 +000016139#include <stdio.h>
16140#include <stddef.h>
16141#include <string.h>
16142
Christian Heimes2c181612007-12-17 20:04:13 +000016143#ifdef HAVE_SYS_TYPES_H
16144#include <sys/types.h>
16145#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016146
16147#ifdef HAVE_SSIZE_T
16148typedef ssize_t Py_ssize_t;
16149#elif SIZEOF_VOID_P == SIZEOF_LONG
16150typedef long Py_ssize_t;
16151#else
16152typedef int Py_ssize_t;
16153#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016154
Christian Heimes2c181612007-12-17 20:04:13 +000016155int main()
16156{
16157 char buffer[256];
16158
Thomas Wouters477c8d52006-05-27 19:21:47 +000016159 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16160 return 1;
16161
Thomas Wouters89f507f2006-12-13 04:49:30 +000016162 if (strcmp(buffer, "123"))
16163 return 1;
16164
16165 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16166 return 1;
16167
16168 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016169 return 1;
16170
16171 return 0;
16172}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016173
Thomas Wouters477c8d52006-05-27 19:21:47 +000016174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016175if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016176 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016177else
Matthias Kloseb9621712010-04-24 17:59:49 +000016178 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16181 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016182fi
16183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16186$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016187if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016188
Matthias Kloseb9621712010-04-24 17:59:49 +000016189$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016190
16191fi
16192
Matthias Kloseb9621712010-04-24 17:59:49 +000016193ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016194#ifdef HAVE_SYS_TYPES_H
16195#include <sys/types.h>
16196#endif
16197#ifdef HAVE_SYS_SOCKET_H
16198#include <sys/socket.h>
16199#endif
16200
Matthias Kloseb9621712010-04-24 17:59:49 +000016201"
Victor Stinnere0be4232011-10-25 13:06:09 +020016202if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016203
Martin v. Löwis11437992002-04-12 09:54:03 +000016204else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016205
Matthias Kloseb9621712010-04-24 17:59:49 +000016206$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016207
16208fi
16209
Michael W. Hudson54241132001-12-07 15:38:26 +000016210
Matthias Kloseb9621712010-04-24 17:59:49 +000016211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16212$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016213if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016214 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016215else
Matthias Kloseb9621712010-04-24 17:59:49 +000016216 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016217 ac_cv_broken_mbstowcs=no
16218else
Matthias Kloseb9621712010-04-24 17:59:49 +000016219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016220/* end confdefs.h. */
16221
Stefan Krah19c21392012-11-22 23:47:32 +010016222#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016223#include<stdlib.h>
16224int main() {
16225 size_t len = -1;
16226 const char *str = "text";
16227 len = mbstowcs(NULL, str, 0);
16228 return (len != 4);
16229}
16230
16231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016232if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016233 ac_cv_broken_mbstowcs=no
16234else
Matthias Kloseb9621712010-04-24 17:59:49 +000016235 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16238 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016239fi
16240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016241fi
16242
Matthias Kloseb9621712010-04-24 17:59:49 +000016243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16244$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016245if test "$ac_cv_broken_mbstowcs" = yes
16246then
16247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016249
16250fi
16251
Antoine Pitroub52ec782009-01-25 16:34:23 +000016252# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16254$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016255
16256# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016257if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016258 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016259if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016260then
16261
Matthias Kloseb9621712010-04-24 17:59:49 +000016262$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016263
Matthias Kloseb9621712010-04-24 17:59:49 +000016264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16265$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016266fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016267if test "$withval" = no
16268then
16269
16270$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16271
Matthias Kloseb9621712010-04-24 17:59:49 +000016272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16273$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016274fi
16275
Antoine Pitrou042b1282010-08-13 21:15:58 +000016276else
16277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16278$as_echo "no value specified" >&6; }
16279fi
16280
Antoine Pitroub52ec782009-01-25 16:34:23 +000016281
Matthias Kloseb17289e2012-03-15 19:51:34 +010016282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16283$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16284if ${ac_cv_computed_gotos+:} false; then :
16285 $as_echo_n "(cached) " >&6
16286else
16287 if test "$cross_compiling" = yes; then :
16288 if test "${with_computed_gotos+set}" = set; then
16289 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16290 else
16291 ac_cv_computed_gotos=no
16292 fi
16293else
16294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16295/* end confdefs.h. */
16296
16297int main(int argc, char **argv)
16298{
16299 static void *targets[1] = { &&LABEL1 };
16300 goto LABEL2;
16301LABEL1:
16302 return 0;
16303LABEL2:
16304 goto *targets[0];
16305 return 1;
16306}
16307
16308_ACEOF
16309if ac_fn_c_try_run "$LINENO"; then :
16310 ac_cv_computed_gotos=yes
16311else
16312 ac_cv_computed_gotos=no
16313fi
16314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16315 conftest.$ac_objext conftest.beam conftest.$ac_ext
16316fi
16317
16318fi
16319
16320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16321$as_echo "$ac_cv_computed_gotos" >&6; }
16322case "$ac_cv_computed_gotos" in yes*)
16323
16324$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16325
16326esac
16327
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016328case $ac_sys_system in
16329AIX*)
16330
16331$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16332 ;;
16333esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016334
Michael W. Hudson54241132001-12-07 15:38:26 +000016335
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016336
16337
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016338for h in `(cd $srcdir;echo Python/thread_*.h)`
16339do
16340 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16341done
16342
Michael W. Hudson54241132001-12-07 15:38:26 +000016343
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016344SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16346$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016347for dir in $SRCDIRS; do
16348 if test ! -d $dir; then
16349 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016350 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016351done
Matthias Kloseb9621712010-04-24 17:59:49 +000016352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16353$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016354
Stefan Krah1919b7e2012-03-21 18:25:23 +010016355# Availability of -O2:
16356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16357$as_echo_n "checking for -O2... " >&6; }
16358saved_cflags="$CFLAGS"
16359CFLAGS="-O2"
16360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16361/* end confdefs.h. */
16362
16363int
16364main ()
16365{
16366
16367
16368 ;
16369 return 0;
16370}
16371_ACEOF
16372if ac_fn_c_try_compile "$LINENO"; then :
16373 have_O2=yes
16374else
16375 have_O2=no
16376fi
16377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16379$as_echo "$have_O2" >&6; }
16380CFLAGS="$saved_cflags"
16381
16382# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16383# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16385$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16386saved_cflags="$CFLAGS"
16387CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16388if test "$have_O2" = no; then
16389 CFLAGS=""
16390fi
16391if test "$cross_compiling" = yes; then :
16392 have_glibc_memmove_bug=undefined
16393else
16394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395/* end confdefs.h. */
16396
16397#include <stdio.h>
16398#include <stdlib.h>
16399#include <string.h>
16400void foo(void *p, void *q) { memmove(p, q, 19); }
16401int main() {
16402 char a[32] = "123456789000000000";
16403 foo(&a[9], a);
16404 if (strcmp(a, "123456789123456789000000000") != 0)
16405 return 1;
16406 foo(a, &a[9]);
16407 if (strcmp(a, "123456789000000000") != 0)
16408 return 1;
16409 return 0;
16410}
16411
16412_ACEOF
16413if ac_fn_c_try_run "$LINENO"; then :
16414 have_glibc_memmove_bug=no
16415else
16416 have_glibc_memmove_bug=yes
16417fi
16418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16419 conftest.$ac_objext conftest.beam conftest.$ac_ext
16420fi
16421
16422CFLAGS="$saved_cflags"
16423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16424$as_echo "$have_glibc_memmove_bug" >&6; }
16425if test "$have_glibc_memmove_bug" = yes; then
16426
16427$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16428
16429fi
16430
16431if test "$have_gcc_asm_for_x87" = yes; then
16432 # Some versions of gcc miscompile inline asm:
16433 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16434 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16435 case $CC in
16436 *gcc*)
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16438$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16439 saved_cflags="$CFLAGS"
16440 CFLAGS="-O2"
16441 if test "$cross_compiling" = yes; then :
16442 have_ipa_pure_const_bug=undefined
16443else
16444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16445/* end confdefs.h. */
16446
16447 __attribute__((noinline)) int
16448 foo(int *p) {
16449 int r;
16450 asm ( "movl \$6, (%1)\n\t"
16451 "xorl %0, %0\n\t"
16452 : "=r" (r) : "r" (p) : "memory"
16453 );
16454 return r;
16455 }
16456 int main() {
16457 int p = 8;
16458 if ((foo(&p) ? : p) != 6)
16459 return 1;
16460 return 0;
16461 }
16462
16463_ACEOF
16464if ac_fn_c_try_run "$LINENO"; then :
16465 have_ipa_pure_const_bug=no
16466else
16467 have_ipa_pure_const_bug=yes
16468fi
16469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16470 conftest.$ac_objext conftest.beam conftest.$ac_ext
16471fi
16472
16473 CFLAGS="$saved_cflags"
16474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16475$as_echo "$have_ipa_pure_const_bug" >&6; }
16476 if test "$have_ipa_pure_const_bug" = yes; then
16477
16478$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16479
16480 fi
16481 ;;
16482 esac
16483fi
16484
Victor Stinner4f5366e2015-01-09 02:13:19 +010016485# Check for stdatomic.h
16486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16487$as_echo_n "checking for stdatomic.h... " >&6; }
16488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16489/* end confdefs.h. */
16490
16491
16492 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016493 atomic_int value = ATOMIC_VAR_INIT(1);
16494 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016495 int main() {
16496 int loaded_value = atomic_load(&value);
16497 return 0;
16498 }
16499
16500
16501_ACEOF
16502if ac_fn_c_try_link "$LINENO"; then :
16503 have_stdatomic_h=yes
16504else
16505 have_stdatomic_h=no
16506fi
16507rm -f core conftest.err conftest.$ac_objext \
16508 conftest$ac_exeext conftest.$ac_ext
16509
16510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16511$as_echo "$have_stdatomic_h" >&6; }
16512
16513if test "$have_stdatomic_h" = yes; then
16514
16515$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16516
16517fi
16518
16519# Check for GCC >= 4.7 __atomic builtins
16520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16521$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16523/* end confdefs.h. */
16524
16525
16526 volatile int val = 1;
16527 int main() {
16528 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16529 return 0;
16530 }
16531
16532
16533_ACEOF
16534if ac_fn_c_try_link "$LINENO"; then :
16535 have_builtin_atomic=yes
16536else
16537 have_builtin_atomic=no
16538fi
16539rm -f core conftest.err conftest.$ac_objext \
16540 conftest$ac_exeext conftest.$ac_ext
16541
16542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16543$as_echo "$have_builtin_atomic" >&6; }
16544
16545if test "$have_builtin_atomic" = yes; then
16546
16547$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16548
16549fi
16550
Ned Deily322f5ba2013-11-21 23:01:59 -080016551# ensurepip option
16552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16553$as_echo_n "checking for ensurepip... " >&6; }
16554
16555# Check whether --with-ensurepip was given.
16556if test "${with_ensurepip+set}" = set; then :
16557 withval=$with_ensurepip;
16558else
16559 with_ensurepip=upgrade
16560fi
16561
16562case $with_ensurepip in #(
16563 yes|upgrade) :
16564 ENSUREPIP=upgrade ;; #(
16565 install) :
16566 ENSUREPIP=install ;; #(
16567 no) :
16568 ENSUREPIP=no ;; #(
16569 *) :
16570 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16571esac
16572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16573$as_echo "$ENSUREPIP" >&6; }
16574
16575
Victor Stinner35a97c02015-03-08 02:59:09 +010016576# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16578$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16580/* end confdefs.h. */
16581
16582
16583 #include <dirent.h>
16584
16585 int main() {
16586 struct dirent entry;
16587 return entry.d_type == DT_UNKNOWN;
16588 }
16589
16590
16591_ACEOF
16592if ac_fn_c_try_link "$LINENO"; then :
16593 have_dirent_d_type=yes
16594else
16595 have_dirent_d_type=no
16596fi
16597rm -f core conftest.err conftest.$ac_objext \
16598 conftest$ac_exeext conftest.$ac_ext
16599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16600$as_echo "$have_dirent_d_type" >&6; }
16601
16602if test "$have_dirent_d_type" = yes; then
16603
16604$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16605
16606fi
16607
Victor Stinner9eb57c52015-03-19 22:21:49 +010016608# check if the Linux getrandom() syscall is available
16609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16610$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16612/* end confdefs.h. */
16613
16614
Victor Stinner1b80b242016-04-12 22:34:58 +020016615 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016616 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016617 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016618
16619 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016620 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016621 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016622 const int flags = GRND_NONBLOCK;
16623 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016624 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016625 return 0;
16626 }
16627
16628
16629_ACEOF
16630if ac_fn_c_try_link "$LINENO"; then :
16631 have_getrandom_syscall=yes
16632else
16633 have_getrandom_syscall=no
16634fi
16635rm -f core conftest.err conftest.$ac_objext \
16636 conftest$ac_exeext conftest.$ac_ext
16637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16638$as_echo "$have_getrandom_syscall" >&6; }
16639
16640if test "$have_getrandom_syscall" = yes; then
16641
16642$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16643
16644fi
16645
Victor Stinner3abf44e2015-09-18 15:38:37 +020016646# check if the getrandom() function is available
16647# the test was written for the Solaris function of <sys/random.h>
16648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16649$as_echo_n "checking for the getrandom() function... " >&6; }
16650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16651/* end confdefs.h. */
16652
16653
16654 #include <sys/random.h>
16655
16656 int main() {
16657 char buffer[1];
16658 const size_t buflen = sizeof(buffer);
16659 const int flags = 0;
16660 /* ignore the result, Python checks for ENOSYS at runtime */
16661 (void)getrandom(buffer, buflen, flags);
16662 return 0;
16663 }
16664
16665
16666_ACEOF
16667if ac_fn_c_try_link "$LINENO"; then :
16668 have_getrandom=yes
16669else
16670 have_getrandom=no
16671fi
16672rm -f core conftest.err conftest.$ac_objext \
16673 conftest$ac_exeext conftest.$ac_ext
16674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16675$as_echo "$have_getrandom" >&6; }
16676
16677if test "$have_getrandom" = yes; then
16678
16679$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16680
16681fi
16682
Guido van Rossum627b2d71993-12-24 10:39:16 +000016683# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016684ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016685
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016686ac_config_files="$ac_config_files Modules/ld_so_aix"
16687
Martin v. Löwis11437992002-04-12 09:54:03 +000016688cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016689# This file is a shell script that caches the results of configure
16690# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016691# scripts and configure runs, see configure's option --config-cache.
16692# It is not useful on other systems. If it contains results you don't
16693# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016694#
Martin v. Löwis11437992002-04-12 09:54:03 +000016695# config.status only pays attention to the cache file if you give it
16696# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016697#
Skip Montanaro6dead952003-09-25 14:50:04 +000016698# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016699# loading this file, other *unset* `ac_cv_foo' will be assigned the
16700# following values.
16701
16702_ACEOF
16703
Guido van Rossumf78abae1997-01-21 22:02:36 +000016704# The following way of writing the cache mishandles newlines in values,
16705# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016707# Ultrix sh set writes to stderr and can't be redirected directly,
16708# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709(
16710 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16711 eval ac_val=\$$ac_var
16712 case $ac_val in #(
16713 *${as_nl}*)
16714 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016715 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16716$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717 esac
16718 case $ac_var in #(
16719 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016720 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16721 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722 esac ;;
16723 esac
16724 done
16725
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16728 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 # `set' does not quote correctly, so add quotes: double-quote
16730 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016731 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016732 "s/'/'\\\\''/g;
16733 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 *)
16736 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016738 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739 esac |
16740 sort
16741) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16747 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16749 :end' >>confcache
16750if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16751 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016752 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016753 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16754$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016755 if test ! -f "$cache_file" || test -h "$cache_file"; then
16756 cat confcache >"$cache_file"
16757 else
16758 case $cache_file in #(
16759 */* | ?:*)
16760 mv -f confcache "$cache_file"$$ &&
16761 mv -f "$cache_file"$$ "$cache_file" ;; #(
16762 *)
16763 mv -f confcache "$cache_file" ;;
16764 esac
16765 fi
16766 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016767 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016768 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16769$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016770 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016771fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016772rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016773
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016774test "x$prefix" = xNONE && prefix=$ac_default_prefix
16775# Let make expand exec_prefix.
16776test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016777
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016778DEFS=-DHAVE_CONFIG_H
16779
Skip Montanaro6dead952003-09-25 14:50:04 +000016780ac_libobjs=
16781ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016782U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016783for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16784 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016786 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16788 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016789 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16790 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016791done
16792LIBOBJS=$ac_libobjs
16793
16794LTLIBOBJS=$ac_ltlibobjs
16795
16796
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
Matthias Kloseb9621712010-04-24 17:59:49 +000016798
Victor Stinnere0be4232011-10-25 13:06:09 +020016799: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016800ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016801ac_clean_files_save=$ac_clean_files
16802ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016803{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16804$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16805as_write_fail=0
16806cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016807#! $SHELL
16808# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016809# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016810# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016811# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016812
Martin v. Löwis11437992002-04-12 09:54:03 +000016813debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016814ac_cs_recheck=false
16815ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016816
Matthias Kloseb9621712010-04-24 17:59:49 +000016817SHELL=\${CONFIG_SHELL-$SHELL}
16818export SHELL
16819_ASEOF
16820cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16821## -------------------- ##
16822## M4sh Initialization. ##
16823## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016825# Be more Bourne compatible
16826DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016827if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016828 emulate sh
16829 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016830 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016831 # is contrary to our usage. Disable this feature.
16832 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016833 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016834else
Matthias Kloseb9621712010-04-24 17:59:49 +000016835 case `(set -o) 2>/dev/null` in #(
16836 *posix*) :
16837 set -o posix ;; #(
16838 *) :
16839 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016841fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016842
16843
Matthias Kloseb9621712010-04-24 17:59:49 +000016844as_nl='
16845'
16846export as_nl
16847# Printing a long string crashes Solaris 7 /usr/bin/printf.
16848as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16849as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16850as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16851# Prefer a ksh shell builtin over an external printf program on Solaris,
16852# but without wasting forks for bash or zsh.
16853if test -z "$BASH_VERSION$ZSH_VERSION" \
16854 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16855 as_echo='print -r --'
16856 as_echo_n='print -rn --'
16857elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16858 as_echo='printf %s\n'
16859 as_echo_n='printf %s'
16860else
16861 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16862 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16863 as_echo_n='/usr/ucb/echo -n'
16864 else
16865 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16866 as_echo_n_body='eval
16867 arg=$1;
16868 case $arg in #(
16869 *"$as_nl"*)
16870 expr "X$arg" : "X\\(.*\\)$as_nl";
16871 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16872 esac;
16873 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16874 '
16875 export as_echo_n_body
16876 as_echo_n='sh -c $as_echo_n_body as_echo'
16877 fi
16878 export as_echo_body
16879 as_echo='sh -c $as_echo_body as_echo'
16880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016881
16882# The user is always right.
16883if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016884 PATH_SEPARATOR=:
16885 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16886 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16887 PATH_SEPARATOR=';'
16888 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891
16892# IFS
16893# We need space, tab and new line, in precisely that order. Quoting is
16894# there to prevent editors from complaining about space-tab.
16895# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16896# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897IFS=" "" $as_nl"
16898
16899# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016900as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016901case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 *[\\/]* ) as_myself=$0 ;;
16903 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016904for as_dir in $PATH
16905do
16906 IFS=$as_save_IFS
16907 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016908 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16909 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016910IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912 ;;
16913esac
16914# We did not find ourselves, most probably we were run as `sh COMMAND'
16915# in which case we are not to be found in the path.
16916if test "x$as_myself" = x; then
16917 as_myself=$0
16918fi
16919if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016920 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16921 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922fi
16923
Matthias Kloseb9621712010-04-24 17:59:49 +000016924# Unset variables that we do not need and which cause bugs (e.g. in
16925# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16926# suppresses any "Segmentation fault" message there. '((' could
16927# trigger a bug in pdksh 5.2.14.
16928for as_var in BASH_ENV ENV MAIL MAILPATH
16929do eval test x\${$as_var+set} = xset \
16930 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931done
16932PS1='$ '
16933PS2='> '
16934PS4='+ '
16935
16936# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016937LC_ALL=C
16938export LC_ALL
16939LANGUAGE=C
16940export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941
Matthias Kloseb9621712010-04-24 17:59:49 +000016942# CDPATH.
16943(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16944
16945
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016946# as_fn_error STATUS ERROR [LINENO LOG_FD]
16947# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016948# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16949# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016950# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016951as_fn_error ()
16952{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016953 as_status=$1; test $as_status -eq 0 && as_status=1
16954 if test "$4"; then
16955 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16956 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016957 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016958 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016959 as_fn_exit $as_status
16960} # as_fn_error
16961
16962
16963# as_fn_set_status STATUS
16964# -----------------------
16965# Set $? to STATUS, without forking.
16966as_fn_set_status ()
16967{
16968 return $1
16969} # as_fn_set_status
16970
16971# as_fn_exit STATUS
16972# -----------------
16973# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16974as_fn_exit ()
16975{
16976 set +e
16977 as_fn_set_status $1
16978 exit $1
16979} # as_fn_exit
16980
16981# as_fn_unset VAR
16982# ---------------
16983# Portably unset VAR.
16984as_fn_unset ()
16985{
16986 { eval $1=; unset $1;}
16987}
16988as_unset=as_fn_unset
16989# as_fn_append VAR VALUE
16990# ----------------------
16991# Append the text in VALUE to the end of the definition contained in VAR. Take
16992# advantage of any shell optimizations that allow amortized linear growth over
16993# repeated appends, instead of the typical quadratic growth present in naive
16994# implementations.
16995if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16996 eval 'as_fn_append ()
16997 {
16998 eval $1+=\$2
16999 }'
17000else
17001 as_fn_append ()
17002 {
17003 eval $1=\$$1\$2
17004 }
17005fi # as_fn_append
17006
17007# as_fn_arith ARG...
17008# ------------------
17009# Perform arithmetic evaluation on the ARGs, and store the result in the
17010# global $as_val. Take advantage of shells that can avoid forks. The arguments
17011# must be portable across $(()) and expr.
17012if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17013 eval 'as_fn_arith ()
17014 {
17015 as_val=$(( $* ))
17016 }'
17017else
17018 as_fn_arith ()
17019 {
17020 as_val=`expr "$@" || test $? -eq 1`
17021 }
17022fi # as_fn_arith
17023
17024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025if expr a : '\(a\)' >/dev/null 2>&1 &&
17026 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17027 as_expr=expr
17028else
17029 as_expr=false
17030fi
17031
17032if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17033 as_basename=basename
17034else
17035 as_basename=false
17036fi
17037
Matthias Kloseb9621712010-04-24 17:59:49 +000017038if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17039 as_dirname=dirname
17040else
17041 as_dirname=false
17042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044as_me=`$as_basename -- "$0" ||
17045$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17046 X"$0" : 'X\(//\)$' \| \
17047 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017048$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017049 sed '/^.*\/\([^/][^/]*\)\/*$/{
17050 s//\1/
17051 q
17052 }
17053 /^X\/\(\/\/\)$/{
17054 s//\1/
17055 q
17056 }
17057 /^X\/\(\/\).*/{
17058 s//\1/
17059 q
17060 }
17061 s/.*/./; q'`
17062
Matthias Kloseb9621712010-04-24 17:59:49 +000017063# Avoid depending upon Character Ranges.
17064as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17065as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17066as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17067as_cr_digits='0123456789'
17068as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069
17070ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017071case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017073 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017075 xy) ECHO_C='\c';;
17076 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17077 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078 esac;;
17079*)
17080 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017081esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017082
Martin v. Löwis11437992002-04-12 09:54:03 +000017083rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084if test -d conf$$.dir; then
17085 rm -f conf$$.dir/conf$$.file
17086else
17087 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017088 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017090if (echo >conf$$.file) 2>/dev/null; then
17091 if ln -s conf$$.file conf$$ 2>/dev/null; then
17092 as_ln_s='ln -s'
17093 # ... but there are two gotchas:
17094 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17095 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017096 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017097 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017098 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017099 elif ln conf$$.file conf$$ 2>/dev/null; then
17100 as_ln_s=ln
17101 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017102 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017103 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017104else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017105 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17108rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017109
Matthias Kloseb9621712010-04-24 17:59:49 +000017110
17111# as_fn_mkdir_p
17112# -------------
17113# Create "$as_dir" as a directory, including parents if necessary.
17114as_fn_mkdir_p ()
17115{
17116
17117 case $as_dir in #(
17118 -*) as_dir=./$as_dir;;
17119 esac
17120 test -d "$as_dir" || eval $as_mkdir_p || {
17121 as_dirs=
17122 while :; do
17123 case $as_dir in #(
17124 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17125 *) as_qdir=$as_dir;;
17126 esac
17127 as_dirs="'$as_qdir' $as_dirs"
17128 as_dir=`$as_dirname -- "$as_dir" ||
17129$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17130 X"$as_dir" : 'X\(//\)[^/]' \| \
17131 X"$as_dir" : 'X\(//\)$' \| \
17132 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17133$as_echo X"$as_dir" |
17134 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17135 s//\1/
17136 q
17137 }
17138 /^X\(\/\/\)[^/].*/{
17139 s//\1/
17140 q
17141 }
17142 /^X\(\/\/\)$/{
17143 s//\1/
17144 q
17145 }
17146 /^X\(\/\).*/{
17147 s//\1/
17148 q
17149 }
17150 s/.*/./; q'`
17151 test -d "$as_dir" && break
17152 done
17153 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017154 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017155
17156
17157} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017158if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017159 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017160else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017161 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017162 as_mkdir_p=false
17163fi
17164
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017165
17166# as_fn_executable_p FILE
17167# -----------------------
17168# Test if FILE is an executable regular file.
17169as_fn_executable_p ()
17170{
17171 test -f "$1" && test -x "$1"
17172} # as_fn_executable_p
17173as_test_x='test -x'
17174as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017175
17176# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017177as_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 +000017178
17179# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017180as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017181
17182
Martin v. Löwis11437992002-04-12 09:54:03 +000017183exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017184## ----------------------------------- ##
17185## Main body of $CONFIG_STATUS script. ##
17186## ----------------------------------- ##
17187_ASEOF
17188test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017189
Matthias Kloseb9621712010-04-24 17:59:49 +000017190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17191# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017192# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193# values after options handling.
17194ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017195This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017196generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017197
17198 CONFIG_FILES = $CONFIG_FILES
17199 CONFIG_HEADERS = $CONFIG_HEADERS
17200 CONFIG_LINKS = $CONFIG_LINKS
17201 CONFIG_COMMANDS = $CONFIG_COMMANDS
17202 $ $0 $@
17203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204on `(hostname || uname -n) 2>/dev/null | sed 1q`
17205"
17206
Martin v. Löwis11437992002-04-12 09:54:03 +000017207_ACEOF
17208
Matthias Kloseb9621712010-04-24 17:59:49 +000017209case $ac_config_files in *"
17210"*) set x $ac_config_files; shift; ac_config_files=$*;;
17211esac
17212
17213case $ac_config_headers in *"
17214"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17215esac
17216
17217
17218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017219# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017220config_files="$ac_config_files"
17221config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017223_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017224
Matthias Kloseb9621712010-04-24 17:59:49 +000017225cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017226ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017227\`$as_me' instantiates files and other configuration actions
17228from templates according to the current configuration. Unless the files
17229and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017230
Matthias Kloseb9621712010-04-24 17:59:49 +000017231Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017232
17233 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017235 --config print configuration, then exit
17236 -q, --quiet, --silent
17237 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017238 -d, --debug don't remove temporary files
17239 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017240 --file=FILE[:TEMPLATE]
17241 instantiate the configuration file FILE
17242 --header=FILE[:TEMPLATE]
17243 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017244
17245Configuration files:
17246$config_files
17247
17248Configuration headers:
17249$config_headers
17250
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017251Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017254cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17255ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017256ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017257python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017258configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017259 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017260
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017261Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017262This config.status script is free software; the Free Software Foundation
17263gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264
17265ac_pwd='$ac_pwd'
17266srcdir='$srcdir'
17267INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017268MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017269test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017270_ACEOF
17271
Matthias Kloseb9621712010-04-24 17:59:49 +000017272cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17273# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017274ac_need_defaults=:
17275while test $# != 0
17276do
17277 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017278 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17280 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017281 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017283 --*=)
17284 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17285 ac_optarg=
17286 ac_shift=:
17287 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017289 ac_option=$1
17290 ac_optarg=$2
17291 ac_shift=shift
17292 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017293 esac
17294
Skip Montanaro6dead952003-09-25 14:50:04 +000017295 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017296 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017297 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17298 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017300 $as_echo "$ac_cs_version"; exit ;;
17301 --config | --confi | --conf | --con | --co | --c )
17302 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017304 debug=: ;;
17305 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017306 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017307 case $ac_optarg in
17308 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017309 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017310 esac
17311 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017312 ac_need_defaults=false;;
17313 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017314 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017315 case $ac_optarg in
17316 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17317 esac
17318 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017319 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320 --he | --h)
17321 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017322 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017323Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017325 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017326 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17327 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17328 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017329
17330 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017331 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017332Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017333
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017336
17337 esac
17338 shift
17339done
17340
Skip Montanaro6dead952003-09-25 14:50:04 +000017341ac_configure_extra_args=
17342
17343if $ac_cs_silent; then
17344 exec 6>/dev/null
17345 ac_configure_extra_args="$ac_configure_extra_args --silent"
17346fi
17347
17348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017349cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017350if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017351 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017352 shift
17353 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17354 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017356 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017357fi
17358
Martin v. Löwis11437992002-04-12 09:54:03 +000017359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361exec 5>>config.log
17362{
17363 echo
17364 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17365## Running $as_me. ##
17366_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017367 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017373
Matthias Kloseb9621712010-04-24 17:59:49 +000017374cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375
17376# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017377for ac_config_target in $ac_config_targets
17378do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379 case $ac_config_target in
17380 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17381 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17382 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017383 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17384 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017386 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017387 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017388 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389
Victor Stinnere0be4232011-10-25 13:06:09 +020017390 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017391 esac
17392done
17393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394
Martin v. Löwis11437992002-04-12 09:54:03 +000017395# If the user did not use the arguments to specify the items to instantiate,
17396# then the envvar interface is used. Set only those that are not.
17397# We use the long form for the default assignment because of an extremely
17398# bizarre bug on SunOS 4.1.3.
17399if $ac_need_defaults; then
17400 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17401 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17402fi
17403
Skip Montanaro6dead952003-09-25 14:50:04 +000017404# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017406# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407# Hook for its removal unless debugging.
17408# Note that there is a small window in which the directory will not be cleaned:
17409# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017410$debug ||
17411{
Victor Stinnere0be4232011-10-25 13:06:09 +020017412 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017414 : "${ac_tmp:=$tmp}"
17415 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017417 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017418}
Martin v. Löwis11437992002-04-12 09:54:03 +000017419# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017420
Martin v. Löwis11437992002-04-12 09:54:03 +000017421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017423 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017424} ||
17425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 tmp=./conf$$-$RANDOM
17427 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017428} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017429ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017430
Matthias Kloseb9621712010-04-24 17:59:49 +000017431# Set up the scripts for CONFIG_FILES section.
17432# No need to generate them if there are no CONFIG_FILES.
17433# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017435
Matthias Kloseb9621712010-04-24 17:59:49 +000017436
17437ac_cr=`echo X | tr X '\015'`
17438# On cygwin, bash can eat \r inside `` if the user requested igncr.
17439# But we know of no other shell where ac_cr would be empty at this
17440# point, so we can use a bashism as a fallback.
17441if test "x$ac_cr" = x; then
17442 eval ac_cr=\$\'\\r\'
17443fi
17444ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17445if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017446 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017447else
17448 ac_cs_awk_cr=$ac_cr
17449fi
17450
Victor Stinnere0be4232011-10-25 13:06:09 +020017451echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017452_ACEOF
17453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454
Matthias Kloseb9621712010-04-24 17:59:49 +000017455{
17456 echo "cat >conf$$subs.awk <<_ACEOF" &&
17457 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17458 echo "_ACEOF"
17459} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017460 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17461ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462ac_delim='%!_!# '
17463for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017464 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017465 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466
Matthias Kloseb9621712010-04-24 17:59:49 +000017467 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17468 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469 break
17470 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017471 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472 else
17473 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017474 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475done
Matthias Kloseb9621712010-04-24 17:59:49 +000017476rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477
Matthias Kloseb9621712010-04-24 17:59:49 +000017478cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017479cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017481sed -n '
17482h
17483s/^/S["/; s/!.*/"]=/
17484p
17485g
17486s/^[^!]*!//
17487:repl
17488t repl
17489s/'"$ac_delim"'$//
17490t delim
17491:nl
17492h
17493s/\(.\{148\}\)..*/\1/
17494t more1
17495s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17496p
17497n
17498b repl
17499:more1
17500s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17501p
17502g
17503s/.\{148\}//
17504t nl
17505:delim
17506h
17507s/\(.\{148\}\)..*/\1/
17508t more2
17509s/["\\]/\\&/g; s/^/"/; s/$/"/
17510p
17511b
17512:more2
17513s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17514p
17515g
17516s/.\{148\}//
17517t delim
17518' <conf$$subs.awk | sed '
17519/^[^""]/{
17520 N
17521 s/\n//
17522}
17523' >>$CONFIG_STATUS || ac_write_fail=1
17524rm -f conf$$subs.awk
17525cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17526_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017527cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 for (key in S) S_is_set[key] = 1
17529 FS = ""
17530
17531}
17532{
17533 line = $ 0
17534 nfields = split(line, field, "@")
17535 substed = 0
17536 len = length(field[1])
17537 for (i = 2; i < nfields; i++) {
17538 key = field[i]
17539 keylen = length(key)
17540 if (S_is_set[key]) {
17541 value = S[key]
17542 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17543 len += length(value) + length(field[++i])
17544 substed = 1
17545 } else
17546 len += 1 + keylen
17547 }
17548
17549 print line
17550}
17551
17552_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17555if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17556 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17557else
17558 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017559fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017560 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017561_ACEOF
17562
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017563# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17564# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565# trailing colons and then remove the whole line if VPATH becomes empty
17566# (actually we leave an empty line to preserve line numbers).
17567if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017568 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17569h
17570s///
17571s/^/:/
17572s/[ ]*$/:/
17573s/:\$(srcdir):/:/g
17574s/:\${srcdir}:/:/g
17575s/:@srcdir@:/:/g
17576s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017578x
17579s/\(=[ ]*\).*/\1/
17580G
17581s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582s/^[^=]*=[ ]*$//
17583}'
17584fi
17585
Matthias Kloseb9621712010-04-24 17:59:49 +000017586cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017587fi # test -n "$CONFIG_FILES"
17588
Matthias Kloseb9621712010-04-24 17:59:49 +000017589# Set up the scripts for CONFIG_HEADERS section.
17590# No need to generate them if there are no CONFIG_HEADERS.
17591# This happens for instance with `./config.status Makefile'.
17592if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017593cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017594BEGIN {
17595_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596
Matthias Kloseb9621712010-04-24 17:59:49 +000017597# Transform confdefs.h into an awk script `defines.awk', embedded as
17598# here-document in config.status, that substitutes the proper values into
17599# config.h.in to produce config.h.
17600
17601# Create a delimiter string that does not exist in confdefs.h, to ease
17602# handling of long lines.
17603ac_delim='%!_!# '
17604for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017605 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17606 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 break
17608 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017609 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017610 else
17611 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17612 fi
17613done
17614
17615# For the awk script, D is an array of macro values keyed by name,
17616# likewise P contains macro parameters if any. Preserve backslash
17617# newline sequences.
17618
17619ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17620sed -n '
17621s/.\{148\}/&'"$ac_delim"'/g
17622t rset
17623:rset
17624s/^[ ]*#[ ]*define[ ][ ]*/ /
17625t def
17626d
17627:def
17628s/\\$//
17629t bsnl
17630s/["\\]/\\&/g
17631s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17632D["\1"]=" \3"/p
17633s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17634d
17635:bsnl
17636s/["\\]/\\&/g
17637s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17638D["\1"]=" \3\\\\\\n"\\/p
17639t cont
17640s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17641t cont
17642d
17643:cont
17644n
17645s/.\{148\}/&'"$ac_delim"'/g
17646t clear
17647:clear
17648s/\\$//
17649t bsnlc
17650s/["\\]/\\&/g; s/^/"/; s/$/"/p
17651d
17652:bsnlc
17653s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17654b cont
17655' <confdefs.h | sed '
17656s/'"$ac_delim"'/"\\\
17657"/g' >>$CONFIG_STATUS || ac_write_fail=1
17658
17659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17660 for (key in D) D_is_set[key] = 1
17661 FS = ""
17662}
17663/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17664 line = \$ 0
17665 split(line, arg, " ")
17666 if (arg[1] == "#") {
17667 defundef = arg[2]
17668 mac1 = arg[3]
17669 } else {
17670 defundef = substr(arg[1], 2)
17671 mac1 = arg[2]
17672 }
17673 split(mac1, mac2, "(") #)
17674 macro = mac2[1]
17675 prefix = substr(line, 1, index(line, defundef) - 1)
17676 if (D_is_set[macro]) {
17677 # Preserve the white space surrounding the "#".
17678 print prefix "define", macro P[macro] D[macro]
17679 next
17680 } else {
17681 # Replace #undef with comments. This is necessary, for example,
17682 # in the case of _POSIX_SOURCE, which is predefined and required
17683 # on some systems where configure will not decide to define it.
17684 if (defundef == "undef") {
17685 print "/*", prefix defundef, macro, "*/"
17686 next
17687 }
17688 }
17689}
17690{ print }
17691_ACAWK
17692_ACEOF
17693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017694 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017695fi # test -n "$CONFIG_HEADERS"
17696
17697
17698eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17699shift
17700for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701do
17702 case $ac_tag in
17703 :[FHLC]) ac_mode=$ac_tag; continue;;
17704 esac
17705 case $ac_mode$ac_tag in
17706 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017707 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708 :[FH]-) ac_tag=-:-;;
17709 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17710 esac
17711 ac_save_IFS=$IFS
17712 IFS=:
17713 set x $ac_tag
17714 IFS=$ac_save_IFS
17715 shift
17716 ac_file=$1
17717 shift
17718
17719 case $ac_mode in
17720 :L) ac_source=$1;;
17721 :[FH])
17722 ac_file_inputs=
17723 for ac_f
17724 do
17725 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017726 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 *) # Look for the file first in the build tree, then in the source tree
17728 # (if the path is not absolute). The absolute path cannot be DOS-style,
17729 # because $ac_f cannot contain `:'.
17730 test -f "$ac_f" ||
17731 case $ac_f in
17732 [\\/$]*) false;;
17733 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17734 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017735 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17738 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 done
17740
17741 # Let's still pretend it is `configure' which instantiates (i.e., don't
17742 # use $as_me), people would be surprised to read:
17743 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017744 configure_input='Generated from '`
17745 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17746 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 if test x"$ac_file" != x-; then
17748 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017749 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17750$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017752 # Neutralize special characters interpreted by sed in replacement strings.
17753 case $configure_input in #(
17754 *\&* | *\|* | *\\* )
17755 ac_sed_conf_input=`$as_echo "$configure_input" |
17756 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17757 *) ac_sed_conf_input=$configure_input;;
17758 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759
17760 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017761 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17762 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763 esac
17764 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 esac
17766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017768$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017769 X"$ac_file" : 'X\(//\)[^/]' \| \
17770 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017772$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17774 s//\1/
17775 q
17776 }
17777 /^X\(\/\/\)[^/].*/{
17778 s//\1/
17779 q
17780 }
17781 /^X\(\/\/\)$/{
17782 s//\1/
17783 q
17784 }
17785 /^X\(\/\).*/{
17786 s//\1/
17787 q
17788 }
17789 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017790 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017791 ac_builddir=.
17792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793case "$ac_dir" in
17794.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17795*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017796 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017798 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799 case $ac_top_builddir_sub in
17800 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17801 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17802 esac ;;
17803esac
17804ac_abs_top_builddir=$ac_pwd
17805ac_abs_builddir=$ac_pwd$ac_dir_suffix
17806# for backward compatibility:
17807ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017808
17809case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017811 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812 ac_top_srcdir=$ac_top_builddir_sub
17813 ac_abs_top_srcdir=$ac_pwd ;;
17814 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816 ac_top_srcdir=$srcdir
17817 ac_abs_top_srcdir=$srcdir ;;
17818 *) # Relative name.
17819 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17820 ac_top_srcdir=$ac_top_build_prefix$srcdir
17821 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017822esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017824
Martin v. Löwis11437992002-04-12 09:54:03 +000017825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826 case $ac_mode in
17827 :F)
17828 #
17829 # CONFIG_FILE
17830 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017831
17832 case $INSTALL in
17833 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017836 ac_MKDIR_P=$MKDIR_P
17837 case $MKDIR_P in
17838 [\\/$]* | ?:[\\/]* ) ;;
17839 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17840 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017841_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842
Matthias Kloseb9621712010-04-24 17:59:49 +000017843cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844# If the template does not know about datarootdir, expand it.
17845# FIXME: This hack should be removed a few years after 2.60.
17846ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017847ac_sed_dataroot='
17848/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849 p
17850 q
17851}
17852/@datadir@/p
17853/@docdir@/p
17854/@infodir@/p
17855/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017856/@mandir@/p'
17857case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858*datarootdir*) ac_datarootdir_seen=yes;;
17859*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17861$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017863cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017864 ac_datarootdir_hack='
17865 s&@datadir@&$datadir&g
17866 s&@docdir@&$docdir&g
17867 s&@infodir@&$infodir&g
17868 s&@localedir@&$localedir&g
17869 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017870 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871esac
17872_ACEOF
17873
17874# Neutralize VPATH when `$srcdir' = `.'.
17875# Shell code in configure.ac might set extrasub.
17876# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017877cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17878ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017879$extrasub
17880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017881cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017882:t
17883/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017884s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017886s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887s&@srcdir@&$ac_srcdir&;t t
17888s&@abs_srcdir@&$ac_abs_srcdir&;t t
17889s&@top_srcdir@&$ac_top_srcdir&;t t
17890s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17891s&@builddir@&$ac_builddir&;t t
17892s&@abs_builddir@&$ac_abs_builddir&;t t
17893s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17894s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017895s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017897"
Victor Stinnere0be4232011-10-25 13:06:09 +020017898eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17899 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017901test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017902 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17903 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17904 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017906which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017907$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017908which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017909
Victor Stinnere0be4232011-10-25 13:06:09 +020017910 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017911 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017912 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17913 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017914 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017915 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017916 ;;
17917 :H)
17918 #
17919 # CONFIG_HEADER
17920 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017922 {
17923 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017924 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17925 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017926 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017927 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017928 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17929$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017930 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017931 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017932 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017933 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017934 fi
17935 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017936 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017937 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017938 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017939 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017940 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942
17943 esac
17944
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017945
17946 case $ac_file$ac_mode in
17947 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17948
17949 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017950done # for ac_tag
17951
Guido van Rossum627b2d71993-12-24 10:39:16 +000017952
Matthias Kloseb9621712010-04-24 17:59:49 +000017953as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017954_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017955ac_clean_files=$ac_clean_files_save
17956
Matthias Kloseb9621712010-04-24 17:59:49 +000017957test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017958 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017959
Martin v. Löwis11437992002-04-12 09:54:03 +000017960
17961# configure is writing to config.log, and then calls config.status.
17962# config.status does its own redirection, appending to config.log.
17963# Unfortunately, on DOS this fails, as config.log is still kept open
17964# by configure, so config.status won't be able to write to it; its
17965# output is simply discarded. So we exec the FD to /dev/null,
17966# effectively closing config.log, so it can be properly (re)opened and
17967# appended to by config.status. When coming back to configure, we
17968# need to make the FD available again.
17969if test "$no_create" != yes; then
17970 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017971 ac_config_status_args=
17972 test "$silent" = yes &&
17973 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017975 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017976 exec 5>>config.log
17977 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17978 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017979 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017980fi
17981if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17983$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017984fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017985
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017986
Christian Heimes75ed8902013-11-20 01:11:18 +010017987echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017988if test ! -f Modules/Setup
17989then
17990 cp $srcdir/Modules/Setup.dist Modules/Setup
17991fi
17992
Christian Heimes75ed8902013-11-20 01:11:18 +010017993echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017994if test ! -f Modules/Setup.local
17995then
17996 echo "# Edit this file for local setup changes" >Modules/Setup.local
17997fi
17998
Christian Heimes75ed8902013-11-20 01:11:18 +010017999echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018000$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018001 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018002 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018003mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018004
18005if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18006 echo "" >&6
18007 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018008 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 +000018009 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018010 echo "" >&6
18011 echo "" >&6
18012fi
18013