blob: 9286443124a0017a951de4082b529a6dcb5510b1 [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)
David Carlierb4ebaa72018-01-09 19:38:07 +00009563# FreeBSD and OpenBSD provides support as well
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9565$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9567/* end confdefs.h. */
9568#include <uuid.h>
9569int
9570main ()
9571{
9572
9573#ifndef uuid_create
9574void *x = uuid_create
9575#endif
9576
9577 ;
9578 return 0;
9579}
9580_ACEOF
9581if ac_fn_c_try_compile "$LINENO"; then :
9582
9583$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9584
9585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9586$as_echo "yes" >&6; }
9587else
9588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589$as_echo "no" >&6; }
9590
9591fi
9592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9593
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009594# 'Real Time' functions on Solaris
9595# posix4 on Solaris 2.6
9596# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009598$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009599if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009601else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009602 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606/* Override any GCC internal prototype to avoid an error.
9607 Use char because int might match the return type of a GCC
9608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009609#ifdef __cplusplus
9610extern "C"
9611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009612char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009613int
9614main ()
9615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ;
9618 return 0;
9619}
9620_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621for ac_lib in '' pthread rt posix4; do
9622 if test -z "$ac_lib"; then
9623 ac_res="none required"
9624 else
9625 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009626 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009631rm -f core conftest.err conftest.$ac_objext \
9632 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009633 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636done
Victor Stinnere0be4232011-10-25 13:06:09 +02009637if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639else
9640 ac_cv_search_sem_init=no
9641fi
9642rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009643LIBS=$ac_func_search_save_LIBS
9644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9646$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009650
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009651fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009652
Martin v. Löwis519adae2003-09-20 10:47:47 +00009653
Martin v. Löwis19d17342003-06-14 21:03:05 +00009654# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9656$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009657if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009659else
9660 ac_check_lib_save_LIBS=$LIBS
9661LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665/* Override any GCC internal prototype to avoid an error.
9666 Use char because int might match the return type of a GCC
9667 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009668#ifdef __cplusplus
9669extern "C"
9670#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009671char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672int
9673main ()
9674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009676 ;
9677 return 0;
9678}
9679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009681 ac_cv_lib_intl_textdomain=yes
9682else
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009687LIBS=$ac_check_lib_save_LIBS
9688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9690$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009691if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009692
Matthias Kloseb9621712010-04-24 17:59:49 +00009693$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009694
Brett Cannonc6d936e2009-06-07 20:09:53 +00009695 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009696fi
9697
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009698
9699# checks for system dependent C++ extensions support
9700case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9702$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009705
Georg Brandl59e87bd2011-02-15 19:48:59 +00009706 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009707int
9708main ()
9709{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009710loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 ;
9712 return 0;
9713}
Matthias Kloseb159a552010-04-25 21:00:44 +00009714
Martin v. Löwis11437992002-04-12 09:54:03 +00009715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009716if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009717
Matthias Kloseb159a552010-04-25 21:00:44 +00009718
Matthias Kloseb9621712010-04-24 17:59:49 +00009719$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009720
Matthias Kloseb159a552010-04-25 21:00:44 +00009721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009722$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009723
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009724else
Matthias Kloseb159a552010-04-25 21:00:44 +00009725
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009727$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009728
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730rm -f core conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009732 *) ;;
9733esac
9734
Christian Heimes985ecdc2013-11-20 11:46:18 +01009735# check for systems that require aligned memory access
9736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9737$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009738if ${ac_cv_aligned_required+:} false; then :
9739 $as_echo_n "(cached) " >&6
9740else
9741 if test "$cross_compiling" = yes; then :
9742 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009743else
9744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9745/* end confdefs.h. */
9746
9747int main()
9748{
9749 char s[16];
9750 int i, *p1, *p2;
9751 for (i=0; i < 16; i++)
9752 s[i] = i;
9753 p1 = (int*)(s+1);
9754 p2 = (int*)(s+2);
9755 if (*p1 == *p2)
9756 return 1;
9757 return 0;
9758}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009759_ACEOF
9760if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009761 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009762else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009763 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009764fi
9765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9766 conftest.$ac_objext conftest.beam conftest.$ac_ext
9767fi
9768
9769
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009770fi
9771
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9773$as_echo "$ac_cv_aligned_required" >&6; }
9774if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009775
9776$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9777
9778fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009779
9780# str, bytes and memoryview hash algorithm
9781
9782
9783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9784$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9785
9786# Check whether --with-hash_algorithm was given.
9787if test "${with_hash_algorithm+set}" = set; then :
9788 withval=$with_hash_algorithm;
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9790$as_echo "$withval" >&6; }
9791case "$withval" in
9792 siphash24)
9793 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9794
9795 ;;
9796 fnv)
9797 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9798
9799 ;;
9800 *)
9801 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9802 ;;
9803esac
9804
9805else
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9807$as_echo "default" >&6; }
9808fi
9809
9810
Charles-François Natalid30b0222014-05-08 23:08:51 +01009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9812$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9813
9814# Check whether --with-address_sanitizer was given.
9815if test "${with_address_sanitizer+set}" = set; then :
9816 withval=$with_address_sanitizer;
9817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9818$as_echo "$withval" >&6; }
9819BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9820LDFLAGS="-fsanitize=address $LDFLAGS"
9821
9822else
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9824$as_echo "no" >&6; }
9825fi
9826
9827
Guido van Rossum70c7f481998-03-26 18:44:10 +00009828# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9830$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009831if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009833else
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009835LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839/* Override any GCC internal prototype to avoid an error.
9840 Use char because int might match the return type of a GCC
9841 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009842#ifdef __cplusplus
9843extern "C"
9844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009845char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009846int
9847main ()
9848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ;
9851 return 0;
9852}
9853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009854if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009856else
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859rm -f core conftest.err conftest.$ac_objext \
9860 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009861LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9864$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009865if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009866 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009867fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009868 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9870$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009871if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009873else
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009875LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879/* Override any GCC internal prototype to avoid an error.
9880 Use char because int might match the return type of a GCC
9881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882#ifdef __cplusplus
9883extern "C"
9884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009885char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899rm -f core conftest.err conftest.$ac_objext \
9900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009901LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9904$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009905if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009906 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009907fi
9908 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9911$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009914if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9917$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009918LIBS="$withval $LIBS"
9919
9920else
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923fi
9924
Guido van Rossum7f43da71994-08-01 12:15:30 +00009925
Victor Stinner8291b5e2015-03-20 16:03:14 +01009926
9927
9928
9929
9930
9931
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009932
Victor Stinner8291b5e2015-03-20 16:03:14 +01009933if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9934 if test -n "$ac_tool_prefix"; then
9935 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9936set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9938$as_echo_n "checking for $ac_word... " >&6; }
9939if ${ac_cv_path_PKG_CONFIG+:} false; then :
9940 $as_echo_n "(cached) " >&6
9941else
9942 case $PKG_CONFIG in
9943 [\\/]* | ?:[\\/]*)
9944 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9945 ;;
9946 *)
9947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9948for as_dir in $PATH
9949do
9950 IFS=$as_save_IFS
9951 test -z "$as_dir" && as_dir=.
9952 for ac_exec_ext in '' $ac_executable_extensions; do
9953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9954 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9956 break 2
9957 fi
9958done
9959 done
9960IFS=$as_save_IFS
9961
9962 ;;
9963esac
9964fi
9965PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9966if test -n "$PKG_CONFIG"; then
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9968$as_echo "$PKG_CONFIG" >&6; }
9969else
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971$as_echo "no" >&6; }
9972fi
9973
9974
9975fi
9976if test -z "$ac_cv_path_PKG_CONFIG"; then
9977 ac_pt_PKG_CONFIG=$PKG_CONFIG
9978 # Extract the first word of "pkg-config", so it can be a program name with args.
9979set dummy pkg-config; ac_word=$2
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9981$as_echo_n "checking for $ac_word... " >&6; }
9982if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9983 $as_echo_n "(cached) " >&6
9984else
9985 case $ac_pt_PKG_CONFIG in
9986 [\\/]* | ?:[\\/]*)
9987 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9988 ;;
9989 *)
9990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991for as_dir in $PATH
9992do
9993 IFS=$as_save_IFS
9994 test -z "$as_dir" && as_dir=.
9995 for ac_exec_ext in '' $ac_executable_extensions; do
9996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9997 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9999 break 2
10000 fi
10001done
10002 done
10003IFS=$as_save_IFS
10004
10005 ;;
10006esac
10007fi
10008ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10009if test -n "$ac_pt_PKG_CONFIG"; then
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10011$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10012else
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
10015fi
10016
10017 if test "x$ac_pt_PKG_CONFIG" = x; then
10018 PKG_CONFIG=""
10019 else
10020 case $cross_compiling:$ac_tool_warned in
10021yes:)
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10024ac_tool_warned=yes ;;
10025esac
10026 PKG_CONFIG=$ac_pt_PKG_CONFIG
10027 fi
10028else
10029 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10030fi
10031
10032fi
10033if test -n "$PKG_CONFIG"; then
10034 _pkg_min_version=0.9.0
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10036$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10037 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10039$as_echo "yes" >&6; }
10040 else
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043 PKG_CONFIG=""
10044 fi
10045fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010046
10047# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10049$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010050
10051# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010053 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010054else
10055 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056fi
10057
10058
Matthias Kloseb9621712010-04-24 17:59:49 +000010059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10060$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010061
10062# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10064$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010065
10066# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010068 withval=$with_system_ffi;
10069fi
10070
10071
Zachary Waref40d4dd2016-09-17 01:25:24 -050010072if test "$ac_sys_system" = "Darwin"
10073then
10074 case "$with_system_ffi" in
10075 "")
10076 with_system_ffi="no"
10077 ;;
10078 yes|no)
10079 ;;
10080 *)
10081 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10082 ;;
10083 esac
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10085$as_echo "$with_system_ffi" >&6; }
10086else
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10088$as_echo "yes" >&6; }
10089 if test "$with_system_ffi" != ""
10090 then
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10092$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10093 fi
10094 with_system_ffi="yes"
10095fi
Zachary Ware935043d2016-09-09 17:01:21 -070010096
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010097if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010098 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10099else
10100 LIBFFI_INCLUDEDIR=""
10101fi
10102
10103
Stefan Krah60187b52012-03-23 19:06:27 +010010104# Check for use of the system libmpdec library
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10106$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10107
10108# Check whether --with-system_libmpdec was given.
10109if test "${with_system_libmpdec+set}" = set; then :
10110 withval=$with_system_libmpdec;
10111else
10112 with_system_libmpdec="no"
10113fi
10114
10115
10116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10117$as_echo "$with_system_libmpdec" >&6; }
10118
Benjamin Peterson076ed002010-10-31 17:11:02 +000010119# Check for support for loadable sqlite extensions
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10121$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10122# Check whether --enable-loadable-sqlite-extensions was given.
10123if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10124 enableval=$enable_loadable_sqlite_extensions;
10125else
10126 enable_loadable_sqlite_extensions="no"
10127fi
10128
10129
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10131$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10132
Ned Deilyd819b932013-09-06 01:07:05 -070010133# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10134
10135
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10137$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10138
10139# Check whether --with-tcltk-includes was given.
10140if test "${with_tcltk_includes+set}" = set; then :
10141 withval=$with_tcltk_includes;
10142else
10143 with_tcltk_includes="default"
10144fi
10145
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10147$as_echo "$with_tcltk_includes" >&6; }
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10149$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10150
10151# Check whether --with-tcltk-libs was given.
10152if test "${with_tcltk_libs+set}" = set; then :
10153 withval=$with_tcltk_libs;
10154else
10155 with_tcltk_libs="default"
10156fi
10157
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10159$as_echo "$with_tcltk_libs" >&6; }
10160if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10161then
10162 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10163 then
10164 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10165 fi
10166 TCLTK_INCLUDES=""
10167 TCLTK_LIBS=""
10168else
10169 TCLTK_INCLUDES="$with_tcltk_includes"
10170 TCLTK_LIBS="$with_tcltk_libs"
10171fi
10172
Matthias Klose55708cc2009-04-30 08:06:49 +000010173# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10175$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010176
10177# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010178if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010179 withval=$with_dbmliborder;
10180if test x$with_dbmliborder = xyes
10181then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010182as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010183else
10184 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10185 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10186 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010187 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010188 fi
10189 done
10190fi
10191fi
10192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10194$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196
Martin v. Löwis11437992002-04-12 09:54:03 +000010197
10198# Templates for things AC_DEFINEd more than once.
10199# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010200
10201
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010202if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010203then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010204 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010206
10207 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010208elif test "$ac_cv_kpthread" = "yes"
10209then
10210 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010211 if test "$ac_cv_cxx_thread" = "yes"; then
10212 CXX="$CXX -Kpthread"
10213 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010214 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010215elif test "$ac_cv_kthread" = "yes"
10216then
10217 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010218 if test "$ac_cv_cxx_thread" = "yes"; then
10219 CXX="$CXX -Kthread"
10220 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010221 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010222elif test "$ac_cv_pthread" = "yes"
10223then
10224 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010225 if test "$ac_cv_cxx_thread" = "yes"; then
10226 CXX="$CXX -pthread"
10227 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010228 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010229else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010230 if test ! -z "$withval" -a -d "$withval"
10231 then LDFLAGS="$LDFLAGS -L$withval"
10232 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010233
10234 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010235 # define _POSIX_THREADS in unistd.h. Some apparently don't
10236 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10238$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010240/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010241
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010242#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010243#ifdef _POSIX_THREADS
10244yes
10245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010246
10247_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010250 unistd_defines_pthreads=yes
10251else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010252 unistd_defines_pthreads=no
10253fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010254rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010255
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10257$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010258
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010260
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010261 # Just looking for pthread_create in libpthread is not enough:
10262 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10263 # So we really have to include pthread.h, and then link.
10264 _libs=$LIBS
10265 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10267$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010269/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010270
10271#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010272#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010273
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010274void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010275int
10276main ()
10277{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010278
10279pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 ;
10281 return 0;
10282}
10283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10287$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010288 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010289
Guido van Rossum02a1c402000-02-25 19:26:31 +000010290else
Martin v. Löwis11437992002-04-12 09:54:03 +000010291
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010292 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010294if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010295
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010296 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010297
Guido van Rossumad678af1998-10-02 14:42:15 +000010298else
Guido van Rossumad678af1998-10-02 14:42:15 +000010299
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10301$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010302if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010304else
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010306LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010310/* Override any GCC internal prototype to avoid an error.
10311 Use char because int might match the return type of a GCC
10312 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010313#ifdef __cplusplus
10314extern "C"
10315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010316char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010317int
10318main ()
10319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ;
10322 return 0;
10323}
10324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010325if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010330rm -f core conftest.err conftest.$ac_objext \
10331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010332LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10335$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010336if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010337
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010338 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010339 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010340
Greg Steinadf63d62000-07-05 10:38:09 +000010341else
Greg Steinadf63d62000-07-05 10:38:09 +000010342
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10344$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010345if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010347else
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010349LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353/* Override any GCC internal prototype to avoid an error.
10354 Use char because int might match the return type of a GCC
10355 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010356#ifdef __cplusplus
10357extern "C"
10358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010359char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010360int
10361main ()
10362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010364 ;
10365 return 0;
10366}
10367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010368if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010370else
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010373rm -f core conftest.err conftest.$ac_objext \
10374 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010375LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10378$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010379if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010380
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010381 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010382 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010383
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010384else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10387$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010388if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010390else
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010392LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396/* Override any GCC internal prototype to avoid an error.
10397 Use char because int might match the return type of a GCC
10398 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010399#ifdef __cplusplus
10400extern "C"
10401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010402char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010403int
10404main ()
10405{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010406return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ;
10408 return 0;
10409}
10410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010413else
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010416rm -f core conftest.err conftest.$ac_objext \
10417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010418LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10421$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010422if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010423
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010424 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010425 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010426
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010427else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010428
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10430$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010431if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010433else
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010435LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439/* Override any GCC internal prototype to avoid an error.
10440 Use char because int might match the return type of a GCC
10441 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010442#ifdef __cplusplus
10443extern "C"
10444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010445char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010446int
10447main ()
10448{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 ;
10451 return 0;
10452}
10453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010454if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010455 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010456else
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010459rm -f core conftest.err conftest.$ac_objext \
10460 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010461LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10464$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010465if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010466
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010467 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010468 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010469
Guido van Rossumb93a8621998-05-07 13:27:32 +000010470else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010471
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010472 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10473
Guido van Rossum2d38f911996-06-26 19:47:01 +000010474fi
10475
Guido van Rossum627b2d71993-12-24 10:39:16 +000010476
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010477fi
10478
Guido van Rossum0be3e491997-05-22 20:33:33 +000010479fi
10480
Guido van Rossum49545951997-12-02 19:28:29 +000010481fi
10482
Guido van Rossumb93a8621998-05-07 13:27:32 +000010483fi
10484
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010486rm -f core conftest.err conftest.$ac_objext \
10487 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010488
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10490$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010491if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010493else
Martin v. Löwis11437992002-04-12 09:54:03 +000010494 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010495LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499/* Override any GCC internal prototype to avoid an error.
10500 Use char because int might match the return type of a GCC
10501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010502#ifdef __cplusplus
10503extern "C"
10504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010505char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010506int
10507main ()
10508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010509return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 ;
10511 return 0;
10512}
10513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010516else
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010519rm -f core conftest.err conftest.$ac_objext \
10520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010521LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10524$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010525if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010526
Martin v. Löwis130fb172001-07-19 11:00:41 +000010527 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010528
Guido van Rossum627b2d71993-12-24 10:39:16 +000010529fi
10530
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010531
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010532fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010533
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010534if test "$posix_threads" = "yes"; then
10535 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010536
Matthias Kloseb9621712010-04-24 17:59:49 +000010537$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010538
10539 fi
10540
10541 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10542 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010543 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010544$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010545
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546 ;;
10547 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010548$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010549
10550 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010551 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010552$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010553
10554 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010555 esac
10556
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10558$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010559 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561else
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010563 ac_cv_pthread_system_supported=no
10564else
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010566/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010567
10568 #include <stdio.h>
10569 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010570 void *foo(void *parm) {
10571 return NULL;
10572 }
10573 main() {
10574 pthread_attr_t attr;
10575 pthread_t id;
10576 if (pthread_attr_init(&attr)) exit(-1);
10577 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10578 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10579 exit(0);
10580 }
10581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010582if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010583 ac_cv_pthread_system_supported=yes
10584else
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010589fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010591
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
10593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10595$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596 if test "$ac_cv_pthread_system_supported" = "yes"; then
10597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010599
10600 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 for ac_func in pthread_sigmask
10602do :
10603 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010604if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010605 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010606#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010608 case $ac_sys_system in
10609 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010612
10613 ;;
10614 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615fi
10616done
10617
pdoxe14679c2017-10-05 00:01:56 -070010618 for ac_func in pthread_getcpuclockid
10619do :
10620 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10621if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10622 cat >>confdefs.h <<_ACEOF
10623#define HAVE_PTHREAD_GETCPUCLOCKID 1
10624_ACEOF
10625
10626fi
10627done
10628
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010629fi
10630
10631
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10635$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010637if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010639 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010642 ipv6=no
10643 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10645$as_echo "yes" >&6; }
10646 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010647
10648 ipv6=yes
10649 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010651else
Martin v. Löwis11437992002-04-12 09:54:03 +000010652
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010654/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655 /* AF_INET6 available check */
10656#include <sys/types.h>
10657#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010658int
10659main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010660{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010661int domain = AF_INET6;
10662 ;
10663 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010664}
Martin v. Löwis11437992002-04-12 09:54:03 +000010665_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010666if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010667
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10669$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010670 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010671
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010672else
Matthias Kloseb159a552010-04-25 21:00:44 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10675$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010677
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010681if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10683$as_echo_n "checking if RFC2553 API is available... " >&6; }
10684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010686
10687 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010688#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010689int
10690main ()
10691{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010692struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010693 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 ;
10695 return 0;
10696}
Matthias Kloseb159a552010-04-25 21:00:44 +000010697
Martin v. Löwis11437992002-04-12 09:54:03 +000010698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010699if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010700
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010702$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010703 ipv6=yes
10704
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010705else
Matthias Kloseb159a552010-04-25 21:00:44 +000010706
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010709 ipv6=no
10710
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010713fi
10714
10715if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010717
10718fi
10719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720fi
10721
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722
10723ipv6type=unknown
10724ipv6lib=none
10725ipv6trylibc=no
10726
10727if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10729$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010730 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10731 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732 case $i in
10733 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010735/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737#include <netinet/in.h>
10738#ifdef IPV6_INRIA_VERSION
10739yes
10740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010741_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010744 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010746rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747
10748 ;;
10749 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010751/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010752
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753#include <netinet/in.h>
10754#ifdef __KAME__
10755yes
10756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010757_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760 ipv6type=$i;
10761 ipv6lib=inet6
10762 ipv6libdir=/usr/local/v6/lib
10763 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010765rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766
10767 ;;
10768 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010770/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010771
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772#include <features.h>
10773#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10774yes
10775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010776_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779 ipv6type=$i;
10780 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010782rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783
10784 ;;
10785 linux-inet6)
10786 if test -d /usr/inet6; then
10787 ipv6type=$i
10788 ipv6lib=inet6
10789 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010790 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791 fi
10792 ;;
10793 solaris)
10794 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010795 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796 ipv6type=$i
10797 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798 fi
10799 fi
10800 ;;
10801 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010803/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010804
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805#include <sys/param.h>
10806#ifdef _TOSHIBA_INET6
10807yes
10808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010809_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812 ipv6type=$i;
10813 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010814 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010816rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817
10818 ;;
10819 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823#include </usr/local/v6/include/sys/v6config.h>
10824#ifdef __V6D__
10825yes
10826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010827_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010830 ipv6type=$i;
10831 ipv6lib=v6;
10832 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010833 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010835rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836
10837 ;;
10838 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010840/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842#include <sys/param.h>
10843#ifdef _ZETA_MINAMI_INET6
10844yes
10845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010846_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849 ipv6type=$i;
10850 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010851 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010853rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854
10855 ;;
10856 esac
10857 if test "$ipv6type" != "unknown"; then
10858 break
10859 fi
10860 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10862$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863fi
10864
10865if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10866 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10867 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10868 echo "using lib$ipv6lib"
10869 else
10870 if test $ipv6trylibc = "yes"; then
10871 echo "using libc"
10872 else
10873 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10874 echo "You need to fetch lib$ipv6lib.a from appropriate"
10875 echo 'ipv6 kit and compile beforehand.'
10876 exit 1
10877 fi
10878 fi
10879fi
10880
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10882$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10884/* end confdefs.h. */
10885 /* CAN_RAW_FD_FRAMES available check */
10886#include <linux/can/raw.h>
10887int
10888main ()
10889{
10890int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10891 ;
10892 return 0;
10893}
10894_ACEOF
10895if ac_fn_c_try_compile "$LINENO"; then :
10896
10897
10898$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10899
10900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10901$as_echo "yes" >&6; }
10902
10903else
10904
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10906$as_echo "no" >&6; }
10907
10908fi
10909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10910
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010911# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10913$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010916if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010917 withval=$with_doc_strings;
10918fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010919
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010920
10921if test -z "$with_doc_strings"
10922then with_doc_strings="yes"
10923fi
10924if test "$with_doc_strings" != "no"
10925then
10926
Matthias Kloseb9621712010-04-24 17:59:49 +000010927$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010928
10929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10931$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010932
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010933# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10935$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010938if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939 withval=$with_pymalloc;
10940fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010941
Neil Schemenauera35c6882001-02-27 04:45:05 +000010942
Neil Schemenauer16c22972002-03-22 15:34:49 +000010943if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010944then
10945 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010946fi
10947if test "$with_pymalloc" != "no"
10948then
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010951
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010952 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10955$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010956
Nick Coghlan6ea41862017-06-11 13:16:15 +100010957# Check for --with-c-locale-coercion
10958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10959$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10960
10961# Check whether --with-c-locale-coercion was given.
10962if test "${with_c_locale_coercion+set}" = set; then :
10963 withval=$with_c_locale_coercion;
10964fi
10965
10966
10967if test -z "$with_c_locale_coercion"
10968then
10969 with_c_locale_coercion="yes"
10970fi
10971if test "$with_c_locale_coercion" != "no"
10972then
10973
10974$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10975
10976fi
10977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10978$as_echo "$with_c_locale_coercion" >&6; }
10979
10980# Check for --with-c-locale-warning
10981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10982$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10983
10984# Check whether --with-c-locale-warning was given.
10985if test "${with_c_locale_warning+set}" = set; then :
10986 withval=$with_c_locale_warning;
10987fi
10988
10989
10990if test -z "$with_c_locale_warning"
10991then
10992 with_c_locale_warning="yes"
10993fi
10994if test "$with_c_locale_warning" != "no"
10995then
10996
10997$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10998
10999fi
11000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11001$as_echo "$with_c_locale_warning" >&6; }
11002
Benjamin Peterson05159c42009-12-03 03:01:27 +000011003# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11005$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011006
11007# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011008if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011009 withval=$with_valgrind;
11010else
11011 with_valgrind=no
11012fi
11013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11015$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011016if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 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 +020011018if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011021
11022else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011023 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011024
11025fi
11026
11027
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011028 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011029fi
11030
Łukasz Langaa785c872016-09-09 17:37:37 -070011031# Check for DTrace support
11032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11033$as_echo_n "checking for --with-dtrace... " >&6; }
11034
11035# Check whether --with-dtrace was given.
11036if test "${with_dtrace+set}" = set; then :
11037 withval=$with_dtrace;
11038else
11039 with_dtrace=no
11040fi
11041
11042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11043$as_echo "$with_dtrace" >&6; }
11044
11045
11046
11047
11048
11049DTRACE=
11050DFLAGS=
11051DTRACE_HEADERS=
11052DTRACE_OBJS=
11053
11054if test "$with_dtrace" = "yes"
11055then
11056 # Extract the first word of "dtrace", so it can be a program name with args.
11057set dummy dtrace; ac_word=$2
11058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11059$as_echo_n "checking for $ac_word... " >&6; }
11060if ${ac_cv_path_DTRACE+:} false; then :
11061 $as_echo_n "(cached) " >&6
11062else
11063 case $DTRACE in
11064 [\\/]* | ?:[\\/]*)
11065 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11066 ;;
11067 *)
11068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11069for as_dir in $PATH
11070do
11071 IFS=$as_save_IFS
11072 test -z "$as_dir" && as_dir=.
11073 for ac_exec_ext in '' $ac_executable_extensions; do
11074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11075 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11077 break 2
11078 fi
11079done
11080 done
11081IFS=$as_save_IFS
11082
11083 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11084 ;;
11085esac
11086fi
11087DTRACE=$ac_cv_path_DTRACE
11088if test -n "$DTRACE"; then
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11090$as_echo "$DTRACE" >&6; }
11091else
11092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11093$as_echo "no" >&6; }
11094fi
11095
11096
11097 if test "$DTRACE" = "not found"; then
11098 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11099 fi
11100
11101$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11102
11103 DTRACE_HEADERS="Include/pydtrace_probes.h"
11104
11105 # On OS X, DTrace providers do not need to be explicitly compiled and
11106 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11107 # generation flag '-G'. We check for presence of this flag, rather than
11108 # hardcoding support by OS, in the interest of robustness.
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11110$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11111if ${ac_cv_dtrace_link+:} false; then :
11112 $as_echo_n "(cached) " >&6
11113else
11114 ac_cv_dtrace_link=no
11115 echo 'BEGIN' > conftest.d
11116 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11117 ac_cv_dtrace_link=yes
11118
11119fi
11120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11121$as_echo "$ac_cv_dtrace_link" >&6; }
11122 if test "$ac_cv_dtrace_link" = "yes"; then
11123 DTRACE_OBJS="Python/pydtrace.o"
11124 fi
11125fi
11126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011127# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011128
Guido van Rossum98935bf2001-09-05 19:13:16 +000011129DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011130
Guido van Rossume97ee181999-12-20 21:27:22 +000011131# the dlopen() function means we might want to use dynload_shlib.o. some
11132# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011133for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011134do :
11135 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011136if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011138#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011139_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011140
Guido van Rossume97ee181999-12-20 21:27:22 +000011141fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011142done
Guido van Rossume97ee181999-12-20 21:27:22 +000011143
Michael W. Hudson54241132001-12-07 15:38:26 +000011144
Guido van Rossume97ee181999-12-20 21:27:22 +000011145# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11146# loading of modules.
11147
Matthias Kloseb9621712010-04-24 17:59:49 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11149$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011150if test -z "$DYNLOADFILE"
11151then
11152 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011153 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11154 if test "$ac_cv_func_dlopen" = yes
11155 then DYNLOADFILE="dynload_shlib.o"
11156 else DYNLOADFILE="dynload_aix.o"
11157 fi
11158 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011159 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011160 *)
11161 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11162 # out any dynamic loading
11163 if test "$ac_cv_func_dlopen" = yes
11164 then DYNLOADFILE="dynload_shlib.o"
11165 else DYNLOADFILE="dynload_stub.o"
11166 fi
11167 ;;
11168 esac
11169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11171$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011172if test "$DYNLOADFILE" != "dynload_stub.o"
11173then
Martin v. Löwis11437992002-04-12 09:54:03 +000011174
Matthias Kloseb9621712010-04-24 17:59:49 +000011175$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011176
11177fi
11178
Neil Schemenauer4e425612001-06-19 15:44:15 +000011179# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11180
Michael W. Hudson54241132001-12-07 15:38:26 +000011181
Matthias Kloseb9621712010-04-24 17:59:49 +000011182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11183$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011184if test -z "$MACHDEP_OBJS"
11185then
Jack Jansene578a632001-08-15 01:27:14 +000011186 MACHDEP_OBJS=$extra_machdep_objs
11187else
11188 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011189fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011190if test -z "$MACHDEP_OBJS"; then
11191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11192$as_echo "none" >&6; }
11193else
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11195$as_echo "$MACHDEP_OBJS" >&6; }
11196fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011197
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011199for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011200 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011201 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011202 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011203 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011204 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011205 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011206 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011207 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011208 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011209 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011210 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011211 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011212 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011213 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011214 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11215 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011216 sigaction sigaltstack siginterrupt sigpending sigrelse \
11217 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011218 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011219 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011220 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011221do :
11222 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11223ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011224if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011226#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011227_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011228
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011229fi
11230done
11231
Michael W. Hudson54241132001-12-07 15:38:26 +000011232
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011233ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11234 #include <dirent.h>
11235"
11236if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11237
11238$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11239
11240fi
11241
11242
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011243# For some functions, having a definition is not sufficient, since
11244# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11246$as_echo_n "checking for chroot... " >&6; }
11247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011248/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011249#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011250int
11251main ()
11252{
11253void *x=chroot
11254 ;
11255 return 0;
11256}
11257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011258if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011261
Matthias Kloseb159a552010-04-25 21:00:44 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011264else
Matthias Kloseb9621712010-04-24 17:59:49 +000011265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011267
11268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11271$as_echo_n "checking for link... " >&6; }
11272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011274#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011275int
11276main ()
11277{
11278void *x=link
11279 ;
11280 return 0;
11281}
11282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011286
Matthias Kloseb159a552010-04-25 21:00:44 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011288$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011289else
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11291$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011292
11293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11296$as_echo_n "checking for symlink... " >&6; }
11297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011298/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011299#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011300int
11301main ()
11302{
11303void *x=symlink
11304 ;
11305 return 0;
11306}
11307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011311
Matthias Kloseb159a552010-04-25 21:00:44 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314else
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011317
11318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11321$as_echo_n "checking for fchdir... " >&6; }
11322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011323/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011324#include <unistd.h>
11325int
11326main ()
11327{
11328void *x=fchdir
11329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011336
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011339else
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011342
11343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11346$as_echo_n "checking for fsync... " >&6; }
11347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011348/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011349#include <unistd.h>
11350int
11351main ()
11352{
11353void *x=fsync
11354 ;
11355 return 0;
11356}
11357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011359
Matthias Kloseb9621712010-04-24 17:59:49 +000011360$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011361
Matthias Kloseb159a552010-04-25 21:00:44 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011363$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011364else
Matthias Kloseb9621712010-04-24 17:59:49 +000011365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11366$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011367
11368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11371$as_echo_n "checking for fdatasync... " >&6; }
11372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011373/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011374#include <unistd.h>
11375int
11376main ()
11377{
11378void *x=fdatasync
11379 ;
11380 return 0;
11381}
11382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384
Matthias Kloseb9621712010-04-24 17:59:49 +000011385$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011386
Matthias Kloseb159a552010-04-25 21:00:44 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011388$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011389else
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011392
11393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11396$as_echo_n "checking for epoll... " >&6; }
11397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011398/* end confdefs.h. */
11399#include <sys/epoll.h>
11400int
11401main ()
11402{
11403void *x=epoll_create
11404 ;
11405 return 0;
11406}
11407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011411
Matthias Kloseb159a552010-04-25 21:00:44 +000011412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011413$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011414else
Matthias Kloseb9621712010-04-24 17:59:49 +000011415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11416$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011417
11418fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11421$as_echo_n "checking for epoll_create1... " >&6; }
11422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11423/* end confdefs.h. */
11424#include <sys/epoll.h>
11425int
11426main ()
11427{
11428void *x=epoll_create1
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433if ac_fn_c_try_compile "$LINENO"; then :
11434
11435$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11436
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11438$as_echo "yes" >&6; }
11439else
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11441$as_echo "no" >&6; }
11442
11443fi
11444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11446$as_echo_n "checking for kqueue... " >&6; }
11447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011448/* end confdefs.h. */
11449
11450#include <sys/types.h>
11451#include <sys/event.h>
11452
11453int
11454main ()
11455{
11456int x=kqueue()
11457 ;
11458 return 0;
11459}
11460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011461if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011462
Matthias Kloseb9621712010-04-24 17:59:49 +000011463$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011464
Matthias Kloseb159a552010-04-25 21:00:44 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011466$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011467else
Matthias Kloseb9621712010-04-24 17:59:49 +000011468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011470
11471fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11474$as_echo_n "checking for prlimit... " >&6; }
11475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11476/* end confdefs.h. */
11477
11478#include <sys/time.h>
11479#include <sys/resource.h>
11480
11481int
11482main ()
11483{
11484void *x=prlimit
11485 ;
11486 return 0;
11487}
11488_ACEOF
11489if ac_fn_c_try_compile "$LINENO"; then :
11490
11491$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11492
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11494$as_echo "yes" >&6; }
11495else
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
11498
11499fi
11500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11501
Martin v. Löwisd5843682002-11-21 20:41:28 +000011502# On some systems (eg. FreeBSD 5), we would find a definition of the
11503# functions ctermid_r, setgroups in the library, but no prototype
11504# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11505# address to avoid compiler warnings and potential miscompilations
11506# because of the missing prototypes.
11507
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11509$as_echo_n "checking for ctermid_r... " >&6; }
11510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011512
Martin v. Löwisd5843682002-11-21 20:41:28 +000011513#include <stdio.h>
11514
Martin v. Löwisd5843682002-11-21 20:41:28 +000011515int
11516main ()
11517{
11518void* p = ctermid_r
11519 ;
11520 return 0;
11521}
11522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011524
Matthias Kloseb9621712010-04-24 17:59:49 +000011525$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011526
Matthias Kloseb159a552010-04-25 21:00:44 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011528$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011529else
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11531$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011532
11533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11535
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11537$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011538if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011539 $as_echo_n "(cached) " >&6
11540else
11541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011543#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011544int
11545main ()
11546{
11547void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011548
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011549 ;
11550 return 0;
11551}
11552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011553if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011554 ac_cv_flock_decl=yes
11555else
11556 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011557
11558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011560
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011561fi
11562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11563$as_echo "$ac_cv_flock_decl" >&6; }
11564if test "x${ac_cv_flock_decl}" = xyes; then
11565 for ac_func in flock
11566do :
11567 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011568if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011569 cat >>confdefs.h <<_ACEOF
11570#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011571_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011572
Antoine Pitroua3000072010-09-07 14:52:42 +000011573else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011575$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011576if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011577 $as_echo_n "(cached) " >&6
11578else
11579 ac_check_lib_save_LIBS=$LIBS
11580LIBS="-lbsd $LIBS"
11581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11582/* end confdefs.h. */
11583
11584/* Override any GCC internal prototype to avoid an error.
11585 Use char because int might match the return type of a GCC
11586 builtin and then its argument prototype would still apply. */
11587#ifdef __cplusplus
11588extern "C"
11589#endif
11590char flock ();
11591int
11592main ()
11593{
11594return flock ();
11595 ;
11596 return 0;
11597}
11598_ACEOF
11599if ac_fn_c_try_link "$LINENO"; then :
11600 ac_cv_lib_bsd_flock=yes
11601else
11602 ac_cv_lib_bsd_flock=no
11603fi
11604rm -f core conftest.err conftest.$ac_objext \
11605 conftest$ac_exeext conftest.$ac_ext
11606LIBS=$ac_check_lib_save_LIBS
11607fi
11608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11609$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011610if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011611 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011612
11613
11614$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11615
11616
11617fi
11618
11619
11620fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011621done
11622
Antoine Pitroua3000072010-09-07 14:52:42 +000011623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624
Matthias Kloseb9621712010-04-24 17:59:49 +000011625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11626$as_echo_n "checking for getpagesize... " >&6; }
11627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011628/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011629
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011630#include <unistd.h>
11631
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011632int
11633main ()
11634{
11635void* p = getpagesize
11636 ;
11637 return 0;
11638}
11639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011640if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011643
Matthias Kloseb159a552010-04-25 21:00:44 +000011644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011646else
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011649
11650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011652
Victor Stinner984890f2011-11-24 13:53:38 +010011653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11654$as_echo_n "checking for broken unsetenv... " >&6; }
11655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11656/* end confdefs.h. */
11657
11658#include <stdlib.h>
11659
11660int
11661main ()
11662{
11663int res = unsetenv("DUMMY")
11664 ;
11665 return 0;
11666}
11667_ACEOF
11668if ac_fn_c_try_compile "$LINENO"; then :
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11670$as_echo "no" >&6; }
11671else
11672
11673$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11674
11675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11676$as_echo "yes" >&6; }
11677
11678fi
11679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11680
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011681for ac_prog in true
11682do
11683 # Extract the first word of "$ac_prog", so it can be a program name with args.
11684set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011687if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011689else
11690 if test -n "$TRUE"; then
11691 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11692else
11693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11694for as_dir in $PATH
11695do
11696 IFS=$as_save_IFS
11697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011700 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 $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 +000011702 break 2
11703 fi
11704done
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011706IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011707
11708fi
11709fi
11710TRUE=$ac_cv_prog_TRUE
11711if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11713$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011714else
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11716$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011717fi
11718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011719
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011720 test -n "$TRUE" && break
11721done
11722test -n "$TRUE" || TRUE="/bin/true"
11723
11724
Matthias Kloseb9621712010-04-24 17:59:49 +000011725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11726$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011727if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011729else
11730 ac_check_lib_save_LIBS=$LIBS
11731LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011733/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011735/* Override any GCC internal prototype to avoid an error.
11736 Use char because int might match the return type of a GCC
11737 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011738#ifdef __cplusplus
11739extern "C"
11740#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011741char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011742int
11743main ()
11744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011746 ;
11747 return 0;
11748}
11749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011751 ac_cv_lib_c_inet_aton=yes
11752else
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011755rm -f core conftest.err conftest.$ac_objext \
11756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011757LIBS=$ac_check_lib_save_LIBS
11758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11760$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011762 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11765$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011766if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011768else
11769 ac_check_lib_save_LIBS=$LIBS
11770LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011772/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774/* Override any GCC internal prototype to avoid an error.
11775 Use char because int might match the return type of a GCC
11776 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011777#ifdef __cplusplus
11778extern "C"
11779#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011781int
11782main ()
11783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011784return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011785 ;
11786 return 0;
11787}
11788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011790 ac_cv_lib_resolv_inet_aton=yes
11791else
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011794rm -f core conftest.err conftest.$ac_objext \
11795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796LIBS=$ac_check_lib_save_LIBS
11797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11799$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011800if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801 cat >>confdefs.h <<_ACEOF
11802#define HAVE_LIBRESOLV 1
11803_ACEOF
11804
11805 LIBS="-lresolv $LIBS"
11806
11807fi
11808
11809
11810fi
11811
11812
Christian Heimesd0764e22007-12-04 15:00:33 +000011813# On Tru64, chflags seems to be present, but calling it will
11814# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11816$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011821 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011824/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011825
Christian Heimesd0764e22007-12-04 15:00:33 +000011826#include <sys/stat.h>
11827#include <unistd.h>
11828int main(int argc, char*argv[])
11829{
11830 if(chflags(argv[0], 0) != 0)
11831 return 1;
11832 return 0;
11833}
Ned Deily3eb67d52011-06-28 00:00:28 -070011834
Christian Heimesd0764e22007-12-04 15:00:33 +000011835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011837 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011843fi
11844
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11848$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011849if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011852 ac_cv_have_chflags="yes"
11853else
11854 ac_cv_have_chflags="no"
11855fi
11856
11857fi
11858if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011861
11862fi
11863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11865$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011866if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011868else
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011870 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011873/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011874
Christian Heimesd0764e22007-12-04 15:00:33 +000011875#include <sys/stat.h>
11876#include <unistd.h>
11877int main(int argc, char*argv[])
11878{
11879 if(lchflags(argv[0], 0) != 0)
11880 return 1;
11881 return 0;
11882}
Ned Deily3eb67d52011-06-28 00:00:28 -070011883
Christian Heimesd0764e22007-12-04 15:00:33 +000011884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011885if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011886 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011887else
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011892fi
11893
11894
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11897$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011898if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011900if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011901 ac_cv_have_lchflags="yes"
11902else
11903 ac_cv_have_lchflags="no"
11904fi
11905
11906fi
11907if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011910
11911fi
11912
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011913case $ac_sys_system/$ac_sys_release in
11914Darwin/*)
11915 _CUR_CFLAGS="${CFLAGS}"
11916 _CUR_LDFLAGS="${LDFLAGS}"
11917 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11918 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11919 ;;
11920esac
11921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11923$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011924if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011926else
11927 ac_check_lib_save_LIBS=$LIBS
11928LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011930/* end confdefs.h. */
11931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011932/* Override any GCC internal prototype to avoid an error.
11933 Use char because int might match the return type of a GCC
11934 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011935#ifdef __cplusplus
11936extern "C"
11937#endif
11938char inflateCopy ();
11939int
11940main ()
11941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011942return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011943 ;
11944 return 0;
11945}
11946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011947if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011948 ac_cv_lib_z_inflateCopy=yes
11949else
Matthias Kloseb9621712010-04-24 17:59:49 +000011950 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011952rm -f core conftest.err conftest.$ac_objext \
11953 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011954LIBS=$ac_check_lib_save_LIBS
11955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11957$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011958if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011961
11962fi
11963
11964
11965case $ac_sys_system/$ac_sys_release in
11966Darwin/*)
11967 CFLAGS="${_CUR_CFLAGS}"
11968 LDFLAGS="${_CUR_LDFLAGS}"
11969 ;;
11970esac
11971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11973$as_echo_n "checking for hstrerror... " >&6; }
11974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011975/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011976
Martin v. Löwise9416172003-05-03 10:12:45 +000011977#include <netdb.h>
11978
Martin v. Löwise9416172003-05-03 10:12:45 +000011979int
11980main ()
11981{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011982void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011983 ;
11984 return 0;
11985}
11986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011987if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011988
Matthias Kloseb9621712010-04-24 17:59:49 +000011989$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011990
Matthias Kloseb159a552010-04-25 21:00:44 +000011991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011992$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11995$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011996
11997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998rm -f core conftest.err conftest.$ac_objext \
11999 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12002$as_echo_n "checking for inet_aton... " >&6; }
12003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012004/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012005
Martin v. Löwis86d66262006-02-17 08:40:11 +000012006#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012007#include <sys/socket.h>
12008#include <netinet/in.h>
12009#include <arpa/inet.h>
12010
Martin v. Löwise9416172003-05-03 10:12:45 +000012011int
12012main ()
12013{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012014void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012015 ;
12016 return 0;
12017}
12018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012019if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012020
Matthias Kloseb9621712010-04-24 17:59:49 +000012021$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012022
Matthias Kloseb159a552010-04-25 21:00:44 +000012023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012024$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012025else
Matthias Kloseb9621712010-04-24 17:59:49 +000012026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12027$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012028
12029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012030rm -f core conftest.err conftest.$ac_objext \
12031 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12034$as_echo_n "checking for inet_pton... " >&6; }
12035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012036/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012037
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012038#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012039#include <sys/socket.h>
12040#include <netinet/in.h>
12041#include <arpa/inet.h>
12042
Martin v. Löwise9416172003-05-03 10:12:45 +000012043int
12044main ()
12045{
12046void* p = inet_pton
12047 ;
12048 return 0;
12049}
12050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012054
Matthias Kloseb159a552010-04-25 21:00:44 +000012055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012056$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012057else
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012060
12061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012063
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012064# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12066$as_echo_n "checking for setgroups... " >&6; }
12067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012068/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012069
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012070#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012071#ifdef HAVE_GRP_H
12072#include <grp.h>
12073#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012074
Martin v. Löwisd5843682002-11-21 20:41:28 +000012075int
12076main ()
12077{
12078void* p = setgroups
12079 ;
12080 return 0;
12081}
12082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012084
Matthias Kloseb9621712010-04-24 17:59:49 +000012085$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012086
Matthias Kloseb159a552010-04-25 21:00:44 +000012087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12091$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012092
12093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012095
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012096# check for openpty and forkpty
12097
12098for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012099do :
12100 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012101if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012103#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012104_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012105
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12108$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012109if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012111else
Martin v. Löwis11437992002-04-12 09:54:03 +000012112 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117/* Override any GCC internal prototype to avoid an error.
12118 Use char because int might match the return type of a GCC
12119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012120#ifdef __cplusplus
12121extern "C"
12122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012123char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012124int
12125main ()
12126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ;
12129 return 0;
12130}
12131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012132if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012134else
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012137rm -f core conftest.err conftest.$ac_objext \
12138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012139LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12142$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012143if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012145 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12148$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012149if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012151else
12152 ac_check_lib_save_LIBS=$LIBS
12153LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012155/* end confdefs.h. */
12156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012157/* Override any GCC internal prototype to avoid an error.
12158 Use char because int might match the return type of a GCC
12159 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012160#ifdef __cplusplus
12161extern "C"
12162#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012163char openpty ();
12164int
12165main ()
12166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012167return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012168 ;
12169 return 0;
12170}
12171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012172if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012173 ac_cv_lib_bsd_openpty=yes
12174else
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012177rm -f core conftest.err conftest.$ac_objext \
12178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012179LIBS=$ac_check_lib_save_LIBS
12180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12182$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012183if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012185 LIBS="$LIBS -lbsd"
12186fi
12187
12188
12189fi
12190
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191
12192fi
12193done
12194
12195for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012196do :
12197 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012200#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012201_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012202
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203else
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12205$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012206if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012208else
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012210LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214/* Override any GCC internal prototype to avoid an error.
12215 Use char because int might match the return type of a GCC
12216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012217#ifdef __cplusplus
12218extern "C"
12219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012220char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012221int
12222main ()
12223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 ;
12226 return 0;
12227}
12228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012231else
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012234rm -f core conftest.err conftest.$ac_objext \
12235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012236LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12239$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012240if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012242 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012243else
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12245$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012246if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012248else
12249 ac_check_lib_save_LIBS=$LIBS
12250LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012252/* end confdefs.h. */
12253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012254/* Override any GCC internal prototype to avoid an error.
12255 Use char because int might match the return type of a GCC
12256 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012257#ifdef __cplusplus
12258extern "C"
12259#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012260char forkpty ();
12261int
12262main ()
12263{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012265 ;
12266 return 0;
12267}
12268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012269if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012270 ac_cv_lib_bsd_forkpty=yes
12271else
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012274rm -f core conftest.err conftest.$ac_objext \
12275 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012276LIBS=$ac_check_lib_save_LIBS
12277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12279$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012280if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012282 LIBS="$LIBS -lbsd"
12283fi
12284
12285
12286fi
12287
Fred Drake8cef4cf2000-06-28 16:40:38 +000012288
12289fi
12290done
12291
Jack Jansendd19cf82001-12-06 22:36:17 +000012292
Michael W. Hudson54241132001-12-07 15:38:26 +000012293# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012294for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012295do :
12296 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12297ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012298if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012300#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012301_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012303fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012304done
12305
Michael W. Hudson54241132001-12-07 15:38:26 +000012306
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012307ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012308if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012309 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012310
Martin v. Löwis1142de32002-03-29 16:28:31 +000012311else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012313 *" dup2.$ac_objext "* ) ;;
12314 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012316esac
12317
Martin v. Löwis1142de32002-03-29 16:28:31 +000012318fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012319
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012320ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012321if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012322 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12323
12324else
12325 case " $LIBOBJS " in
12326 *" strdup.$ac_objext "* ) ;;
12327 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12328 ;;
12329esac
12330
12331fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012332
12333
12334for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012335do :
12336 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012337if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012342/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012343#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012344int
12345main ()
12346{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012347getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012348 ;
12349 return 0;
12350}
12351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012353
Matthias Kloseb9621712010-04-24 17:59:49 +000012354$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012355
Guido van Rossum627b2d71993-12-24 10:39:16 +000012356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012358
Guido van Rossum627b2d71993-12-24 10:39:16 +000012359fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012360done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012361
Jack Jansen150753c2003-03-29 22:07:47 +000012362for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012363do :
12364 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012365if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012366 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012370/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012371#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012372int
12373main ()
12374{
12375setpgrp(0,0);
12376 ;
12377 return 0;
12378}
12379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012381
Matthias Kloseb9621712010-04-24 17:59:49 +000012382$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012383
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012386
12387fi
12388done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012389
Thomas Wouters3a584202000-08-05 23:28:51 +000012390for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012391do :
12392 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012393if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012398/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012399#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012400int
12401main ()
12402{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 ;
12405 return 0;
12406}
12407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012408if ac_fn_c_try_compile "$LINENO"; then :
12409
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410else
Skip Montanaro6dead952003-09-25 14:50:04 +000012411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012413
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
Guido van Rossum627b2d71993-12-24 10:39:16 +000012415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012418fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012419done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420
Michael W. Hudson54241132001-12-07 15:38:26 +000012421
Victor Stinnere0be4232011-10-25 13:06:09 +020012422for ac_func in clock_gettime
12423do :
12424 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12425if test "x$ac_cv_func_clock_gettime" = xyes; then :
12426 cat >>confdefs.h <<_ACEOF
12427#define HAVE_CLOCK_GETTIME 1
12428_ACEOF
12429
12430else
12431
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12433$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12434if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12435 $as_echo_n "(cached) " >&6
12436else
12437 ac_check_lib_save_LIBS=$LIBS
12438LIBS="-lrt $LIBS"
12439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12440/* end confdefs.h. */
12441
12442/* Override any GCC internal prototype to avoid an error.
12443 Use char because int might match the return type of a GCC
12444 builtin and then its argument prototype would still apply. */
12445#ifdef __cplusplus
12446extern "C"
12447#endif
12448char clock_gettime ();
12449int
12450main ()
12451{
12452return clock_gettime ();
12453 ;
12454 return 0;
12455}
12456_ACEOF
12457if ac_fn_c_try_link "$LINENO"; then :
12458 ac_cv_lib_rt_clock_gettime=yes
12459else
12460 ac_cv_lib_rt_clock_gettime=no
12461fi
12462rm -f core conftest.err conftest.$ac_objext \
12463 conftest$ac_exeext conftest.$ac_ext
12464LIBS=$ac_check_lib_save_LIBS
12465fi
12466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12467$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12468if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12469
Victor Stinner7efb8332014-08-29 15:41:08 +020012470 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012471 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12472
12473
12474$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12475
12476
12477fi
12478
12479
12480fi
12481done
12482
12483
12484for ac_func in clock_getres
12485do :
12486 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12487if test "x$ac_cv_func_clock_getres" = xyes; then :
12488 cat >>confdefs.h <<_ACEOF
12489#define HAVE_CLOCK_GETRES 1
12490_ACEOF
12491
12492else
12493
12494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12495$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12496if ${ac_cv_lib_rt_clock_getres+:} false; then :
12497 $as_echo_n "(cached) " >&6
12498else
12499 ac_check_lib_save_LIBS=$LIBS
12500LIBS="-lrt $LIBS"
12501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12502/* end confdefs.h. */
12503
12504/* Override any GCC internal prototype to avoid an error.
12505 Use char because int might match the return type of a GCC
12506 builtin and then its argument prototype would still apply. */
12507#ifdef __cplusplus
12508extern "C"
12509#endif
12510char clock_getres ();
12511int
12512main ()
12513{
12514return clock_getres ();
12515 ;
12516 return 0;
12517}
12518_ACEOF
12519if ac_fn_c_try_link "$LINENO"; then :
12520 ac_cv_lib_rt_clock_getres=yes
12521else
12522 ac_cv_lib_rt_clock_getres=no
12523fi
12524rm -f core conftest.err conftest.$ac_objext \
12525 conftest$ac_exeext conftest.$ac_ext
12526LIBS=$ac_check_lib_save_LIBS
12527fi
12528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12529$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12530if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12531
12532 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12533
12534
12535fi
12536
12537
12538fi
12539done
12540
12541
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012542for ac_func in clock_settime
12543do :
12544 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12545if test "x$ac_cv_func_clock_settime" = xyes; then :
12546 cat >>confdefs.h <<_ACEOF
12547#define HAVE_CLOCK_SETTIME 1
12548_ACEOF
12549
12550else
12551
12552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12553$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12554if ${ac_cv_lib_rt_clock_settime+:} false; then :
12555 $as_echo_n "(cached) " >&6
12556else
12557 ac_check_lib_save_LIBS=$LIBS
12558LIBS="-lrt $LIBS"
12559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12560/* end confdefs.h. */
12561
12562/* Override any GCC internal prototype to avoid an error.
12563 Use char because int might match the return type of a GCC
12564 builtin and then its argument prototype would still apply. */
12565#ifdef __cplusplus
12566extern "C"
12567#endif
12568char clock_settime ();
12569int
12570main ()
12571{
12572return clock_settime ();
12573 ;
12574 return 0;
12575}
12576_ACEOF
12577if ac_fn_c_try_link "$LINENO"; then :
12578 ac_cv_lib_rt_clock_settime=yes
12579else
12580 ac_cv_lib_rt_clock_settime=no
12581fi
12582rm -f core conftest.err conftest.$ac_objext \
12583 conftest$ac_exeext conftest.$ac_ext
12584LIBS=$ac_check_lib_save_LIBS
12585fi
12586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12587$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12588if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12589
12590 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12591
12592
12593fi
12594
12595
12596fi
12597done
12598
12599
Matthias Kloseb9621712010-04-24 17:59:49 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12601$as_echo_n "checking for major... " >&6; }
12602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012603/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012604
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012605#if defined(MAJOR_IN_MKDEV)
12606#include <sys/mkdev.h>
12607#elif defined(MAJOR_IN_SYSMACROS)
12608#include <sys/sysmacros.h>
12609#else
12610#include <sys/types.h>
12611#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012612
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012613int
12614main ()
12615{
12616
12617 makedev(major(0),minor(0));
12618
12619 ;
12620 return 0;
12621}
12622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012624
12625
Matthias Kloseb9621712010-04-24 17:59:49 +000012626$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12629$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012630
12631else
Skip Montanaro6dead952003-09-25 14:50:04 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12634$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012635
12636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012637rm -f core conftest.err conftest.$ac_objext \
12638 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012639
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012640# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012641# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12643$as_echo_n "checking for getaddrinfo... " >&6; }
12644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012645/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012646
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012647#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012648#include <sys/socket.h>
12649#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012650#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012651
Martin v. Löwis11437992002-04-12 09:54:03 +000012652int
12653main ()
12654{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012655getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ;
12657 return 0;
12658}
12659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012660if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012661 have_getaddrinfo=yes
12662else
Matthias Kloseb9621712010-04-24 17:59:49 +000012663 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012665rm -f core conftest.err conftest.$ac_objext \
12666 conftest$ac_exeext conftest.$ac_ext
12667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12668$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012669if test $have_getaddrinfo = yes
12670then
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12672$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012673 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012675else
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012677
12678if test "${enable_ipv6+set}" = set; then
12679 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12680else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012681 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012682fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012683else
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012686
Stefan Krah19c21392012-11-22 23:47:32 +010012687#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012688#include <sys/types.h>
12689#include <netdb.h>
12690#include <string.h>
12691#include <sys/socket.h>
12692#include <netinet/in.h>
12693
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012694int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012695{
12696 int passive, gaierr, inet4 = 0, inet6 = 0;
12697 struct addrinfo hints, *ai, *aitop;
12698 char straddr[INET6_ADDRSTRLEN], strport[16];
12699
12700 for (passive = 0; passive <= 1; passive++) {
12701 memset(&hints, 0, sizeof(hints));
12702 hints.ai_family = AF_UNSPEC;
12703 hints.ai_flags = passive ? AI_PASSIVE : 0;
12704 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012705 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012706 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12707 (void)gai_strerror(gaierr);
12708 goto bad;
12709 }
12710 for (ai = aitop; ai; ai = ai->ai_next) {
12711 if (ai->ai_addr == NULL ||
12712 ai->ai_addrlen == 0 ||
12713 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12714 straddr, sizeof(straddr), strport, sizeof(strport),
12715 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12716 goto bad;
12717 }
12718 switch (ai->ai_family) {
12719 case AF_INET:
12720 if (strcmp(strport, "54321") != 0) {
12721 goto bad;
12722 }
12723 if (passive) {
12724 if (strcmp(straddr, "0.0.0.0") != 0) {
12725 goto bad;
12726 }
12727 } else {
12728 if (strcmp(straddr, "127.0.0.1") != 0) {
12729 goto bad;
12730 }
12731 }
12732 inet4++;
12733 break;
12734 case AF_INET6:
12735 if (strcmp(strport, "54321") != 0) {
12736 goto bad;
12737 }
12738 if (passive) {
12739 if (strcmp(straddr, "::") != 0) {
12740 goto bad;
12741 }
12742 } else {
12743 if (strcmp(straddr, "::1") != 0) {
12744 goto bad;
12745 }
12746 }
12747 inet6++;
12748 break;
12749 case AF_UNSPEC:
12750 goto bad;
12751 break;
12752 default:
12753 /* another family support? */
12754 break;
12755 }
12756 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012757 freeaddrinfo(aitop);
12758 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012759 }
12760
12761 if (!(inet4 == 0 || inet4 == 2))
12762 goto bad;
12763 if (!(inet6 == 0 || inet6 == 2))
12764 goto bad;
12765
12766 if (aitop)
12767 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012768 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012769
12770 bad:
12771 if (aitop)
12772 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012773 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012774}
12775
Martin v. Löwis11437992002-04-12 09:54:03 +000012776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012777if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012778 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012779else
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012786fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012787
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12791$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12792
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012793if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012794then
12795 if test $ipv6 = yes
12796 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012797 echo 'Fatal: You must get working getaddrinfo() function.'
12798 echo ' or you can specify "--disable-ipv6"'.
12799 exit 1
12800 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012801else
Martin v. Löwis11437992002-04-12 09:54:03 +000012802
Matthias Kloseb9621712010-04-24 17:59:49 +000012803$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012804
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012805fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012806
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012807for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012808do :
12809 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012810if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012812#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012813_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012814
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012815fi
12816done
12817
Michael W. Hudson54241132001-12-07 15:38:26 +000012818
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012819# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12821$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012822if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012824else
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012826/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012827#include <sys/types.h>
12828#include <sys/time.h>
12829#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
Martin v. Löwis11437992002-04-12 09:54:03 +000012831int
12832main ()
12833{
12834if ((struct tm *) 0)
12835return 0;
12836 ;
12837 return 0;
12838}
12839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012840if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012841 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12848$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012849if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012852
12853fi
12854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12856$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012857if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859else
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012862#include <sys/types.h>
12863#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012864
Martin v. Löwis11437992002-04-12 09:54:03 +000012865int
12866main ()
12867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868struct tm tm;
12869 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 ;
12872 return 0;
12873}
12874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012875if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876 ac_cv_struct_tm=time.h
12877else
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12883$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012884if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Matthias Kloseb9621712010-04-24 17:59:49 +000012886$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887
12888fi
12889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890ac_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 +000012891#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893"
Victor Stinnere0be4232011-10-25 13:06:09 +020012894if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012895
12896cat >>confdefs.h <<_ACEOF
12897#define HAVE_STRUCT_TM_TM_ZONE 1
12898_ACEOF
12899
12900
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012902
Martin v. Löwis11437992002-04-12 09:54:03 +000012903if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906
12907else
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12909"
Victor Stinnere0be4232011-10-25 13:06:09 +020012910if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912else
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914fi
12915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918_ACEOF
12919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12921$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012922if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924else
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012926/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012927#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928#if !HAVE_DECL_TZNAME
12929extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
Martin v. Löwis11437992002-04-12 09:54:03 +000012932int
12933main ()
12934{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ;
12937 return 0;
12938}
12939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012940if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012941 ac_cv_var_tzname=yes
12942else
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012945rm -f core conftest.err conftest.$ac_objext \
12946 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12949$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012950 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012953
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954 fi
12955fi
12956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957ac_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 +020012958if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
12960cat >>confdefs.h <<_ACEOF
12961#define HAVE_STRUCT_STAT_ST_RDEV 1
12962_ACEOF
12963
12964
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012965fi
12966
Matthias Kloseb9621712010-04-24 17:59:49 +000012967ac_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 +020012968if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012969
Martin v. Löwis11437992002-04-12 09:54:03 +000012970cat >>confdefs.h <<_ACEOF
12971#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12972_ACEOF
12973
12974
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012975fi
12976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977ac_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 +020012978if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012979
12980cat >>confdefs.h <<_ACEOF
12981#define HAVE_STRUCT_STAT_ST_FLAGS 1
12982_ACEOF
12983
12984
12985fi
12986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987ac_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 +020012988if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012989
12990cat >>confdefs.h <<_ACEOF
12991#define HAVE_STRUCT_STAT_ST_GEN 1
12992_ACEOF
12993
12994
12995fi
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997ac_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 +020012998if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012999
13000cat >>confdefs.h <<_ACEOF
13001#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13002_ACEOF
13003
13004
13005fi
13006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007ac_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 +020013008if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013009
Martin v. Löwis11437992002-04-12 09:54:03 +000013010cat >>confdefs.h <<_ACEOF
13011#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13012_ACEOF
13013
13014
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013015fi
13016
Stefan Krah267b6392016-04-26 01:09:18 +020013017ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13018 #include <sys/types.h>
13019 #include <pwd.h>
13020
13021"
13022if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13023
13024cat >>confdefs.h <<_ACEOF
13025#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13026_ACEOF
13027
13028
13029fi
13030ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13031 #include <sys/types.h>
13032 #include <pwd.h>
13033
13034"
13035if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13036
13037cat >>confdefs.h <<_ACEOF
13038#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13039_ACEOF
13040
13041
13042fi
13043
Zachary Ware6a6967e2016-10-01 00:47:27 -050013044# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13045ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13046"
13047if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13048
13049cat >>confdefs.h <<_ACEOF
13050#define HAVE_SIGINFO_T_SI_BAND 1
13051_ACEOF
13052
13053
13054fi
13055
Michael W. Hudson54241132001-12-07 15:38:26 +000013056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13058$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013059if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013061else
Matthias Kloseb159a552010-04-25 21:00:44 +000013062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013064/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013065#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013066int
13067main ()
13068{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 ;
13071 return 0;
13072}
13073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013074if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075 ac_cv_header_time_altzone=yes
13076else
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081fi
13082
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13084$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013088
13089fi
13090
Guido van Rossumda88dad1995-01-26 00:46:29 +000013091was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13093$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013095/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013096
13097#include <sys/types.h>
13098#include <sys/select.h>
13099#include <sys/time.h>
13100
Martin v. Löwis11437992002-04-12 09:54:03 +000013101int
13102main ()
13103{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013104;
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 ;
13106 return 0;
13107}
13108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013110
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013113
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013114 was_it_defined=yes
13115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13119$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13122$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013123if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013127/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013128#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013129int
13130main ()
13131{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013132struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013133 ;
13134 return 0;
13135}
13136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013138 ac_cv_struct_addrinfo=yes
13139else
Matthias Kloseb9621712010-04-24 17:59:49 +000013140 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13143fi
13144
Matthias Kloseb9621712010-04-24 17:59:49 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13146$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013150
13151fi
13152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13154$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013155if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013156 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157else
Matthias Kloseb9621712010-04-24 17:59:49 +000013158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013159/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013160
13161# include <sys/types.h>
13162# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013163int
13164main ()
13165{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013166struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013167 ;
13168 return 0;
13169}
13170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172 ac_cv_struct_sockaddr_storage=yes
13173else
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13177fi
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13180$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013184
13185fi
13186
Christian Heimesdffa3942016-09-05 23:54:41 +020013187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13188$as_echo_n "checking for sockaddr_alg... " >&6; }
13189if ${ac_cv_struct_sockaddr_alg+:} false; then :
13190 $as_echo_n "(cached) " >&6
13191else
13192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13193/* end confdefs.h. */
13194
13195# include <sys/types.h>
13196# include <sys/socket.h>
13197# include <linux/if_alg.h>
13198int
13199main ()
13200{
13201struct sockaddr_alg s
13202 ;
13203 return 0;
13204}
13205_ACEOF
13206if ac_fn_c_try_compile "$LINENO"; then :
13207 ac_cv_struct_sockaddr_alg=yes
13208else
13209 ac_cv_struct_sockaddr_alg=no
13210fi
13211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13212fi
13213
13214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13215$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13216if test $ac_cv_struct_sockaddr_alg = yes; then
13217
13218$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13219
13220fi
13221
Guido van Rossum627b2d71993-12-24 10:39:16 +000013222# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013223
Matthias Kloseb9621712010-04-24 17:59:49 +000013224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13225$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013226if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013228else
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013231$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013232int
13233main ()
13234{
13235static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013236test_array [0] = 0;
13237return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013238
13239 ;
13240 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013241}
Martin v. Löwis11437992002-04-12 09:54:03 +000013242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013243if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013244 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13251$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013252if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013254
13255fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13258$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013259if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264
Martin v. Löwis11437992002-04-12 09:54:03 +000013265int
13266main ()
13267{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013268
Martin v. Löwis11437992002-04-12 09:54:03 +000013269#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013270 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013272 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013273 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274 char const *const *pcpcc;
13275 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 /* NEC SVR4.0.2 mips cc rejects this. */
13277 struct point {int x, y;};
13278 static struct point const zero = {0,0};
13279 /* AIX XL C 1.02.0.0 rejects this.
13280 It does not let you subtract one const X* pointer from another in
13281 an arm of an if-expression whose if-part is not a constant
13282 expression */
13283 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013284 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286 ++pcpcc;
13287 ppc = (char**) pcpcc;
13288 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013289 { /* SCO 3.2v4 cc rejects this sort of thing. */
13290 char tx;
13291 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013295 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013296 }
13297 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13298 int x[] = {25, 17};
13299 const int *foo = &x[0];
13300 ++foo;
13301 }
13302 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13303 typedef const int *iptr;
13304 iptr p = 0;
13305 ++p;
13306 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013307 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013309 struct s { int j; const int *ap[3]; } bx;
13310 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 }
13312 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13313 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013317#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013318
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 ;
13320 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013321}
Martin v. Löwis11437992002-04-12 09:54:03 +000013322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013323if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324 ac_cv_c_const=yes
13325else
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13331$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335
13336fi
13337
Michael W. Hudson54241132001-12-07 15:38:26 +000013338
Guido van Rossumda88dad1995-01-26 00:46:29 +000013339works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13341$as_echo_n "checking for working signed char... " >&6; }
13342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013343/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013344
Martin v. Löwis11437992002-04-12 09:54:03 +000013345int
13346main ()
13347{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 ;
13350 return 0;
13351}
13352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013353if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013354 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013355else
Skip Montanaro6dead952003-09-25 14:50:04 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013358
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013359
Guido van Rossum7f43da71994-08-01 12:15:30 +000013360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13363$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013364
Guido van Rossumda88dad1995-01-26 00:46:29 +000013365have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13367$as_echo_n "checking for prototypes... " >&6; }
13368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013369/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013370int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013371int
13372main ()
13373{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013374return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 ;
13376 return 0;
13377}
13378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Matthias Kloseb159a552010-04-25 21:00:44 +000013383 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13387$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013388
Guido van Rossumda88dad1995-01-26 00:46:29 +000013389works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13391$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013393/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013394
13395#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013396int foo(int x, ...) {
13397 va_list va;
13398 va_start(va, x);
13399 va_arg(va, int);
13400 va_arg(va, char *);
13401 va_arg(va, double);
13402 return 0;
13403}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
Guido van Rossum90eea071996-08-30 20:58:57 +000013408return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 ;
13410 return 0;
13411}
13412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013414
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013418 works=yes
13419
Guido van Rossum627b2d71993-12-24 10:39:16 +000013420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13423$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013424
Martin v. Löwisd6320502004-08-12 13:45:08 +000013425# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13427$as_echo_n "checking for socketpair... " >&6; }
13428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013429/* end confdefs.h. */
13430
13431#include <sys/types.h>
13432#include <sys/socket.h>
13433
13434int
13435main ()
13436{
13437void *x=socketpair
13438 ;
13439 return 0;
13440}
13441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013443
Matthias Kloseb9621712010-04-24 17:59:49 +000013444$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013445
Matthias Kloseb159a552010-04-25 21:00:44 +000013446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013447$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13450$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013451
13452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013454
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013455# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13457$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013459/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013460#include <sys/types.h>
13461#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013462int
13463main ()
13464{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013465struct sockaddr x;
13466x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 ;
13468 return 0;
13469}
13470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013471if ac_fn_c_try_compile "$LINENO"; then :
13472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13473$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013476
13477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13479$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013480
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013483
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013484# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
13486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013488if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13493$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013494 OLD_CFLAGS=$CFLAGS
13495 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013498
13499# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501int
13502main ()
13503{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013504
13505 char *name;
13506 struct hostent *he, *res;
13507 char buffer[2048];
13508 int buflen = 2048;
13509 int h_errnop;
13510
13511 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013512
13513 ;
13514 return 0;
13515}
13516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013520
Martin v. Löwis11437992002-04-12 09:54:03 +000013521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13525$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013527else
Skip Montanaro6dead952003-09-25 14:50:04 +000013528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13530$as_echo "no" >&6; }
13531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13532$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013534/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013536# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013537
Martin v. Löwis11437992002-04-12 09:54:03 +000013538int
13539main ()
13540{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013541
13542 char *name;
13543 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013544 char buffer[2048];
13545 int buflen = 2048;
13546 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013547
Matthias Kloseb159a552010-04-25 21:00:44 +000013548 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
13550 ;
13551 return 0;
13552}
13553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
Matthias Kloseb159a552010-04-25 21:00:44 +000013559$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13562$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013564else
Skip Montanaro6dead952003-09-25 14:50:04 +000013565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13567$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13569$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13571/* end confdefs.h. */
13572
13573# include <netdb.h>
13574
13575int
13576main ()
13577{
13578
13579 char *name;
13580 struct hostent *he;
13581 struct hostent_data data;
13582
13583 (void) gethostbyname_r(name, he, &data);
13584
13585 ;
13586 return 0;
13587}
13588_ACEOF
13589if ac_fn_c_try_compile "$LINENO"; then :
13590
13591 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13592
13593
13594$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13595
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13597$as_echo "yes" >&6; }
13598
13599else
13600
13601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13602$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013612 CFLAGS=$OLD_CFLAGS
13613
13614else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 for ac_func in gethostbyname
13617do :
13618 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013619if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013621#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013622_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013623
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013624fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013625done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013626
Michael W. Hudson54241132001-12-07 15:38:26 +000013627
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013628fi
13629
Michael W. Hudson54241132001-12-07 15:38:26 +000013630
13631
13632
13633
13634
13635
Guido van Rossum627b2d71993-12-24 10:39:16 +000013636# checks for system services
13637# (none yet)
13638
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013639# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013640ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013641if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013642
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13645$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013646if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013648else
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013650LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654/* Override any GCC internal prototype to avoid an error.
13655 Use char because int might match the return type of a GCC
13656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013657#ifdef __cplusplus
13658extern "C"
13659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013660char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013661int
13662main ()
13663{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ;
13666 return 0;
13667}
13668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013669if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013671else
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013674rm -f core conftest.err conftest.$ac_objext \
13675 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013676LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13679$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013680if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 cat >>confdefs.h <<_ACEOF
13682#define HAVE_LIBIEEE 1
13683_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013684
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013685 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686
Guido van Rossum627b2d71993-12-24 10:39:16 +000013687fi
13688
Michael W. Hudson54241132001-12-07 15:38:26 +000013689
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013690fi
13691
Michael W. Hudson54241132001-12-07 15:38:26 +000013692
Guido van Rossum7f43da71994-08-01 12:15:30 +000013693# check for --with-libm=...
13694
Guido van Rossum563e7081996-09-10 18:20:48 +000013695case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013696Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013697*) LIBM=-lm
13698esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13700$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013703if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013705if test "$withval" = no
13706then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13708$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013709elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013710then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13712$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013713else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013714fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13717$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013718fi
13719
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720
13721# check for --with-libc=...
13722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13724$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013727if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013729if test "$withval" = no
13730then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13732$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013733elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013734then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13736$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013737else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013738fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13741$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013742fi
13743
Guido van Rossum7f43da71994-08-01 12:15:30 +000013744
Stefan Krah1919b7e2012-03-21 18:25:23 +010013745# **************************************
13746# * Check for gcc x64 inline assembler *
13747# **************************************
13748
13749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13750$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13752/* end confdefs.h. */
13753
13754int
13755main ()
13756{
13757
13758 __asm__ __volatile__ ("movq %rcx, %rax");
13759
13760 ;
13761 return 0;
13762}
13763_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013764if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013765 have_gcc_asm_for_x64=yes
13766else
13767 have_gcc_asm_for_x64=no
13768fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013769rm -f core conftest.err conftest.$ac_objext \
13770 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13772$as_echo "$have_gcc_asm_for_x64" >&6; }
13773if test "$have_gcc_asm_for_x64" = yes
13774then
13775
13776$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13777
13778fi
13779
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013780# **************************************************
13781# * Check for various properties of floating point *
13782# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13785$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013786if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013788else
13789
Matthias Kloseb9621712010-04-24 17:59:49 +000013790if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013791 ac_cv_little_endian_double=no
13792else
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013794/* end confdefs.h. */
13795
13796#include <string.h>
13797int main() {
13798 double x = 9006104071832581.0;
13799 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13800 return 0;
13801 else
13802 return 1;
13803}
13804
13805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013806if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013807 ac_cv_little_endian_double=yes
13808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013813fi
13814
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815fi
13816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13818$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819if test "$ac_cv_little_endian_double" = yes
13820then
13821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013823
13824fi
13825
Matthias Kloseb9621712010-04-24 17:59:49 +000013826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13827$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013828if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013830else
13831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013833 ac_cv_big_endian_double=no
13834else
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013836/* end confdefs.h. */
13837
13838#include <string.h>
13839int main() {
13840 double x = 9006104071832581.0;
13841 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13842 return 0;
13843 else
13844 return 1;
13845}
13846
13847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013848if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013849 ac_cv_big_endian_double=yes
13850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013855fi
13856
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857fi
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13860$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861if test "$ac_cv_big_endian_double" = yes
13862then
13863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013865
13866fi
13867
13868# Some ARM platforms use a mixed-endian representation for doubles.
13869# While Python doesn't currently have full support for these platforms
13870# (see e.g., issue 1762561), we can at least make sure that float <-> string
13871# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13873$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013874if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876else
13877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879 ac_cv_mixed_endian_double=no
13880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882/* end confdefs.h. */
13883
13884#include <string.h>
13885int main() {
13886 double x = 9006104071832581.0;
13887 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13888 return 0;
13889 else
13890 return 1;
13891}
13892
13893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013894if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013895 ac_cv_mixed_endian_double=yes
13896else
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013901fi
13902
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903fi
13904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13906$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907if test "$ac_cv_mixed_endian_double" = yes
13908then
13909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911
13912fi
13913
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013914# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013915# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013916# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013917# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013918# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013919# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013920
13921# This inline assembler syntax may also work for suncc and icc,
13922# so we try it on all platforms.
13923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13925$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013927/* end confdefs.h. */
13928
13929int
13930main ()
13931{
13932
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013933 unsigned short cw;
13934 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13935 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013936
13937 ;
13938 return 0;
13939}
13940_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013941if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942 have_gcc_asm_for_x87=yes
13943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013946rm -f core conftest.err conftest.$ac_objext \
13947 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13949$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013950if test "$have_gcc_asm_for_x87" = yes
13951then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13958$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13960/* end confdefs.h. */
13961
13962int
13963main ()
13964{
13965
13966 unsigned int fpcr;
13967 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13968 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13969
13970 ;
13971 return 0;
13972}
13973_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013974if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013975 have_gcc_asm_for_mc68881=yes
13976else
13977 have_gcc_asm_for_mc68881=no
13978fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013979rm -f core conftest.err conftest.$ac_objext \
13980 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13982$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13983if test "$have_gcc_asm_for_mc68881" = yes
13984then
13985
13986$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13987
13988fi
13989
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013990# Detect whether system arithmetic is subject to x87-style double
13991# rounding issues. The result of this test has little meaning on non
13992# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13993# mode is round-to-nearest and double rounding issues are present, and
13994# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13996$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013997# $BASECFLAGS may affect the result
13998ac_save_cc="$CC"
13999CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014000if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014001 ac_cv_x87_double_rounding=no
14002else
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014004/* end confdefs.h. */
14005
14006#include <stdlib.h>
14007#include <math.h>
14008int main() {
14009 volatile double x, y, z;
14010 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14011 x = 0.99999999999999989; /* 1-2**-53 */
14012 y = 1./x;
14013 if (y != 1.)
14014 exit(0);
14015 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14016 x = 1e16;
14017 y = 2.99999;
14018 z = x + y;
14019 if (z != 1e16+4.)
14020 exit(0);
14021 /* both tests show evidence of double rounding */
14022 exit(1);
14023}
14024
14025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014026if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014027 ac_cv_x87_double_rounding=no
14028else
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014033fi
14034
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014035CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14037$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014038if test "$ac_cv_x87_double_rounding" = yes
14039then
14040
Matthias Kloseb9621712010-04-24 17:59:49 +000014041$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014042
14043fi
14044
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014045# ************************************
14046# * Check for mathematical functions *
14047# ************************************
14048
14049LIBS_SAVE=$LIBS
14050LIBS="$LIBS $LIBM"
14051
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014052for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14053do :
14054 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14055ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014056if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014057 cat >>confdefs.h <<_ACEOF
14058#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14059_ACEOF
14060
14061fi
14062done
14063
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014064for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014065do :
14066 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14067ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014068if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014069 cat >>confdefs.h <<_ACEOF
14070#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14071_ACEOF
14072
14073fi
14074done
14075
14076ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14077"
Victor Stinnere0be4232011-10-25 13:06:09 +020014078if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014079 ac_have_decl=1
14080else
14081 ac_have_decl=0
14082fi
14083
14084cat >>confdefs.h <<_ACEOF
14085#define HAVE_DECL_ISINF $ac_have_decl
14086_ACEOF
14087ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14088"
Victor Stinnere0be4232011-10-25 13:06:09 +020014089if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014090 ac_have_decl=1
14091else
14092 ac_have_decl=0
14093fi
14094
14095cat >>confdefs.h <<_ACEOF
14096#define HAVE_DECL_ISNAN $ac_have_decl
14097_ACEOF
14098ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14099"
Victor Stinnere0be4232011-10-25 13:06:09 +020014100if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014101 ac_have_decl=1
14102else
14103 ac_have_decl=0
14104fi
14105
14106cat >>confdefs.h <<_ACEOF
14107#define HAVE_DECL_ISFINITE $ac_have_decl
14108_ACEOF
14109
14110
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014111# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14112# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14114$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014115if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014117else
14118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014120 ac_cv_tanh_preserves_zero_sign=no
14121else
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014123/* end confdefs.h. */
14124
14125#include <math.h>
14126#include <stdlib.h>
14127int main() {
14128 /* return 0 if either negative zeros don't exist
14129 on this platform or if negative zeros exist
14130 and tanh(-0.) == -0. */
14131 if (atan2(0., -1.) == atan2(-0., -1.) ||
14132 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14133 else exit(1);
14134}
14135
14136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014137if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014138 ac_cv_tanh_preserves_zero_sign=yes
14139else
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14143 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014144fi
14145
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014146fi
14147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14149$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014150if test "$ac_cv_tanh_preserves_zero_sign" = yes
14151then
14152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014154
14155fi
14156
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014157if test "$ac_cv_func_log1p" = yes
14158then
14159 # On some versions of AIX, log1p(-0.) returns 0. instead of
14160 # -0. See issue #9920.
14161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14162$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014163 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014164 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014165else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014166
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014167 if test "$cross_compiling" = yes; then :
14168 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014169else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14171/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014172
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014173 #include <math.h>
14174 #include <stdlib.h>
14175 int main() {
14176 /* Fail if the signs of log1p(-0.) and -0. can be
14177 distinguished. */
14178 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14179 return 0;
14180 else
14181 return 1;
14182 }
14183
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014184_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014185if ac_fn_c_try_run "$LINENO"; then :
14186 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014187else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014188 ac_cv_log1p_drops_zero_sign=yes
14189fi
14190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014192fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014194fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014195
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14197$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14198fi
14199if test "$ac_cv_log1p_drops_zero_sign" = yes
14200then
14201
14202$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14203
14204fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014205
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014206LIBS=$LIBS_SAVE
14207
Mark Dickinsona614f042009-11-28 12:48:43 +000014208# For multiprocessing module, check that sem_open
14209# actually works. For FreeBSD versions <= 7.2,
14210# the kernel module that provides POSIX semaphores
14211# isn't loaded by default, so an attempt to call
14212# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14214$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014215if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014217else
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014219 ac_cv_posix_semaphores_enabled=yes
14220else
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014222/* end confdefs.h. */
14223
14224#include <unistd.h>
14225#include <fcntl.h>
14226#include <stdio.h>
14227#include <semaphore.h>
14228#include <sys/stat.h>
14229
14230int main(void) {
14231 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14232 if (a == SEM_FAILED) {
14233 perror("sem_open");
14234 return 1;
14235 }
14236 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014237 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014238 return 0;
14239}
14240
14241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014242if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014243 ac_cv_posix_semaphores_enabled=yes
14244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14248 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014249fi
14250
14251
Mark Dickinsona614f042009-11-28 12:48:43 +000014252fi
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14255$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014256if test $ac_cv_posix_semaphores_enabled = no
14257then
14258
Matthias Kloseb9621712010-04-24 17:59:49 +000014259$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014260
14261fi
14262
Mark Dickinson10683072009-04-18 21:18:19 +000014263# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14265$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014266if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014268else
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014270 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014271else
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014273/* end confdefs.h. */
14274
14275#include <unistd.h>
14276#include <fcntl.h>
14277#include <stdio.h>
14278#include <semaphore.h>
14279#include <sys/stat.h>
14280
14281int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014282 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014283 int count;
14284 int res;
14285 if(a==SEM_FAILED){
14286 perror("sem_open");
14287 return 1;
14288
14289 }
14290 res = sem_getvalue(a, &count);
14291 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014292 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014293 return res==-1 ? 1 : 0;
14294}
14295
Mark Dickinson10683072009-04-18 21:18:19 +000014296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014297if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014298 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014299else
Matthias Kloseb9621712010-04-24 17:59:49 +000014300 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14303 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014304fi
14305
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014306
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014307fi
14308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14310$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014311if test $ac_cv_broken_sem_getvalue = yes
14312then
14313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014315
14316fi
14317
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014318ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14319"
14320if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14321 ac_have_decl=1
14322else
14323 ac_have_decl=0
14324fi
14325
14326cat >>confdefs.h <<_ACEOF
14327#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14328_ACEOF
14329ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14330"
14331if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14332 ac_have_decl=1
14333else
14334 ac_have_decl=0
14335fi
14336
14337cat >>confdefs.h <<_ACEOF
14338#define HAVE_DECL_RTLD_NOW $ac_have_decl
14339_ACEOF
14340ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14341"
14342if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14343 ac_have_decl=1
14344else
14345 ac_have_decl=0
14346fi
14347
14348cat >>confdefs.h <<_ACEOF
14349#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14350_ACEOF
14351ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14352"
14353if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14354 ac_have_decl=1
14355else
14356 ac_have_decl=0
14357fi
14358
14359cat >>confdefs.h <<_ACEOF
14360#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14361_ACEOF
14362ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14363"
14364if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14365 ac_have_decl=1
14366else
14367 ac_have_decl=0
14368fi
14369
14370cat >>confdefs.h <<_ACEOF
14371#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14372_ACEOF
14373ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14374"
14375if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14376 ac_have_decl=1
14377else
14378 ac_have_decl=0
14379fi
14380
14381cat >>confdefs.h <<_ACEOF
14382#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14383_ACEOF
14384ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14385"
14386if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14387 ac_have_decl=1
14388else
14389 ac_have_decl=0
14390fi
14391
14392cat >>confdefs.h <<_ACEOF
14393#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14394_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014395ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14396"
14397if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14398 ac_have_decl=1
14399else
14400 ac_have_decl=0
14401fi
14402
14403cat >>confdefs.h <<_ACEOF
14404#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14405_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014406
14407
Mark Dickinsonbd792642009-03-18 20:06:12 +000014408# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14410$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014411# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014412if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014413 enableval=$enable_big_digits; case $enable_big_digits in
14414yes)
14415 enable_big_digits=30 ;;
14416no)
14417 enable_big_digits=15 ;;
1441815|30)
14419 ;;
14420*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014421 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 +000014422esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14424$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014425
14426cat >>confdefs.h <<_ACEOF
14427#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14428_ACEOF
14429
14430
14431else
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14433$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014434fi
14435
14436
Guido van Rossumef2255b2000-03-10 22:30:29 +000014437# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014438ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014439if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
14441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014444 wchar_h="yes"
14445
Guido van Rossumef2255b2000-03-10 22:30:29 +000014446else
Martin v. Löwis11437992002-04-12 09:54:03 +000014447 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014448
14449fi
14450
Michael W. Hudson54241132001-12-07 15:38:26 +000014451
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014453# determine wchar_t size
14454if test "$wchar_h" = yes
14455then
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14458# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14459# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14461$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014462if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014464else
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14466"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014467
Martin v. Löwis11437992002-04-12 09:54:03 +000014468else
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 if test "$ac_cv_type_wchar_t" = yes; then
14470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014472as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014473See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474 else
14475 ac_cv_sizeof_wchar_t=0
14476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014478
Martin v. Löwis11437992002-04-12 09:54:03 +000014479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14481$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482
14483
14484
Martin v. Löwis11437992002-04-12 09:54:03 +000014485cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014486#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014487_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014488
Michael W. Hudson54241132001-12-07 15:38:26 +000014489
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014490fi
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14493$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014494have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014496/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014497
14498#include <tcl.h>
14499#if TCL_UTF_MAX != 6
14500# error "NOT UCS4_TCL"
14501#endif
14502int
14503main ()
14504{
14505
14506 ;
14507 return 0;
14508}
14509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014511
14512
Matthias Kloseb9621712010-04-24 17:59:49 +000014513$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014514
14515 have_ucs4_tcl=yes
14516
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14520$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014521
Skip Montanaro6dead952003-09-25 14:50:04 +000014522# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014523if test "$wchar_h" = yes
14524then
14525 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14527$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014528 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014530else
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014533 ac_cv_wchar_t_signed=yes
14534else
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014536/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014537
14538 #include <wchar.h>
14539 int main()
14540 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014541 /* Success: exit code 0 */
14542 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014543 }
14544
14545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014546if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014547 ac_cv_wchar_t_signed=yes
14548else
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14552 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014553fi
14554
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014555fi
14556
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14558$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559fi
14560
Georg Brandl52d168a2008-01-07 18:10:24 +000014561# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014562if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014563 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014564then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014565 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014566
Matthias Kloseb9621712010-04-24 17:59:49 +000014567$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014568
Georg Brandl52d168a2008-01-07 18:10:24 +000014569else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014570 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014571fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14573$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014574
14575# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14577$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014578if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014579 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014580else
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 ac_cv_c_bigendian=unknown
14582 # See if we're dealing with a universal compiler.
14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14584/* end confdefs.h. */
14585#ifndef __APPLE_CC__
14586 not a universal capable compiler
14587 #endif
14588 typedef int dummy;
14589
Skip Montanaro6dead952003-09-25 14:50:04 +000014590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014591if ac_fn_c_try_compile "$LINENO"; then :
14592
14593 # Check for potential -arch flags. It is not universal unless
14594 # there are at least two -arch flags with different values.
14595 ac_arch=
14596 ac_prev=
14597 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14598 if test -n "$ac_prev"; then
14599 case $ac_word in
14600 i?86 | x86_64 | ppc | ppc64)
14601 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14602 ac_arch=$ac_word
14603 else
14604 ac_cv_c_bigendian=universal
14605 break
14606 fi
14607 ;;
14608 esac
14609 ac_prev=
14610 elif test "x$ac_word" = "x-arch"; then
14611 ac_prev=arch
14612 fi
14613 done
14614fi
14615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14616 if test $ac_cv_c_bigendian = unknown; then
14617 # See if sys/param.h defines the BYTE_ORDER macro.
14618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014619/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014620#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014622
Martin v. Löwis11437992002-04-12 09:54:03 +000014623int
14624main ()
14625{
Matthias Kloseb9621712010-04-24 17:59:49 +000014626#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14627 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14628 && LITTLE_ENDIAN)
14629 bogus endian macros
14630 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014631
14632 ;
14633 return 0;
14634}
14635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014636if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014637 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014639/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014640#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014642
Martin v. Löwis11437992002-04-12 09:54:03 +000014643int
14644main ()
14645{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014646#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014647 not big endian
14648 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
14650 ;
14651 return 0;
14652}
14653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014654if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014655 ac_cv_c_bigendian=yes
14656else
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014660fi
14661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14662 fi
14663 if test $ac_cv_c_bigendian = unknown; then
14664 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014666/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014667#include <limits.h>
14668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669int
14670main ()
14671{
Matthias Kloseb9621712010-04-24 17:59:49 +000014672#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14673 bogus endian macros
14674 #endif
14675
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 ;
14677 return 0;
14678}
14679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014680if ac_fn_c_try_compile "$LINENO"; then :
14681 # It does; now see whether it defined to _BIG_ENDIAN or not.
14682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14683/* end confdefs.h. */
14684#include <limits.h>
14685
14686int
14687main ()
14688{
14689#ifndef _BIG_ENDIAN
14690 not big endian
14691 #endif
14692
14693 ;
14694 return 0;
14695}
14696_ACEOF
14697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014699else
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14703fi
14704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14705 fi
14706 if test $ac_cv_c_bigendian = unknown; then
14707 # Compile a test program.
14708 if test "$cross_compiling" = yes; then :
14709 # Try to guess by grepping values from an object file.
14710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14711/* end confdefs.h. */
14712short int ascii_mm[] =
14713 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14714 short int ascii_ii[] =
14715 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14716 int use_ascii (int i) {
14717 return ascii_mm[i] + ascii_ii[i];
14718 }
14719 short int ebcdic_ii[] =
14720 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14721 short int ebcdic_mm[] =
14722 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14723 int use_ebcdic (int i) {
14724 return ebcdic_mm[i] + ebcdic_ii[i];
14725 }
14726 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728int
14729main ()
14730{
14731return use_ascii (foo) == use_ebcdic (foo);
14732 ;
14733 return 0;
14734}
14735_ACEOF
14736if ac_fn_c_try_compile "$LINENO"; then :
14737 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14738 ac_cv_c_bigendian=yes
14739 fi
14740 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14741 if test "$ac_cv_c_bigendian" = unknown; then
14742 ac_cv_c_bigendian=no
14743 else
14744 # finding both strings is unlikely to happen, but who knows?
14745 ac_cv_c_bigendian=unknown
14746 fi
14747 fi
14748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014750else
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014752/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014753$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014754int
14755main ()
14756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758 /* Are we little or big endian? From Harbison&Steele. */
14759 union
14760 {
14761 long int l;
14762 char c[sizeof (long int)];
14763 } u;
14764 u.l = 1;
14765 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766
14767 ;
14768 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014769}
Martin v. Löwis11437992002-04-12 09:54:03 +000014770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014771if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014772 ac_cv_c_bigendian=no
14773else
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14783$as_echo "$ac_cv_c_bigendian" >&6; }
14784 case $ac_cv_c_bigendian in #(
14785 yes)
14786 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14787;; #(
14788 no)
14789 ;; #(
14790 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 ;; #(
14795 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014796 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014797 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014799
Michael W. Hudson54241132001-12-07 15:38:26 +000014800
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014801# ABI version string for Python extension modules. This appears between the
14802# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14803# from the following attributes which affect the ABI of this Python build (in
14804# this order):
14805#
14806# * The Python implementation (always 'cpython-' for us)
14807# * The major and minor version numbers
14808# * --with-pydebug (adds a 'd')
14809# * --with-pymalloc (adds a 'm')
14810# * --with-wide-unicode (adds a 'u')
14811#
14812# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014813# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14814# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014815
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14817$as_echo_n "checking ABIFLAGS... " >&6; }
14818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14819$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14821$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014822SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14824$as_echo "$SOABI" >&6; }
14825
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014826
14827case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014828 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014829 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14830 *)
14831 EXT_SUFFIX=${SHLIB_SUFFIX};;
14832esac
14833
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14835$as_echo_n "checking LDVERSION... " >&6; }
14836LDVERSION='$(VERSION)$(ABIFLAGS)'
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14838$as_echo "$LDVERSION" >&6; }
14839
doko@python.org87421192013-01-26 11:39:31 +010014840
doko@ubuntu.com55532312016-06-14 08:55:19 +020014841if test x$PLATFORM_TRIPLET = x; then
14842 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14843else
14844 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14845fi
doko@python.org87421192013-01-26 11:39:31 +010014846
14847
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014848# Check whether right shifting a negative integer extends the sign bit
14849# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14851$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014852if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014854else
Martin v. Löwis11437992002-04-12 09:54:03 +000014855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014857 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014858else
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014860/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014861
14862int main()
14863{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014864 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014865}
14866
Martin v. Löwis11437992002-04-12 09:54:03 +000014867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014868if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014869 ac_cv_rshift_extends_sign=yes
14870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014875fi
14876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877fi
14878
Matthias Kloseb9621712010-04-24 17:59:49 +000014879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14880$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014881if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014882then
Martin v. Löwis11437992002-04-12 09:54:03 +000014883
Matthias Kloseb9621712010-04-24 17:59:49 +000014884$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014885
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014886fi
14887
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014888# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14890$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014891if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014893else
Martin v. Löwis11437992002-04-12 09:54:03 +000014894
Matthias Kloseb9621712010-04-24 17:59:49 +000014895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014896/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014897#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014898int
14899main ()
14900{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014901
14902 FILE *f = fopen("/dev/null", "r");
14903 flockfile(f);
14904 getc_unlocked(f);
14905 funlockfile(f);
14906
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 ;
14908 return 0;
14909}
14910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014911if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014912 ac_cv_have_getc_unlocked=yes
14913else
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 ac_cv_have_getc_unlocked=no
14915fi
14916rm -f core conftest.err conftest.$ac_objext \
14917 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14921$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014922if test "$ac_cv_have_getc_unlocked" = yes
14923then
Martin v. Löwis11437992002-04-12 09:54:03 +000014924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014926
14927fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014928
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014929# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014930# save the value of LIBS so we don't actually link Python with readline
14931LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014932
Gregory P. Smith18820942008-09-07 06:24:49 +000014933# On some systems we need to link readline to a termcap compatible
14934# library. NOTE: Keep the precedence of listed libraries synchronised
14935# with setup.py.
14936py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14938$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014939for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014940 if test -z "$py_libtermcap"; then
14941 READLINE_LIBS="-lreadline"
14942 else
14943 READLINE_LIBS="-lreadline -l$py_libtermcap"
14944 fi
14945 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014947/* end confdefs.h. */
14948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949/* Override any GCC internal prototype to avoid an error.
14950 Use char because int might match the return type of a GCC
14951 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014952#ifdef __cplusplus
14953extern "C"
14954#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014955char readline ();
14956int
14957main ()
14958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014960 ;
14961 return 0;
14962}
14963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014964if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014965 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014967rm -f core conftest.err conftest.$ac_objext \
14968 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014969 if test $py_cv_lib_readline = yes; then
14970 break
14971 fi
14972done
14973# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14974#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014975if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14977$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014978else
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14980$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014983
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014984fi
14985
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014986# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014988/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989#include <readline/readline.h>
14990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014991if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014992 have_readline=yes
14993else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014994 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014995
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014996fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014997rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014998if test $have_readline = yes
14999then
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015001/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015002#include <readline/readline.h>
15003
15004_ACEOF
15005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015006 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015009
15010fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015011rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015012
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015014/* end confdefs.h. */
15015#include <readline/readline.h>
15016
15017_ACEOF
15018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015020
Matthias Kloseb9621712010-04-24 17:59:49 +000015021$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015022
15023fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015024rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015025
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015026fi
15027
Martin v. Löwis0daad592001-09-30 21:09:59 +000015028# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15030$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015031if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015033else
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015035LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039/* Override any GCC internal prototype to avoid an error.
15040 Use char because int might match the return type of a GCC
15041 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015042#ifdef __cplusplus
15043extern "C"
15044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015045char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015046int
15047main ()
15048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ;
15051 return 0;
15052}
15053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015054if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015055 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015056else
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015059rm -f core conftest.err conftest.$ac_objext \
15060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015061LIBS=$ac_check_lib_save_LIBS
15062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15064$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015065if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015066
Matthias Kloseb9621712010-04-24 17:59:49 +000015067$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015068
Martin v. Löwis0daad592001-09-30 21:09:59 +000015069fi
15070
Michael W. Hudson54241132001-12-07 15:38:26 +000015071
Thomas Wouters89d996e2007-09-08 17:39:28 +000015072# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15074$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015075if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015077else
15078 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015079LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015081/* end confdefs.h. */
15082
15083/* Override any GCC internal prototype to avoid an error.
15084 Use char because int might match the return type of a GCC
15085 builtin and then its argument prototype would still apply. */
15086#ifdef __cplusplus
15087extern "C"
15088#endif
15089char rl_completion_display_matches_hook ();
15090int
15091main ()
15092{
15093return rl_completion_display_matches_hook ();
15094 ;
15095 return 0;
15096}
15097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015098if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015099 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15100else
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015103rm -f core conftest.err conftest.$ac_objext \
15104 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015105LIBS=$ac_check_lib_save_LIBS
15106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15108$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015109if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015110
Matthias Kloseb9621712010-04-24 17:59:49 +000015111$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015112
15113fi
15114
15115
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015116# also in 4.0, but not in editline
15117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15118$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15119if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15120 $as_echo_n "(cached) " >&6
15121else
15122 ac_check_lib_save_LIBS=$LIBS
15123LIBS="-lreadline $READLINE_LIBS $LIBS"
15124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15125/* end confdefs.h. */
15126
15127/* Override any GCC internal prototype to avoid an error.
15128 Use char because int might match the return type of a GCC
15129 builtin and then its argument prototype would still apply. */
15130#ifdef __cplusplus
15131extern "C"
15132#endif
15133char rl_resize_terminal ();
15134int
15135main ()
15136{
15137return rl_resize_terminal ();
15138 ;
15139 return 0;
15140}
15141_ACEOF
15142if ac_fn_c_try_link "$LINENO"; then :
15143 ac_cv_lib_readline_rl_resize_terminal=yes
15144else
15145 ac_cv_lib_readline_rl_resize_terminal=no
15146fi
15147rm -f core conftest.err conftest.$ac_objext \
15148 conftest$ac_exeext conftest.$ac_ext
15149LIBS=$ac_check_lib_save_LIBS
15150fi
15151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15152$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15153if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15154
15155$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15156
15157fi
15158
15159
Martin v. Löwis0daad592001-09-30 21:09:59 +000015160# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15162$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015163if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015165else
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015167LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171/* Override any GCC internal prototype to avoid an error.
15172 Use char because int might match the return type of a GCC
15173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015174#ifdef __cplusplus
15175extern "C"
15176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015177char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015178int
15179main ()
15180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ;
15183 return 0;
15184}
15185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015186if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015188else
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015191rm -f core conftest.err conftest.$ac_objext \
15192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015193LIBS=$ac_check_lib_save_LIBS
15194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15196$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015197if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015200
Guido van Rossum353ae582001-07-10 16:45:32 +000015201fi
15202
Jack Jansendd19cf82001-12-06 22:36:17 +000015203
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015204# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015206/* end confdefs.h. */
15207#include <readline/readline.h>
15208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015209if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015210 have_readline=yes
15211else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015212 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015213
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015214fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015215rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015216if test $have_readline = yes
15217then
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015219/* end confdefs.h. */
15220#include <readline/readline.h>
15221
15222_ACEOF
15223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015225
Matthias Kloseb9621712010-04-24 17:59:49 +000015226$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015227
15228fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015229rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015230
15231fi
15232
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15234$as_echo_n "checking for append_history in -lreadline... " >&6; }
15235if ${ac_cv_lib_readline_append_history+:} false; then :
15236 $as_echo_n "(cached) " >&6
15237else
15238 ac_check_lib_save_LIBS=$LIBS
15239LIBS="-lreadline $READLINE_LIBS $LIBS"
15240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241/* end confdefs.h. */
15242
15243/* Override any GCC internal prototype to avoid an error.
15244 Use char because int might match the return type of a GCC
15245 builtin and then its argument prototype would still apply. */
15246#ifdef __cplusplus
15247extern "C"
15248#endif
15249char append_history ();
15250int
15251main ()
15252{
15253return append_history ();
15254 ;
15255 return 0;
15256}
15257_ACEOF
15258if ac_fn_c_try_link "$LINENO"; then :
15259 ac_cv_lib_readline_append_history=yes
15260else
15261 ac_cv_lib_readline_append_history=no
15262fi
15263rm -f core conftest.err conftest.$ac_objext \
15264 conftest$ac_exeext conftest.$ac_ext
15265LIBS=$ac_check_lib_save_LIBS
15266fi
15267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15268$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15269if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15270
15271$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15272
15273fi
15274
15275
Martin v. Löwis82bca632006-02-10 20:49:30 +000015276# End of readline checks: restore LIBS
15277LIBS=$LIBS_no_readline
15278
Matthias Kloseb9621712010-04-24 17:59:49 +000015279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15280$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015281if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015283else
Martin v. Löwis11437992002-04-12 09:54:03 +000015284
Matthias Kloseb9621712010-04-24 17:59:49 +000015285if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015286 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015287else
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015289/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015290
15291int main()
15292{
15293 int val1 = nice(1);
15294 if (val1 != -1 && val1 == nice(2))
15295 exit(0);
15296 exit(1);
15297}
15298
Martin v. Löwis11437992002-04-12 09:54:03 +000015299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015300if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015301 ac_cv_broken_nice=yes
15302else
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015307fi
15308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309fi
15310
Matthias Kloseb9621712010-04-24 17:59:49 +000015311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15312$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015313if test "$ac_cv_broken_nice" = yes
15314then
Martin v. Löwis11437992002-04-12 09:54:03 +000015315
Matthias Kloseb9621712010-04-24 17:59:49 +000015316$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015317
15318fi
15319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15321$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015322if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015326 ac_cv_broken_poll=no
15327else
Matthias Kloseb9621712010-04-24 17:59:49 +000015328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015329/* end confdefs.h. */
15330
15331#include <poll.h>
15332
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015333int main()
15334{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015335 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015336 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015337
15338 close (42);
15339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015340 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015341 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015342 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015343 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015344 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015345 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015346 return 1;
15347}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015348
15349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015350if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015351 ac_cv_broken_poll=yes
15352else
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15356 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015359fi
15360
Matthias Kloseb9621712010-04-24 17:59:49 +000015361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15362$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015363if test "$ac_cv_broken_poll" = yes
15364then
15365
Matthias Kloseb9621712010-04-24 17:59:49 +000015366$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015367
15368fi
15369
Brett Cannon43802422005-02-10 20:48:03 +000015370# 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 +000015371# (which is not required by ISO C or UNIX spec) and/or if we support
15372# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015373ac_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 +000015374#include <$ac_cv_struct_tm>
15375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376"
Victor Stinnere0be4232011-10-25 13:06:09 +020015377if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015378
15379cat >>confdefs.h <<_ACEOF
15380#define HAVE_STRUCT_TM_TM_ZONE 1
15381_ACEOF
15382
15383
15384fi
15385
15386if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015389
15390else
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15392"
Victor Stinnere0be4232011-10-25 13:06:09 +020015393if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395else
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015397fi
15398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015399cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015400#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401_ACEOF
15402
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15404$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015405if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015409/* end confdefs.h. */
15410#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411#if !HAVE_DECL_TZNAME
15412extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015413#endif
15414
15415int
15416main ()
15417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015418return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015419 ;
15420 return 0;
15421}
15422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015423if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015424 ac_cv_var_tzname=yes
15425else
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015428rm -f core conftest.err conftest.$ac_objext \
15429 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15432$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015433 if test $ac_cv_var_tzname = yes; then
15434
Matthias Kloseb9621712010-04-24 17:59:49 +000015435$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015436
15437 fi
15438fi
15439
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015440
Martin v. Löwis1d459062005-03-14 21:23:33 +000015441# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15443$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015444if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015446else
15447
Matthias Kloseb9621712010-04-24 17:59:49 +000015448if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015449 ac_cv_working_tzset=no
15450else
Matthias Kloseb9621712010-04-24 17:59:49 +000015451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015452/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015453
15454#include <stdlib.h>
15455#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015456#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015457
15458#if HAVE_TZNAME
15459extern char *tzname[];
15460#endif
15461
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015462int main()
15463{
Brett Cannon18367812003-09-19 00:59:16 +000015464 /* Note that we need to ensure that not only does tzset(3)
15465 do 'something' with localtime, but it works as documented
15466 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015467 This includes making sure that tzname is set properly if
15468 tm->tm_zone does not exist since it is the alternative way
15469 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015470
15471 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015472 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015473 */
15474
Martin v. Löwis1d459062005-03-14 21:23:33 +000015475 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015476 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15477
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015478 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015479 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015480 if (localtime(&groundhogday)->tm_hour != 0)
15481 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015482#if HAVE_TZNAME
15483 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15484 if (strcmp(tzname[0], "UTC") ||
15485 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15486 exit(1);
15487#endif
Brett Cannon18367812003-09-19 00:59:16 +000015488
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015489 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015490 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015491 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015492 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015493#if HAVE_TZNAME
15494 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15495 exit(1);
15496#endif
Brett Cannon18367812003-09-19 00:59:16 +000015497
15498 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15499 tzset();
15500 if (localtime(&groundhogday)->tm_hour != 11)
15501 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015502#if HAVE_TZNAME
15503 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15504 exit(1);
15505#endif
15506
15507#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015508 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15509 exit(1);
15510 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15511 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015512#endif
Brett Cannon18367812003-09-19 00:59:16 +000015513
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015514 exit(0);
15515}
15516
15517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015518if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015519 ac_cv_working_tzset=yes
15520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015525fi
15526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015527fi
15528
Matthias Kloseb9621712010-04-24 17:59:49 +000015529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15530$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015531if test "$ac_cv_working_tzset" = yes
15532then
15533
Matthias Kloseb9621712010-04-24 17:59:49 +000015534$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015535
15536fi
15537
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015538# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15540$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015541if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015543else
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015545/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015546#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015547int
15548main ()
15549{
15550
15551struct stat st;
15552st.st_mtim.tv_nsec = 1;
15553
15554 ;
15555 return 0;
15556}
15557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015559 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015560else
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15564fi
15565
Matthias Kloseb9621712010-04-24 17:59:49 +000015566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15567$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015568if test "$ac_cv_stat_tv_nsec" = yes
15569then
15570
Matthias Kloseb9621712010-04-24 17:59:49 +000015571$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015572
15573fi
15574
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015575# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15577$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015578if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015580else
Matthias Kloseb9621712010-04-24 17:59:49 +000015581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015582/* end confdefs.h. */
15583#include <sys/stat.h>
15584int
15585main ()
15586{
15587
15588struct stat st;
15589st.st_mtimespec.tv_nsec = 1;
15590
15591 ;
15592 return 0;
15593}
15594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015596 ac_cv_stat_tv_nsec2=yes
15597else
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15601fi
15602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15604$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015605if test "$ac_cv_stat_tv_nsec2" = yes
15606then
15607
Matthias Kloseb9621712010-04-24 17:59:49 +000015608$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015609
15610fi
15611
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015612# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015613ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015614if test "$cross_compiling" = no; then
15615 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15616fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015617
15618for ac_header in curses.h ncurses.h
15619do :
15620 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15621ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15622if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15623 cat >>confdefs.h <<_ACEOF
15624#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15625_ACEOF
15626
15627fi
15628
15629done
15630
15631
15632# On Solaris, term.h requires curses.h
15633for ac_header in term.h
15634do :
15635 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15636#ifdef HAVE_CURSES_H
15637#include <curses.h>
15638#endif
15639
15640"
15641if test "x$ac_cv_header_term_h" = xyes; then :
15642 cat >>confdefs.h <<_ACEOF
15643#define HAVE_TERM_H 1
15644_ACEOF
15645
15646fi
15647
15648done
15649
15650
Jack Jansen666b1e72001-10-31 12:11:48 +000015651# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15653$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015654if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015656else
Matthias Kloseb9621712010-04-24 17:59:49 +000015657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015658/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015659#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015660int
15661main ()
15662{
Jack Jansen666b1e72001-10-31 12:11:48 +000015663
15664 int rtn;
15665 rtn = mvwdelch(0,0,0);
15666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 ;
15668 return 0;
15669}
15670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015671if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015672 ac_cv_mvwdelch_is_expression=yes
15673else
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15677fi
15678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15680$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015681
15682if test "$ac_cv_mvwdelch_is_expression" = yes
15683then
Martin v. Löwis11437992002-04-12 09:54:03 +000015684
Matthias Kloseb9621712010-04-24 17:59:49 +000015685$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015686
15687fi
15688
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015689# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15690# structs since version 5.7. If the macro is defined as zero before including
15691# [n]curses.h, ncurses will expose fields of the structs regardless of the
15692# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15694$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015695if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015696 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015697else
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015699/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015700
15701 #define NCURSES_OPAQUE 0
15702 #include <curses.h>
15703
Martin v. Löwis11437992002-04-12 09:54:03 +000015704int
15705main ()
15706{
Jack Jansen666b1e72001-10-31 12:11:48 +000015707
15708 WINDOW *w;
15709 w->_flags = 0;
15710
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 ;
15712 return 0;
15713}
15714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015715if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015716 ac_cv_window_has_flags=yes
15717else
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15721fi
15722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15724$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015725
Jack Jansen666b1e72001-10-31 12:11:48 +000015726
15727if test "$ac_cv_window_has_flags" = yes
15728then
Martin v. Löwis11437992002-04-12 09:54:03 +000015729
Matthias Kloseb9621712010-04-24 17:59:49 +000015730$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015731
15732fi
15733
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15735$as_echo_n "checking for is_pad... " >&6; }
15736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15737/* end confdefs.h. */
15738#include <curses.h>
15739int
15740main ()
15741{
15742
15743#ifndef is_pad
15744void *x=is_pad
15745#endif
15746
15747 ;
15748 return 0;
15749}
15750_ACEOF
15751if ac_fn_c_try_compile "$LINENO"; then :
15752
15753$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15754
15755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15756$as_echo "yes" >&6; }
15757else
15758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15759$as_echo "no" >&6; }
15760
15761fi
15762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15765$as_echo_n "checking for is_term_resized... " >&6; }
15766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015767/* end confdefs.h. */
15768#include <curses.h>
15769int
15770main ()
15771{
15772void *x=is_term_resized
15773 ;
15774 return 0;
15775}
15776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015778
Matthias Kloseb9621712010-04-24 17:59:49 +000015779$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015780
Matthias Kloseb159a552010-04-25 21:00:44 +000015781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015782$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015783else
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15785$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015786
15787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15789
Matthias Kloseb9621712010-04-24 17:59:49 +000015790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15791$as_echo_n "checking for resize_term... " >&6; }
15792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015793/* end confdefs.h. */
15794#include <curses.h>
15795int
15796main ()
15797{
15798void *x=resize_term
15799 ;
15800 return 0;
15801}
15802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015803if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015804
Matthias Kloseb9621712010-04-24 17:59:49 +000015805$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015806
Matthias Kloseb159a552010-04-25 21:00:44 +000015807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015808$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015809else
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15811$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015812
15813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15815
Matthias Kloseb9621712010-04-24 17:59:49 +000015816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15817$as_echo_n "checking for resizeterm... " >&6; }
15818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015819/* end confdefs.h. */
15820#include <curses.h>
15821int
15822main ()
15823{
15824void *x=resizeterm
15825 ;
15826 return 0;
15827}
15828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015829if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015832
Matthias Kloseb159a552010-04-25 21:00:44 +000015833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015834$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015835else
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15837$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015838
15839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015841
15842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15843$as_echo_n "checking for immedok... " >&6; }
15844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15845/* end confdefs.h. */
15846#include <curses.h>
15847int
15848main ()
15849{
15850
15851#ifndef immedok
15852void *x=immedok
15853#endif
15854
15855 ;
15856 return 0;
15857}
15858_ACEOF
15859if ac_fn_c_try_compile "$LINENO"; then :
15860
15861$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15862
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15864$as_echo "yes" >&6; }
15865else
15866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15867$as_echo "no" >&6; }
15868
15869fi
15870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15871
15872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15873$as_echo_n "checking for syncok... " >&6; }
15874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15875/* end confdefs.h. */
15876#include <curses.h>
15877int
15878main ()
15879{
15880
15881#ifndef syncok
15882void *x=syncok
15883#endif
15884
15885 ;
15886 return 0;
15887}
15888_ACEOF
15889if ac_fn_c_try_compile "$LINENO"; then :
15890
15891$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15892
15893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15894$as_echo "yes" >&6; }
15895else
15896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15897$as_echo "no" >&6; }
15898
15899fi
15900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15901
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15903$as_echo_n "checking for wchgat... " >&6; }
15904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15905/* end confdefs.h. */
15906#include <curses.h>
15907int
15908main ()
15909{
15910
15911#ifndef wchgat
15912void *x=wchgat
15913#endif
15914
15915 ;
15916 return 0;
15917}
15918_ACEOF
15919if ac_fn_c_try_compile "$LINENO"; then :
15920
15921$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15922
15923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15924$as_echo "yes" >&6; }
15925else
15926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15927$as_echo "no" >&6; }
15928
15929fi
15930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15931
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15933$as_echo_n "checking for filter... " >&6; }
15934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15935/* end confdefs.h. */
15936#include <curses.h>
15937int
15938main ()
15939{
15940
15941#ifndef filter
15942void *x=filter
15943#endif
15944
15945 ;
15946 return 0;
15947}
15948_ACEOF
15949if ac_fn_c_try_compile "$LINENO"; then :
15950
15951$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15952
15953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15954$as_echo "yes" >&6; }
15955else
15956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15957$as_echo "no" >&6; }
15958
15959fi
15960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15961
15962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15963$as_echo_n "checking for has_key... " >&6; }
15964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15965/* end confdefs.h. */
15966#include <curses.h>
15967int
15968main ()
15969{
15970
15971#ifndef has_key
15972void *x=has_key
15973#endif
15974
15975 ;
15976 return 0;
15977}
15978_ACEOF
15979if ac_fn_c_try_compile "$LINENO"; then :
15980
15981$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15982
15983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15984$as_echo "yes" >&6; }
15985else
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15987$as_echo "no" >&6; }
15988
15989fi
15990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15991
15992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15993$as_echo_n "checking for typeahead... " >&6; }
15994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15995/* end confdefs.h. */
15996#include <curses.h>
15997int
15998main ()
15999{
16000
16001#ifndef typeahead
16002void *x=typeahead
16003#endif
16004
16005 ;
16006 return 0;
16007}
16008_ACEOF
16009if ac_fn_c_try_compile "$LINENO"; then :
16010
16011$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16012
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16014$as_echo "yes" >&6; }
16015else
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16017$as_echo "no" >&6; }
16018
16019fi
16020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16021
16022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16023$as_echo_n "checking for use_env... " >&6; }
16024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16025/* end confdefs.h. */
16026#include <curses.h>
16027int
16028main ()
16029{
16030
16031#ifndef use_env
16032void *x=use_env
16033#endif
16034
16035 ;
16036 return 0;
16037}
16038_ACEOF
16039if ac_fn_c_try_compile "$LINENO"; then :
16040
16041$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16042
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16044$as_echo "yes" >&6; }
16045else
16046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16047$as_echo "no" >&6; }
16048
16049fi
16050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016051# last curses configure check
16052CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016053
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16055$as_echo "$as_me: checking for device files" >&6;}
16056
16057if test "x$cross_compiling" = xyes; then
16058 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16060$as_echo_n "checking for /dev/ptmx... " >&6; }
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16062$as_echo "not set" >&6; }
16063 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16064 fi
16065 if test "${ac_cv_file__dev_ptc+set}" != set; then
16066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16067$as_echo_n "checking for /dev/ptc... " >&6; }
16068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16069$as_echo "not set" >&6; }
16070 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16071 fi
16072fi
16073
Matthias Kloseb9621712010-04-24 17:59:49 +000016074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16075$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016076if ${ac_cv_file__dev_ptmx+:} false; then :
16077 $as_echo_n "(cached) " >&6
16078else
16079 test "$cross_compiling" = yes &&
16080 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16081if test -r "/dev/ptmx"; then
16082 ac_cv_file__dev_ptmx=yes
16083else
16084 ac_cv_file__dev_ptmx=no
16085fi
16086fi
16087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16088$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16089if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016090
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016091fi
16092
16093if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016094
Matthias Kloseb9621712010-04-24 17:59:49 +000016095$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016096
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16099$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016100if ${ac_cv_file__dev_ptc+:} false; then :
16101 $as_echo_n "(cached) " >&6
16102else
16103 test "$cross_compiling" = yes &&
16104 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16105if test -r "/dev/ptc"; then
16106 ac_cv_file__dev_ptc=yes
16107else
16108 ac_cv_file__dev_ptc=no
16109fi
16110fi
16111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16112$as_echo "$ac_cv_file__dev_ptc" >&6; }
16113if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016114
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016115fi
16116
16117if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016118
Matthias Kloseb9621712010-04-24 17:59:49 +000016119$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016120
Neal Norwitz865400f2003-03-21 01:42:58 +000016121fi
16122
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016123if test $ac_sys_system = Darwin
16124then
16125 LIBS="$LIBS -framework CoreFoundation"
16126fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016127
Matthias Kloseb9621712010-04-24 17:59:49 +000016128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16129$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016130if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016131 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016132else
Matthias Kloseb9621712010-04-24 17:59:49 +000016133 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016134 ac_cv_have_size_t_format="cross -- assuming yes"
16135
Thomas Wouters477c8d52006-05-27 19:21:47 +000016136else
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016138/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016139
Thomas Wouters477c8d52006-05-27 19:21:47 +000016140#include <stdio.h>
16141#include <stddef.h>
16142#include <string.h>
16143
Christian Heimes2c181612007-12-17 20:04:13 +000016144#ifdef HAVE_SYS_TYPES_H
16145#include <sys/types.h>
16146#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016147
16148#ifdef HAVE_SSIZE_T
16149typedef ssize_t Py_ssize_t;
16150#elif SIZEOF_VOID_P == SIZEOF_LONG
16151typedef long Py_ssize_t;
16152#else
16153typedef int Py_ssize_t;
16154#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016155
Christian Heimes2c181612007-12-17 20:04:13 +000016156int main()
16157{
16158 char buffer[256];
16159
Thomas Wouters477c8d52006-05-27 19:21:47 +000016160 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16161 return 1;
16162
Thomas Wouters89f507f2006-12-13 04:49:30 +000016163 if (strcmp(buffer, "123"))
16164 return 1;
16165
16166 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16167 return 1;
16168
16169 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016170 return 1;
16171
16172 return 0;
16173}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016174
Thomas Wouters477c8d52006-05-27 19:21:47 +000016175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016176if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016177 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016178else
Matthias Kloseb9621712010-04-24 17:59:49 +000016179 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16182 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016183fi
16184
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16187$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016188if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016189
Matthias Kloseb9621712010-04-24 17:59:49 +000016190$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016191
16192fi
16193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016195#ifdef HAVE_SYS_TYPES_H
16196#include <sys/types.h>
16197#endif
16198#ifdef HAVE_SYS_SOCKET_H
16199#include <sys/socket.h>
16200#endif
16201
Matthias Kloseb9621712010-04-24 17:59:49 +000016202"
Victor Stinnere0be4232011-10-25 13:06:09 +020016203if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016204
Martin v. Löwis11437992002-04-12 09:54:03 +000016205else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016206
Matthias Kloseb9621712010-04-24 17:59:49 +000016207$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016208
16209fi
16210
Michael W. Hudson54241132001-12-07 15:38:26 +000016211
Matthias Kloseb9621712010-04-24 17:59:49 +000016212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16213$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016214if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016215 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016216else
Matthias Kloseb9621712010-04-24 17:59:49 +000016217 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016218 ac_cv_broken_mbstowcs=no
16219else
Matthias Kloseb9621712010-04-24 17:59:49 +000016220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016221/* end confdefs.h. */
16222
Stefan Krah19c21392012-11-22 23:47:32 +010016223#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016224#include<stdlib.h>
16225int main() {
16226 size_t len = -1;
16227 const char *str = "text";
16228 len = mbstowcs(NULL, str, 0);
16229 return (len != 4);
16230}
16231
16232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016233if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016234 ac_cv_broken_mbstowcs=no
16235else
Matthias Kloseb9621712010-04-24 17:59:49 +000016236 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16239 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016240fi
16241
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016242fi
16243
Matthias Kloseb9621712010-04-24 17:59:49 +000016244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16245$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016246if test "$ac_cv_broken_mbstowcs" = yes
16247then
16248
Matthias Kloseb9621712010-04-24 17:59:49 +000016249$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016250
16251fi
16252
Antoine Pitroub52ec782009-01-25 16:34:23 +000016253# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16255$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016256
16257# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016258if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016259 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016260if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016261then
16262
Matthias Kloseb9621712010-04-24 17:59:49 +000016263$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016264
Matthias Kloseb9621712010-04-24 17:59:49 +000016265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16266$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016267fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016268if test "$withval" = no
16269then
16270
16271$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16272
Matthias Kloseb9621712010-04-24 17:59:49 +000016273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16274$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016275fi
16276
Antoine Pitrou042b1282010-08-13 21:15:58 +000016277else
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16279$as_echo "no value specified" >&6; }
16280fi
16281
Antoine Pitroub52ec782009-01-25 16:34:23 +000016282
Matthias Kloseb17289e2012-03-15 19:51:34 +010016283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16284$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16285if ${ac_cv_computed_gotos+:} false; then :
16286 $as_echo_n "(cached) " >&6
16287else
16288 if test "$cross_compiling" = yes; then :
16289 if test "${with_computed_gotos+set}" = set; then
16290 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16291 else
16292 ac_cv_computed_gotos=no
16293 fi
16294else
16295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16296/* end confdefs.h. */
16297
16298int main(int argc, char **argv)
16299{
16300 static void *targets[1] = { &&LABEL1 };
16301 goto LABEL2;
16302LABEL1:
16303 return 0;
16304LABEL2:
16305 goto *targets[0];
16306 return 1;
16307}
16308
16309_ACEOF
16310if ac_fn_c_try_run "$LINENO"; then :
16311 ac_cv_computed_gotos=yes
16312else
16313 ac_cv_computed_gotos=no
16314fi
16315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16316 conftest.$ac_objext conftest.beam conftest.$ac_ext
16317fi
16318
16319fi
16320
16321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16322$as_echo "$ac_cv_computed_gotos" >&6; }
16323case "$ac_cv_computed_gotos" in yes*)
16324
16325$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16326
16327esac
16328
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016329case $ac_sys_system in
16330AIX*)
16331
16332$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16333 ;;
16334esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016335
Michael W. Hudson54241132001-12-07 15:38:26 +000016336
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016337
16338
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016339for h in `(cd $srcdir;echo Python/thread_*.h)`
16340do
16341 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16342done
16343
Michael W. Hudson54241132001-12-07 15:38:26 +000016344
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016345SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16347$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016348for dir in $SRCDIRS; do
16349 if test ! -d $dir; then
16350 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016351 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016352done
Matthias Kloseb9621712010-04-24 17:59:49 +000016353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16354$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016355
Stefan Krah1919b7e2012-03-21 18:25:23 +010016356# Availability of -O2:
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16358$as_echo_n "checking for -O2... " >&6; }
16359saved_cflags="$CFLAGS"
16360CFLAGS="-O2"
16361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16362/* end confdefs.h. */
16363
16364int
16365main ()
16366{
16367
16368
16369 ;
16370 return 0;
16371}
16372_ACEOF
16373if ac_fn_c_try_compile "$LINENO"; then :
16374 have_O2=yes
16375else
16376 have_O2=no
16377fi
16378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16380$as_echo "$have_O2" >&6; }
16381CFLAGS="$saved_cflags"
16382
16383# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16384# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16386$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16387saved_cflags="$CFLAGS"
16388CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16389if test "$have_O2" = no; then
16390 CFLAGS=""
16391fi
16392if test "$cross_compiling" = yes; then :
16393 have_glibc_memmove_bug=undefined
16394else
16395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16396/* end confdefs.h. */
16397
16398#include <stdio.h>
16399#include <stdlib.h>
16400#include <string.h>
16401void foo(void *p, void *q) { memmove(p, q, 19); }
16402int main() {
16403 char a[32] = "123456789000000000";
16404 foo(&a[9], a);
16405 if (strcmp(a, "123456789123456789000000000") != 0)
16406 return 1;
16407 foo(a, &a[9]);
16408 if (strcmp(a, "123456789000000000") != 0)
16409 return 1;
16410 return 0;
16411}
16412
16413_ACEOF
16414if ac_fn_c_try_run "$LINENO"; then :
16415 have_glibc_memmove_bug=no
16416else
16417 have_glibc_memmove_bug=yes
16418fi
16419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16420 conftest.$ac_objext conftest.beam conftest.$ac_ext
16421fi
16422
16423CFLAGS="$saved_cflags"
16424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16425$as_echo "$have_glibc_memmove_bug" >&6; }
16426if test "$have_glibc_memmove_bug" = yes; then
16427
16428$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16429
16430fi
16431
16432if test "$have_gcc_asm_for_x87" = yes; then
16433 # Some versions of gcc miscompile inline asm:
16434 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16435 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16436 case $CC in
16437 *gcc*)
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16439$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16440 saved_cflags="$CFLAGS"
16441 CFLAGS="-O2"
16442 if test "$cross_compiling" = yes; then :
16443 have_ipa_pure_const_bug=undefined
16444else
16445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16446/* end confdefs.h. */
16447
16448 __attribute__((noinline)) int
16449 foo(int *p) {
16450 int r;
16451 asm ( "movl \$6, (%1)\n\t"
16452 "xorl %0, %0\n\t"
16453 : "=r" (r) : "r" (p) : "memory"
16454 );
16455 return r;
16456 }
16457 int main() {
16458 int p = 8;
16459 if ((foo(&p) ? : p) != 6)
16460 return 1;
16461 return 0;
16462 }
16463
16464_ACEOF
16465if ac_fn_c_try_run "$LINENO"; then :
16466 have_ipa_pure_const_bug=no
16467else
16468 have_ipa_pure_const_bug=yes
16469fi
16470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16471 conftest.$ac_objext conftest.beam conftest.$ac_ext
16472fi
16473
16474 CFLAGS="$saved_cflags"
16475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16476$as_echo "$have_ipa_pure_const_bug" >&6; }
16477 if test "$have_ipa_pure_const_bug" = yes; then
16478
16479$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16480
16481 fi
16482 ;;
16483 esac
16484fi
16485
Victor Stinner4f5366e2015-01-09 02:13:19 +010016486# Check for stdatomic.h
16487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16488$as_echo_n "checking for stdatomic.h... " >&6; }
16489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16490/* end confdefs.h. */
16491
16492
16493 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016494 atomic_int value = ATOMIC_VAR_INIT(1);
16495 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016496 int main() {
16497 int loaded_value = atomic_load(&value);
16498 return 0;
16499 }
16500
16501
16502_ACEOF
16503if ac_fn_c_try_link "$LINENO"; then :
16504 have_stdatomic_h=yes
16505else
16506 have_stdatomic_h=no
16507fi
16508rm -f core conftest.err conftest.$ac_objext \
16509 conftest$ac_exeext conftest.$ac_ext
16510
16511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16512$as_echo "$have_stdatomic_h" >&6; }
16513
16514if test "$have_stdatomic_h" = yes; then
16515
16516$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16517
16518fi
16519
16520# Check for GCC >= 4.7 __atomic builtins
16521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16522$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16524/* end confdefs.h. */
16525
16526
16527 volatile int val = 1;
16528 int main() {
16529 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16530 return 0;
16531 }
16532
16533
16534_ACEOF
16535if ac_fn_c_try_link "$LINENO"; then :
16536 have_builtin_atomic=yes
16537else
16538 have_builtin_atomic=no
16539fi
16540rm -f core conftest.err conftest.$ac_objext \
16541 conftest$ac_exeext conftest.$ac_ext
16542
16543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16544$as_echo "$have_builtin_atomic" >&6; }
16545
16546if test "$have_builtin_atomic" = yes; then
16547
16548$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16549
16550fi
16551
Ned Deily322f5ba2013-11-21 23:01:59 -080016552# ensurepip option
16553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16554$as_echo_n "checking for ensurepip... " >&6; }
16555
16556# Check whether --with-ensurepip was given.
16557if test "${with_ensurepip+set}" = set; then :
16558 withval=$with_ensurepip;
16559else
16560 with_ensurepip=upgrade
16561fi
16562
16563case $with_ensurepip in #(
16564 yes|upgrade) :
16565 ENSUREPIP=upgrade ;; #(
16566 install) :
16567 ENSUREPIP=install ;; #(
16568 no) :
16569 ENSUREPIP=no ;; #(
16570 *) :
16571 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16572esac
16573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16574$as_echo "$ENSUREPIP" >&6; }
16575
16576
Victor Stinner35a97c02015-03-08 02:59:09 +010016577# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16579$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16581/* end confdefs.h. */
16582
16583
16584 #include <dirent.h>
16585
16586 int main() {
16587 struct dirent entry;
16588 return entry.d_type == DT_UNKNOWN;
16589 }
16590
16591
16592_ACEOF
16593if ac_fn_c_try_link "$LINENO"; then :
16594 have_dirent_d_type=yes
16595else
16596 have_dirent_d_type=no
16597fi
16598rm -f core conftest.err conftest.$ac_objext \
16599 conftest$ac_exeext conftest.$ac_ext
16600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16601$as_echo "$have_dirent_d_type" >&6; }
16602
16603if test "$have_dirent_d_type" = yes; then
16604
16605$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16606
16607fi
16608
Victor Stinner9eb57c52015-03-19 22:21:49 +010016609# check if the Linux getrandom() syscall is available
16610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16611$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16613/* end confdefs.h. */
16614
16615
Victor Stinner1b80b242016-04-12 22:34:58 +020016616 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016617 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016618 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016619
16620 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016621 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016622 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016623 const int flags = GRND_NONBLOCK;
16624 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016625 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016626 return 0;
16627 }
16628
16629
16630_ACEOF
16631if ac_fn_c_try_link "$LINENO"; then :
16632 have_getrandom_syscall=yes
16633else
16634 have_getrandom_syscall=no
16635fi
16636rm -f core conftest.err conftest.$ac_objext \
16637 conftest$ac_exeext conftest.$ac_ext
16638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16639$as_echo "$have_getrandom_syscall" >&6; }
16640
16641if test "$have_getrandom_syscall" = yes; then
16642
16643$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16644
16645fi
16646
Victor Stinner3abf44e2015-09-18 15:38:37 +020016647# check if the getrandom() function is available
16648# the test was written for the Solaris function of <sys/random.h>
16649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16650$as_echo_n "checking for the getrandom() function... " >&6; }
16651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16652/* end confdefs.h. */
16653
16654
16655 #include <sys/random.h>
16656
16657 int main() {
16658 char buffer[1];
16659 const size_t buflen = sizeof(buffer);
16660 const int flags = 0;
16661 /* ignore the result, Python checks for ENOSYS at runtime */
16662 (void)getrandom(buffer, buflen, flags);
16663 return 0;
16664 }
16665
16666
16667_ACEOF
16668if ac_fn_c_try_link "$LINENO"; then :
16669 have_getrandom=yes
16670else
16671 have_getrandom=no
16672fi
16673rm -f core conftest.err conftest.$ac_objext \
16674 conftest$ac_exeext conftest.$ac_ext
16675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16676$as_echo "$have_getrandom" >&6; }
16677
16678if test "$have_getrandom" = yes; then
16679
16680$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16681
16682fi
16683
Guido van Rossum627b2d71993-12-24 10:39:16 +000016684# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016685ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016686
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016687ac_config_files="$ac_config_files Modules/ld_so_aix"
16688
Martin v. Löwis11437992002-04-12 09:54:03 +000016689cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016690# This file is a shell script that caches the results of configure
16691# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016692# scripts and configure runs, see configure's option --config-cache.
16693# It is not useful on other systems. If it contains results you don't
16694# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016695#
Martin v. Löwis11437992002-04-12 09:54:03 +000016696# config.status only pays attention to the cache file if you give it
16697# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016698#
Skip Montanaro6dead952003-09-25 14:50:04 +000016699# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016700# loading this file, other *unset* `ac_cv_foo' will be assigned the
16701# following values.
16702
16703_ACEOF
16704
Guido van Rossumf78abae1997-01-21 22:02:36 +000016705# The following way of writing the cache mishandles newlines in values,
16706# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016708# Ultrix sh set writes to stderr and can't be redirected directly,
16709# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710(
16711 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16712 eval ac_val=\$$ac_var
16713 case $ac_val in #(
16714 *${as_nl}*)
16715 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016716 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718 esac
16719 case $ac_var in #(
16720 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016721 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16722 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723 esac ;;
16724 esac
16725 done
16726
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16729 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016730 # `set' does not quote correctly, so add quotes: double-quote
16731 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016733 "s/'/'\\\\''/g;
16734 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016735 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016736 *)
16737 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016740 esac |
16741 sort
16742) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016743 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16748 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16750 :end' >>confcache
16751if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16752 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016753 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016754 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16755$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016756 if test ! -f "$cache_file" || test -h "$cache_file"; then
16757 cat confcache >"$cache_file"
16758 else
16759 case $cache_file in #(
16760 */* | ?:*)
16761 mv -f confcache "$cache_file"$$ &&
16762 mv -f "$cache_file"$$ "$cache_file" ;; #(
16763 *)
16764 mv -f confcache "$cache_file" ;;
16765 esac
16766 fi
16767 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016768 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016769 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16770$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016771 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016772fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016773rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016774
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016775test "x$prefix" = xNONE && prefix=$ac_default_prefix
16776# Let make expand exec_prefix.
16777test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016779DEFS=-DHAVE_CONFIG_H
16780
Skip Montanaro6dead952003-09-25 14:50:04 +000016781ac_libobjs=
16782ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016783U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016784for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16785 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016787 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16789 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016790 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16791 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016792done
16793LIBOBJS=$ac_libobjs
16794
16795LTLIBOBJS=$ac_ltlibobjs
16796
16797
Martin v. Löwis11437992002-04-12 09:54:03 +000016798
Matthias Kloseb9621712010-04-24 17:59:49 +000016799
Victor Stinnere0be4232011-10-25 13:06:09 +020016800: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016801ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016802ac_clean_files_save=$ac_clean_files
16803ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016804{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16805$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16806as_write_fail=0
16807cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016808#! $SHELL
16809# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016810# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016811# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016812# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016813
Martin v. Löwis11437992002-04-12 09:54:03 +000016814debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016815ac_cs_recheck=false
16816ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016817
Matthias Kloseb9621712010-04-24 17:59:49 +000016818SHELL=\${CONFIG_SHELL-$SHELL}
16819export SHELL
16820_ASEOF
16821cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16822## -------------------- ##
16823## M4sh Initialization. ##
16824## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016826# Be more Bourne compatible
16827DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016828if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016829 emulate sh
16830 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016831 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016832 # is contrary to our usage. Disable this feature.
16833 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016835else
Matthias Kloseb9621712010-04-24 17:59:49 +000016836 case `(set -o) 2>/dev/null` in #(
16837 *posix*) :
16838 set -o posix ;; #(
16839 *) :
16840 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016841esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016842fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016843
16844
Matthias Kloseb9621712010-04-24 17:59:49 +000016845as_nl='
16846'
16847export as_nl
16848# Printing a long string crashes Solaris 7 /usr/bin/printf.
16849as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16850as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16851as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16852# Prefer a ksh shell builtin over an external printf program on Solaris,
16853# but without wasting forks for bash or zsh.
16854if test -z "$BASH_VERSION$ZSH_VERSION" \
16855 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16856 as_echo='print -r --'
16857 as_echo_n='print -rn --'
16858elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16859 as_echo='printf %s\n'
16860 as_echo_n='printf %s'
16861else
16862 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16863 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16864 as_echo_n='/usr/ucb/echo -n'
16865 else
16866 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16867 as_echo_n_body='eval
16868 arg=$1;
16869 case $arg in #(
16870 *"$as_nl"*)
16871 expr "X$arg" : "X\\(.*\\)$as_nl";
16872 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16873 esac;
16874 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16875 '
16876 export as_echo_n_body
16877 as_echo_n='sh -c $as_echo_n_body as_echo'
16878 fi
16879 export as_echo_body
16880 as_echo='sh -c $as_echo_body as_echo'
16881fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016882
16883# The user is always right.
16884if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016885 PATH_SEPARATOR=:
16886 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16887 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16888 PATH_SEPARATOR=';'
16889 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016892
16893# IFS
16894# We need space, tab and new line, in precisely that order. Quoting is
16895# there to prevent editors from complaining about space-tab.
16896# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16897# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898IFS=" "" $as_nl"
16899
16900# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016901as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016902case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903 *[\\/]* ) as_myself=$0 ;;
16904 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016905for as_dir in $PATH
16906do
16907 IFS=$as_save_IFS
16908 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016909 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16910 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016913 ;;
16914esac
16915# We did not find ourselves, most probably we were run as `sh COMMAND'
16916# in which case we are not to be found in the path.
16917if test "x$as_myself" = x; then
16918 as_myself=$0
16919fi
16920if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016921 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16922 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923fi
16924
Matthias Kloseb9621712010-04-24 17:59:49 +000016925# Unset variables that we do not need and which cause bugs (e.g. in
16926# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16927# suppresses any "Segmentation fault" message there. '((' could
16928# trigger a bug in pdksh 5.2.14.
16929for as_var in BASH_ENV ENV MAIL MAILPATH
16930do eval test x\${$as_var+set} = xset \
16931 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932done
16933PS1='$ '
16934PS2='> '
16935PS4='+ '
16936
16937# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016938LC_ALL=C
16939export LC_ALL
16940LANGUAGE=C
16941export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016942
Matthias Kloseb9621712010-04-24 17:59:49 +000016943# CDPATH.
16944(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16945
16946
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016947# as_fn_error STATUS ERROR [LINENO LOG_FD]
16948# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016949# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16950# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016951# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016952as_fn_error ()
16953{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016954 as_status=$1; test $as_status -eq 0 && as_status=1
16955 if test "$4"; then
16956 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16957 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016958 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016959 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016960 as_fn_exit $as_status
16961} # as_fn_error
16962
16963
16964# as_fn_set_status STATUS
16965# -----------------------
16966# Set $? to STATUS, without forking.
16967as_fn_set_status ()
16968{
16969 return $1
16970} # as_fn_set_status
16971
16972# as_fn_exit STATUS
16973# -----------------
16974# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16975as_fn_exit ()
16976{
16977 set +e
16978 as_fn_set_status $1
16979 exit $1
16980} # as_fn_exit
16981
16982# as_fn_unset VAR
16983# ---------------
16984# Portably unset VAR.
16985as_fn_unset ()
16986{
16987 { eval $1=; unset $1;}
16988}
16989as_unset=as_fn_unset
16990# as_fn_append VAR VALUE
16991# ----------------------
16992# Append the text in VALUE to the end of the definition contained in VAR. Take
16993# advantage of any shell optimizations that allow amortized linear growth over
16994# repeated appends, instead of the typical quadratic growth present in naive
16995# implementations.
16996if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16997 eval 'as_fn_append ()
16998 {
16999 eval $1+=\$2
17000 }'
17001else
17002 as_fn_append ()
17003 {
17004 eval $1=\$$1\$2
17005 }
17006fi # as_fn_append
17007
17008# as_fn_arith ARG...
17009# ------------------
17010# Perform arithmetic evaluation on the ARGs, and store the result in the
17011# global $as_val. Take advantage of shells that can avoid forks. The arguments
17012# must be portable across $(()) and expr.
17013if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17014 eval 'as_fn_arith ()
17015 {
17016 as_val=$(( $* ))
17017 }'
17018else
17019 as_fn_arith ()
17020 {
17021 as_val=`expr "$@" || test $? -eq 1`
17022 }
17023fi # as_fn_arith
17024
17025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026if expr a : '\(a\)' >/dev/null 2>&1 &&
17027 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17028 as_expr=expr
17029else
17030 as_expr=false
17031fi
17032
17033if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17034 as_basename=basename
17035else
17036 as_basename=false
17037fi
17038
Matthias Kloseb9621712010-04-24 17:59:49 +000017039if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17040 as_dirname=dirname
17041else
17042 as_dirname=false
17043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045as_me=`$as_basename -- "$0" ||
17046$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17047 X"$0" : 'X\(//\)$' \| \
17048 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017049$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050 sed '/^.*\/\([^/][^/]*\)\/*$/{
17051 s//\1/
17052 q
17053 }
17054 /^X\/\(\/\/\)$/{
17055 s//\1/
17056 q
17057 }
17058 /^X\/\(\/\).*/{
17059 s//\1/
17060 q
17061 }
17062 s/.*/./; q'`
17063
Matthias Kloseb9621712010-04-24 17:59:49 +000017064# Avoid depending upon Character Ranges.
17065as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17066as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17067as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17068as_cr_digits='0123456789'
17069as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017070
17071ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017072case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017074 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017076 xy) ECHO_C='\c';;
17077 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17078 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079 esac;;
17080*)
17081 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017083
Martin v. Löwis11437992002-04-12 09:54:03 +000017084rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085if test -d conf$$.dir; then
17086 rm -f conf$$.dir/conf$$.file
17087else
17088 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017089 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017091if (echo >conf$$.file) 2>/dev/null; then
17092 if ln -s conf$$.file conf$$ 2>/dev/null; then
17093 as_ln_s='ln -s'
17094 # ... but there are two gotchas:
17095 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17096 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017097 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017098 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017099 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017100 elif ln conf$$.file conf$$ 2>/dev/null; then
17101 as_ln_s=ln
17102 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017103 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017104 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017105else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017106 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17109rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017110
Matthias Kloseb9621712010-04-24 17:59:49 +000017111
17112# as_fn_mkdir_p
17113# -------------
17114# Create "$as_dir" as a directory, including parents if necessary.
17115as_fn_mkdir_p ()
17116{
17117
17118 case $as_dir in #(
17119 -*) as_dir=./$as_dir;;
17120 esac
17121 test -d "$as_dir" || eval $as_mkdir_p || {
17122 as_dirs=
17123 while :; do
17124 case $as_dir in #(
17125 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17126 *) as_qdir=$as_dir;;
17127 esac
17128 as_dirs="'$as_qdir' $as_dirs"
17129 as_dir=`$as_dirname -- "$as_dir" ||
17130$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17131 X"$as_dir" : 'X\(//\)[^/]' \| \
17132 X"$as_dir" : 'X\(//\)$' \| \
17133 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17134$as_echo X"$as_dir" |
17135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17136 s//\1/
17137 q
17138 }
17139 /^X\(\/\/\)[^/].*/{
17140 s//\1/
17141 q
17142 }
17143 /^X\(\/\/\)$/{
17144 s//\1/
17145 q
17146 }
17147 /^X\(\/\).*/{
17148 s//\1/
17149 q
17150 }
17151 s/.*/./; q'`
17152 test -d "$as_dir" && break
17153 done
17154 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017155 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017156
17157
17158} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017159if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017160 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017161else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017162 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017163 as_mkdir_p=false
17164fi
17165
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017166
17167# as_fn_executable_p FILE
17168# -----------------------
17169# Test if FILE is an executable regular file.
17170as_fn_executable_p ()
17171{
17172 test -f "$1" && test -x "$1"
17173} # as_fn_executable_p
17174as_test_x='test -x'
17175as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
17177# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017178as_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 +000017179
17180# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017181as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017182
17183
Martin v. Löwis11437992002-04-12 09:54:03 +000017184exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017185## ----------------------------------- ##
17186## Main body of $CONFIG_STATUS script. ##
17187## ----------------------------------- ##
17188_ASEOF
17189test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017190
Matthias Kloseb9621712010-04-24 17:59:49 +000017191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17192# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017193# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194# values after options handling.
17195ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017196This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017197generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017198
17199 CONFIG_FILES = $CONFIG_FILES
17200 CONFIG_HEADERS = $CONFIG_HEADERS
17201 CONFIG_LINKS = $CONFIG_LINKS
17202 CONFIG_COMMANDS = $CONFIG_COMMANDS
17203 $ $0 $@
17204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205on `(hostname || uname -n) 2>/dev/null | sed 1q`
17206"
17207
Martin v. Löwis11437992002-04-12 09:54:03 +000017208_ACEOF
17209
Matthias Kloseb9621712010-04-24 17:59:49 +000017210case $ac_config_files in *"
17211"*) set x $ac_config_files; shift; ac_config_files=$*;;
17212esac
17213
17214case $ac_config_headers in *"
17215"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17216esac
17217
17218
17219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017220# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017221config_files="$ac_config_files"
17222config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017225
Matthias Kloseb9621712010-04-24 17:59:49 +000017226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017227ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017228\`$as_me' instantiates files and other configuration actions
17229from templates according to the current configuration. Unless the files
17230and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017231
Matthias Kloseb9621712010-04-24 17:59:49 +000017232Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017233
17234 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017235 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017236 --config print configuration, then exit
17237 -q, --quiet, --silent
17238 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017239 -d, --debug don't remove temporary files
17240 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017241 --file=FILE[:TEMPLATE]
17242 instantiate the configuration file FILE
17243 --header=FILE[:TEMPLATE]
17244 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017245
17246Configuration files:
17247$config_files
17248
17249Configuration headers:
17250$config_headers
17251
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017252Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17256ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017257ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017258python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017259configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017260 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017261
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017262Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017263This config.status script is free software; the Free Software Foundation
17264gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265
17266ac_pwd='$ac_pwd'
17267srcdir='$srcdir'
17268INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017269MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017270test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017271_ACEOF
17272
Matthias Kloseb9621712010-04-24 17:59:49 +000017273cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17274# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017275ac_need_defaults=:
17276while test $# != 0
17277do
17278 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017279 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17281 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017282 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017283 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017284 --*=)
17285 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17286 ac_optarg=
17287 ac_shift=:
17288 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017290 ac_option=$1
17291 ac_optarg=$2
17292 ac_shift=shift
17293 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017294 esac
17295
Skip Montanaro6dead952003-09-25 14:50:04 +000017296 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017297 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017298 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17299 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017300 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017301 $as_echo "$ac_cs_version"; exit ;;
17302 --config | --confi | --conf | --con | --co | --c )
17303 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017304 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017305 debug=: ;;
17306 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017307 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017308 case $ac_optarg in
17309 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017310 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017311 esac
17312 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 ac_need_defaults=false;;
17314 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017315 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017316 case $ac_optarg in
17317 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17318 esac
17319 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017320 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 --he | --h)
17322 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017323 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017324Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017326 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017327 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17328 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17329 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017330
17331 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017332 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017333Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017334
Matthias Kloseb9621712010-04-24 17:59:49 +000017335 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017337
17338 esac
17339 shift
17340done
17341
Skip Montanaro6dead952003-09-25 14:50:04 +000017342ac_configure_extra_args=
17343
17344if $ac_cs_silent; then
17345 exec 6>/dev/null
17346 ac_configure_extra_args="$ac_configure_extra_args --silent"
17347fi
17348
17349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017351if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017352 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017353 shift
17354 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17355 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017357 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017358fi
17359
Martin v. Löwis11437992002-04-12 09:54:03 +000017360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362exec 5>>config.log
17363{
17364 echo
17365 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17366## Running $as_me. ##
17367_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017368 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017374
Matthias Kloseb9621712010-04-24 17:59:49 +000017375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376
17377# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017378for ac_config_target in $ac_config_targets
17379do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 case $ac_config_target in
17381 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17382 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17383 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017384 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17385 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017387 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017388 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017389 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390
Victor Stinnere0be4232011-10-25 13:06:09 +020017391 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 esac
17393done
17394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395
Martin v. Löwis11437992002-04-12 09:54:03 +000017396# If the user did not use the arguments to specify the items to instantiate,
17397# then the envvar interface is used. Set only those that are not.
17398# We use the long form for the default assignment because of an extremely
17399# bizarre bug on SunOS 4.1.3.
17400if $ac_need_defaults; then
17401 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17402 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17403fi
17404
Skip Montanaro6dead952003-09-25 14:50:04 +000017405# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017407# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408# Hook for its removal unless debugging.
17409# Note that there is a small window in which the directory will not be cleaned:
17410# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017411$debug ||
17412{
Victor Stinnere0be4232011-10-25 13:06:09 +020017413 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017415 : "${ac_tmp:=$tmp}"
17416 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017419}
Martin v. Löwis11437992002-04-12 09:54:03 +000017420# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017421
Martin v. Löwis11437992002-04-12 09:54:03 +000017422{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017424 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017425} ||
17426{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427 tmp=./conf$$-$RANDOM
17428 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017429} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017430ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017431
Matthias Kloseb9621712010-04-24 17:59:49 +000017432# Set up the scripts for CONFIG_FILES section.
17433# No need to generate them if there are no CONFIG_FILES.
17434# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017436
Matthias Kloseb9621712010-04-24 17:59:49 +000017437
17438ac_cr=`echo X | tr X '\015'`
17439# On cygwin, bash can eat \r inside `` if the user requested igncr.
17440# But we know of no other shell where ac_cr would be empty at this
17441# point, so we can use a bashism as a fallback.
17442if test "x$ac_cr" = x; then
17443 eval ac_cr=\$\'\\r\'
17444fi
17445ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17446if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017447 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017448else
17449 ac_cs_awk_cr=$ac_cr
17450fi
17451
Victor Stinnere0be4232011-10-25 13:06:09 +020017452echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017453_ACEOF
17454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455
Matthias Kloseb9621712010-04-24 17:59:49 +000017456{
17457 echo "cat >conf$$subs.awk <<_ACEOF" &&
17458 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17459 echo "_ACEOF"
17460} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017461 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17462ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463ac_delim='%!_!# '
17464for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017465 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017466 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467
Matthias Kloseb9621712010-04-24 17:59:49 +000017468 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17469 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470 break
17471 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017472 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017473 else
17474 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476done
Matthias Kloseb9621712010-04-24 17:59:49 +000017477rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478
Matthias Kloseb9621712010-04-24 17:59:49 +000017479cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017480cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017482sed -n '
17483h
17484s/^/S["/; s/!.*/"]=/
17485p
17486g
17487s/^[^!]*!//
17488:repl
17489t repl
17490s/'"$ac_delim"'$//
17491t delim
17492:nl
17493h
17494s/\(.\{148\}\)..*/\1/
17495t more1
17496s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17497p
17498n
17499b repl
17500:more1
17501s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17502p
17503g
17504s/.\{148\}//
17505t nl
17506:delim
17507h
17508s/\(.\{148\}\)..*/\1/
17509t more2
17510s/["\\]/\\&/g; s/^/"/; s/$/"/
17511p
17512b
17513:more2
17514s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17515p
17516g
17517s/.\{148\}//
17518t delim
17519' <conf$$subs.awk | sed '
17520/^[^""]/{
17521 N
17522 s/\n//
17523}
17524' >>$CONFIG_STATUS || ac_write_fail=1
17525rm -f conf$$subs.awk
17526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17527_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017528cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017529 for (key in S) S_is_set[key] = 1
17530 FS = ""
17531
17532}
17533{
17534 line = $ 0
17535 nfields = split(line, field, "@")
17536 substed = 0
17537 len = length(field[1])
17538 for (i = 2; i < nfields; i++) {
17539 key = field[i]
17540 keylen = length(key)
17541 if (S_is_set[key]) {
17542 value = S[key]
17543 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17544 len += length(value) + length(field[++i])
17545 substed = 1
17546 } else
17547 len += 1 + keylen
17548 }
17549
17550 print line
17551}
17552
17553_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017555cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17556if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17557 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17558else
17559 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017560fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017561 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017562_ACEOF
17563
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017564# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17565# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566# trailing colons and then remove the whole line if VPATH becomes empty
17567# (actually we leave an empty line to preserve line numbers).
17568if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017569 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17570h
17571s///
17572s/^/:/
17573s/[ ]*$/:/
17574s/:\$(srcdir):/:/g
17575s/:\${srcdir}:/:/g
17576s/:@srcdir@:/:/g
17577s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017579x
17580s/\(=[ ]*\).*/\1/
17581G
17582s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583s/^[^=]*=[ ]*$//
17584}'
17585fi
17586
Matthias Kloseb9621712010-04-24 17:59:49 +000017587cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017588fi # test -n "$CONFIG_FILES"
17589
Matthias Kloseb9621712010-04-24 17:59:49 +000017590# Set up the scripts for CONFIG_HEADERS section.
17591# No need to generate them if there are no CONFIG_HEADERS.
17592# This happens for instance with `./config.status Makefile'.
17593if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017594cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017595BEGIN {
17596_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597
Matthias Kloseb9621712010-04-24 17:59:49 +000017598# Transform confdefs.h into an awk script `defines.awk', embedded as
17599# here-document in config.status, that substitutes the proper values into
17600# config.h.in to produce config.h.
17601
17602# Create a delimiter string that does not exist in confdefs.h, to ease
17603# handling of long lines.
17604ac_delim='%!_!# '
17605for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017606 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17607 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017608 break
17609 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017610 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017611 else
17612 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17613 fi
17614done
17615
17616# For the awk script, D is an array of macro values keyed by name,
17617# likewise P contains macro parameters if any. Preserve backslash
17618# newline sequences.
17619
17620ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17621sed -n '
17622s/.\{148\}/&'"$ac_delim"'/g
17623t rset
17624:rset
17625s/^[ ]*#[ ]*define[ ][ ]*/ /
17626t def
17627d
17628:def
17629s/\\$//
17630t bsnl
17631s/["\\]/\\&/g
17632s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17633D["\1"]=" \3"/p
17634s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17635d
17636:bsnl
17637s/["\\]/\\&/g
17638s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17639D["\1"]=" \3\\\\\\n"\\/p
17640t cont
17641s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17642t cont
17643d
17644:cont
17645n
17646s/.\{148\}/&'"$ac_delim"'/g
17647t clear
17648:clear
17649s/\\$//
17650t bsnlc
17651s/["\\]/\\&/g; s/^/"/; s/$/"/p
17652d
17653:bsnlc
17654s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17655b cont
17656' <confdefs.h | sed '
17657s/'"$ac_delim"'/"\\\
17658"/g' >>$CONFIG_STATUS || ac_write_fail=1
17659
17660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17661 for (key in D) D_is_set[key] = 1
17662 FS = ""
17663}
17664/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17665 line = \$ 0
17666 split(line, arg, " ")
17667 if (arg[1] == "#") {
17668 defundef = arg[2]
17669 mac1 = arg[3]
17670 } else {
17671 defundef = substr(arg[1], 2)
17672 mac1 = arg[2]
17673 }
17674 split(mac1, mac2, "(") #)
17675 macro = mac2[1]
17676 prefix = substr(line, 1, index(line, defundef) - 1)
17677 if (D_is_set[macro]) {
17678 # Preserve the white space surrounding the "#".
17679 print prefix "define", macro P[macro] D[macro]
17680 next
17681 } else {
17682 # Replace #undef with comments. This is necessary, for example,
17683 # in the case of _POSIX_SOURCE, which is predefined and required
17684 # on some systems where configure will not decide to define it.
17685 if (defundef == "undef") {
17686 print "/*", prefix defundef, macro, "*/"
17687 next
17688 }
17689 }
17690}
17691{ print }
17692_ACAWK
17693_ACEOF
17694cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017695 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017696fi # test -n "$CONFIG_HEADERS"
17697
17698
17699eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17700shift
17701for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702do
17703 case $ac_tag in
17704 :[FHLC]) ac_mode=$ac_tag; continue;;
17705 esac
17706 case $ac_mode$ac_tag in
17707 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017708 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709 :[FH]-) ac_tag=-:-;;
17710 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17711 esac
17712 ac_save_IFS=$IFS
17713 IFS=:
17714 set x $ac_tag
17715 IFS=$ac_save_IFS
17716 shift
17717 ac_file=$1
17718 shift
17719
17720 case $ac_mode in
17721 :L) ac_source=$1;;
17722 :[FH])
17723 ac_file_inputs=
17724 for ac_f
17725 do
17726 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017727 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 *) # Look for the file first in the build tree, then in the source tree
17729 # (if the path is not absolute). The absolute path cannot be DOS-style,
17730 # because $ac_f cannot contain `:'.
17731 test -f "$ac_f" ||
17732 case $ac_f in
17733 [\\/$]*) false;;
17734 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17735 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017736 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017738 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17739 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740 done
17741
17742 # Let's still pretend it is `configure' which instantiates (i.e., don't
17743 # use $as_me), people would be surprised to read:
17744 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 configure_input='Generated from '`
17746 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17747 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748 if test x"$ac_file" != x-; then
17749 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017750 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17751$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 # Neutralize special characters interpreted by sed in replacement strings.
17754 case $configure_input in #(
17755 *\&* | *\|* | *\\* )
17756 ac_sed_conf_input=`$as_echo "$configure_input" |
17757 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17758 *) ac_sed_conf_input=$configure_input;;
17759 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760
17761 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017762 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17763 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 esac
17765 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017766 esac
17767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017769$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017770 X"$ac_file" : 'X\(//\)[^/]' \| \
17771 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017773$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17775 s//\1/
17776 q
17777 }
17778 /^X\(\/\/\)[^/].*/{
17779 s//\1/
17780 q
17781 }
17782 /^X\(\/\/\)$/{
17783 s//\1/
17784 q
17785 }
17786 /^X\(\/\).*/{
17787 s//\1/
17788 q
17789 }
17790 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017791 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017792 ac_builddir=.
17793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794case "$ac_dir" in
17795.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17796*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017797 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017799 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800 case $ac_top_builddir_sub in
17801 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17802 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17803 esac ;;
17804esac
17805ac_abs_top_builddir=$ac_pwd
17806ac_abs_builddir=$ac_pwd$ac_dir_suffix
17807# for backward compatibility:
17808ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017809
17810case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017812 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813 ac_top_srcdir=$ac_top_builddir_sub
17814 ac_abs_top_srcdir=$ac_pwd ;;
17815 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817 ac_top_srcdir=$srcdir
17818 ac_abs_top_srcdir=$srcdir ;;
17819 *) # Relative name.
17820 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17821 ac_top_srcdir=$ac_top_build_prefix$srcdir
17822 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017823esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017825
Martin v. Löwis11437992002-04-12 09:54:03 +000017826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827 case $ac_mode in
17828 :F)
17829 #
17830 # CONFIG_FILE
17831 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017832
17833 case $INSTALL in
17834 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017836 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017837 ac_MKDIR_P=$MKDIR_P
17838 case $MKDIR_P in
17839 [\\/$]* | ?:[\\/]* ) ;;
17840 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17841 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017842_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843
Matthias Kloseb9621712010-04-24 17:59:49 +000017844cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845# If the template does not know about datarootdir, expand it.
17846# FIXME: This hack should be removed a few years after 2.60.
17847ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017848ac_sed_dataroot='
17849/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850 p
17851 q
17852}
17853/@datadir@/p
17854/@docdir@/p
17855/@infodir@/p
17856/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017857/@mandir@/p'
17858case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859*datarootdir*) ac_datarootdir_seen=yes;;
17860*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17862$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017865 ac_datarootdir_hack='
17866 s&@datadir@&$datadir&g
17867 s&@docdir@&$docdir&g
17868 s&@infodir@&$infodir&g
17869 s&@localedir@&$localedir&g
17870 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017871 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017872esac
17873_ACEOF
17874
17875# Neutralize VPATH when `$srcdir' = `.'.
17876# Shell code in configure.ac might set extrasub.
17877# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017878cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17879ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017880$extrasub
17881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017882cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017883:t
17884/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017885s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017886s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017887s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888s&@srcdir@&$ac_srcdir&;t t
17889s&@abs_srcdir@&$ac_abs_srcdir&;t t
17890s&@top_srcdir@&$ac_top_srcdir&;t t
17891s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17892s&@builddir@&$ac_builddir&;t t
17893s&@abs_builddir@&$ac_abs_builddir&;t t
17894s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17895s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017896s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017898"
Victor Stinnere0be4232011-10-25 13:06:09 +020017899eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17900 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017903 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17904 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17905 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017907which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017908$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017909which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017910
Victor Stinnere0be4232011-10-25 13:06:09 +020017911 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017913 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17914 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017915 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017916 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917 ;;
17918 :H)
17919 #
17920 # CONFIG_HEADER
17921 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017922 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017923 {
17924 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017925 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17926 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017927 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017928 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017929 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17930$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017931 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017932 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017933 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017934 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017935 fi
17936 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017937 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017938 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017939 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017943
17944 esac
17945
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017946
17947 case $ac_file$ac_mode in
17948 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17949
17950 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951done # for ac_tag
17952
Guido van Rossum627b2d71993-12-24 10:39:16 +000017953
Matthias Kloseb9621712010-04-24 17:59:49 +000017954as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017955_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017956ac_clean_files=$ac_clean_files_save
17957
Matthias Kloseb9621712010-04-24 17:59:49 +000017958test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017959 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017960
Martin v. Löwis11437992002-04-12 09:54:03 +000017961
17962# configure is writing to config.log, and then calls config.status.
17963# config.status does its own redirection, appending to config.log.
17964# Unfortunately, on DOS this fails, as config.log is still kept open
17965# by configure, so config.status won't be able to write to it; its
17966# output is simply discarded. So we exec the FD to /dev/null,
17967# effectively closing config.log, so it can be properly (re)opened and
17968# appended to by config.status. When coming back to configure, we
17969# need to make the FD available again.
17970if test "$no_create" != yes; then
17971 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017972 ac_config_status_args=
17973 test "$silent" = yes &&
17974 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017975 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017976 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 exec 5>>config.log
17978 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17979 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017980 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017981fi
17982if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17984$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017985fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017986
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017987
Christian Heimes75ed8902013-11-20 01:11:18 +010017988echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017989if test ! -f Modules/Setup
17990then
17991 cp $srcdir/Modules/Setup.dist Modules/Setup
17992fi
17993
Christian Heimes75ed8902013-11-20 01:11:18 +010017994echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017995if test ! -f Modules/Setup.local
17996then
17997 echo "# Edit this file for local setup changes" >Modules/Setup.local
17998fi
17999
Christian Heimes75ed8902013-11-20 01:11:18 +010018000echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018001$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018002 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018003 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018004mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018005
18006if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18007 echo "" >&6
18008 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018009 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 +000018010 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018011 echo "" >&6
18012 echo "" >&6
18013fi
18014