blob: ab33115d56398dfd5c9b1f287ab450b98f48d350 [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
781localstatedir
782sharedstatedir
783sysconfdir
784datadir
785datarootdir
786libexecdir
787sbindir
788bindir
789program_transform_name
790prefix
791exec_prefix
792PACKAGE_URL
793PACKAGE_BUGREPORT
794PACKAGE_STRING
795PACKAGE_VERSION
796PACKAGE_TARNAME
797PACKAGE_NAME
798PATH_SEPARATOR
799SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000800ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000801ac_user_opts='
802enable_option_checking
803enable_universalsdk
804with_universal_archs
805with_framework_name
806enable_framework
807with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600808with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_cxx_main
810with_suffix
811enable_shared
812enable_profiling
813with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200814with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000815enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700816with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100817with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100818with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000819with_libs
820with_system_expat
821with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100822with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000823enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700824with_tcltk_includes
825with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000826with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000827enable_ipv6
828with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000830with_c_locale_coercion
831with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700833with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_fpectl
835with_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'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892includedir='${prefix}/include'
893oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
895infodir='${datarootdir}/info'
896htmldir='${docdir}'
897dvidir='${docdir}'
898pdfdir='${docdir}'
899psdir='${docdir}'
900libdir='${exec_prefix}/lib'
901localedir='${datarootdir}/locale'
902mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 # If the previous option needs an argument, assign it.
909 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 ac_prev=
912 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200916 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
917 *=) ac_optarg= ;;
918 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Accept the important Cygnus configure options, so we can diagnose typos.
922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_dashdash$ac_option in
924 --)
925 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 -bindir | --bindir | --bindi | --bind | --bin | --bi)
928 ac_prev=bindir ;;
929 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
932 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937 -cache-file | --cache-file | --cache-fil | --cache-fi \
938 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
939 ac_prev=cache_file ;;
940 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
941 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 cache_file=$ac_optarg ;;
943
944 --config-cache | -C)
945 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
953 | --dataroo | --dataro | --datar)
954 ac_prev=datarootdir ;;
955 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
956 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
957 datarootdir=$ac_optarg ;;
958
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200963 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt_orig=$ac_useropt
965 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966 case $ac_user_opts in
967 *"
968"enable_$ac_useropt"
969"*) ;;
970 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
971 ac_unrecognized_sep=', ';;
972 esac
973 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974
975 -docdir | --docdir | --docdi | --doc | --do)
976 ac_prev=docdir ;;
977 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
978 docdir=$ac_optarg ;;
979
980 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
981 ac_prev=dvidir ;;
982 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
983 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200989 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt_orig=$ac_useropt
991 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
992 case $ac_user_opts in
993 *"
994"enable_$ac_useropt"
995"*) ;;
996 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
997 ac_unrecognized_sep=', ';;
998 esac
999 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1002 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1003 | --exec | --exe | --ex)
1004 ac_prev=exec_prefix ;;
1005 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1006 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1007 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 # Obsolete; use --with-gas.
1012 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 -help | --help | --hel | --he | -h)
1015 ac_init_help=long ;;
1016 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1017 ac_init_help=recursive ;;
1018 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1019 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001026 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1027 ac_prev=htmldir ;;
1028 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1029 | --ht=*)
1030 htmldir=$ac_optarg ;;
1031
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032 -includedir | --includedir | --includedi | --included | --include \
1033 | --includ | --inclu | --incl | --inc)
1034 ac_prev=includedir ;;
1035 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1036 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
1039 -infodir | --infodir | --infodi | --infod | --info | --inf)
1040 ac_prev=infodir ;;
1041 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -libdir | --libdir | --libdi | --libd)
1045 ac_prev=libdir ;;
1046 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1050 | --libexe | --libex | --libe)
1051 ac_prev=libexecdir ;;
1052 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1053 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001056 -localedir | --localedir | --localedi | --localed | --locale)
1057 ac_prev=localedir ;;
1058 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1059 localedir=$ac_optarg ;;
1060
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 ac_prev=localstatedir ;;
1064 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
1068 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1069 ac_prev=mandir ;;
1070 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Obsolete; use --without-fp.
1075 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 no_create=yes ;;
1080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1082 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1083 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1086 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1087 | --oldin | --oldi | --old | --ol | --o)
1088 ac_prev=oldincludedir ;;
1089 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1090 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1091 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1095 ac_prev=prefix ;;
1096 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1100 | --program-pre | --program-pr | --program-p)
1101 ac_prev=program_prefix ;;
1102 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1103 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1107 | --program-suf | --program-su | --program-s)
1108 ac_prev=program_suffix ;;
1109 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1110 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-transform-name | --program-transform-name \
1114 | --program-transform-nam | --program-transform-na \
1115 | --program-transform-n | --program-transform- \
1116 | --program-transform | --program-transfor \
1117 | --program-transfo | --program-transf \
1118 | --program-trans | --program-tran \
1119 | --progr-tra | --program-tr | --program-t)
1120 ac_prev=program_transform_name ;;
1121 -program-transform-name=* | --program-transform-name=* \
1122 | --program-transform-nam=* | --program-transform-na=* \
1123 | --program-transform-n=* | --program-transform-=* \
1124 | --program-transform=* | --program-transfor=* \
1125 | --program-transfo=* | --program-transf=* \
1126 | --program-trans=* | --program-tran=* \
1127 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001130 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1131 ac_prev=pdfdir ;;
1132 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1133 pdfdir=$ac_optarg ;;
1134
1135 -psdir | --psdir | --psdi | --psd | --ps)
1136 ac_prev=psdir ;;
1137 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1138 psdir=$ac_optarg ;;
1139
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1141 | -silent | --silent | --silen | --sile | --sil)
1142 silent=yes ;;
1143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1145 ac_prev=sbindir ;;
1146 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1147 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149
1150 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1151 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1152 | --sharedst | --shareds | --shared | --share | --shar \
1153 | --sha | --sh)
1154 ac_prev=sharedstatedir ;;
1155 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1156 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1157 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1158 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161 -site | --site | --sit)
1162 ac_prev=site ;;
1163 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1167 ac_prev=srcdir ;;
1168 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1172 | --syscon | --sysco | --sysc | --sys | --sy)
1173 ac_prev=sysconfdir ;;
1174 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1175 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
1183 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1184 verbose=yes ;;
1185
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 -version | --version | --versio | --versi | --vers | -V)
1187 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001193 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 ac_useropt_orig=$ac_useropt
1195 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196 case $ac_user_opts in
1197 *"
1198"with_$ac_useropt"
1199"*) ;;
1200 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1201 ac_unrecognized_sep=', ';;
1202 esac
1203 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221 --x)
1222 # Obsolete; use --with-x.
1223 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
1225 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1226 | --x-incl | --x-inc | --x-in | --x-i)
1227 ac_prev=x_includes ;;
1228 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1229 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1233 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1234 ac_prev=x_libraries ;;
1235 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1236 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1240Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 ;;
1242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 *=*)
1244 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1245 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 case $ac_envvar in #(
1247 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001248 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 export $ac_envvar ;;
1252
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001253 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001258 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ;;
1260
1261 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001262done
1263
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267fi
1268
Matthias Kloseb9621712010-04-24 17:59:49 +00001269if test -n "$ac_unrecognized_opts"; then
1270 case $enable_option_checking in
1271 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1274 esac
1275fi
1276
1277# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1279 datadir sysconfdir sharedstatedir localstatedir includedir \
1280 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
xdegaye5ad7ef82017-11-23 11:13:22 +01001281 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001282do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001284 # Remove trailing slashes.
1285 case $ac_val in
1286 */ )
1287 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1288 eval $ac_var=\$ac_val;;
1289 esac
1290 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001291 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292 [\\/$]* | ?:[\\/]* ) continue;;
1293 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001295 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001296done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001297
Martin v. Löwis11437992002-04-12 09:54:03 +00001298# There might be people who depend on the old broken behavior: `$host'
1299# used to hold the argument of --host etc.
1300# FIXME: To remove some day.
1301build=$build_alias
1302host=$host_alias
1303target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# FIXME: To remove some day.
1306if test "x$host_alias" != x; then
1307 if test "x$build_alias" = x; then
1308 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001309 elif test "x$build_alias" != "x$host_alias"; then
1310 cross_compiling=yes
1311 fi
1312fi
1313
1314ac_tool_prefix=
1315test -n "$host_alias" && ac_tool_prefix=$host_alias-
1316
1317test "$silent" = yes && exec 6>/dev/null
1318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320ac_pwd=`pwd` && test -n "$ac_pwd" &&
1321ac_ls_di=`ls -di .` &&
1322ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001323 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001325 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326
1327
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328# Find the source files, if location was not specified.
1329if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001330 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001332 ac_confdir=`$as_dirname -- "$as_myself" ||
1333$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1334 X"$as_myself" : 'X\(//\)[^/]' \| \
1335 X"$as_myself" : 'X\(//\)$' \| \
1336 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1337$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\/\)[^/].*/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\/\)$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\).*/{
1351 s//\1/
1352 q
1353 }
1354 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001355 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357 srcdir=..
1358 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359else
1360 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362if test ! -r "$srcdir/$ac_unique_file"; then
1363 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001364 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1367ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001368 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369 pwd)`
1370# When building in place, set srcdir=.
1371if test "$ac_abs_confdir" = "$ac_pwd"; then
1372 srcdir=.
1373fi
1374# Remove unnecessary trailing slashes from srcdir.
1375# Double slashes in file names in object file debugging info
1376# mess up M-x gdb in Emacs.
1377case $srcdir in
1378*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1379esac
1380for ac_var in $ac_precious_vars; do
1381 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1382 eval ac_env_${ac_var}_value=\$${ac_var}
1383 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1384 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1385done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001386
Martin v. Löwis11437992002-04-12 09:54:03 +00001387#
1388# Report the --help message.
1389#
1390if test "$ac_init_help" = "long"; then
1391 # Omit some internal or obsolete options to make the list less imposing.
1392 # This message is too long to be a string in the A/UX 3.1 sh.
1393 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001394\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001395
1396Usage: $0 [OPTION]... [VAR=VALUE]...
1397
1398To assign environment variables (e.g., CC, CFLAGS...), specify them as
1399VAR=VALUE. See below for descriptions of some of the useful variables.
1400
1401Defaults for the options are specified in brackets.
1402
1403Configuration:
1404 -h, --help display this help and exit
1405 --help=short display options specific to this package
1406 --help=recursive display the short help of all the included packages
1407 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001408 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 --cache-file=FILE cache test results in FILE [disabled]
1410 -C, --config-cache alias for \`--cache-file=config.cache'
1411 -n, --no-create do not create output files
1412 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1413
Martin v. Löwis11437992002-04-12 09:54:03 +00001414Installation directories:
1415 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001416 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001418 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001419
1420By default, \`make install' will install all the files in
1421\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1422an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1423for instance \`--prefix=\$HOME'.
1424
1425For better control, use the options below.
1426
1427Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 --bindir=DIR user executables [EPREFIX/bin]
1429 --sbindir=DIR system admin executables [EPREFIX/sbin]
1430 --libexecdir=DIR program executables [EPREFIX/libexec]
1431 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1432 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1433 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1434 --libdir=DIR object code libraries [EPREFIX/lib]
1435 --includedir=DIR C header files [PREFIX/include]
1436 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1437 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1438 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1439 --infodir=DIR info documentation [DATAROOTDIR/info]
1440 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1441 --mandir=DIR man documentation [DATAROOTDIR/man]
1442 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1443 --htmldir=DIR html documentation [DOCDIR]
1444 --dvidir=DIR dvi documentation [DOCDIR]
1445 --pdfdir=DIR pdf documentation [DOCDIR]
1446 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001447_ACEOF
1448
1449 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001450
1451System types:
1452 --build=BUILD configure for building on BUILD [guessed]
1453 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001454 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456fi
1457
1458if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001459 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001460 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001461 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 cat <<\_ACEOF
1463
1464Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1467 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001468 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001469 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --enable-framework[=INSTALLDIR]
1471 Build (MacOSX|Darwin) framework
1472 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001473 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001474 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1475 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001476 --enable-loadable-sqlite-extensions
1477 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --enable-ipv6 Enable ipv6 (with ipv4) support
1479 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001480 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001482
1483Optional Packages:
1484 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1485 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001486 --with-universal-archs=ARCH
1487 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001488 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001489 --with-framework-name=FRAMEWORK
1490 specify an alternate name of the framework built
1491 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001493 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001494 --with-cxx-main=<compiler>
1495 compile main() and link python executable with C++
1496 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with-suffix=.exe set executable suffix
1498 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001499 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001500 --with-lto Enable Link Time Optimization in any build. Disabled
1501 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001502 --with-hash-algorithm=[fnv|siphash24]
1503 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001504 --with-address-sanitizer
1505 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001507 --with-system-expat build pyexpat module using an installed expat
1508 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001509 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001510 --with-system-libmpdec build _decimal module using an installed libmpdec
1511 library
Ned Deilyd819b932013-09-06 01:07:05 -07001512 --with-tcltk-includes='-I...'
1513 override search for Tcl and Tk include files
1514 --with-tcltk-libs='-L...'
1515 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001516 --with-dbmliborder=db1:db2:...
1517 order to check db backends for dbm. Valid value is a
1518 colon separated string with the backend names
1519 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with(out)-doc-strings disable/enable documentation strings
1521 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001522 --with(out)-c-locale-coercion
1523 disable/enable C locale coercion to a UTF-8 based
1524 locale
1525 --with(out)-c-locale-warning
1526 disable/enable locale compatibility warning in the C
1527 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001528 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001529 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with-fpectl enable SIGFPE catching
1531 --with-libm=STRING math library
1532 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001533 --with(out)-computed-gotos
1534 Use computed gotos in evaluation loop (enabled by
1535 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001536 --with(out)-ensurepip=[=upgrade]
1537 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001538
1539Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001540 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001541 CC C compiler command
1542 CFLAGS C compiler flags
1543 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1544 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001546 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001549 PKG_CONFIG path to pkg-config utility
1550 PKG_CONFIG_PATH
1551 directories to add to pkg-config's search path
1552 PKG_CONFIG_LIBDIR
1553 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
1555Use these variables to override the choices made by `configure' or to help
1556it to find libraries and programs with nonstandard names/locations.
1557
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001558Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001559_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001561fi
1562
1563if test "$ac_init_help" = "recursive"; then
1564 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 test -d "$ac_dir" ||
1567 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1568 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 ac_builddir=.
1570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571case "$ac_dir" in
1572.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1573*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 case $ac_top_builddir_sub in
1578 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1580 esac ;;
1581esac
1582ac_abs_top_builddir=$ac_pwd
1583ac_abs_builddir=$ac_pwd$ac_dir_suffix
1584# for backward compatibility:
1585ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
1587case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 ac_top_srcdir=$ac_top_builddir_sub
1591 ac_abs_top_srcdir=$ac_pwd ;;
1592 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 ac_top_srcdir=$srcdir
1595 ac_abs_top_srcdir=$srcdir ;;
1596 *) # Relative name.
1597 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1598 ac_top_srcdir=$ac_top_build_prefix$srcdir
1599 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001600esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 cd "$ac_dir" || { ac_status=$?; continue; }
1604 # Check for guested configure.
1605 if test -f "$ac_srcdir/configure.gnu"; then
1606 echo &&
1607 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1608 elif test -f "$ac_srcdir/configure"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001612 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 fi || ac_status=$?
1614 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 done
1616fi
1617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001619if $ac_init_version; then
1620 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001621python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001622generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001623
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001624Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001625This configure script is free software; the Free Software Foundation
1626gives unlimited permission to copy, distribute and modify it.
1627_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001630
1631## ------------------------ ##
1632## Autoconf initialization. ##
1633## ------------------------ ##
1634
1635# ac_fn_c_try_compile LINENO
1636# --------------------------
1637# Try to compile conftest.$ac_ext, and return whether this succeeded.
1638ac_fn_c_try_compile ()
1639{
1640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1641 rm -f conftest.$ac_objext
1642 if { { ac_try="$ac_compile"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_compile") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1657 test $ac_status = 0; } && {
1658 test -z "$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 } && test -s conftest.$ac_objext; then :
1661 ac_retval=0
1662else
1663 $as_echo "$as_me: failed program was:" >&5
1664sed 's/^/| /' conftest.$ac_ext >&5
1665
1666 ac_retval=1
1667fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_compile
1672
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001673# ac_fn_c_try_cpp LINENO
1674# ----------------------
1675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1676ac_fn_c_try_cpp ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1679 if { { ac_try="$ac_cpp conftest.$ac_ext"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1694 test $ac_status = 0; } > conftest.i && {
1695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 }; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
1702
1703 ac_retval=1
1704fi
1705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1706 as_fn_set_status $ac_retval
1707
1708} # ac_fn_c_try_cpp
1709
Matthias Kloseb9621712010-04-24 17:59:49 +00001710# ac_fn_c_try_link LINENO
1711# -----------------------
1712# Try to link conftest.$ac_ext, and return whether this succeeded.
1713ac_fn_c_try_link ()
1714{
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 rm -f conftest.$ac_objext conftest$ac_exeext
1717 if { { ac_try="$ac_link"
1718case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721esac
1722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723$as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_link") 2>conftest.err
1725 ac_status=$?
1726 if test -s conftest.err; then
1727 grep -v '^ *+' conftest.err >conftest.er1
1728 cat conftest.er1 >&5
1729 mv -f conftest.er1 conftest.err
1730 fi
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; } && {
1733 test -z "$ac_c_werror_flag" ||
1734 test ! -s conftest.err
1735 } && test -s conftest$ac_exeext && {
1736 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001737 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 }; then :
1739 ac_retval=0
1740else
1741 $as_echo "$as_me: failed program was:" >&5
1742sed 's/^/| /' conftest.$ac_ext >&5
1743
1744 ac_retval=1
1745fi
1746 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1747 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1748 # interfere with the next link command; also delete a directory that is
1749 # left behind by Apple's compiler. We do this before executing the actions.
1750 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001751 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 as_fn_set_status $ac_retval
1753
1754} # ac_fn_c_try_link
1755
Matthias Kloseb9621712010-04-24 17:59:49 +00001756# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1757# -------------------------------------------------------
1758# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1759# the include files in INCLUDES and setting the cache variable VAR
1760# accordingly.
1761ac_fn_c_check_header_mongrel ()
1762{
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1766$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001767if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 $as_echo_n "(cached) " >&6
1769fi
1770eval ac_res=\$$3
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1772$as_echo "$ac_res" >&6; }
1773else
1774 # Is the header compilable?
1775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1776$as_echo_n "checking $2 usability... " >&6; }
1777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1778/* end confdefs.h. */
1779$4
1780#include <$2>
1781_ACEOF
1782if ac_fn_c_try_compile "$LINENO"; then :
1783 ac_header_compiler=yes
1784else
1785 ac_header_compiler=no
1786fi
1787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1789$as_echo "$ac_header_compiler" >&6; }
1790
1791# Is the header present?
1792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1793$as_echo_n "checking $2 presence... " >&6; }
1794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1795/* end confdefs.h. */
1796#include <$2>
1797_ACEOF
1798if ac_fn_c_try_cpp "$LINENO"; then :
1799 ac_header_preproc=yes
1800else
1801 ac_header_preproc=no
1802fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001803rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1805$as_echo "$ac_header_preproc" >&6; }
1806
1807# So? What about this header?
1808case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1809 yes:no: )
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1811$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1813$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1814 ;;
1815 no:yes:* )
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1817$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1819$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1821$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1823$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1825$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001826( $as_echo "## --------------------------------------- ##
1827## Report this to https://bugs.python.org/ ##
1828## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001829 ) | sed "s/^/$as_me: WARNING: /" >&2
1830 ;;
1831esac
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1833$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001834if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001835 $as_echo_n "(cached) " >&6
1836else
1837 eval "$3=\$ac_header_compiler"
1838fi
1839eval ac_res=\$$3
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1841$as_echo "$ac_res" >&6; }
1842fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001844
1845} # ac_fn_c_check_header_mongrel
1846
1847# ac_fn_c_try_run LINENO
1848# ----------------------
1849# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1850# that executables *can* be run.
1851ac_fn_c_try_run ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854 if { { ac_try="$ac_link"
1855case "(($ac_try" in
1856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1857 *) ac_try_echo=$ac_try;;
1858esac
1859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1860$as_echo "$ac_try_echo"; } >&5
1861 (eval "$ac_link") 2>&5
1862 ac_status=$?
1863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1864 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1865 { { case "(($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_try") 2>&5
1872 ac_status=$?
1873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874 test $ac_status = 0; }; }; then :
1875 ac_retval=0
1876else
1877 $as_echo "$as_me: program exited with status $ac_status" >&5
1878 $as_echo "$as_me: failed program was:" >&5
1879sed 's/^/| /' conftest.$ac_ext >&5
1880
1881 ac_retval=$ac_status
1882fi
1883 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001884 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 as_fn_set_status $ac_retval
1886
1887} # ac_fn_c_try_run
1888
1889# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1890# -------------------------------------------------------
1891# Tests whether HEADER exists and can be compiled using the include files in
1892# INCLUDES, setting the cache variable VAR accordingly.
1893ac_fn_c_check_header_compile ()
1894{
1895 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1897$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001898if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 $as_echo_n "(cached) " >&6
1900else
1901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1902/* end confdefs.h. */
1903$4
1904#include <$2>
1905_ACEOF
1906if ac_fn_c_try_compile "$LINENO"; then :
1907 eval "$3=yes"
1908else
1909 eval "$3=no"
1910fi
1911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1912fi
1913eval ac_res=\$$3
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1915$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001916 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001917
1918} # ac_fn_c_check_header_compile
1919
Matthias Kloseb9621712010-04-24 17:59:49 +00001920# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1921# -------------------------------------------
1922# Tests whether TYPE exists after having included INCLUDES, setting cache
1923# variable VAR accordingly.
1924ac_fn_c_check_type ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1928$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939if (sizeof ($2))
1940 return 0;
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof (($2)))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959
1960else
1961 eval "$3=yes"
1962fi
1963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967eval ac_res=\$$3
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001971
1972} # ac_fn_c_check_type
1973
Matthias Kloseb9621712010-04-24 17:59:49 +00001974# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1975# --------------------------------------------
1976# Tries to find the compile-time value of EXPR in a program that includes
1977# INCLUDES, setting VAR accordingly. Returns whether the value could be
1978# computed
1979ac_fn_c_compute_int ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 if test "$cross_compiling" = yes; then
1983 # Depending upon the size, compute the lo and hi bounds.
1984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1985/* end confdefs.h. */
1986$4
1987int
1988main ()
1989{
1990static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001991test_array [0] = 0;
1992return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994 ;
1995 return 0;
1996}
1997_ACEOF
1998if ac_fn_c_try_compile "$LINENO"; then :
1999 ac_lo=0 ac_mid=0
2000 while :; do
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004int
2005main ()
2006{
2007static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002008test_array [0] = 0;
2009return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002010
2011 ;
2012 return 0;
2013}
2014_ACEOF
2015if ac_fn_c_try_compile "$LINENO"; then :
2016 ac_hi=$ac_mid; break
2017else
2018 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2019 if test $ac_lo -le $ac_mid; then
2020 ac_lo= ac_hi=
2021 break
2022 fi
2023 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2024fi
2025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2026 done
2027else
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002035test_array [0] = 0;
2036return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002037
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"; then :
2043 ac_hi=-1 ac_mid=-1
2044 while :; do
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002052test_array [0] = 0;
2053return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_lo=$ac_mid; break
2061else
2062 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2063 if test $ac_mid -le $ac_hi; then
2064 ac_lo= ac_hi=
2065 break
2066 fi
2067 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2068fi
2069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2070 done
2071else
2072 ac_lo= ac_hi=
2073fi
2074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077# Binary search between lo and hi bounds.
2078while test "x$ac_lo" != "x$ac_hi"; do
2079 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
2083int
2084main ()
2085{
2086static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002087test_array [0] = 0;
2088return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002089
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_compile "$LINENO"; then :
2095 ac_hi=$ac_mid
2096else
2097 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100done
2101case $ac_lo in #((
2102?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2103'') ac_retval=1 ;;
2104esac
2105 else
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109static long int longval () { return $2; }
2110static unsigned long int ulongval () { return $2; }
2111#include <stdio.h>
2112#include <stdlib.h>
2113int
2114main ()
2115{
2116
2117 FILE *f = fopen ("conftest.val", "w");
2118 if (! f)
2119 return 1;
2120 if (($2) < 0)
2121 {
2122 long int i = longval ();
2123 if (i != ($2))
2124 return 1;
2125 fprintf (f, "%ld", i);
2126 }
2127 else
2128 {
2129 unsigned long int i = ulongval ();
2130 if (i != ($2))
2131 return 1;
2132 fprintf (f, "%lu", i);
2133 }
2134 /* Do not output a trailing newline, as this causes \r\n confusion
2135 on some platforms. */
2136 return ferror (f) || fclose (f) != 0;
2137
2138 ;
2139 return 0;
2140}
2141_ACEOF
2142if ac_fn_c_try_run "$LINENO"; then :
2143 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2144else
2145 ac_retval=1
2146fi
2147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2148 conftest.$ac_objext conftest.beam conftest.$ac_ext
2149rm -f conftest.val
2150
2151 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002152 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002153 as_fn_set_status $ac_retval
2154
2155} # ac_fn_c_compute_int
2156
2157# ac_fn_c_check_func LINENO FUNC VAR
2158# ----------------------------------
2159# Tests whether FUNC exists, setting the cache variable VAR accordingly
2160ac_fn_c_check_func ()
2161{
2162 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2164$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002165if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 $as_echo_n "(cached) " >&6
2167else
2168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169/* end confdefs.h. */
2170/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2171 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2172#define $2 innocuous_$2
2173
2174/* System header to define __stub macros and hopefully few prototypes,
2175 which can conflict with char $2 (); below.
2176 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2177 <limits.h> exists even on freestanding compilers. */
2178
2179#ifdef __STDC__
2180# include <limits.h>
2181#else
2182# include <assert.h>
2183#endif
2184
2185#undef $2
2186
2187/* Override any GCC internal prototype to avoid an error.
2188 Use char because int might match the return type of a GCC
2189 builtin and then its argument prototype would still apply. */
2190#ifdef __cplusplus
2191extern "C"
2192#endif
2193char $2 ();
2194/* The GNU C library defines this for functions which it implements
2195 to always fail with ENOSYS. Some functions are actually named
2196 something starting with __ and the normal name is an alias. */
2197#if defined __stub_$2 || defined __stub___$2
2198choke me
2199#endif
2200
2201int
2202main ()
2203{
2204return $2 ();
2205 ;
2206 return 0;
2207}
2208_ACEOF
2209if ac_fn_c_try_link "$LINENO"; then :
2210 eval "$3=yes"
2211else
2212 eval "$3=no"
2213fi
2214rm -f core conftest.err conftest.$ac_objext \
2215 conftest$ac_exeext conftest.$ac_ext
2216fi
2217eval ac_res=\$$3
2218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2219$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002220 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002221
2222} # ac_fn_c_check_func
2223
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002224# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2225# ---------------------------------------------
2226# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2227# accordingly.
2228ac_fn_c_check_decl ()
2229{
2230 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2231 as_decl_name=`echo $2|sed 's/ *(.*//'`
2232 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2234$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2235if eval \${$3+:} false; then :
2236 $as_echo_n "(cached) " >&6
2237else
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240$4
2241int
2242main ()
2243{
2244#ifndef $as_decl_name
2245#ifdef __cplusplus
2246 (void) $as_decl_use;
2247#else
2248 (void) $as_decl_name;
2249#endif
2250#endif
2251
2252 ;
2253 return 0;
2254}
2255_ACEOF
2256if ac_fn_c_try_compile "$LINENO"; then :
2257 eval "$3=yes"
2258else
2259 eval "$3=no"
2260fi
2261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2262fi
2263eval ac_res=\$$3
2264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2265$as_echo "$ac_res" >&6; }
2266 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2267
2268} # ac_fn_c_check_decl
2269
Matthias Kloseb9621712010-04-24 17:59:49 +00002270# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2271# ----------------------------------------------------
2272# Tries to find if the field MEMBER exists in type AGGR, after including
2273# INCLUDES, setting cache variable VAR accordingly.
2274ac_fn_c_check_member ()
2275{
2276 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2278$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002279if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002280 $as_echo_n "(cached) " >&6
2281else
2282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h. */
2284$5
2285int
2286main ()
2287{
2288static $2 ac_aggr;
2289if (ac_aggr.$3)
2290return 0;
2291 ;
2292 return 0;
2293}
2294_ACEOF
2295if ac_fn_c_try_compile "$LINENO"; then :
2296 eval "$4=yes"
2297else
2298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h. */
2300$5
2301int
2302main ()
2303{
2304static $2 ac_aggr;
2305if (sizeof ac_aggr.$3)
2306return 0;
2307 ;
2308 return 0;
2309}
2310_ACEOF
2311if ac_fn_c_try_compile "$LINENO"; then :
2312 eval "$4=yes"
2313else
2314 eval "$4=no"
2315fi
2316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320eval ac_res=\$$4
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2322$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002323 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002324
2325} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002326cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002327This file contains any messages produced by compilers while
2328running configure, to aid debugging if configure makes a mistake.
2329
Ned Deily4829bc62016-09-12 17:29:04 -04002330It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002331generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002332
2333 $ $0 $@
2334
2335_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002337{
2338cat <<_ASUNAME
2339## --------- ##
2340## Platform. ##
2341## --------- ##
2342
2343hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2344uname -m = `(uname -m) 2>/dev/null || echo unknown`
2345uname -r = `(uname -r) 2>/dev/null || echo unknown`
2346uname -s = `(uname -s) 2>/dev/null || echo unknown`
2347uname -v = `(uname -v) 2>/dev/null || echo unknown`
2348
2349/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2350/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2351
2352/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2353/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2354/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002355/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002356/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2357/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2358/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2359
2360_ASUNAME
2361
2362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2363for as_dir in $PATH
2364do
2365 IFS=$as_save_IFS
2366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002367 $as_echo "PATH: $as_dir"
2368 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002370
2371} >&5
2372
2373cat >&5 <<_ACEOF
2374
2375
2376## ----------- ##
2377## Core tests. ##
2378## ----------- ##
2379
2380_ACEOF
2381
2382
2383# Keep a trace of the command line.
2384# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002385# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002386# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002389ac_configure_args0=
2390ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_must_keep_next=false
2392for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002393do
Skip Montanaro6dead952003-09-25 14:50:04 +00002394 for ac_arg
2395 do
2396 case $ac_arg in
2397 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2398 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2399 | -silent | --silent | --silen | --sile | --sil)
2400 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002402 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 esac
2404 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002409 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 case $ac_arg in
2412 *=* | --config-cache | -C | -disable-* | --disable-* \
2413 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2414 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2415 | -with-* | --with-* | -without-* | --without-* | --x)
2416 case "$ac_configure_args0 " in
2417 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2418 esac
2419 ;;
2420 -* ) ac_must_keep_next=true ;;
2421 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 ;;
2425 esac
2426 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002427done
Matthias Kloseb9621712010-04-24 17:59:49 +00002428{ ac_configure_args0=; unset ac_configure_args0;}
2429{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002430
2431# When interrupted or exit'd, cleanup temporary files, and complete
2432# config.log. We remove comments because anyway the quotes in there
2433# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434# WARNING: Use '\'' to represent an apostrophe within the trap.
2435# 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 +00002436trap 'exit_status=$?
2437 # Save into config.log some information that might help in debugging.
2438 {
2439 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002440
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002441 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002442## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002443## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002444 echo
2445 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446(
2447 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2448 eval ac_val=\$$ac_var
2449 case $ac_val in #(
2450 *${as_nl}*)
2451 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002452 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2453$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454 esac
2455 case $ac_var in #(
2456 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2458 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459 esac ;;
2460 esac
2461 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2464 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 "s/'\''/'\''\\\\'\'''\''/g;
2467 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2468 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002469 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac |
2473 sort
2474)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002476
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002477 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002478## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002479## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 echo
2481 for ac_var in $ac_subst_vars
2482 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 eval ac_val=\$$ac_var
2484 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002485 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 done | sort
2489 echo
2490
2491 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 echo
2496 for ac_var in $ac_subst_files
2497 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 eval ac_val=\$$ac_var
2499 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 done | sort
2504 echo
2505 fi
2506
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002509## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 echo
2514 fi
2515 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$as_me: caught signal $ac_signal"
2517 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 rm -f core *.core core.conftest.* &&
2520 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002523for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002525done
2526ac_signal=0
2527
2528# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002530
Matthias Kloseb9621712010-04-24 17:59:49 +00002531$as_echo "/* confdefs.h */" > confdefs.h
2532
Martin v. Löwis11437992002-04-12 09:54:03 +00002533# Predefined preprocessor variables.
2534
2535cat >>confdefs.h <<_ACEOF
2536#define PACKAGE_NAME "$PACKAGE_NAME"
2537_ACEOF
2538
Martin v. Löwis11437992002-04-12 09:54:03 +00002539cat >>confdefs.h <<_ACEOF
2540#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2541_ACEOF
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_VERSION "$PACKAGE_VERSION"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_STRING "$PACKAGE_STRING"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2553_ACEOF
2554
Matthias Kloseb9621712010-04-24 17:59:49 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_URL "$PACKAGE_URL"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559
2560# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002561# Prefer an explicitly selected file to automatically selected ones.
2562ac_site_file1=NONE
2563ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565 # We do not want a PATH search for config.site.
2566 case $CONFIG_SITE in #((
2567 -*) ac_site_file1=./$CONFIG_SITE;;
2568 */*) ac_site_file1=$CONFIG_SITE;;
2569 *) ac_site_file1=./$CONFIG_SITE;;
2570 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 ac_site_file1=$prefix/share/config.site
2573 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574else
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$ac_default_prefix/share/config.site
2576 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002578for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579do
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 test "x$ac_site_file" = xNONE && continue
2581 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2582 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2583$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585 . "$ac_site_file" \
2586 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2588as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002589See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590 fi
2591done
2592
2593if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 # Some versions of bash will fail to source /dev/null (special files
2595 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2596 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2598$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2601 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 esac
2603 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604else
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2606$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 >$cache_file
2608fi
2609
2610# Check that the precious variables saved in the cache have kept the same
2611# value.
2612ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2615 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2617 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 case $ac_old_set,$ac_new_set in
2619 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2621$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 +00002622 ac_cache_corrupted=: ;;
2623 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2625$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 ac_cache_corrupted=: ;;
2627 ,);;
2628 *)
2629 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 # differences in whitespace do not lead to failure.
2631 ac_old_val_w=`echo x $ac_old_val`
2632 ac_new_val_w=`echo x $ac_new_val`
2633 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2635$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2636 ac_cache_corrupted=:
2637 else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2639$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2640 eval $ac_var=\$ac_old_val
2641 fi
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2643$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2645$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 fi;;
2647 esac
2648 # Pass precious variables to config.status.
2649 if test "$ac_new_set" = set; then
2650 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 *) ac_arg=$ac_var=$ac_new_val ;;
2653 esac
2654 case " $ac_configure_args " in
2655 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 esac
2658 fi
2659done
2660if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2664$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002665 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002667## -------------------- ##
2668## Main body of script. ##
2669## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670
Guido van Rossum7f43da71994-08-01 12:15:30 +00002671ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676
Guido van Rossum627b2d71993-12-24 10:39:16 +00002677
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Trent Nelson4d4ec652012-10-16 08:51:24 -04002679
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002680if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002681 # If we're building out-of-tree, we need to make sure the following
2682 # resources get picked up before their $srcdir counterparts.
2683 # Objects/ -> typeslots.inc
2684 # Include/ -> Python-ast.h, graminit.h
2685 # Python/ -> importlib.h
2686 # (A side effect of this is that these resources will automatically be
2687 # regenerated when building out-of-tree, regardless of whether or not
2688 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2689 # off.)
2690 BASECPPFLAGS="-IObjects -IInclude -IPython"
2691else
2692 BASECPPFLAGS=""
2693fi
2694
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002695
2696
2697
2698
Victor Stinner9ed34a82017-05-02 22:35:58 +02002699if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002700then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002701# Extract the first word of "git", so it can be a program name with args.
2702set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2704$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002705if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706 $as_echo_n "(cached) " >&6
2707else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002708 if test -n "$HAS_GIT"; then
2709 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710else
2711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2712for as_dir in $PATH
2713do
2714 IFS=$as_save_IFS
2715 test -z "$as_dir" && as_dir=.
2716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2720 break 2
2721 fi
2722done
2723 done
2724IFS=$as_save_IFS
2725
Ned Deily5c4b0d02017-03-04 00:19:55 -05002726 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727fi
2728fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729HAS_GIT=$ac_cv_prog_HAS_GIT
2730if test -n "$HAS_GIT"; then
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2732$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733else
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2735$as_echo "no" >&6; }
2736fi
2737
2738
2739else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743then
Ned Deily554626a2017-03-20 23:41:52 -04002744 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2745 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002746 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748 GITVERSION=""
2749 GITTAG=""
2750 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751fi
2752
2753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002755
2756
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002757ac_aux_dir=
2758for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2759 if test -f "$ac_dir/install-sh"; then
2760 ac_aux_dir=$ac_dir
2761 ac_install_sh="$ac_aux_dir/install-sh -c"
2762 break
2763 elif test -f "$ac_dir/install.sh"; then
2764 ac_aux_dir=$ac_dir
2765 ac_install_sh="$ac_aux_dir/install.sh -c"
2766 break
2767 elif test -f "$ac_dir/shtool"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/shtool install -c"
2770 break
2771 fi
2772done
2773if test -z "$ac_aux_dir"; then
2774 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2775fi
2776
2777# These three variables are undocumented and unsupported,
2778# and are intended to be withdrawn in a future Autoconf release.
2779# They can cause serious problems if a builder's source tree is in a directory
2780# whose full name contains unusual characters.
2781ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2782ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2783ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2784
2785
2786# Make sure we can run config.sub.
2787$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2788 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2789
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2791$as_echo_n "checking build system type... " >&6; }
2792if ${ac_cv_build+:} false; then :
2793 $as_echo_n "(cached) " >&6
2794else
2795 ac_build_alias=$build_alias
2796test "x$ac_build_alias" = x &&
2797 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2798test "x$ac_build_alias" = x &&
2799 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2800ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2801 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2802
2803fi
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2805$as_echo "$ac_cv_build" >&6; }
2806case $ac_cv_build in
2807*-*-*) ;;
2808*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2809esac
2810build=$ac_cv_build
2811ac_save_IFS=$IFS; IFS='-'
2812set x $ac_cv_build
2813shift
2814build_cpu=$1
2815build_vendor=$2
2816shift; shift
2817# Remember, the first character of IFS is used to create $*,
2818# except with old shells:
2819build_os=$*
2820IFS=$ac_save_IFS
2821case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2822
2823
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2825$as_echo_n "checking host system type... " >&6; }
2826if ${ac_cv_host+:} false; then :
2827 $as_echo_n "(cached) " >&6
2828else
2829 if test "x$host_alias" = x; then
2830 ac_cv_host=$ac_cv_build
2831else
2832 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2833 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2834fi
2835
2836fi
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2838$as_echo "$ac_cv_host" >&6; }
2839case $ac_cv_host in
2840*-*-*) ;;
2841*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2842esac
2843host=$ac_cv_host
2844ac_save_IFS=$IFS; IFS='-'
2845set x $ac_cv_host
2846shift
2847host_cpu=$1
2848host_vendor=$2
2849shift; shift
2850# Remember, the first character of IFS is used to create $*,
2851# except with old shells:
2852host_os=$*
2853IFS=$ac_save_IFS
2854case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2855
2856
2857
doko@python.orga10e4a92013-01-25 18:45:12 +01002858
2859
Ned Deilyfcbc2462014-08-22 13:32:49 -07002860# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2861rm -f pybuilddir.txt
2862
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002863for ac_prog in python$PACKAGE_VERSION python3 python
2864do
2865 # Extract the first word of "$ac_prog", so it can be a program name with args.
2866set dummy $ac_prog; ac_word=$2
2867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2868$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002869if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002870 $as_echo_n "(cached) " >&6
2871else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002872 if test -n "$PYTHON_FOR_REGEN"; then
2873 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002874else
2875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2876for as_dir in $PATH
2877do
2878 IFS=$as_save_IFS
2879 test -z "$as_dir" && as_dir=.
2880 for ac_exec_ext in '' $ac_executable_extensions; do
2881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2884 break 2
2885 fi
2886done
2887 done
2888IFS=$as_save_IFS
2889
2890fi
2891fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2893if test -n "$PYTHON_FOR_REGEN"; then
2894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2895$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896else
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2898$as_echo "no" >&6; }
2899fi
2900
2901
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002903done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002904test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002905
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906
2907
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002908if test "$cross_compiling" = yes; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2910$as_echo_n "checking for python interpreter for cross build... " >&6; }
2911 if test -z "$PYTHON_FOR_BUILD"; then
2912 for interp in python$PACKAGE_VERSION python3 python; do
2913 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002914 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 +02002915 break
2916 fi
2917 interp=
2918 done
2919 if test x$interp = x; then
2920 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2921 fi
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2923$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002924 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 +02002925 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002926elif test "$cross_compiling" = maybe; then
2927 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928else
2929 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2930fi
2931
2932
Martin v. Löwis11437992002-04-12 09:54:03 +00002933
Benjamin Petersond23f8222009-04-05 19:13:16 +00002934if test "$prefix" != "/"; then
2935 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2936fi
2937
2938
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
2940
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002941# We don't use PACKAGE_ variables, and they cause conflicts
2942# with other autoconf-based packages that include Python.h
2943grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2944rm confdefs.h
2945mv confdefs.h.new confdefs.h
2946
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002947
Ned Deily4829bc62016-09-12 17:29:04 -04002948VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002949
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002950# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002951
2952SOVERSION=1.0
2953
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002954# The later defininition of _XOPEN_SOURCE disables certain features
2955# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2956
Matthias Kloseb9621712010-04-24 17:59:49 +00002957$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002958
2959
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002960# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2961# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2962# them.
2963
Matthias Kloseb9621712010-04-24 17:59:49 +00002964$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002965
2966
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002967# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2968# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2969# them.
2970
Matthias Kloseb9621712010-04-24 17:59:49 +00002971$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002972
2973
Martin v. Löwisd6320502004-08-12 13:45:08 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002975# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2976# them.
2977
Matthias Kloseb9621712010-04-24 17:59:49 +00002978$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002979
2980
2981
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002982define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002983
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002984# Arguments passed to configure.
2985
2986CONFIG_ARGS="$ac_configure_args"
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2989$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002991if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002992 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002993 case $enableval in
2994 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002995 # Locate the best usable SDK, see Mac/README.txt for more
2996 # information
2997 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07002998 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002999 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003000 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3001 if test ! -d "${enableval}"
3002 then
3003 enableval=/
3004 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003005 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003006 ;;
3007 esac
3008 case $enableval in
3009 no)
3010 UNIVERSALSDK=
3011 enable_universalsdk=
3012 ;;
3013 *)
3014 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 if test ! -d "${UNIVERSALSDK}"
3016 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003017 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 ;;
3020 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003021
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023else
3024
3025 UNIVERSALSDK=
3026 enable_universalsdk=
3027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030if test -n "${UNIVERSALSDK}"
3031then
Matthias Kloseb9621712010-04-24 17:59:49 +00003032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3033$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034else
Matthias Kloseb9621712010-04-24 17:59:49 +00003035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3036$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003040
Ned Deily87adb6e2013-10-18 21:09:56 -07003041ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003042
Ned Deilycbfb9a52012-06-23 16:02:19 -07003043# For backward compatibility reasons we prefer to select '32-bit' if available,
3044# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003045UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003046if test "`uname -s`" = "Darwin"
3047then
3048 if test -n "${UNIVERSALSDK}"
3049 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003050 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003051 then
3052 UNIVERSAL_ARCHS="intel"
3053 fi
3054 fi
3055fi
3056
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003057
Matthias Kloseb9621712010-04-24 17:59:49 +00003058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3059$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003060
3061# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003062if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003064 UNIVERSAL_ARCHS="$withval"
3065
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003066fi
3067
Ned Deily87adb6e2013-10-18 21:09:56 -07003068if test -n "${UNIVERSALSDK}"
3069then
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3071$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3072else
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3074$as_echo "no" >&6; }
3075fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003077
3078# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003079if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003080 withval=$with_framework_name;
3081 PYTHONFRAMEWORK=${withval}
3082 PYTHONFRAMEWORKDIR=${withval}.framework
3083 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3084
3085else
3086
3087 PYTHONFRAMEWORK=Python
3088 PYTHONFRAMEWORKDIR=Python.framework
3089 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3090
3091fi
3092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003094if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003095 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003096 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003097 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003098 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003099 esac
3100 case $enableval in
3101 no)
3102 PYTHONFRAMEWORK=
3103 PYTHONFRAMEWORKDIR=no-framework
3104 PYTHONFRAMEWORKPREFIX=
3105 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003106 FRAMEWORKINSTALLFIRST=
3107 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003108 FRAMEWORKALTINSTALLFIRST=
3109 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003110 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003111 if test "x${prefix}" = "xNONE"; then
3112 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3113 else
3114 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3115 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003117 ;;
3118 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003119 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003120 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003122 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003123 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3124 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003125 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003126 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003128 if test "x${prefix}" = "xNONE" ; then
3129 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003131 else
3132 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3133 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003134
3135 case "${enableval}" in
3136 /System*)
3137 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3138 if test "${prefix}" = "NONE" ; then
3139 # See below
3140 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3141 fi
3142 ;;
3143
3144 /Library*)
3145 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3146 ;;
3147
3148 */Library/Frameworks)
3149 MDIR="`dirname "${enableval}"`"
3150 MDIR="`dirname "${MDIR}"`"
3151 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3152
3153 if test "${prefix}" = "NONE"; then
3154 # User hasn't specified the
3155 # --prefix option, but wants to install
3156 # the framework in a non-default location,
3157 # ensure that the compatibility links get
3158 # installed relative to that prefix as well
3159 # instead of in /usr/local.
3160 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3161 fi
3162 ;;
3163
3164 *)
3165 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3166 ;;
3167 esac
3168
Jack Jansen127e56e2001-09-11 14:41:54 +00003169 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003171 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003172 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003176
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003177 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3178
3179 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3180
Jack Jansene578a632001-08-15 01:27:14 +00003181 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003182
Guido van Rossum563e7081996-09-10 18:20:48 +00003183else
Martin v. Löwis11437992002-04-12 09:54:03 +00003184
Jack Jansene578a632001-08-15 01:27:14 +00003185 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003187 PYTHONFRAMEWORKPREFIX=
3188 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 FRAMEWORKINSTALLFIRST=
3190 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003191 FRAMEWORKALTINSTALLFIRST=
3192 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003193 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003194 if test "x${prefix}" = "xNONE" ; then
3195 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3196 else
3197 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3198 fi
Jack Jansene578a632001-08-15 01:27:14 +00003199 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003200
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202fi
3203
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
3205
Michael W. Hudson54241132001-12-07 15:38:26 +00003206
3207
3208
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211
3212
3213
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003214
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003215
Ned Deilyb8f944f2013-11-21 22:42:25 -08003216
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003217
3218cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003219#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003220_ACEOF
3221
3222
Jack Jansene578a632001-08-15 01:27:14 +00003223##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003224## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003225## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003226##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227# Set name for machine-dependent library files
3228
Matthias Kloseb9621712010-04-24 17:59:49 +00003229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3230$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003231if test -z "$MACHDEP"
3232then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003233 # avoid using uname for cross builds
3234 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003235 # ac_sys_system and ac_sys_release are used for setting
3236 # a lot of different things including 'define_xopen_source'
3237 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003238 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003239 *-*-linux-android*)
3240 ac_sys_system=Linux-android
3241 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003242 *-*-linux*)
3243 ac_sys_system=Linux
3244 ;;
3245 *-*-cygwin*)
3246 ac_sys_system=Cygwin
3247 ;;
3248 *)
3249 # for now, limit cross builds to known configurations
3250 MACHDEP="unknown"
3251 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3252 esac
3253 ac_sys_release=
3254 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003255 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003256 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003257 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003258 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003260 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 fi
3263 ac_md_system=`echo $ac_sys_system |
3264 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3265 ac_md_release=`echo $ac_sys_release |
3266 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3267 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003268
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003269 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003270 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003271 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003272 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003273 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275fi
Guido van Rossum91922671997-10-09 20:24:13 +00003276
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003277
3278if test "$cross_compiling" = yes; then
3279 case "$host" in
3280 *-*-linux*)
3281 case "$host_cpu" in
3282 arm*)
3283 _host_cpu=arm
3284 ;;
3285 *)
3286 _host_cpu=$host_cpu
3287 esac
3288 ;;
3289 *-*-cygwin*)
3290 _host_cpu=
3291 ;;
3292 *)
3293 # for now, limit cross builds to known configurations
3294 MACHDEP="unknown"
3295 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3296 esac
3297 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3298fi
3299
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003300# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3301# disable features if it is defined, without any means to access these
3302# features as extensions. For these systems, we skip the definition of
3303# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3304# some feature, make sure there is no alternative way to access this
3305# feature. Also, when using wildcards, make sure you have verified the
3306# need for not defining _XOPEN_SOURCE on all systems matching the
3307# wildcard, and that the wildcard does not include future systems
3308# (which may remove their limitations).
3309case $ac_sys_system/$ac_sys_release in
3310 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3311 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003312 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003313 # In addition, Stefan Krah confirms that issue #1244610 exists through
3314 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003315 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003316 define_xopen_source=no
3317 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3318 # also defined. This can be overridden by defining _BSD_SOURCE
3319 # As this has a different meaning on Linux, only define it on OpenBSD
3320
Matthias Kloseb9621712010-04-24 17:59:49 +00003321$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003322
3323 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003324 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003325 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3326 # also defined. This can be overridden by defining _BSD_SOURCE
3327 # As this has a different meaning on Linux, only define it on OpenBSD
3328
Matthias Kloseb9621712010-04-24 17:59:49 +00003329$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003330
3331 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003332 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3333 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3334 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003335 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 +00003336 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003337 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3338 # request to enable features supported by the standard as a request
3339 # to disable features not supported by the standard. The best way
3340 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3341 # entirely and define __EXTENSIONS__ instead.
3342 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003343 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003344 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3345 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003346 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003347 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003348 define_xopen_source=no;;
3349 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003350 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003351 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003352 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003353 # On FreeBSD 4, the math functions C89 does not cover are never defined
3354 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3355 FreeBSD/4.*)
3356 define_xopen_source=no;;
3357 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3358 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3359 # identifies itself as Darwin/7.*
3360 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3361 # disables platform specific features beyond repair.
3362 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3363 # has no effect, don't bother defining them
3364 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003365 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003366 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003367 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003368 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3369 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3370 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003371 AIX/4)
3372 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003373 AIX/5)
3374 if test `uname -r` -eq 1; then
3375 define_xopen_source=no
3376 fi
3377 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003378 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3379 # defining NI_NUMERICHOST.
3380 QNX/6.3.2)
3381 define_xopen_source=no
3382 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003383
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003384esac
3385
3386if test $define_xopen_source = yes
3387then
Victor Stinner14d098d2011-09-07 22:29:43 +02003388 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003389
Victor Stinner14d098d2011-09-07 22:29:43 +02003390$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003391
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003392
3393 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3394 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3395 # several APIs are not declared. Since this is also needed in some
3396 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003397
Matthias Kloseb9621712010-04-24 17:59:49 +00003398$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
3400
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003401
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003402$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003404fi
3405
Christian Heimes647cd872013-12-07 23:39:33 +01003406# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3407case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003408 hp*|HP*)
3409 define_stdc_a1=yes;;
3410 *)
3411 define_stdc_a1=no;;
3412esac
3413
3414if test $define_stdc_a1 = yes
3415then
Christian Heimes647cd872013-12-07 23:39:33 +01003416
3417$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3418
Christian Heimesb02bcae2013-12-08 15:21:08 +01003419fi
Christian Heimes647cd872013-12-07 23:39:33 +01003420
Jack Jansen6b08a402004-06-03 12:41:45 +00003421# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3422# it may influence the way we can build extensions, so distutils
3423# needs to check it
3424
Thomas Wouters477c8d52006-05-27 19:21:47 +00003425
Jack Jansen6b08a402004-06-03 12:41:45 +00003426CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003427EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003428
Guido van Rossum627b2d71993-12-24 10:39:16 +00003429# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003430
3431# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3432# for debug/optimization stuff. BASECFLAGS is for flags that are required
3433# just to get things to compile and link. Users are free to override OPT
3434# when running configure or make. The build should not break if they do.
3435# BASECFLAGS should generally not be messed with, however.
3436
3437# XXX shouldn't some/most/all of this code be merged with the stuff later
3438# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3440$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003443if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003444 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003445 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003446 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003447 without_gcc=yes;;
3448 yes) CC=gcc
3449 without_gcc=no;;
3450 *) CC=$withval
3451 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003452 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003453else
Martin v. Löwis11437992002-04-12 09:54:03 +00003454
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003455 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003456 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003457 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003458 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003459 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460fi
3461
Matthias Kloseb9621712010-04-24 17:59:49 +00003462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3463$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003464
Zachary Ware5af85642015-12-21 12:09:17 -06003465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3466$as_echo_n "checking for --with-icc... " >&6; }
3467
3468# Check whether --with-icc was given.
3469if test "${with_icc+set}" = set; then :
3470 withval=$with_icc;
3471 case $withval in
3472 no) CC=${CC:-cc}
3473 with_icc=no;;
3474 yes) CC=icc
3475 CXX=icpc
3476 with_icc=yes;;
3477 *) CC=$withval
3478 with_icc=$withval;;
3479 esac
3480else
3481
3482 with_icc=no
3483fi
3484
3485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3486$as_echo "$with_icc" >&6; }
3487
Guido van Rossum8b131c51995-03-09 14:10:13 +00003488# If the user switches compilers, we can't believe the cache
3489if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3490then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003491 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003492(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003493fi
3494
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003495# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3496# when the compiler supports them, but we don't always want -O2, and
3497# we set -g later.
3498if test -z "$CFLAGS"; then
3499 CFLAGS=
3500fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501
3502if test "$ac_sys_system" = "Darwin"
3503then
3504 # Compiler selection on MacOSX is more complicated than
3505 # AC_PROG_CC can handle, see Mac/README.txt for more
3506 # information
3507 if test -z "${CC}"
3508 then
3509 found_gcc=
3510 found_clang=
3511 as_save_IFS=$IFS; IFS=:
3512 for as_dir in $PATH
3513 do
3514 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003515 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003516 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003517 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003518 fi
3519 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003520 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003521 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003522 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523 fi
3524 fi
3525 done
3526 IFS=$as_save_IFS
3527
3528 if test -n "$found_gcc" -a -n "$found_clang"
3529 then
3530 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3531 then
3532 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3533$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3534 CC="$found_clang"
3535 CXX="$found_clang++"
3536 fi
3537
3538
3539 elif test -z "$found_gcc" -a -n "$found_clang"
3540 then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3542$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3543 CC="$found_clang"
3544 CXX="$found_clang++"
3545
3546 elif test -z "$found_gcc" -a -z "$found_clang"
3547 then
3548 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3549 if test -n "${found_clang}"
3550 then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3552$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3553 CC="${found_clang}"
3554 CXX="`/usr/bin/xcrun -find clang++`"
3555
3556 # else: use default behaviour
3557 fi
3558 fi
3559 fi
3560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003561ac_ext=c
3562ac_cpp='$CPP $CPPFLAGS'
3563ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3564ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3565ac_compiler_gnu=$ac_cv_c_compiler_gnu
3566if test -n "$ac_tool_prefix"; then
3567 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3568set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3570$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003571if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003573else
3574 if test -n "$CC"; then
3575 ac_cv_prog_CC="$CC" # Let the user override the test.
3576else
Martin v. Löwis11437992002-04-12 09:54:03 +00003577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580 IFS=$as_save_IFS
3581 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $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 +00003586 break 2
3587 fi
3588done
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003591
Jack Jansendd19cf82001-12-06 22:36:17 +00003592fi
3593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003594CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003595if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3597$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003598else
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003601fi
3602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603
Martin v. Löwis11437992002-04-12 09:54:03 +00003604fi
3605if test -z "$ac_cv_prog_CC"; then
3606 ac_ct_CC=$CC
3607 # Extract the first word of "gcc", so it can be a program name with args.
3608set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003611if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003613else
3614 if test -n "$ac_ct_CC"; then
3615 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3616else
3617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618for as_dir in $PATH
3619do
3620 IFS=$as_save_IFS
3621 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $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 +00003626 break 2
3627 fi
3628done
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003631
3632fi
3633fi
3634ac_ct_CC=$ac_cv_prog_ac_ct_CC
3635if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3637$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003638else
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3640$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641fi
3642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 if test "x$ac_ct_CC" = x; then
3644 CC=""
3645 else
3646 case $cross_compiling:$ac_tool_warned in
3647yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003648{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3649$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650ac_tool_warned=yes ;;
3651esac
3652 CC=$ac_ct_CC
3653 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654else
3655 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003656fi
3657
Jack Jansendd19cf82001-12-06 22:36:17 +00003658if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 if test -n "$ac_tool_prefix"; then
3660 # 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 +00003661set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3663$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003664if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003666else
3667 if test -n "$CC"; then
3668 ac_cv_prog_CC="$CC" # Let the user override the test.
3669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671for as_dir in $PATH
3672do
3673 IFS=$as_save_IFS
3674 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $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 +00003679 break 2
3680 fi
3681done
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003684
3685fi
3686fi
3687CC=$ac_cv_prog_CC
3688if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3690$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003691else
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3693$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003694fi
3695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003698fi
3699if test -z "$CC"; then
3700 # Extract the first word of "cc", so it can be a program name with args.
3701set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3703$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003704if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003706else
3707 if test -n "$CC"; then
3708 ac_cv_prog_CC="$CC" # Let the user override the test.
3709else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003710 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712for as_dir in $PATH
3713do
3714 IFS=$as_save_IFS
3715 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3719 ac_prog_rejected=yes
3720 continue
3721 fi
3722 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $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 +00003724 break 2
3725 fi
3726done
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003729
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730if test $ac_prog_rejected = yes; then
3731 # We found a bogon in the path, so make sure we never use it.
3732 set dummy $ac_cv_prog_CC
3733 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 # We chose a different compiler from the bogus one.
3736 # However, it has the same basename, so the bogon will be chosen
3737 # first if we set CC to just the basename; use the full file name.
3738 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003739 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740 fi
3741fi
3742fi
3743fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003744CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3747$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748else
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3750$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751fi
3752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755if test -z "$CC"; then
3756 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 do
3759 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3760set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3762$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003763if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003765else
3766 if test -n "$CC"; then
3767 ac_cv_prog_CC="$CC" # Let the user override the test.
3768else
Martin v. Löwis11437992002-04-12 09:54:03 +00003769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $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 +00003778 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003780done
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003783
3784fi
3785fi
3786CC=$ac_cv_prog_CC
3787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 test -n "$CC" && break
3797 done
3798fi
3799if test -z "$CC"; then
3800 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003802do
3803 # Extract the first word of "$ac_prog", so it can be a program name with args.
3804set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003807if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003809else
3810 if test -n "$ac_ct_CC"; then
3811 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3812else
3813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3814for as_dir in $PATH
3815do
3816 IFS=$as_save_IFS
3817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $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 +00003822 break 2
3823 fi
3824done
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828fi
3829fi
3830ac_ct_CC=$ac_cv_prog_ac_ct_CC
3831if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3833$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003834else
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3836$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 test -n "$ac_ct_CC" && break
3841done
Michael W. Hudson54241132001-12-07 15:38:26 +00003842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 if test "x$ac_ct_CC" = x; then
3844 CC=""
3845 else
3846 case $cross_compiling:$ac_tool_warned in
3847yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850ac_tool_warned=yes ;;
3851esac
3852 CC=$ac_ct_CC
3853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003854fi
3855
3856fi
3857
3858
Matthias Kloseb9621712010-04-24 17:59:49 +00003859test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003861as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003862See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863
3864# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003865$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3866set X $ac_compile
3867ac_compiler=$2
3868for ac_option in --version -v -V -qversion; do
3869 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870case "(($ac_try" in
3871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3872 *) ac_try_echo=$ac_try;;
3873esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3875$as_echo "$ac_try_echo"; } >&5
3876 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 if test -s conftest.err; then
3879 sed '10a\
3880... rest of stderr output deleted ...
3881 10q' conftest.err >conftest.er1
3882 cat conftest.er1 >&5
3883 fi
3884 rm -f conftest.er1 conftest.err
3885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3886 test $ac_status = 0; }
3887done
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
Matthias Kloseb9621712010-04-24 17:59:49 +00003889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003890/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003891
Martin v. Löwis11437992002-04-12 09:54:03 +00003892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
3900ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003901ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003902# Try to create an executable without -o first, disregard a.out.
3903# It will help us diagnose broken compilers, and finding out an intuition
3904# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3906$as_echo_n "checking whether the C compiler works... " >&6; }
3907ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3908
3909# The possible output files:
3910ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912ac_rmfiles=
3913for ac_file in $ac_files
3914do
3915 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3918 esac
3919done
3920rm -f $ac_rmfiles
3921
Matthias Kloseb9621712010-04-24 17:59:49 +00003922if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923case "(($ac_try" in
3924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3925 *) ac_try_echo=$ac_try;;
3926esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3928$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3932 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3934# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3935# in a Makefile. We should not override ac_cv_exeext if it was cached,
3936# so that the user can short-circuit this test for compilers unknown to
3937# Autoconf.
3938for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003939do
3940 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003943 ;;
3944 [ab].out )
3945 # We found the default executable, but exeext='' is most
3946 # certainly right.
3947 break;;
3948 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 then :; else
3951 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3952 fi
3953 # We set ac_cv_exeext here because the later test for it is not
3954 # safe: cross compilers may not add the suffix if given an `-o'
3955 # argument, so we may need to know it at that point already.
3956 # Even if this section looks crufty: it has the advantage of
3957 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958 break;;
3959 * )
3960 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 esac
3962done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963test "$ac_cv_exeext" = no && ac_cv_exeext=
3964
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003965else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 ac_file=''
3967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if test -z "$ac_file"; then :
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3970$as_echo "no" >&6; }
3971$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003972sed 's/^/| /' conftest.$ac_ext >&5
3973
Matthias Kloseb9621712010-04-24 17:59:49 +00003974{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003976as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003977See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003978else
3979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3980$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3983$as_echo_n "checking for C compiler default output file name... " >&6; }
3984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3985$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987
Matthias Kloseb9621712010-04-24 17:59:49 +00003988rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3991$as_echo_n "checking for suffix of executables... " >&6; }
3992if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993case "(($ac_try" in
3994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995 *) ac_try_echo=$ac_try;;
3996esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3998$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4002 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4004# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4005# work properly (i.e., refer to `conftest.exe'), while it won't with
4006# `rm'.
4007for ac_file in conftest.exe conftest conftest.*; do
4008 test -f "$ac_file" || continue
4009 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4012 break;;
4013 * ) break;;
4014 esac
4015done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004016else
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004019as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004020See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004022rm -f conftest conftest$ac_cv_exeext
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4024$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025
4026rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004027EXEEXT=$ac_cv_exeext
4028ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4030/* end confdefs.h. */
4031#include <stdio.h>
4032int
4033main ()
4034{
4035FILE *f = fopen ("conftest.out", "w");
4036 return ferror (f) || fclose (f) != 0;
4037
4038 ;
4039 return 0;
4040}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004042ac_clean_files="$ac_clean_files conftest.out"
4043# Check that the compiler produces executables we can run. If not, either
4044# the compiler is broken, or we cross compile.
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4046$as_echo_n "checking whether we are cross compiling... " >&6; }
4047if test "$cross_compiling" != yes; then
4048 { { ac_try="$ac_link"
4049case "(($ac_try" in
4050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4051 *) ac_try_echo=$ac_try;;
4052esac
4053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4054$as_echo "$ac_try_echo"; } >&5
4055 (eval "$ac_link") 2>&5
4056 ac_status=$?
4057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4058 test $ac_status = 0; }
4059 if { ac_try='./conftest$ac_cv_exeext'
4060 { { case "(($ac_try" in
4061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4062 *) ac_try_echo=$ac_try;;
4063esac
4064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4065$as_echo "$ac_try_echo"; } >&5
4066 (eval "$ac_try") 2>&5
4067 ac_status=$?
4068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4069 test $ac_status = 0; }; }; then
4070 cross_compiling=no
4071 else
4072 if test "$cross_compiling" = maybe; then
4073 cross_compiling=yes
4074 else
4075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004077as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004078If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004079See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 fi
4081 fi
4082fi
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4084$as_echo "$cross_compiling" >&6; }
4085
4086rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4087ac_clean_files=$ac_clean_files_save
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4089$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004090if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 $as_echo_n "(cached) " >&6
4092else
4093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094/* end confdefs.h. */
4095
4096int
4097main ()
4098{
4099
4100 ;
4101 return 0;
4102}
4103_ACEOF
4104rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004105if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004110eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4111$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4115 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116 for ac_file in conftest.o conftest.obj conftest.*; do
4117 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4121 break;;
4122 esac
4123done
4124else
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004126sed 's/^/| /' conftest.$ac_ext >&5
4127
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004130as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004131See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4136$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004137OBJEXT=$ac_cv_objext
4138ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4140$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004141if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004143else
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004146
Martin v. Löwis11437992002-04-12 09:54:03 +00004147int
4148main ()
4149{
4150#ifndef __GNUC__
4151 choke me
4152#endif
4153
4154 ;
4155 return 0;
4156}
4157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_compiler_gnu=yes
4160else
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004164ac_cv_c_compiler_gnu=$ac_compiler_gnu
4165
4166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4168$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4169if test $ac_compiler_gnu = yes; then
4170 GCC=yes
4171else
4172 GCC=
4173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004174ac_test_CFLAGS=${CFLAGS+set}
4175ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4177$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004178if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004180else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004181 ac_save_c_werror_flag=$ac_c_werror_flag
4182 ac_c_werror_flag=yes
4183 ac_cv_prog_cc_g=no
4184 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004187
Martin v. Löwis11437992002-04-12 09:54:03 +00004188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004197 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198else
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 CFLAGS=""
4200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201/* end confdefs.h. */
4202
4203int
4204main ()
4205{
4206
4207 ;
4208 return 0;
4209}
4210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004211if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212
Matthias Kloseb9621712010-04-24 17:59:49 +00004213else
4214 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217/* end confdefs.h. */
4218
4219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4235 ac_c_werror_flag=$ac_save_c_werror_flag
4236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4238$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004239if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004241elif test $ac_cv_prog_cc_g = yes; then
4242 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004243 CFLAGS="-g -O2"
4244 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004245 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246 fi
4247else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248 if test "$GCC" = yes; then
4249 CFLAGS="-O2"
4250 else
4251 CFLAGS=
4252 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4255$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004256if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004258else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004260ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* end confdefs.h. */
4263#include <stdarg.h>
4264#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004265struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004266/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4267struct buf { int x; };
4268FILE * (*rcsopen) (struct buf *, struct stat *, int);
4269static char *e (p, i)
4270 char **p;
4271 int i;
4272{
4273 return p[i];
4274}
4275static char *f (char * (*g) (char **, int), char **p, ...)
4276{
4277 char *s;
4278 va_list v;
4279 va_start (v,p);
4280 s = g (p, va_arg (v,int));
4281 va_end (v);
4282 return s;
4283}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284
4285/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4286 function prototypes and stuff, but not '\xHH' hex character constants.
4287 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004289 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4290 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4295 inside strings and character constants. */
4296#define FOO(x) 'x'
4297int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4298
Skip Montanaro6dead952003-09-25 14:50:04 +00004299int test (int i, double x);
4300struct s1 {int (*f) (int a);};
4301struct s2 {int (*f) (double a);};
4302int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4303int argc;
4304char **argv;
4305int
4306main ()
4307{
4308return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4309 ;
4310 return 0;
4311}
4312_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4314 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004315do
4316 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320rm -f core conftest.err conftest.$ac_objext
4321 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004322done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004324CC=$ac_save_CC
4325
4326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327# AC_CACHE_VAL
4328case "x$ac_cv_prog_cc_c89" in
4329 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4331$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4334$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004335 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4338$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004339esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004340if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004341
Matthias Kloseb9621712010-04-24 17:59:49 +00004342fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004343
Martin v. Löwis11437992002-04-12 09:54:03 +00004344ac_ext=c
4345ac_cpp='$CPP $CPPFLAGS'
4346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4348ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004349
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004350ac_ext=c
4351ac_cpp='$CPP $CPPFLAGS'
4352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4354ac_compiler_gnu=$ac_cv_c_compiler_gnu
4355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4356$as_echo_n "checking how to run the C preprocessor... " >&6; }
4357# On Suns, sometimes $CPP names a directory.
4358if test -n "$CPP" && test -d "$CPP"; then
4359 CPP=
4360fi
4361if test -z "$CPP"; then
4362 if ${ac_cv_prog_CPP+:} false; then :
4363 $as_echo_n "(cached) " >&6
4364else
4365 # Double quotes because CPP needs to be expanded
4366 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4367 do
4368 ac_preproc_ok=false
4369for ac_c_preproc_warn_flag in '' yes
4370do
4371 # Use a header file that comes with gcc, so configuring glibc
4372 # with a fresh cross-compiler works.
4373 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4374 # <limits.h> exists even on freestanding compilers.
4375 # On the NeXT, cc -E runs the code through the compiler's parser,
4376 # not just through cpp. "Syntax error" is here to catch this case.
4377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4378/* end confdefs.h. */
4379#ifdef __STDC__
4380# include <limits.h>
4381#else
4382# include <assert.h>
4383#endif
4384 Syntax error
4385_ACEOF
4386if ac_fn_c_try_cpp "$LINENO"; then :
4387
4388else
4389 # Broken: fails on valid input.
4390continue
4391fi
4392rm -f conftest.err conftest.i conftest.$ac_ext
4393
4394 # OK, works on sane cases. Now check whether nonexistent headers
4395 # can be detected and how.
4396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4397/* end confdefs.h. */
4398#include <ac_nonexistent.h>
4399_ACEOF
4400if ac_fn_c_try_cpp "$LINENO"; then :
4401 # Broken: success on invalid input.
4402continue
4403else
4404 # Passes both tests.
4405ac_preproc_ok=:
4406break
4407fi
4408rm -f conftest.err conftest.i conftest.$ac_ext
4409
4410done
4411# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4412rm -f conftest.i conftest.err conftest.$ac_ext
4413if $ac_preproc_ok; then :
4414 break
4415fi
4416
4417 done
4418 ac_cv_prog_CPP=$CPP
4419
4420fi
4421 CPP=$ac_cv_prog_CPP
4422else
4423 ac_cv_prog_CPP=$CPP
4424fi
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4426$as_echo "$CPP" >&6; }
4427ac_preproc_ok=false
4428for ac_c_preproc_warn_flag in '' yes
4429do
4430 # Use a header file that comes with gcc, so configuring glibc
4431 # with a fresh cross-compiler works.
4432 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4433 # <limits.h> exists even on freestanding compilers.
4434 # On the NeXT, cc -E runs the code through the compiler's parser,
4435 # not just through cpp. "Syntax error" is here to catch this case.
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4437/* end confdefs.h. */
4438#ifdef __STDC__
4439# include <limits.h>
4440#else
4441# include <assert.h>
4442#endif
4443 Syntax error
4444_ACEOF
4445if ac_fn_c_try_cpp "$LINENO"; then :
4446
4447else
4448 # Broken: fails on valid input.
4449continue
4450fi
4451rm -f conftest.err conftest.i conftest.$ac_ext
4452
4453 # OK, works on sane cases. Now check whether nonexistent headers
4454 # can be detected and how.
4455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4456/* end confdefs.h. */
4457#include <ac_nonexistent.h>
4458_ACEOF
4459if ac_fn_c_try_cpp "$LINENO"; then :
4460 # Broken: success on invalid input.
4461continue
4462else
4463 # Passes both tests.
4464ac_preproc_ok=:
4465break
4466fi
4467rm -f conftest.err conftest.i conftest.$ac_ext
4468
4469done
4470# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4471rm -f conftest.i conftest.err conftest.$ac_ext
4472if $ac_preproc_ok; then :
4473
4474else
4475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4477as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4478See \`config.log' for more details" "$LINENO" 5; }
4479fi
4480
4481ac_ext=c
4482ac_cpp='$CPP $CPPFLAGS'
4483ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4484ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4485ac_compiler_gnu=$ac_cv_c_compiler_gnu
4486
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4488$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4489if ${ac_cv_path_GREP+:} false; then :
4490 $as_echo_n "(cached) " >&6
4491else
4492 if test -z "$GREP"; then
4493 ac_path_GREP_found=false
4494 # Loop through the user's path and test for each of PROGNAME-LIST
4495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4497do
4498 IFS=$as_save_IFS
4499 test -z "$as_dir" && as_dir=.
4500 for ac_prog in grep ggrep; do
4501 for ac_exec_ext in '' $ac_executable_extensions; do
4502 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4503 as_fn_executable_p "$ac_path_GREP" || continue
4504# Check for GNU ac_path_GREP and select it if it is found.
4505 # Check for GNU $ac_path_GREP
4506case `"$ac_path_GREP" --version 2>&1` in
4507*GNU*)
4508 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4509*)
4510 ac_count=0
4511 $as_echo_n 0123456789 >"conftest.in"
4512 while :
4513 do
4514 cat "conftest.in" "conftest.in" >"conftest.tmp"
4515 mv "conftest.tmp" "conftest.in"
4516 cp "conftest.in" "conftest.nl"
4517 $as_echo 'GREP' >> "conftest.nl"
4518 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4519 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4520 as_fn_arith $ac_count + 1 && ac_count=$as_val
4521 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4522 # Best one so far, save it but keep looking for a better one
4523 ac_cv_path_GREP="$ac_path_GREP"
4524 ac_path_GREP_max=$ac_count
4525 fi
4526 # 10*(2^10) chars as input seems more than enough
4527 test $ac_count -gt 10 && break
4528 done
4529 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4530esac
4531
4532 $ac_path_GREP_found && break 3
4533 done
4534 done
4535 done
4536IFS=$as_save_IFS
4537 if test -z "$ac_cv_path_GREP"; then
4538 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4539 fi
4540else
4541 ac_cv_path_GREP=$GREP
4542fi
4543
4544fi
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4546$as_echo "$ac_cv_path_GREP" >&6; }
4547 GREP="$ac_cv_path_GREP"
4548
4549
Łukasz Langaa785c872016-09-09 17:37:37 -07004550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4551$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4552if ${ac_cv_path_SED+:} false; then :
4553 $as_echo_n "(cached) " >&6
4554else
4555 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4556 for ac_i in 1 2 3 4 5 6 7; do
4557 ac_script="$ac_script$as_nl$ac_script"
4558 done
4559 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4560 { ac_script=; unset ac_script;}
4561 if test -z "$SED"; then
4562 ac_path_SED_found=false
4563 # Loop through the user's path and test for each of PROGNAME-LIST
4564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4565for as_dir in $PATH
4566do
4567 IFS=$as_save_IFS
4568 test -z "$as_dir" && as_dir=.
4569 for ac_prog in sed gsed; do
4570 for ac_exec_ext in '' $ac_executable_extensions; do
4571 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4572 as_fn_executable_p "$ac_path_SED" || continue
4573# Check for GNU ac_path_SED and select it if it is found.
4574 # Check for GNU $ac_path_SED
4575case `"$ac_path_SED" --version 2>&1` in
4576*GNU*)
4577 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4578*)
4579 ac_count=0
4580 $as_echo_n 0123456789 >"conftest.in"
4581 while :
4582 do
4583 cat "conftest.in" "conftest.in" >"conftest.tmp"
4584 mv "conftest.tmp" "conftest.in"
4585 cp "conftest.in" "conftest.nl"
4586 $as_echo '' >> "conftest.nl"
4587 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4588 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4589 as_fn_arith $ac_count + 1 && ac_count=$as_val
4590 if test $ac_count -gt ${ac_path_SED_max-0}; then
4591 # Best one so far, save it but keep looking for a better one
4592 ac_cv_path_SED="$ac_path_SED"
4593 ac_path_SED_max=$ac_count
4594 fi
4595 # 10*(2^10) chars as input seems more than enough
4596 test $ac_count -gt 10 && break
4597 done
4598 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4599esac
4600
4601 $ac_path_SED_found && break 3
4602 done
4603 done
4604 done
4605IFS=$as_save_IFS
4606 if test -z "$ac_cv_path_SED"; then
4607 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4608 fi
4609else
4610 ac_cv_path_SED=$SED
4611fi
4612
4613fi
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4615$as_echo "$ac_cv_path_SED" >&6; }
4616 SED="$ac_cv_path_SED"
4617 rm -f conftest.sed
4618
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004619
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004620
4621
Matthias Kloseb9621712010-04-24 17:59:49 +00004622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4623$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004625# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004626if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004627 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004628
4629 case $withval in
4630 no) with_cxx_main=no
4631 MAINCC='$(CC)';;
4632 yes) with_cxx_main=yes
4633 MAINCC='$(CXX)';;
4634 *) with_cxx_main=yes
4635 MAINCC=$withval
4636 if test -z "$CXX"
4637 then
4638 CXX=$withval
4639 fi;;
4640 esac
4641else
4642
4643 with_cxx_main=no
4644 MAINCC='$(CC)'
4645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004646fi
4647
Matthias Kloseb9621712010-04-24 17:59:49 +00004648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4649$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004650
4651preset_cxx="$CXX"
4652if test -z "$CXX"
4653then
4654 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004655 gcc) if test -n "$ac_tool_prefix"; then
4656 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4657set dummy ${ac_tool_prefix}g++; ac_word=$2
4658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4659$as_echo_n "checking for $ac_word... " >&6; }
4660if ${ac_cv_path_CXX+:} false; then :
4661 $as_echo_n "(cached) " >&6
4662else
4663 case $CXX in
4664 [\\/]* | ?:[\\/]*)
4665 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4666 ;;
4667 *)
4668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4669for as_dir in notfound
4670do
4671 IFS=$as_save_IFS
4672 test -z "$as_dir" && as_dir=.
4673 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004674 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004675 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4676 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4677 break 2
4678 fi
4679done
4680 done
4681IFS=$as_save_IFS
4682
4683 ;;
4684esac
4685fi
4686CXX=$ac_cv_path_CXX
4687if test -n "$CXX"; then
4688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4689$as_echo "$CXX" >&6; }
4690else
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692$as_echo "no" >&6; }
4693fi
4694
4695
4696fi
4697if test -z "$ac_cv_path_CXX"; then
4698 ac_pt_CXX=$CXX
4699 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004700set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703if ${ac_cv_path_ac_pt_CXX+:} false; then :
4704 $as_echo_n "(cached) " >&6
4705else
4706 case $ac_pt_CXX in
4707 [\\/]* | ?:[\\/]*)
4708 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4709 ;;
4710 *)
4711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in notfound
4713do
4714 IFS=$as_save_IFS
4715 test -z "$as_dir" && as_dir=.
4716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004718 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720 break 2
4721 fi
4722done
4723 done
4724IFS=$as_save_IFS
4725
4726 ;;
4727esac
4728fi
4729ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4730if test -n "$ac_pt_CXX"; then
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4732$as_echo "$ac_pt_CXX" >&6; }
4733else
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
4736fi
4737
4738 if test "x$ac_pt_CXX" = x; then
4739 CXX="g++"
4740 else
4741 case $cross_compiling:$ac_tool_warned in
4742yes:)
4743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4745ac_tool_warned=yes ;;
4746esac
4747 CXX=$ac_pt_CXX
4748 fi
4749else
4750 CXX="$ac_cv_path_CXX"
4751fi
4752 ;;
4753 cc) if test -n "$ac_tool_prefix"; then
4754 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4755set dummy ${ac_tool_prefix}c++; ac_word=$2
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004758if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760else
4761 case $CXX in
4762 [\\/]* | ?:[\\/]*)
4763 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4764 ;;
4765 *)
4766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4767for as_dir in notfound
4768do
4769 IFS=$as_save_IFS
4770 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004771 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775 break 2
4776 fi
4777done
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004779IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781 ;;
4782esac
4783fi
4784CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004785if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4787$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004788else
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4790$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004792
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793
4794fi
4795if test -z "$ac_cv_path_CXX"; then
4796 ac_pt_CXX=$CXX
4797 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004804 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806 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 +00004807 ;;
4808 *)
4809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810for as_dir in notfound
4811do
4812 IFS=$as_save_IFS
4813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 break 2
4819 fi
4820done
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004822IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 ;;
4825esac
4826fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004827ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4828if test -n "$ac_pt_CXX"; then
4829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4830$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004831else
Matthias Kloseb9621712010-04-24 17:59:49 +00004832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836 if test "x$ac_pt_CXX" = x; then
4837 CXX="c++"
4838 else
4839 case $cross_compiling:$ac_tool_warned in
4840yes:)
4841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4843ac_tool_warned=yes ;;
4844esac
4845 CXX=$ac_pt_CXX
4846 fi
4847else
4848 CXX="$ac_cv_path_CXX"
4849fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851 clang|*/clang) if test -n "$ac_tool_prefix"; then
4852 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4853set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4855$as_echo_n "checking for $ac_word... " >&6; }
4856if ${ac_cv_path_CXX+:} false; then :
4857 $as_echo_n "(cached) " >&6
4858else
4859 case $CXX in
4860 [\\/]* | ?:[\\/]*)
4861 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4862 ;;
4863 *)
4864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865for as_dir in notfound
4866do
4867 IFS=$as_save_IFS
4868 test -z "$as_dir" && as_dir=.
4869 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004870 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004871 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4873 break 2
4874 fi
4875done
4876 done
4877IFS=$as_save_IFS
4878
Ned Deilycbfb9a52012-06-23 16:02:19 -07004879 ;;
4880esac
4881fi
4882CXX=$ac_cv_path_CXX
4883if test -n "$CXX"; then
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4885$as_echo "$CXX" >&6; }
4886else
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4888$as_echo "no" >&6; }
4889fi
4890
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004891
4892fi
4893if test -z "$ac_cv_path_CXX"; then
4894 ac_pt_CXX=$CXX
4895 # Extract the first word of "clang++", so it can be a program name with args.
4896set dummy clang++; ac_word=$2
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4898$as_echo_n "checking for $ac_word... " >&6; }
4899if ${ac_cv_path_ac_pt_CXX+:} false; then :
4900 $as_echo_n "(cached) " >&6
4901else
4902 case $ac_pt_CXX in
4903 [\\/]* | ?:[\\/]*)
4904 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4905 ;;
4906 *)
4907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4908for as_dir in notfound
4909do
4910 IFS=$as_save_IFS
4911 test -z "$as_dir" && as_dir=.
4912 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004914 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4916 break 2
4917 fi
4918done
4919 done
4920IFS=$as_save_IFS
4921
4922 ;;
4923esac
4924fi
4925ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4926if test -n "$ac_pt_CXX"; then
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4928$as_echo "$ac_pt_CXX" >&6; }
4929else
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4931$as_echo "no" >&6; }
4932fi
4933
4934 if test "x$ac_pt_CXX" = x; then
4935 CXX="clang++"
4936 else
4937 case $cross_compiling:$ac_tool_warned in
4938yes:)
4939{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4940$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4941ac_tool_warned=yes ;;
4942esac
4943 CXX=$ac_pt_CXX
4944 fi
4945else
4946 CXX="$ac_cv_path_CXX"
4947fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004948 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004949 icc|*/icc) if test -n "$ac_tool_prefix"; then
4950 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4951set dummy ${ac_tool_prefix}icpc; ac_word=$2
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4953$as_echo_n "checking for $ac_word... " >&6; }
4954if ${ac_cv_path_CXX+:} false; then :
4955 $as_echo_n "(cached) " >&6
4956else
4957 case $CXX in
4958 [\\/]* | ?:[\\/]*)
4959 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4960 ;;
4961 *)
4962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963for as_dir in notfound
4964do
4965 IFS=$as_save_IFS
4966 test -z "$as_dir" && as_dir=.
4967 for ac_exec_ext in '' $ac_executable_extensions; do
4968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4969 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4971 break 2
4972 fi
4973done
4974 done
4975IFS=$as_save_IFS
4976
4977 ;;
4978esac
4979fi
4980CXX=$ac_cv_path_CXX
4981if test -n "$CXX"; then
4982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4983$as_echo "$CXX" >&6; }
4984else
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986$as_echo "no" >&6; }
4987fi
4988
4989
4990fi
4991if test -z "$ac_cv_path_CXX"; then
4992 ac_pt_CXX=$CXX
4993 # Extract the first word of "icpc", so it can be a program name with args.
4994set dummy icpc; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_path_ac_pt_CXX+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 case $ac_pt_CXX in
5001 [\\/]* | ?:[\\/]*)
5002 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5003 ;;
5004 *)
5005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006for as_dir in notfound
5007do
5008 IFS=$as_save_IFS
5009 test -z "$as_dir" && as_dir=.
5010 for ac_exec_ext in '' $ac_executable_extensions; do
5011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5012 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5014 break 2
5015 fi
5016done
5017 done
5018IFS=$as_save_IFS
5019
5020 ;;
5021esac
5022fi
5023ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5024if test -n "$ac_pt_CXX"; then
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5026$as_echo "$ac_pt_CXX" >&6; }
5027else
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
5030fi
5031
5032 if test "x$ac_pt_CXX" = x; then
5033 CXX="icpc"
5034 else
5035 case $cross_compiling:$ac_tool_warned in
5036yes:)
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5038$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5039ac_tool_warned=yes ;;
5040esac
5041 CXX=$ac_pt_CXX
5042 fi
5043else
5044 CXX="$ac_cv_path_CXX"
5045fi
5046 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005047 esac
5048 if test "$CXX" = "notfound"
5049 then
5050 CXX=""
5051 fi
5052fi
5053if test -z "$CXX"
5054then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005055 if test -n "$ac_tool_prefix"; then
5056 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5057 do
5058 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5059set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005062if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005064else
5065 if test -n "$CXX"; then
5066 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5067else
5068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071 IFS=$as_save_IFS
5072 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005075 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077 break 2
5078 fi
5079done
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005082
5083fi
5084fi
5085CXX=$ac_cv_prog_CXX
5086if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5088$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089else
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005092fi
5093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005095 test -n "$CXX" && break
5096 done
5097fi
5098if test -z "$CXX"; then
5099 ac_ct_CXX=$CXX
5100 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5101do
5102 # Extract the first word of "$ac_prog", so it can be a program name with args.
5103set dummy $ac_prog; ac_word=$2
5104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5105$as_echo_n "checking for $ac_word... " >&6; }
5106if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5107 $as_echo_n "(cached) " >&6
5108else
5109 if test -n "$ac_ct_CXX"; then
5110 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5111else
5112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5113for as_dir in $PATH
5114do
5115 IFS=$as_save_IFS
5116 test -z "$as_dir" && as_dir=.
5117 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005119 ac_cv_prog_ac_ct_CXX="$ac_prog"
5120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5121 break 2
5122 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005124 done
5125IFS=$as_save_IFS
5126
5127fi
5128fi
5129ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5130if test -n "$ac_ct_CXX"; then
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5132$as_echo "$ac_ct_CXX" >&6; }
5133else
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5135$as_echo "no" >&6; }
5136fi
5137
5138
5139 test -n "$ac_ct_CXX" && break
5140done
5141
5142 if test "x$ac_ct_CXX" = x; then
5143 CXX="notfound"
5144 else
5145 case $cross_compiling:$ac_tool_warned in
5146yes:)
5147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5149ac_tool_warned=yes ;;
5150esac
5151 CXX=$ac_ct_CXX
5152 fi
5153fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154
5155 if test "$CXX" = "notfound"
5156 then
5157 CXX=""
5158 fi
5159fi
5160if test "$preset_cxx" != "$CXX"
5161then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005162 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005163
5164 By default, distutils will build C++ extension modules with \"$CXX\".
5165 If this is not intended, then set CXX on the configure command line.
5166 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005167$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005168
5169 By default, distutils will build C++ extension modules with \"$CXX\".
5170 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005171 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172fi
5173
5174
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005175MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5176
5177
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5179$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5180cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005181#undef bfin
5182#undef cris
5183#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005184#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005185#undef hppa
5186#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005187#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005188#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005189#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005190#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005191#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005192#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005193 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005194#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005195# if defined(__x86_64__) && defined(__LP64__)
5196 x86_64-linux-gnu
5197# elif defined(__x86_64__) && defined(__ILP32__)
5198 x86_64-linux-gnux32
5199# elif defined(__i386__)
5200 i386-linux-gnu
5201# elif defined(__aarch64__) && defined(__AARCH64EL__)
5202# if defined(__ILP32__)
5203 aarch64_ilp32-linux-gnu
5204# else
5205 aarch64-linux-gnu
5206# endif
5207# elif defined(__aarch64__) && defined(__AARCH64EB__)
5208# if defined(__ILP32__)
5209 aarch64_be_ilp32-linux-gnu
5210# else
5211 aarch64_be-linux-gnu
5212# endif
5213# elif defined(__alpha__)
5214 alpha-linux-gnu
5215# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5216# if defined(__ARMEL__)
5217 arm-linux-gnueabihf
5218# else
5219 armeb-linux-gnueabihf
5220# endif
5221# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5222# if defined(__ARMEL__)
5223 arm-linux-gnueabi
5224# else
5225 armeb-linux-gnueabi
5226# endif
5227# elif defined(__hppa__)
5228 hppa-linux-gnu
5229# elif defined(__ia64__)
5230 ia64-linux-gnu
5231# elif defined(__m68k__) && !defined(__mcoldfire__)
5232 m68k-linux-gnu
5233# elif defined(__mips_hard_float) && defined(_MIPSEL)
5234# if _MIPS_SIM == _ABIO32
5235 mipsel-linux-gnu
5236# elif _MIPS_SIM == _ABIN32
5237 mips64el-linux-gnuabin32
5238# elif _MIPS_SIM == _ABI64
5239 mips64el-linux-gnuabi64
5240# else
5241# error unknown platform triplet
5242# endif
5243# elif defined(__mips_hard_float)
5244# if _MIPS_SIM == _ABIO32
5245 mips-linux-gnu
5246# elif _MIPS_SIM == _ABIN32
5247 mips64-linux-gnuabin32
5248# elif _MIPS_SIM == _ABI64
5249 mips64-linux-gnuabi64
5250# else
5251# error unknown platform triplet
5252# endif
5253# elif defined(__or1k__)
5254 or1k-linux-gnu
5255# elif defined(__powerpc__) && defined(__SPE__)
5256 powerpc-linux-gnuspe
5257# elif defined(__powerpc64__)
5258# if defined(__LITTLE_ENDIAN__)
5259 powerpc64le-linux-gnu
5260# else
5261 powerpc64-linux-gnu
5262# endif
5263# elif defined(__powerpc__)
5264 powerpc-linux-gnu
5265# elif defined(__s390x__)
5266 s390x-linux-gnu
5267# elif defined(__s390__)
5268 s390-linux-gnu
5269# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5270 sh4-linux-gnu
5271# elif defined(__sparc__) && defined(__arch64__)
5272 sparc64-linux-gnu
5273# elif defined(__sparc__)
5274 sparc-linux-gnu
5275# else
5276# error unknown platform triplet
5277# endif
5278#elif defined(__FreeBSD_kernel__)
5279# if defined(__LP64__)
5280 x86_64-kfreebsd-gnu
5281# elif defined(__i386__)
5282 i386-kfreebsd-gnu
5283# else
5284# error unknown platform triplet
5285# endif
5286#elif defined(__gnu_hurd__)
5287 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005288#elif defined(__APPLE__)
5289 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005290#else
5291# error unknown platform triplet
5292#endif
5293
5294EOF
5295
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005296if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005297 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5299$as_echo "$PLATFORM_TRIPLET" >&6; }
5300else
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5302$as_echo "none" >&6; }
5303fi
5304rm -f conftest.c conftest.out
5305
5306if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5307 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5308 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5309 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005310elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5311 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313
doko@ubuntu.com55532312016-06-14 08:55:19 +02005314if test x$MULTIARCH != x; then
5315 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5316fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005317
5318
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5320$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5321save_LDFLAGS="$LDFLAGS"
5322LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005323
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5325/* end confdefs.h. */
5326
5327int
5328main ()
5329{
5330
5331 ;
5332 return 0;
5333}
5334_ACEOF
5335if ac_fn_c_try_link "$LINENO"; then :
5336 NO_AS_NEEDED="-Wl,--no-as-needed"
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5338$as_echo "yes" >&6; }
5339else
5340 NO_AS_NEEDED=""
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
5343fi
5344rm -f core conftest.err conftest.$ac_objext \
5345 conftest$ac_exeext conftest.$ac_ext
5346LDFLAGS="$save_LDFLAGS"
5347
5348
5349
5350# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005351
Matthias Kloseb9621712010-04-24 17:59:49 +00005352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5353$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005354if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005356else
5357 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5358 then ac_cv_path_EGREP="$GREP -E"
5359 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 # Loop through the user's path and test for each of PROGNAME-LIST
5363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5365do
5366 IFS=$as_save_IFS
5367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 for ac_prog in egrep; do
5369 for ac_exec_ext in '' $ac_executable_extensions; do
5370 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005371 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005372# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 # Check for GNU $ac_path_EGREP
5374case `"$ac_path_EGREP" --version 2>&1` in
5375*GNU*)
5376 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5377*)
5378 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005379 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005380 while :
5381 do
5382 cat "conftest.in" "conftest.in" >"conftest.tmp"
5383 mv "conftest.tmp" "conftest.in"
5384 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5387 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5390 # Best one so far, save it but keep looking for a better one
5391 ac_cv_path_EGREP="$ac_path_EGREP"
5392 ac_path_EGREP_max=$ac_count
5393 fi
5394 # 10*(2^10) chars as input seems more than enough
5395 test $ac_count -gt 10 && break
5396 done
5397 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5398esac
5399
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $ac_path_EGREP_found && break 3
5401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005406 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 +00005407 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408else
5409 ac_cv_path_EGREP=$EGREP
5410fi
5411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 fi
5413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5415$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005417
5418
Matthias Kloseb9621712010-04-24 17:59:49 +00005419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5420$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005421if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $as_echo_n "(cached) " >&6
5423else
5424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005425/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005426#include <stdlib.h>
5427#include <stdarg.h>
5428#include <string.h>
5429#include <float.h>
5430
5431int
5432main ()
5433{
5434
5435 ;
5436 return 0;
5437}
5438_ACEOF
5439if ac_fn_c_try_compile "$LINENO"; then :
5440 ac_cv_header_stdc=yes
5441else
5442 ac_cv_header_stdc=no
5443fi
5444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5445
5446if test $ac_cv_header_stdc = yes; then
5447 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5449/* end confdefs.h. */
5450#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005451
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005452_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005456else
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005458fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005459rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460
Matthias Kloseb9621712010-04-24 17:59:49 +00005461fi
5462
5463if test $ac_cv_header_stdc = yes; then
5464 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5466/* end confdefs.h. */
5467#include <stdlib.h>
5468
5469_ACEOF
5470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5471 $EGREP "free" >/dev/null 2>&1; then :
5472
5473else
5474 ac_cv_header_stdc=no
5475fi
5476rm -f conftest*
5477
5478fi
5479
5480if test $ac_cv_header_stdc = yes; then
5481 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5482 if test "$cross_compiling" = yes; then :
5483 :
5484else
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5486/* end confdefs.h. */
5487#include <ctype.h>
5488#include <stdlib.h>
5489#if ((' ' & 0x0FF) == 0x020)
5490# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5491# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5492#else
5493# define ISLOWER(c) \
5494 (('a' <= (c) && (c) <= 'i') \
5495 || ('j' <= (c) && (c) <= 'r') \
5496 || ('s' <= (c) && (c) <= 'z'))
5497# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5498#endif
5499
5500#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5501int
5502main ()
5503{
5504 int i;
5505 for (i = 0; i < 256; i++)
5506 if (XOR (islower (i), ISLOWER (i))
5507 || toupper (i) != TOUPPER (i))
5508 return 2;
5509 return 0;
5510}
5511_ACEOF
5512if ac_fn_c_try_run "$LINENO"; then :
5513
5514else
5515 ac_cv_header_stdc=no
5516fi
5517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5518 conftest.$ac_objext conftest.beam conftest.$ac_ext
5519fi
5520
5521fi
5522fi
5523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5524$as_echo "$ac_cv_header_stdc" >&6; }
5525if test $ac_cv_header_stdc = yes; then
5526
5527$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5528
5529fi
5530
5531# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5533 inttypes.h stdint.h unistd.h
5534do :
5535 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5536ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5537"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005538if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005539 cat >>confdefs.h <<_ACEOF
5540#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5541_ACEOF
5542
5543fi
5544
5545done
5546
5547
5548
5549 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 +02005550if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 MINIX=yes
5552else
5553 MINIX=
5554fi
5555
5556
5557 if test "$MINIX" = yes; then
5558
5559$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5560
5561
5562$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5563
5564
5565$as_echo "#define _MINIX 1" >>confdefs.h
5566
5567 fi
5568
5569
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5571$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005572if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005573 $as_echo_n "(cached) " >&6
5574else
5575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5576/* end confdefs.h. */
5577
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005578# define __EXTENSIONS__ 1
5579 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005580int
5581main ()
5582{
5583
5584 ;
5585 return 0;
5586}
5587_ACEOF
5588if ac_fn_c_try_compile "$LINENO"; then :
5589 ac_cv_safe_to_define___extensions__=yes
5590else
5591 ac_cv_safe_to_define___extensions__=no
5592fi
5593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5594fi
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5596$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5597 test $ac_cv_safe_to_define___extensions__ = yes &&
5598 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5599
5600 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5601
5602 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5603
5604 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5605
5606 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5607
5608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609
Xavier de Gaye95750b12016-07-09 11:05:42 +02005610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5611$as_echo_n "checking for the Android API level... " >&6; }
5612cat >> conftest.c <<EOF
5613#ifdef __ANDROID__
5614#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005615android_api = __ANDROID_API__
5616arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005617#else
5618#error not Android
5619#endif
5620EOF
5621
5622if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005623 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5624 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5626$as_echo "$ANDROID_API_LEVEL" >&6; }
5627
5628cat >>confdefs.h <<_ACEOF
5629#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5630_ACEOF
5631
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005632
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5634$as_echo_n "checking for the Android arm ABI... " >&6; }
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5636$as_echo "$_arm_arch" >&6; }
5637 if test "$_arm_arch" = 7; then
5638 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5639 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5640 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005641else
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5643$as_echo "not Android" >&6; }
5644fi
5645rm -f conftest.c conftest.out
5646
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647# Check for unsupported systems
5648case $ac_sys_system/$ac_sys_release in
5649atheos*|Linux*/1*)
5650 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5651 echo See README for details.
5652 exit 1;;
5653esac
5654
5655
Matthias Kloseb9621712010-04-24 17:59:49 +00005656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5657$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658
5659# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005660if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 withval=$with_suffix;
5662 case $withval in
5663 no) EXEEXT=;;
5664 yes) EXEEXT=.exe;;
5665 *) EXEEXT=$withval;;
5666 esac
5667fi
5668
Matthias Kloseb9621712010-04-24 17:59:49 +00005669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5670$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672# Test whether we're running on a non-case-sensitive system, in which
5673# case we give a warning if no ext is given
5674
Matthias Kloseb9621712010-04-24 17:59:49 +00005675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5676$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677if test ! -d CaseSensitiveTestDir; then
5678mkdir CaseSensitiveTestDir
5679fi
5680
5681if test -d casesensitivetestdir
5682then
Matthias Kloseb9621712010-04-24 17:59:49 +00005683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5684$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685 BUILDEXEEXT=.exe
5686else
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5688$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 BUILDEXEEXT=$EXEEXT
5690fi
5691rmdir CaseSensitiveTestDir
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693case $ac_sys_system in
5694hp*|HP*)
5695 case $CC in
5696 cc|*/cc) CC="$CC -Ae";;
5697 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698esac
5699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5702$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703if test -z "$LIBRARY"
5704then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005705 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5708$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709
5710# LDLIBRARY is the name of the library to link against (as opposed to the
5711# name of the library into which to insert object files). BLDLIBRARY is also
5712# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5713# is blank as the main program is not linked directly against LDLIBRARY.
5714# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5715# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5716# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5717# DLLLIBRARY is the shared (i.e., DLL) library.
5718#
5719# RUNSHARED is used to run shared python without installed libraries
5720#
5721# INSTSONAME is the name of the shared library that will be use to install
5722# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005723#
5724# LDVERSION is the shared library version number, normally the Python version
5725# with the ABI build flags appended.
5726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728
5729
5730
5731
5732
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734LDLIBRARY="$LIBRARY"
5735BLDLIBRARY='$(LDLIBRARY)'
5736INSTSONAME='$(LDLIBRARY)'
5737DLLLIBRARY=''
5738LDLIBRARYDIR=''
5739RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005740LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741
5742# LINKCC is the command that links the python executable -- default is $(CC).
5743# If CXX is set, and if it is needed to link a main function that was
5744# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5745# python might then depend on the C++ runtime
5746# This is altered for AIX in order to build the export list before
5747# linking.
5748
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5750$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751if test -z "$LINKCC"
5752then
5753 LINKCC='$(PURIFY) $(MAINCC)'
5754 case $ac_sys_system in
5755 AIX*)
5756 exp_extra="\"\""
5757 if test $ac_sys_release -ge 5 -o \
5758 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5759 exp_extra="."
5760 fi
5761 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762 QNX*)
5763 # qcc must be used because the other compilers do not
5764 # support -N.
5765 LINKCC=qcc;;
5766 esac
5767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5769$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770
5771# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5772# make sure we default having it set to "no": this is used by
5773# distutils.unixccompiler to know if it should add --enable-new-dtags
5774# to linker command lines, and failing to detect GNU ld simply results
5775# in the same bahaviour as before.
5776
Matthias Kloseb9621712010-04-24 17:59:49 +00005777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5778$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779ac_prog=ld
5780if test "$GCC" = yes; then
5781 ac_prog=`$CC -print-prog-name=ld`
5782fi
5783case `"$ac_prog" -V 2>&1 < /dev/null` in
5784 *GNU*)
5785 GNULD=yes;;
5786 *)
5787 GNULD=no;;
5788esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5790$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5793$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005795if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796 enableval=$enable_shared;
5797fi
5798
5799
5800if test -z "$enable_shared"
5801then
5802 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005803 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 enable_shared="yes";;
5805 *)
5806 enable_shared="no";;
5807 esac
5808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5810$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5813$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005815if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005816 enableval=$enable_profiling;
5817fi
5818
5819if test "x$enable_profiling" = xyes; then
5820 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005821 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823/* end confdefs.h. */
5824int main() { return 0; }
5825_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005826if ac_fn_c_try_link "$LINENO"; then :
5827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005831rm -f core conftest.err conftest.$ac_objext \
5832 conftest$ac_exeext conftest.$ac_ext
5833 CC="$ac_save_cc"
5834else
5835 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5838$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839
doko@ubuntu.comba015832012-06-30 16:52:05 +02005840if test "x$enable_profiling" = xyes; then
5841 BASECFLAGS="-pg $BASECFLAGS"
5842 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
5844
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5846$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
5848# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5849# library that we build, but we do not want to link against it (we
5850# will find it with a -framework option). For this reason there is an
5851# extra variable BLDLIBRARY against which Python and the extension
5852# modules are linked, BLDLIBRARY. This is normally the same as
5853# LDLIBRARY, but empty for MacOSX framework builds.
5854if test "$enable_framework"
5855then
5856 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005857 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 BLDLIBRARY=''
5859else
5860 BLDLIBRARY='$(LDLIBRARY)'
5861fi
5862
5863# Other platforms follow
5864if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005865 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866
Matthias Kloseb9621712010-04-24 17:59:49 +00005867$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868
5869 case $ac_sys_system in
5870 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005871 LDLIBRARY='libpython$(LDVERSION).dll.a'
5872 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 ;;
5874 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005875 LDLIBRARY='libpython$(LDVERSION).so'
5876 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005877 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005879 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005880 then
5881 PY3LIBRARY=libpython3.so
5882 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005884 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005885 LDLIBRARY='libpython$(LDVERSION).so'
5886 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005887 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005889 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005890 then
5891 PY3LIBRARY=libpython3.so
5892 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ;;
5894 hp*|HP*)
5895 case `uname -m` in
5896 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005897 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 ;;
5899 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005900 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
5902 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005904 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005907 LDLIBRARY='libpython$(LDVERSION).dylib'
5908 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005909 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005911 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005913 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005914 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
5916 esac
5917else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005918 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 case $ac_sys_system in
5920 CYGWIN*)
5921 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
5924 esac
5925fi
5926
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005927if test "$cross_compiling" = yes; then
5928 RUNSHARED=
5929fi
5930
Matthias Kloseb9621712010-04-24 17:59:49 +00005931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5932$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005935if test -n "$ac_tool_prefix"; then
5936 for ac_prog in ar aal
5937 do
5938 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5939set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5941$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005942if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005943 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944else
5945 if test -n "$AR"; then
5946 ac_cv_prog_AR="$AR" # Let the user override the test.
5947else
5948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5949for as_dir in $PATH
5950do
5951 IFS=$as_save_IFS
5952 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005955 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 break 2
5958 fi
5959done
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961IFS=$as_save_IFS
5962
5963fi
5964fi
5965AR=$ac_cv_prog_AR
5966if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5968$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969else
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972fi
5973
5974
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005975 test -n "$AR" && break
5976 done
5977fi
5978if test -z "$AR"; then
5979 ac_ct_AR=$AR
5980 for ac_prog in ar aal
5981do
5982 # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if ${ac_cv_prog_ac_ct_AR+:} false; then :
5987 $as_echo_n "(cached) " >&6
5988else
5989 if test -n "$ac_ct_AR"; then
5990 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5991else
5992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995 IFS=$as_save_IFS
5996 test -z "$as_dir" && as_dir=.
5997 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005999 ac_cv_prog_ac_ct_AR="$ac_prog"
6000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001 break 2
6002 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006004 done
6005IFS=$as_save_IFS
6006
6007fi
6008fi
6009ac_ct_AR=$ac_cv_prog_ac_ct_AR
6010if test -n "$ac_ct_AR"; then
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6012$as_echo "$ac_ct_AR" >&6; }
6013else
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
6016fi
6017
6018
6019 test -n "$ac_ct_AR" && break
6020done
6021
6022 if test "x$ac_ct_AR" = x; then
6023 AR="ar"
6024 else
6025 case $cross_compiling:$ac_tool_warned in
6026yes:)
6027{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6028$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6029ac_tool_warned=yes ;;
6030esac
6031 AR=$ac_ct_AR
6032 fi
6033fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034
6035
6036# tweak ARFLAGS only if the user didn't set it on the command line
6037
6038if test -z "$ARFLAGS"
6039then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006040 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041fi
6042
doko@ubuntu.com58844492012-06-30 18:25:32 +02006043if test -n "$ac_tool_prefix"; then
6044 for ac_prog in readelf
6045 do
6046 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6047set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_prog_READELF+:} false; then :
6051 $as_echo_n "(cached) " >&6
6052else
6053 if test -n "$READELF"; then
6054 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6055else
6056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057for as_dir in $PATH
6058do
6059 IFS=$as_save_IFS
6060 test -z "$as_dir" && as_dir=.
6061 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006062 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006063 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6065 break 2
6066 fi
6067done
6068 done
6069IFS=$as_save_IFS
6070
6071fi
6072fi
6073READELF=$ac_cv_prog_READELF
6074if test -n "$READELF"; then
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6076$as_echo "$READELF" >&6; }
6077else
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6079$as_echo "no" >&6; }
6080fi
6081
6082
6083 test -n "$READELF" && break
6084 done
6085fi
6086if test -z "$READELF"; then
6087 ac_ct_READELF=$READELF
6088 for ac_prog in readelf
6089do
6090 # Extract the first word of "$ac_prog", so it can be a program name with args.
6091set dummy $ac_prog; ac_word=$2
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6093$as_echo_n "checking for $ac_word... " >&6; }
6094if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6095 $as_echo_n "(cached) " >&6
6096else
6097 if test -n "$ac_ct_READELF"; then
6098 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6099else
6100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103 IFS=$as_save_IFS
6104 test -z "$as_dir" && as_dir=.
6105 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006107 ac_cv_prog_ac_ct_READELF="$ac_prog"
6108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6109 break 2
6110 fi
6111done
6112 done
6113IFS=$as_save_IFS
6114
6115fi
6116fi
6117ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6118if test -n "$ac_ct_READELF"; then
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6120$as_echo "$ac_ct_READELF" >&6; }
6121else
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124fi
6125
6126
6127 test -n "$ac_ct_READELF" && break
6128done
6129
6130 if test "x$ac_ct_READELF" = x; then
6131 READELF=":"
6132 else
6133 case $cross_compiling:$ac_tool_warned in
6134yes:)
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6137ac_tool_warned=yes ;;
6138esac
6139 READELF=$ac_ct_READELF
6140 fi
6141fi
6142
6143if test "$cross_compiling" = yes; then
6144 case "$READELF" in
6145 readelf|:)
6146 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6147 ;;
6148 esac
6149fi
6150
6151
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006154hp*|HP*)
6155 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 if test -z "$INSTALL"
6157 then
6158 INSTALL="${srcdir}/install-sh -c"
6159 fi
6160esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161# Find a good install program. We prefer a C program (faster),
6162# so one script is as good as another. But avoid the broken or
6163# incompatible versions:
6164# SysV /etc/install, /usr/sbin/install
6165# SunOS /usr/etc/install
6166# IRIX /sbin/install
6167# AIX /bin/install
6168# AmigaOS /C/install, which installs bootblocks on floppy discs
6169# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6170# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6171# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6172# OS/2's system install, which has a completely different semantic
6173# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006174# Reject install programs that cannot install multiple files.
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6176$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006178if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006179 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180else
6181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182for as_dir in $PATH
6183do
6184 IFS=$as_save_IFS
6185 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 # Account for people who put trailing slashes in PATH elements.
6187case $as_dir/ in #((
6188 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191 /usr/ucb/* ) ;;
6192 *)
6193 # OSF1 and SCO ODT 3.0 have their own names for install.
6194 # Don't use installbsd from OSF since it installs stuff as root
6195 # by default.
6196 for ac_prog in ginstall scoinst install; do
6197 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006198 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199 if test $ac_prog = install &&
6200 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6201 # AIX install. It has an incompatible calling convention.
6202 :
6203 elif test $ac_prog = install &&
6204 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6205 # program-specific install script used by HP pwplus--don't use.
6206 :
6207 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 rm -rf conftest.one conftest.two conftest.dir
6209 echo one > conftest.one
6210 echo two > conftest.two
6211 mkdir conftest.dir
6212 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6213 test -s conftest.one && test -s conftest.two &&
6214 test -s conftest.dir/conftest.one &&
6215 test -s conftest.dir/conftest.two
6216 then
6217 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6218 break 3
6219 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220 fi
6221 fi
6222 done
6223 done
6224 ;;
6225esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006226
6227 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228IFS=$as_save_IFS
6229
Matthias Kloseb9621712010-04-24 17:59:49 +00006230rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231
6232fi
6233 if test "${ac_cv_path_install+set}" = set; then
6234 INSTALL=$ac_cv_path_install
6235 else
6236 # As a last resort, use the slow shell script. Don't cache a
6237 # value for INSTALL within a source directory, because that will
6238 # break other packages using the cache if that directory is
6239 # removed, or if the value is a relative name.
6240 INSTALL=$ac_install_sh
6241 fi
6242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6244$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245
6246# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6247# It thinks the first close brace ends the variable substitution.
6248test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6249
6250test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6251
6252test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6253
Matthias Klose93a0ef12012-03-15 18:08:34 +01006254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6255$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6256if test -z "$MKDIR_P"; then
6257 if ${ac_cv_path_mkdir+:} false; then :
6258 $as_echo_n "(cached) " >&6
6259else
6260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6261for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6262do
6263 IFS=$as_save_IFS
6264 test -z "$as_dir" && as_dir=.
6265 for ac_prog in mkdir gmkdir; do
6266 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006267 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006268 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6269 'mkdir (GNU coreutils) '* | \
6270 'mkdir (coreutils) '* | \
6271 'mkdir (fileutils) '4.1*)
6272 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6273 break 3;;
6274 esac
6275 done
6276 done
6277 done
6278IFS=$as_save_IFS
6279
6280fi
6281
6282 test -d ./--version && rmdir ./--version
6283 if test "${ac_cv_path_mkdir+set}" = set; then
6284 MKDIR_P="$ac_cv_path_mkdir -p"
6285 else
6286 # As a last resort, use the slow shell script. Don't cache a
6287 # value for MKDIR_P within a source directory, because that will
6288 # break other packages using the cache if that directory is
6289 # removed, or if the value is a relative name.
6290 MKDIR_P="$ac_install_sh -d"
6291 fi
6292fi
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6294$as_echo "$MKDIR_P" >&6; }
6295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296
6297# Not every filesystem supports hard links
6298
6299if test -z "$LN" ; then
6300 case $ac_sys_system in
6301 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302 *) LN=ln;;
6303 esac
6304fi
6305
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006306# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006307
6308ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6312$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313
6314# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006315if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316 withval=$with_pydebug;
6317if test "$withval" != no
6318then
6319
Matthias Kloseb9621712010-04-24 17:59:49 +00006320$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6323$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006325 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006326else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328fi
6329else
Matthias Kloseb9621712010-04-24 17:59:49 +00006330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332fi
6333
6334
T. Woutersddbfa2c2017-05-23 01:30:49 +02006335# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6336# the ABI. This allows enabling assertions without changing the ABI.
6337assertions='false'
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6339$as_echo_n "checking for --with-assertions... " >&6; }
6340
6341# Check whether --with-assertions was given.
6342if test "${with_assertions+set}" = set; then :
6343 withval=$with_assertions;
6344if test "$withval" != no
6345then
6346 assertions='true'
6347fi
6348fi
6349
6350if test "$assertions" = 'true'; then
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6352$as_echo "yes" >&6; }
6353elif test "$Py_DEBUG" = 'true'; then
6354 assertions='true'
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6356$as_echo "implied by --with-pydebug" >&6; }
6357else
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6359$as_echo "no" >&6; }
6360fi
6361
Brett Cannon63d98bc2016-09-06 17:12:40 -07006362# Enable optimization flags
6363
6364
6365Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6367$as_echo_n "checking for --enable-optimizations... " >&6; }
6368# Check whether --enable-optimizations was given.
6369if test "${enable_optimizations+set}" = set; then :
6370 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006371if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006372then
6373 Py_OPT='true'
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6375$as_echo "yes" >&6; };
6376else
6377 Py_OPT='false'
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379$as_echo "no" >&6; };
6380fi
6381else
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383$as_echo "no" >&6; }
6384fi
6385
6386if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006387 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6388 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006389 # 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 +00006390 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006391 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006392 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006393 DEF_MAKE_RULE="build_all"
6394else
6395 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006396 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006397 DEF_MAKE_RULE="all"
6398fi
6399
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006400# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6402$as_echo_n "checking for --with-lto... " >&6; }
6403
6404# Check whether --with-lto was given.
6405if test "${with_lto+set}" = set; then :
6406 withval=$with_lto;
6407if test "$withval" != no
6408then
6409 Py_LTO='true'
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6411$as_echo "yes" >&6; };
6412else
6413 Py_LTO='false'
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6415$as_echo "no" >&6; };
6416fi
6417else
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; }
6420fi
6421
6422if test "$Py_LTO" = 'true' ; then
6423 case $CC in
6424 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006425 case $ac_sys_system in
6426 Darwin*)
6427 # Any changes made here should be reflected in the GCC+Darwin case below
6428 LTOFLAGS="-flto -Wl,-export_dynamic"
6429 ;;
6430 *)
6431 LTOFLAGS="-flto"
6432 ;;
6433 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006434 ;;
6435 *gcc*)
6436 case $ac_sys_system in
6437 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006438 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006439 ;;
6440 *)
6441 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6442 ;;
6443 esac
6444 ;;
6445 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006446 CFLAGS="$CFLAGS $LTOFLAGS"
6447 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006448fi
6449
Brett Cannon7188a3e2015-09-18 15:13:44 -07006450# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006451
6452
6453
6454
6455
Gregory P. Smith799520c2016-09-07 16:10:00 -07006456# Make this work on systems where llvm tools are not installed with their
6457# normal names in the default $PATH (ie: Ubuntu). They exist under the
6458# non-suffixed name in their versioned llvm directory.
6459llvm_bin_dir=''
6460llvm_path="${PATH}"
6461if test "${CC}" = "clang"
6462then
6463 clang_bin=`which clang`
6464 # Some systems install clang elsewhere as a symlink to the real path
6465 # which is where the related llvm tools are located.
6466 if test -L "${clang_bin}"
6467 then
6468 clang_dir=`dirname "${clang_bin}"`
6469 clang_bin=`readlink "${clang_bin}"`
6470 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6471 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6472 fi
6473fi
Zachary Ware5af85642015-12-21 12:09:17 -06006474
Gregory P. Smith799520c2016-09-07 16:10:00 -07006475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6476$as_echo_n "checking target system type... " >&6; }
6477if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006478 $as_echo_n "(cached) " >&6
6479else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006480 if test "x$target_alias" = x; then
6481 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006482else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6484 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6485fi
6486
6487fi
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6489$as_echo "$ac_cv_target" >&6; }
6490case $ac_cv_target in
6491*-*-*) ;;
6492*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6493esac
6494target=$ac_cv_target
6495ac_save_IFS=$IFS; IFS='-'
6496set x $ac_cv_target
6497shift
6498target_cpu=$1
6499target_vendor=$2
6500shift; shift
6501# Remember, the first character of IFS is used to create $*,
6502# except with old shells:
6503target_os=$*
6504IFS=$ac_save_IFS
6505case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6506
6507
6508# The aliases save the names the user supplied, while $host etc.
6509# will get canonicalized.
6510test -n "$target_alias" &&
6511 test "$program_prefix$program_suffix$program_transform_name" = \
6512 NONENONEs,x,x, &&
6513 program_prefix=${target_alias}-
6514# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6515set dummy $target_alias-llvm-profdata; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6519 $as_echo_n "(cached) " >&6
6520else
6521 case $LLVM_PROFDATA in
6522 [\\/]* | ?:[\\/]*)
6523 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6524 ;;
6525 *)
6526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006528do
6529 IFS=$as_save_IFS
6530 test -z "$as_dir" && as_dir=.
6531 for ac_exec_ext in '' $ac_executable_extensions; do
6532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006533 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535 break 2
6536 fi
6537done
6538 done
6539IFS=$as_save_IFS
6540
Gregory P. Smith799520c2016-09-07 16:10:00 -07006541 ;;
6542esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006543fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006544LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6545if test -n "$LLVM_PROFDATA"; then
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6547$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006548else
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
Gregory P. Smith799520c2016-09-07 16:10:00 -07006554if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6555 if test "$build" = "$target"; then
6556 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6557 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6558set dummy llvm-profdata; ac_word=$2
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6560$as_echo_n "checking for $ac_word... " >&6; }
6561if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6562 $as_echo_n "(cached) " >&6
6563else
6564 case $ac_pt_LLVM_PROFDATA in
6565 [\\/]* | ?:[\\/]*)
6566 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6567 ;;
6568 *)
6569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6570for as_dir in ${llvm_path}
6571do
6572 IFS=$as_save_IFS
6573 test -z "$as_dir" && as_dir=.
6574 for ac_exec_ext in '' $ac_executable_extensions; do
6575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6576 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6578 break 2
6579 fi
6580done
6581 done
6582IFS=$as_save_IFS
6583
6584 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6585 ;;
6586esac
6587fi
6588ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6589if test -n "$ac_pt_LLVM_PROFDATA"; then
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6591$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6592else
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6598 else
6599 LLVM_PROFDATA="''"
6600 fi
6601else
6602 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6603fi
6604
6605
6606if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6607then
6608 LLVM_PROF_FOUND="found"
6609else
6610 LLVM_PROF_FOUND="not-found"
6611fi
6612if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6613then
6614 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6615 if test -n "${found_llvm_profdata}"
6616 then
6617 # llvm-profdata isn't directly in $PATH in some cases.
6618 # https://apple.stackexchange.com/questions/197053/
6619 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6620 LLVM_PROF_FOUND=found
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6622$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6623 fi
6624fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006625LLVM_PROF_ERR=no
6626case $CC in
6627 *clang*)
6628 # Any changes made here should be reflected in the GCC+Darwin case below
6629 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6630 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006631 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6633 if test $LLVM_PROF_FOUND = not-found
6634 then
6635 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006636 if test "${REQUIRE_PGO}" = "yes"
6637 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006638 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 -07006639 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640 fi
6641 ;;
6642 *gcc*)
6643 case $ac_sys_system in
6644 Darwin*)
6645 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6646 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006649 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006650 then
6651 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006652 if test "${REQUIRE_PGO}" = "yes"
6653 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006654 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 -07006655 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656 fi
6657 ;;
6658 *)
6659 PGO_PROF_GEN_FLAG="-fprofile-generate"
6660 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6661 LLVM_PROF_MERGER="true"
6662 LLVM_PROF_FILE=""
6663 ;;
6664 esac
6665 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006666 *icc*)
6667 PGO_PROF_GEN_FLAG="-prof-gen"
6668 PGO_PROF_USE_FLAG="-prof-use"
6669 LLVM_PROF_MERGER="true"
6670 LLVM_PROF_FILE=""
6671 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672esac
6673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6675# merged with this chunk of code?
6676
6677# Optimizer/debugger flags
6678# ------------------------
6679# (The following bit of code is complicated enough - please keep things
6680# indented properly. Just pretend you're editing Python code. ;-)
6681
6682# There are two parallel sets of case statements below, one that checks to
6683# see if OPT was set and one that does BASECFLAGS setting based upon
6684# compiler and platform. BASECFLAGS tweaks need to be made even if the
6685# user set OPT.
6686
6687# tweak OPT based on compiler and platform, only if the user didn't set
6688# it on the command line
6689
Victor Stinner9ed34a82017-05-02 22:35:58 +02006690
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006691if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692then
6693 case $GCC in
6694 yes)
6695 if test "$CC" != 'g++' ; then
6696 STRICT_PROTO="-Wstrict-prototypes"
6697 fi
6698 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6699 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6700 WRAP="-fwrapv"
6701 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006702
Stefan Krahaf04ff22011-12-08 22:20:31 +01006703 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006704 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006705 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006706 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006707 *)
6708 if $CC --version 2>&1 | grep -q clang
6709 then
6710 cc_is_clang=1
6711 else
6712 cc_is_clang=
6713 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006714 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006715
Victor Stinner35f3d242017-04-21 12:35:24 +02006716 if test -n "${cc_is_clang}"
6717 then
6718 # Clang also needs -fwrapv
6719 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006720 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6721 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006722 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006723 fi
6724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006725 case $ac_cv_prog_cc_g in
6726 yes)
6727 if test "$Py_DEBUG" = 'true' ; then
6728 # Optimization messes up debuggers, so turn it off for
6729 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006730 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006731 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006732 else
Victor Stinner28205b22017-04-21 11:24:34 +02006733 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006734 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735 else
Victor Stinner28205b22017-04-21 11:24:34 +02006736 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737 fi
6738 ;;
6739 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006740 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741 ;;
6742 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006743
Victor Stinner826f83f2017-04-28 15:07:10 +02006744 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746 case $ac_sys_system in
6747 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6748 ;;
6749 esac
6750 ;;
6751
6752 *)
6753 OPT="-O"
6754 ;;
6755 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756fi
6757
6758
6759
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761# The -arch flags for universal builds on OSX
6762UNIVERSAL_ARCH_FLAGS=
6763
6764
6765# tweak BASECFLAGS based on compiler and platform
6766case $GCC in
6767yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006768 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006769
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6771$as_echo_n "checking for -Wextra... " >&6; }
6772 ac_save_cc="$CC"
6773 CC="$CC -Wextra -Werror"
6774 if ${ac_cv_extra_warnings+:} false; then :
6775 $as_echo_n "(cached) " >&6
6776else
6777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6778/* end confdefs.h. */
6779
6780
6781int
6782main ()
6783{
6784
6785 ;
6786 return 0;
6787}
6788
6789_ACEOF
6790if ac_fn_c_try_compile "$LINENO"; then :
6791
6792 ac_cv_extra_warnings=yes
6793
6794else
6795
6796 ac_cv_extra_warnings=no
6797
6798fi
6799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6800fi
6801
6802 CC="$ac_save_cc"
6803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6804$as_echo "$ac_cv_extra_warnings" >&6; }
6805
6806 if test $ac_cv_extra_warnings = yes
6807 then
6808 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6809 fi
6810
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006811 # Python doesn't violate C99 aliasing rules, but older versions of
6812 # GCC produce warnings for legal Python code. Enable
6813 # -fno-strict-aliasing on versions of GCC that support but produce
6814 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6816$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817 ac_save_cc="$CC"
6818 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006819 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006820 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006821 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006822else
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006824/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006825
Matthias Kloseb159a552010-04-25 21:00:44 +00006826
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006827int
6828main ()
6829{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006830
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006831 ;
6832 return 0;
6833}
Matthias Kloseb159a552010-04-25 21:00:44 +00006834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006836if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006837
6838 CC="$ac_save_cc -fstrict-aliasing"
6839 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006841/* end confdefs.h. */
6842
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006843 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006844int
6845main ()
6846{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006847double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006848 ;
6849 return 0;
6850}
Matthias Kloseb159a552010-04-25 21:00:44 +00006851
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006853if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006854
6855 ac_cv_no_strict_aliasing=no
6856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857else
Matthias Kloseb159a552010-04-25 21:00:44 +00006858
6859 ac_cv_no_strict_aliasing=yes
6860
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006861fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006863
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006864else
Matthias Kloseb159a552010-04-25 21:00:44 +00006865
6866 ac_cv_no_strict_aliasing=no
6867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006870fi
6871
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006872 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6875$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006876 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877 then
6878 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6879 fi
6880
Zachary Ware5af85642015-12-21 12:09:17 -06006881 # ICC doesn't recognize the option, but only emits a warning
6882 ## XXX does it emit an unused result warning and can it be disabled?
6883 case "$CC" in
6884 *icc*)
6885 ac_cv_disable_unused_result_warning=no
6886 ;;
6887 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6889$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6890 ac_save_cc="$CC"
6891 CC="$CC -Wunused-result -Werror"
6892 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006893 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006894 $as_echo_n "(cached) " >&6
6895else
6896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6897/* end confdefs.h. */
6898
6899
6900int
6901main ()
6902{
6903
6904 ;
6905 return 0;
6906}
6907
6908_ACEOF
6909if ac_fn_c_try_compile "$LINENO"; then :
6910
6911 ac_cv_disable_unused_result_warning=yes
6912
6913else
6914
6915 ac_cv_disable_unused_result_warning=no
6916
6917fi
6918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6919fi
6920
6921 CFLAGS="$save_CFLAGS"
6922 CC="$ac_save_cc"
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6924$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006925 ;;
6926 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006927
6928 if test $ac_cv_disable_unused_result_warning = yes
6929 then
6930 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006931 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6932 fi
6933
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6935$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6936 ac_save_cc="$CC"
6937 CC="$CC -Wunused-parameter -Werror"
6938 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6939 $as_echo_n "(cached) " >&6
6940else
6941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6942/* end confdefs.h. */
6943
6944
6945int
6946main ()
6947{
6948
6949 ;
6950 return 0;
6951}
6952
6953_ACEOF
6954if ac_fn_c_try_compile "$LINENO"; then :
6955
6956 ac_cv_disable_unused_parameter_warning=yes
6957
6958else
6959
6960 ac_cv_disable_unused_parameter_warning=no
6961
6962fi
6963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6964fi
6965
6966 CC="$ac_save_cc"
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6968$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6969
6970 if test $ac_cv_disable_unused_parameter_warning = yes
6971 then
6972 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6973 fi
6974
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6976$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6977 ac_save_cc="$CC"
6978 CC="$CC -Wmissing-field-initializers -Werror"
6979 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6980 $as_echo_n "(cached) " >&6
6981else
6982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6983/* end confdefs.h. */
6984
6985
6986int
6987main ()
6988{
6989
6990 ;
6991 return 0;
6992}
6993
6994_ACEOF
6995if ac_fn_c_try_compile "$LINENO"; then :
6996
6997 ac_cv_disable_missing_field_initializers=yes
6998
6999else
7000
7001 ac_cv_disable_missing_field_initializers=no
7002
7003fi
7004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7005fi
7006
7007 CC="$ac_save_cc"
7008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7009$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7010
7011 if test $ac_cv_disable_missing_field_initializers = yes
7012 then
7013 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007014 fi
7015
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7017$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7018 ac_save_cc="$CC"
7019 CC="$CC -Wsign-compare"
7020 save_CFLAGS="$CFLAGS"
7021 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7022 $as_echo_n "(cached) " >&6
7023else
7024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7025/* end confdefs.h. */
7026
7027
7028int
7029main ()
7030{
7031
7032 ;
7033 return 0;
7034}
7035
7036_ACEOF
7037if ac_fn_c_try_compile "$LINENO"; then :
7038
7039 ac_cv_enable_sign_compare_warning=yes
7040
7041else
7042
7043 ac_cv_enable_sign_compare_warning=no
7044
7045fi
7046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7047fi
7048
7049 CFLAGS="$save_CFLAGS"
7050 CC="$ac_save_cc"
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7052$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7053
7054 if test $ac_cv_enable_sign_compare_warning = yes
7055 then
7056 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7057 fi
7058
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7060$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7061 ac_save_cc="$CC"
7062 CC="$CC -Wunreachable-code"
7063 save_CFLAGS="$CFLAGS"
7064 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7065 $as_echo_n "(cached) " >&6
7066else
7067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068/* end confdefs.h. */
7069
7070
7071int
7072main ()
7073{
7074
7075 ;
7076 return 0;
7077}
7078
7079_ACEOF
7080if ac_fn_c_try_compile "$LINENO"; then :
7081
7082 ac_cv_enable_unreachable_code_warning=yes
7083
7084else
7085
7086 ac_cv_enable_unreachable_code_warning=no
7087
7088fi
7089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7090fi
7091
7092 CFLAGS="$save_CFLAGS"
7093 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007094
7095 # Don't enable unreachable code warning in debug mode, since it usually
7096 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007097 # Issue #24324: Unfortunately, the unreachable code warning does not work
7098 # correctly on gcc and has been silently removed from the compiler.
7099 # It is supported on clang but on OS X systems gcc may be an alias
7100 # for clang. Try to determine if the compiler is not really gcc and,
7101 # if so, only then enable the warning.
7102 if test $ac_cv_enable_unreachable_code_warning = yes && \
7103 test "$Py_DEBUG" != "true" && \
7104 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007105 then
7106 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007107 else
7108 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007109 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7111$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007112
Victor Stinner193ee0a2017-02-06 14:24:00 +01007113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7114$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7115 ac_save_cc="$CC"
7116 CC="$CC -Werror=implicit-function-declaration"
7117 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7118 $as_echo_n "(cached) " >&6
7119else
7120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7121/* end confdefs.h. */
7122
7123
7124int
7125main ()
7126{
7127
7128 ;
7129 return 0;
7130}
7131
7132_ACEOF
7133if ac_fn_c_try_compile "$LINENO"; then :
7134
7135 ac_cv_enable_implicit_function_declaration_error=yes
7136
7137else
7138
7139 ac_cv_enable_implicit_function_declaration_error=no
7140
7141fi
7142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7143fi
7144
7145 CC="$ac_save_cc"
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7147$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7148
7149 if test $ac_cv_enable_implicit_function_declaration_error = yes
7150 then
7151 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7152 fi
7153
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007154 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7155 # support. Without this, treatment of subnormals doesn't follow
7156 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007157 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007158 alpha*)
7159 BASECFLAGS="$BASECFLAGS -mieee"
7160 ;;
7161 esac
7162
7163 case $ac_sys_system in
7164 SCO_SV*)
7165 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7166 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007167
7168 # is there any other compiler on Darwin besides gcc?
7169 Darwin*)
7170 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7171 # used to be here, but non-Apple gcc doesn't accept them.
7172 if test "${CC}" = gcc
7173 then
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007175$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007176 case "${UNIVERSALSDK}" in
7177 */MacOSX10.4u.sdk)
7178 # Build using 10.4 SDK, force usage of gcc when the
7179 # compiler is gcc, otherwise the user will get very
7180 # confusing error messages when building on OSX 10.6
7181 CC=gcc-4.0
7182 CPP=cpp-4.0
7183 ;;
7184 esac
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007186$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007187 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188
Ned Deily87adb6e2013-10-18 21:09:56 -07007189 if test "${enable_universalsdk}"
7190 then
7191 case "$UNIVERSAL_ARCHS" in
7192 32-bit)
7193 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7194 LIPO_32BIT_FLAGS=""
7195 ARCH_RUN_32BIT=""
7196 ;;
7197 64-bit)
7198 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7199 LIPO_32BIT_FLAGS=""
7200 ARCH_RUN_32BIT="true"
7201 ;;
7202 all)
7203 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7204 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7205 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7206 ;;
7207 intel)
7208 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7209 LIPO_32BIT_FLAGS="-extract i386"
7210 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7211 ;;
7212 intel-32)
7213 UNIVERSAL_ARCH_FLAGS="-arch i386"
7214 LIPO_32BIT_FLAGS=""
7215 ARCH_RUN_32BIT=""
7216 ;;
7217 3-way)
7218 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7219 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7220 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7221 ;;
7222 *)
7223 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7224 ;;
7225 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007226
Ned Deily87adb6e2013-10-18 21:09:56 -07007227 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7228 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7229 if test "${UNIVERSALSDK}" != "/"
7230 then
7231 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7232 fi
7233 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007234
Ned Deily87adb6e2013-10-18 21:09:56 -07007235 # Calculate an appropriate deployment target for this build:
7236 # The deployment target value is used explicitly to enable certain
7237 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007238 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007239 # component of the string returned by distutils.get_platform().
7240 #
7241 # Use the value from:
7242 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7243 # 2. the operating system version of the build machine if >= 10.6
7244 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7245 # below to pick either 10.3, 10.4, or 10.5 as the target.
7246 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247
Ned Deily87adb6e2013-10-18 21:09:56 -07007248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7249$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007250 cur_target_major=`sw_vers -productVersion | \
7251 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7252 cur_target_minor=`sw_vers -productVersion | \
7253 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7254 cur_target="${cur_target_major}.${cur_target_minor}"
7255 if test ${cur_target_major} -eq 10 && \
7256 test ${cur_target_minor} -ge 3 && \
7257 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007258 then
Ned Deily36820b62014-06-25 13:44:22 -07007259 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007260 cur_target=10.3
7261 if test ${enable_universalsdk}
7262 then
7263 case "$UNIVERSAL_ARCHS" in
7264 all|3-way|intel|64-bit)
7265 # These configurations were first supported in 10.5
7266 cur_target='10.5'
7267 ;;
7268 esac
7269 else
7270 if test `/usr/bin/arch` = "i386"
7271 then
7272 # 10.4 was the first release to support Intel archs
7273 cur_target="10.4"
7274 fi
7275 fi
7276 fi
7277 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007278
Ned Deily87adb6e2013-10-18 21:09:56 -07007279 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7280 # environment with a value that is the same as what we'll use
7281 # in the Makefile to ensure that we'll get the same compiler
7282 # environment during configure and build time.
7283 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7284 export MACOSX_DEPLOYMENT_TARGET
7285 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7287$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007288
Ned Deily87adb6e2013-10-18 21:09:56 -07007289 # end of Darwin* tests
7290 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291 esac
7292 ;;
7293
7294*)
7295 case $ac_sys_system in
7296 OpenUNIX*|UnixWare*)
7297 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7298 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007299 SCO_SV*)
7300 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7301 ;;
7302 esac
7303 ;;
7304esac
7305
Zachary Ware5af85642015-12-21 12:09:17 -06007306# ICC needs -fp-model strict or floats behave badly
7307case "$CC" in
7308*icc*)
7309 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7310 ;;
7311esac
7312
T. Woutersddbfa2c2017-05-23 01:30:49 +02007313if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007314 :
7315else
7316 OPT="-DNDEBUG $OPT"
7317fi
7318
7319if test "$ac_arch_flags"
7320then
7321 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7322fi
7323
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324# On some compilers, pthreads are available without further options
7325# (e.g. MacOS X). On some of these systems, the compiler will not
7326# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7327# So we have to see first whether pthreads are available without
7328# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7330$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007331if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007333else
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335 ac_cv_pthread_is_default=no
7336else
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338/* end confdefs.h. */
7339
Stefan Krah7dba5942012-11-22 22:49:11 +01007340#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341#include <pthread.h>
7342
7343void* routine(void* p){return NULL;}
7344
7345int main(){
7346 pthread_t p;
7347 if(pthread_create(&p,NULL,routine,NULL)!=0)
7348 return 1;
7349 (void)pthread_detach(p);
7350 return 0;
7351}
7352
7353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007354if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355
7356 ac_cv_pthread_is_default=yes
7357 ac_cv_kthread=no
7358 ac_cv_pthread=no
7359
7360else
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365fi
7366
7367
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368fi
7369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7371$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372
7373
7374if test $ac_cv_pthread_is_default = yes
7375then
7376 ac_cv_kpthread=no
7377else
7378# -Kpthread, if available, provides the right #defines
7379# and linker options to make pthread_create available
7380# Some compilers won't report that they do not support -Kpthread,
7381# so we need to run a program to see whether it really made the
7382# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7384$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007385if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387else
7388 ac_save_cc="$CC"
7389CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007390if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391 ac_cv_kpthread=no
7392else
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394/* end confdefs.h. */
7395
Stefan Krah7dba5942012-11-22 22:49:11 +01007396#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397#include <pthread.h>
7398
7399void* routine(void* p){return NULL;}
7400
7401int main(){
7402 pthread_t p;
7403 if(pthread_create(&p,NULL,routine,NULL)!=0)
7404 return 1;
7405 (void)pthread_detach(p);
7406 return 0;
7407}
7408
7409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007410if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 ac_cv_kpthread=yes
7412else
Matthias Kloseb9621712010-04-24 17:59:49 +00007413 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417fi
7418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419CC="$ac_save_cc"
7420fi
7421
Matthias Kloseb9621712010-04-24 17:59:49 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7423$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424fi
7425
7426if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7427then
7428# -Kthread, if available, provides the right #defines
7429# and linker options to make pthread_create available
7430# Some compilers won't report that they do not support -Kthread,
7431# so we need to run a program to see whether it really made the
7432# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7434$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007435if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437else
7438 ac_save_cc="$CC"
7439CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007440if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441 ac_cv_kthread=no
7442else
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444/* end confdefs.h. */
7445
Stefan Krah7dba5942012-11-22 22:49:11 +01007446#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447#include <pthread.h>
7448
7449void* routine(void* p){return NULL;}
7450
7451int main(){
7452 pthread_t p;
7453 if(pthread_create(&p,NULL,routine,NULL)!=0)
7454 return 1;
7455 (void)pthread_detach(p);
7456 return 0;
7457}
7458
7459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007460if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461 ac_cv_kthread=yes
7462else
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7466 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467fi
7468
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469CC="$ac_save_cc"
7470fi
7471
Matthias Kloseb9621712010-04-24 17:59:49 +00007472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7473$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474fi
7475
7476if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7477then
7478# -pthread, if available, provides the right #defines
7479# and linker options to make pthread_create available
7480# Some compilers won't report that they do not support -pthread,
7481# so we need to run a program to see whether it really made the
7482# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7484$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007485if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487else
7488 ac_save_cc="$CC"
7489CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007490if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491 ac_cv_pthread=no
7492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494/* end confdefs.h. */
7495
Stefan Krah7dba5942012-11-22 22:49:11 +01007496#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497#include <pthread.h>
7498
7499void* routine(void* p){return NULL;}
7500
7501int main(){
7502 pthread_t p;
7503 if(pthread_create(&p,NULL,routine,NULL)!=0)
7504 return 1;
7505 (void)pthread_detach(p);
7506 return 0;
7507}
7508
7509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007510if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511 ac_cv_pthread=yes
7512else
Matthias Kloseb9621712010-04-24 17:59:49 +00007513 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
7518
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519CC="$ac_save_cc"
7520fi
7521
Matthias Kloseb9621712010-04-24 17:59:49 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7523$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524fi
7525
7526# If we have set a CC compiler flag for thread support then
7527# check if it works for CXX, too.
7528ac_cv_cxx_thread=no
7529if test ! -z "$CXX"
7530then
Matthias Kloseb9621712010-04-24 17:59:49 +00007531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7532$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533ac_save_cxx="$CXX"
7534
7535if test "$ac_cv_kpthread" = "yes"
7536then
7537 CXX="$CXX -Kpthread"
7538 ac_cv_cxx_thread=yes
7539elif test "$ac_cv_kthread" = "yes"
7540then
7541 CXX="$CXX -Kthread"
7542 ac_cv_cxx_thread=yes
7543elif test "$ac_cv_pthread" = "yes"
7544then
7545 CXX="$CXX -pthread"
7546 ac_cv_cxx_thread=yes
7547fi
7548
7549if test $ac_cv_cxx_thread = yes
7550then
7551 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7552 $CXX -c conftest.$ac_ext 2>&5
7553 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7554 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7555 then
7556 ac_cv_cxx_thread=yes
7557 else
7558 ac_cv_cxx_thread=no
7559 fi
7560 rm -fr conftest*
7561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7563$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564fi
7565CXX="$ac_save_cxx"
7566
7567
7568# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7570$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007571if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573else
Matthias Kloseb9621712010-04-24 17:59:49 +00007574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575/* end confdefs.h. */
7576#include <stdlib.h>
7577#include <stdarg.h>
7578#include <string.h>
7579#include <float.h>
7580
7581int
7582main ()
7583{
7584
7585 ;
7586 return 0;
7587}
7588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007589if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590 ac_cv_header_stdc=yes
7591else
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7595
7596if test $ac_cv_header_stdc = yes; then
7597 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599/* end confdefs.h. */
7600#include <string.h>
7601
7602_ACEOF
7603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 $EGREP "memchr" >/dev/null 2>&1; then :
7605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606else
7607 ac_cv_header_stdc=no
7608fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007609rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610
7611fi
7612
7613if test $ac_cv_header_stdc = yes; then
7614 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616/* end confdefs.h. */
7617#include <stdlib.h>
7618
7619_ACEOF
7620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 $EGREP "free" >/dev/null 2>&1; then :
7622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623else
7624 ac_cv_header_stdc=no
7625fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007626rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627
7628fi
7629
7630if test $ac_cv_header_stdc = yes; then
7631 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633 :
7634else
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636/* end confdefs.h. */
7637#include <ctype.h>
7638#include <stdlib.h>
7639#if ((' ' & 0x0FF) == 0x020)
7640# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7641# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7642#else
7643# define ISLOWER(c) \
7644 (('a' <= (c) && (c) <= 'i') \
7645 || ('j' <= (c) && (c) <= 'r') \
7646 || ('s' <= (c) && (c) <= 'z'))
7647# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7648#endif
7649
7650#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7651int
7652main ()
7653{
7654 int i;
7655 for (i = 0; i < 256; i++)
7656 if (XOR (islower (i), ISLOWER (i))
7657 || toupper (i) != TOUPPER (i))
7658 return 2;
7659 return 0;
7660}
7661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007662if ac_fn_c_try_run "$LINENO"; then :
7663
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7668 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669fi
7670
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671fi
7672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7674$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675if test $ac_cv_header_stdc = yes; then
7676
Matthias Kloseb9621712010-04-24 17:59:49 +00007677$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678
7679fi
7680
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007681for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007682fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007683ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007684sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007685unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007686poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007687sys/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 +01007688sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007689sys/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 +01007690sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007691sys/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 -07007692libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007693linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007694sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007695do :
7696 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7697ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007698if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007700#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007701_ACEOF
7702
7703fi
7704
Guido van Rossum627b2d71993-12-24 10:39:16 +00007705done
7706
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007707ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007708for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7711$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007712if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007714else
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007716/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007717#include <sys/types.h>
7718#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007719
Martin v. Löwis11437992002-04-12 09:54:03 +00007720int
7721main ()
7722{
7723if ((DIR *) 0)
7724return 0;
7725 ;
7726 return 0;
7727}
7728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007730 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007731else
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007736eval ac_res=\$$as_ac_Header
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7738$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007739if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007740 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007741#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007742_ACEOF
7743
7744ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007747done
7748# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7749if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7751$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007752if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007754else
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759/* Override any GCC internal prototype to avoid an error.
7760 Use char because int might match the return type of a GCC
7761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007762#ifdef __cplusplus
7763extern "C"
7764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007765char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007766int
7767main ()
7768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ;
7771 return 0;
7772}
7773_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774for ac_lib in '' dir; do
7775 if test -z "$ac_lib"; then
7776 ac_res="none required"
7777 else
7778 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007779 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007780 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007784rm -f core conftest.err conftest.$ac_objext \
7785 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007786 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789done
Victor Stinnere0be4232011-10-25 13:06:09 +02007790if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792else
7793 ac_cv_search_opendir=no
7794fi
7795rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007796LIBS=$ac_func_search_save_LIBS
7797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7799$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007801if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007803
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007805
Michael W. Hudson54241132001-12-07 15:38:26 +00007806else
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7808$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007809if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007811else
7812 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816/* Override any GCC internal prototype to avoid an error.
7817 Use char because int might match the return type of a GCC
7818 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007819#ifdef __cplusplus
7820extern "C"
7821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007822char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007823int
7824main ()
7825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 ;
7828 return 0;
7829}
7830_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831for ac_lib in '' x; do
7832 if test -z "$ac_lib"; then
7833 ac_res="none required"
7834 else
7835 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841rm -f core conftest.err conftest.$ac_objext \
7842 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007843 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846done
Victor Stinnere0be4232011-10-25 13:06:09 +02007847if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849else
7850 ac_cv_search_opendir=no
7851fi
7852rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007853LIBS=$ac_func_search_save_LIBS
7854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7856$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007858if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007860
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861fi
7862
7863fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007864
Matthias Kloseb9621712010-04-24 17:59:49 +00007865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7866$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007867if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007869else
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007871/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007872#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007873int
7874main ()
7875{
7876return makedev(0, 0);
7877 ;
7878 return 0;
7879}
7880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007882 ac_cv_header_sys_types_h_makedev=yes
7883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886rm -f core conftest.err conftest.$ac_objext \
7887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007888
7889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7891$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007892
7893if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007894ac_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 +02007895if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007898
7899fi
7900
7901
7902
7903 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 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 +02007905if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007908
7909fi
7910
7911
7912 fi
7913fi
7914
Michael W. Hudson54241132001-12-07 15:38:26 +00007915
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007916# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7917# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7918SAVE_CFLAGS=$CFLAGS
7919CFLAGS="-std=c99 $CFLAGS"
7920for ac_header in bluetooth/bluetooth.h
7921do :
7922 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7923if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7924 cat >>confdefs.h <<_ACEOF
7925#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7926_ACEOF
7927
7928fi
7929
7930done
7931
7932CFLAGS=$SAVE_CFLAGS
7933
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007934# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7935for ac_header in net/if.h
7936do :
7937 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7938#ifdef STDC_HEADERS
7939# include <stdlib.h>
7940# include <stddef.h>
7941#else
7942# ifdef HAVE_STDLIB_H
7943# include <stdlib.h>
7944# endif
7945#endif
7946#ifdef HAVE_SYS_SOCKET_H
7947# include <sys/socket.h>
7948#endif
7949
7950"
Victor Stinnere0be4232011-10-25 13:06:09 +02007951if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007952 cat >>confdefs.h <<_ACEOF
7953#define HAVE_NET_IF_H 1
7954_ACEOF
7955
7956fi
7957
7958done
7959
7960
Martin v. Löwis11017b12006-01-14 18:12:57 +00007961# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007962for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007963do :
7964 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 +00007965#ifdef HAVE_ASM_TYPES_H
7966#include <asm/types.h>
7967#endif
7968#ifdef HAVE_SYS_SOCKET_H
7969#include <sys/socket.h>
7970#endif
7971
Matthias Kloseb9621712010-04-24 17:59:49 +00007972"
Victor Stinnere0be4232011-10-25 13:06:09 +02007973if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007974 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007975#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007976_ACEOF
7977
7978fi
7979
7980done
7981
7982
caaveryeffc12f2017-09-06 18:18:10 -04007983for ac_header in linux/vm_sockets.h
7984do :
7985 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7986#ifdef HAVE_SYS_SOCKET_H
7987#include <sys/socket.h>
7988#endif
7989
7990"
7991if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
7992 cat >>confdefs.h <<_ACEOF
7993#define HAVE_LINUX_VM_SOCKETS_H 1
7994_ACEOF
7995
7996fi
7997
7998done
7999
8000
Charles-François Natali47413c12011-10-06 19:47:44 +02008001# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008002for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008003do :
8004 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8005ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8006#ifdef HAVE_SYS_SOCKET_H
8007#include <sys/socket.h>
8008#endif
8009
8010"
8011if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8012 cat >>confdefs.h <<_ACEOF
8013#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8014_ACEOF
8015
8016fi
8017
8018done
8019
8020
Guido van Rossum627b2d71993-12-24 10:39:16 +00008021# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008022was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8024$as_echo_n "checking for clock_t in time.h... " >&6; }
8025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008026/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008027#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008028
8029_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008032 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008033else
Martin v. Löwis11437992002-04-12 09:54:03 +00008034
8035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008037
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008038
Guido van Rossum627b2d71993-12-24 10:39:16 +00008039fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008040rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008041
Matthias Kloseb9621712010-04-24 17:59:49 +00008042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8043$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008044
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8046$as_echo_n "checking for makedev... " >&6; }
8047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008048/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008049
Jesus Cea740f53a2010-04-28 11:35:30 +00008050#if defined(MAJOR_IN_MKDEV)
8051#include <sys/mkdev.h>
8052#elif defined(MAJOR_IN_SYSMACROS)
8053#include <sys/sysmacros.h>
8054#else
8055#include <sys/types.h>
8056#endif
8057
Neal Norwitz11690112002-07-30 01:08:28 +00008058int
8059main ()
8060{
Jesus Cea740f53a2010-04-28 11:35:30 +00008061
8062 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008063 ;
8064 return 0;
8065}
Matthias Kloseb159a552010-04-25 21:00:44 +00008066
Neal Norwitz11690112002-07-30 01:08:28 +00008067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008068if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008069 ac_cv_has_makedev=yes
8070else
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073rm -f core conftest.err conftest.$ac_objext \
8074 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8076$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008077if test "$ac_cv_has_makedev" = "yes"; then
8078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008080
8081fi
8082
Christian Heimes985ecdc2013-11-20 11:46:18 +01008083# byte swapping
8084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8085$as_echo_n "checking for le64toh... " >&6; }
8086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8087/* end confdefs.h. */
8088
8089#ifdef HAVE_ENDIAN_H
8090#include <endian.h>
8091#elif defined(HAVE_SYS_ENDIAN_H)
8092#include <sys/endian.h>
8093#endif
8094
8095int
8096main ()
8097{
8098
8099 le64toh(1)
8100 ;
8101 return 0;
8102}
8103
8104_ACEOF
8105if ac_fn_c_try_link "$LINENO"; then :
8106 ac_cv_has_le64toh=yes
8107else
8108 ac_cv_has_le64toh=no
8109fi
8110rm -f core conftest.err conftest.$ac_objext \
8111 conftest$ac_exeext conftest.$ac_ext
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8113$as_echo "$ac_cv_has_le64toh" >&6; }
8114if test "$ac_cv_has_le64toh" = "yes"; then
8115
8116$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8117
8118fi
8119
Martin v. Löwis399a6892002-10-04 10:22:02 +00008120use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008121# Don't use largefile support for GNU/Hurd
8122case $ac_sys_system in GNU*)
8123 use_lfs=no
8124esac
8125
Martin v. Löwis399a6892002-10-04 10:22:02 +00008126if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008127# Two defines needed to enable largefile support on various platforms
8128# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008129case $ac_sys_system/$ac_sys_release in
8130AIX*)
8131
8132$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8133
8134 ;;
8135esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008138
8139
Matthias Kloseb9621712010-04-24 17:59:49 +00008140$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008141
Martin v. Löwis399a6892002-10-04 10:22:02 +00008142fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008143
Guido van Rossum84e7b241996-08-19 21:59:00 +00008144# Add some code to confdefs.h so that the test for off_t works on SCO
8145cat >> confdefs.h <<\EOF
8146#if defined(SCO_DS)
8147#undef _OFF_T
8148#endif
8149EOF
8150
Guido van Rossumef2255b2000-03-10 22:30:29 +00008151# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008152ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008153if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008155else
Martin v. Löwis11437992002-04-12 09:54:03 +00008156
8157cat >>confdefs.h <<_ACEOF
8158#define mode_t int
8159_ACEOF
8160
8161fi
8162
Matthias Kloseb9621712010-04-24 17:59:49 +00008163ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008164if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008166else
Martin v. Löwis11437992002-04-12 09:54:03 +00008167
8168cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008170_ACEOF
8171
8172fi
8173
Matthias Kloseb9621712010-04-24 17:59:49 +00008174ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008175if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008177else
Martin v. Löwis11437992002-04-12 09:54:03 +00008178
8179cat >>confdefs.h <<_ACEOF
8180#define pid_t int
8181_ACEOF
8182
8183fi
8184
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008185
Martin v. Löwis11437992002-04-12 09:54:03 +00008186cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008187#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008188_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008189
Matthias Kloseb9621712010-04-24 17:59:49 +00008190ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008191if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008192
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008193else
Martin v. Löwis11437992002-04-12 09:54:03 +00008194
8195cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008197_ACEOF
8198
8199fi
8200
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8202$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008203if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008205else
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008207/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008208#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008209
8210_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008213 ac_cv_type_uid_t=yes
8214else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008215 ac_cv_type_uid_t=no
8216fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008217rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008218
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8221$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008222if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008225
8226
Matthias Kloseb9621712010-04-24 17:59:49 +00008227$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008228
8229fi
8230
Mark Dickinson983bc162012-12-02 12:11:38 +00008231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008233if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008236
8237fi
8238
Stefan Krah1919b7e2012-03-21 18:25:23 +01008239ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8240if test "x$ac_cv_type___uint128_t" = xyes; then :
8241
8242$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8243
8244fi
8245
Jack Jansendd19cf82001-12-06 22:36:17 +00008246
Michael W. Hudson54241132001-12-07 15:38:26 +00008247# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008248# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249# The cast to long int works around a bug in the HP C Compiler
8250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8252# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8254$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008255if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008257else
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 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 +00008259
Martin v. Löwis11437992002-04-12 09:54:03 +00008260else
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 if test "$ac_cv_type_int" = yes; then
8262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008264as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008265See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266 else
8267 ac_cv_sizeof_int=0
8268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8273$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274
8275
8276
Martin v. Löwis11437992002-04-12 09:54:03 +00008277cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008278#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008279_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008280
8281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282# The cast to long int works around a bug in the HP C Compiler
8283# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8284# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8285# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8287$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008288if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008290else
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 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 +00008292
Martin v. Löwis11437992002-04-12 09:54:03 +00008293else
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 if test "$ac_cv_type_long" = yes; then
8295 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008297as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008298See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299 else
8300 ac_cv_sizeof_long=0
8301 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8306$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307
8308
8309
Martin v. Löwis11437992002-04-12 09:54:03 +00008310cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008311#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008312_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008313
8314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008315# The cast to long int works around a bug in the HP C Compiler
8316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8318# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8320$as_echo_n "checking size of long long... " >&6; }
8321if ${ac_cv_sizeof_long_long+:} false; then :
8322 $as_echo_n "(cached) " >&6
8323else
8324 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8325
8326else
8327 if test "$ac_cv_type_long_long" = yes; then
8328 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8330as_fn_error 77 "cannot compute sizeof (long long)
8331See \`config.log' for more details" "$LINENO" 5; }
8332 else
8333 ac_cv_sizeof_long_long=0
8334 fi
8335fi
8336
8337fi
8338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8339$as_echo "$ac_cv_sizeof_long_long" >&6; }
8340
8341
8342
8343cat >>confdefs.h <<_ACEOF
8344#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8345_ACEOF
8346
8347
8348# The cast to long int works around a bug in the HP C Compiler
8349# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8350# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8351# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8353$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008354if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008356else
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 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 +00008358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359else
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 if test "$ac_cv_type_void_p" = yes; then
8361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8362$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008363as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008364See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365 else
8366 ac_cv_sizeof_void_p=0
8367 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008369
Martin v. Löwis11437992002-04-12 09:54:03 +00008370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8372$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008373
8374
8375
Martin v. Löwis11437992002-04-12 09:54:03 +00008376cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008377#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008378_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008379
8380
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381# The cast to long int works around a bug in the HP C Compiler
8382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8384# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8386$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008387if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008389else
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 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 +00008391
Martin v. Löwis11437992002-04-12 09:54:03 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 if test "$ac_cv_type_short" = yes; then
8394 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8395$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008396as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008397See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398 else
8399 ac_cv_sizeof_short=0
8400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008402
Martin v. Löwis11437992002-04-12 09:54:03 +00008403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8405$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406
8407
8408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008410#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008411_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008412
8413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414# The cast to long int works around a bug in the HP C Compiler
8415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8417# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8419$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008420if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 if test "$ac_cv_type_float" = yes; then
8427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008429as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008430See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431 else
8432 ac_cv_sizeof_float=0
8433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8438$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439
8440
8441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008443#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008444_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008445
8446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447# The cast to long int works around a bug in the HP C Compiler
8448# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8449# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8450# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8452$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008453if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008457
Martin v. Löwis11437992002-04-12 09:54:03 +00008458else
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 if test "$ac_cv_type_double" = yes; then
8460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008462as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008463See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464 else
8465 ac_cv_sizeof_double=0
8466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008468
Martin v. Löwis11437992002-04-12 09:54:03 +00008469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8471$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472
8473
8474
Martin v. Löwis11437992002-04-12 09:54:03 +00008475cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008476#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008477_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008478
8479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480# The cast to long int works around a bug in the HP C Compiler
8481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8483# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8485$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008486if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008488else
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 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 +00008490
Martin v. Löwis11437992002-04-12 09:54:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 if test "$ac_cv_type_fpos_t" = yes; then
8493 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008495as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008496See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497 else
8498 ac_cv_sizeof_fpos_t=0
8499 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8504$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505
8506
8507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008509#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008510_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008511
Michael W. Hudson54241132001-12-07 15:38:26 +00008512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513# The cast to long int works around a bug in the HP C Compiler
8514# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8515# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8516# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8518$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008519if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 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 +00008523
Martin v. Löwis18e16552006-02-15 17:27:45 +00008524else
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 if test "$ac_cv_type_size_t" = yes; then
8526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008528as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008529See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530 else
8531 ac_cv_sizeof_size_t=0
8532 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534
Martin v. Löwis18e16552006-02-15 17:27:45 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8537$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538
8539
8540
Martin v. Löwis18e16552006-02-15 17:27:45 +00008541cat >>confdefs.h <<_ACEOF
8542#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8543_ACEOF
8544
8545
Christian Heimes400adb02008-02-01 08:12:03 +00008546# The cast to long int works around a bug in the HP C Compiler
8547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8549# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8551$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008552if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 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 +00008556
Christian Heimes400adb02008-02-01 08:12:03 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 if test "$ac_cv_type_pid_t" = yes; then
8559 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008561as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008562See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008563 else
8564 ac_cv_sizeof_pid_t=0
8565 fi
8566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567
Christian Heimes400adb02008-02-01 08:12:03 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8570$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008571
8572
8573
8574cat >>confdefs.h <<_ACEOF
8575#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8576_ACEOF
8577
8578
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008579# The cast to long int works around a bug in the HP C Compiler
8580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8582# This bug is HP SR number 8606223364.
8583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8584$as_echo_n "checking size of uintptr_t... " >&6; }
8585if ${ac_cv_sizeof_uintptr_t+:} false; then :
8586 $as_echo_n "(cached) " >&6
8587else
8588 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8589
8590else
8591 if test "$ac_cv_type_uintptr_t" = yes; then
8592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8594as_fn_error 77 "cannot compute sizeof (uintptr_t)
8595See \`config.log' for more details" "$LINENO" 5; }
8596 else
8597 ac_cv_sizeof_uintptr_t=0
8598 fi
8599fi
8600
8601fi
8602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8603$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8604
8605
8606
8607cat >>confdefs.h <<_ACEOF
8608#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8609_ACEOF
8610
8611
Michael W. Hudson54241132001-12-07 15:38:26 +00008612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8614$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008615have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008617/* end confdefs.h. */
8618
8619int
8620main ()
8621{
8622long double x; x = (long double)0;
8623 ;
8624 return 0;
8625}
8626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008627if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008628
8629
Matthias Kloseb9621712010-04-24 17:59:49 +00008630$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008631
8632 have_long_double=yes
8633
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008634fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8637$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008638if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008639# The cast to long int works around a bug in the HP C Compiler
8640# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8641# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8642# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8644$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008645if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647else
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 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 +00008649
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008650else
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 if test "$ac_cv_type_long_double" = yes; then
8652 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008654as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008655See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008656 else
8657 ac_cv_sizeof_long_double=0
8658 fi
8659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008660
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8663$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008664
8665
8666
8667cat >>confdefs.h <<_ACEOF
8668#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8669_ACEOF
8670
8671
8672fi
8673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674# The cast to long int works around a bug in the HP C Compiler
8675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8677# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8679$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008680if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 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 +00008684
Thomas Woutersb2137042007-02-01 18:02:27 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 if test "$ac_cv_type__Bool" = yes; then
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008689as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008690See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691 else
8692 ac_cv_sizeof__Bool=0
8693 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695
Thomas Woutersb2137042007-02-01 18:02:27 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8698$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699
8700
8701
Thomas Woutersb2137042007-02-01 18:02:27 +00008702cat >>confdefs.h <<_ACEOF
8703#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8704_ACEOF
8705
8706
Thomas Woutersb2137042007-02-01 18:02:27 +00008707
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008708# The cast to long int works around a bug in the HP C Compiler
8709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8711# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8713$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008714if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008716else
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008718#ifdef HAVE_SYS_TYPES_H
8719#include <sys/types.h>
8720#endif
8721
Matthias Kloseb9621712010-04-24 17:59:49 +00008722"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008723
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008724else
Matthias Kloseb9621712010-04-24 17:59:49 +00008725 if test "$ac_cv_type_off_t" = yes; then
8726 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008728as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008729See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008730 else
8731 ac_cv_sizeof_off_t=0
8732 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8737$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008738
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008739
8740
Martin v. Löwis11437992002-04-12 09:54:03 +00008741cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008742#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008743_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008744
Michael W. Hudson54241132001-12-07 15:38:26 +00008745
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008746
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8748$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008749if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008750 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008751
Matthias Kloseb9621712010-04-24 17:59:49 +00008752$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008753
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8755$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008756else
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8758$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008759fi
8760
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008761# The cast to long int works around a bug in the HP C Compiler
8762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8766$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008767if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008771#ifdef HAVE_SYS_TYPES_H
8772#include <sys/types.h>
8773#endif
8774#ifdef HAVE_TIME_H
8775#include <time.h>
8776#endif
8777
Matthias Kloseb9621712010-04-24 17:59:49 +00008778"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 if test "$ac_cv_type_time_t" = yes; then
8782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008784as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008785See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008786 else
8787 ac_cv_sizeof_time_t=0
8788 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8793$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008794
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008795
8796
Martin v. Löwis11437992002-04-12 09:54:03 +00008797cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008798#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008799_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008800
Michael W. Hudson54241132001-12-07 15:38:26 +00008801
8802
Trent Mick635f6fb2000-08-23 21:33:05 +00008803# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008804ac_save_cc="$CC"
8805if test "$ac_cv_kpthread" = "yes"
8806then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008807elif test "$ac_cv_kthread" = "yes"
8808then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008809elif test "$ac_cv_pthread" = "yes"
8810then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008811fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008812
Matthias Kloseb9621712010-04-24 17:59:49 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8814$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008815have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008817/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008818
8819 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008820int
8821main ()
8822{
Guido van Rossum12580492000-09-24 16:47:19 +00008823pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008824 ;
8825 return 0;
8826}
Matthias Kloseb159a552010-04-25 21:00:44 +00008827
Martin v. Löwis11437992002-04-12 09:54:03 +00008828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008829if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008830 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8834$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008835if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8839# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8841$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008842if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844else
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008846#ifdef HAVE_PTHREAD_H
8847#include <pthread.h>
8848#endif
8849
Matthias Kloseb9621712010-04-24 17:59:49 +00008850"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 if test "$ac_cv_type_pthread_t" = yes; then
8854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008856as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008857See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858 else
8859 ac_cv_sizeof_pthread_t=0
8860 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862
Trent Mick635f6fb2000-08-23 21:33:05 +00008863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8865$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008866
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008867
8868
Martin v. Löwis11437992002-04-12 09:54:03 +00008869cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008870#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873
Trent Mick635f6fb2000-08-23 21:33:05 +00008874fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008875
8876# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8877# This checking will be unnecessary after removing deprecated TLS API.
8878# The cast to long int works around a bug in the HP C Compiler
8879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8881# This bug is HP SR number 8606223364.
8882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8883$as_echo_n "checking size of pthread_key_t... " >&6; }
8884if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8885 $as_echo_n "(cached) " >&6
8886else
8887 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8888"; then :
8889
8890else
8891 if test "$ac_cv_type_pthread_key_t" = yes; then
8892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8894as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8895See \`config.log' for more details" "$LINENO" 5; }
8896 else
8897 ac_cv_sizeof_pthread_key_t=0
8898 fi
8899fi
8900
8901fi
8902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8903$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8904
8905
8906
8907cat >>confdefs.h <<_ACEOF
8908#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8909_ACEOF
8910
8911
8912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8913$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8914if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8916/* end confdefs.h. */
8917#include <pthread.h>
8918int
8919main ()
8920{
8921pthread_key_t k; k * 1;
8922 ;
8923 return 0;
8924}
8925_ACEOF
8926if ac_fn_c_try_compile "$LINENO"; then :
8927 ac_pthread_key_t_is_arithmetic_type=yes
8928else
8929 ac_pthread_key_t_is_arithmetic_type=no
8930
8931fi
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8934$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8935 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8936
8937$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8938
8939 fi
8940else
8941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8942$as_echo "no" >&6; }
8943fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008944CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008945
Michael W. Hudson54241132001-12-07 15:38:26 +00008946
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008947case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008948 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008949 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8950 ;;
8951 Darwin/*)
8952 OTHER_LIBTOOL_OPT=""
8953 ;;
8954esac
8955
8956
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008957
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008958case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008959 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008960 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8961 if test "${enable_universalsdk}"; then
8962 :
8963 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008964 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008965 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008966 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008967 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008968 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008969 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008970 if test ${gcc_version} '<' 4.0
8971 then
8972 LIBTOOL_CRUFT="-lcc_dynamic"
8973 else
8974 LIBTOOL_CRUFT=""
8975 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008977 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008978else
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008980/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008981
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008982 #include <unistd.h>
8983 int main(int argc, char*argv[])
8984 {
8985 if (sizeof(long) == 4) {
8986 return 0;
8987 } else {
8988 return 1;
8989 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008990 }
8991
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008993if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008994 ac_osx_32bit=yes
8995else
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8999 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009000fi
9001
9002
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009003 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009004 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009005 i386)
9006 MACOSX_DEFAULT_ARCH="i386"
9007 ;;
9008 ppc)
9009 MACOSX_DEFAULT_ARCH="ppc"
9010 ;;
9011 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009012 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009013 ;;
9014 esac
9015 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009016 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009017 i386)
9018 MACOSX_DEFAULT_ARCH="x86_64"
9019 ;;
9020 ppc)
9021 MACOSX_DEFAULT_ARCH="ppc64"
9022 ;;
9023 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009024 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009025 ;;
9026 esac
9027
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009028 fi
9029
9030 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009031 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009032 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009033esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9035$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009036if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009037then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009038 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009040 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009041
Matthias Kloseb9621712010-04-24 17:59:49 +00009042$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9045$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009046 if test $enable_shared = "yes"
9047 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009048 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 +00009049 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009050else
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9052$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009053fi
9054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9056$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009057case $ac_sys_system/$ac_sys_release in
9058 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009059
Matthias Kloseb9621712010-04-24 17:59:49 +00009060$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009061
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9063$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009064 ;;
9065 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9067$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009068 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009069esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009070
Guido van Rossum0a516c91994-09-12 10:58:40 +00009071# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009072
Michael W. Hudson54241132001-12-07 15:38:26 +00009073
9074
9075
9076
Benjamin Peterson99f03762010-04-11 22:15:28 +00009077
Thomas Wouters477c8d52006-05-27 19:21:47 +00009078
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009079# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9080# -- usually .so, .sl on HP-UX, .dll on Cygwin
9081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9082$as_echo_n "checking the extension of shared libraries... " >&6; }
9083if test -z "$SHLIB_SUFFIX"; then
9084 case $ac_sys_system in
9085 hp*|HP*)
9086 case `uname -m` in
9087 ia64) SHLIB_SUFFIX=.so;;
9088 *) SHLIB_SUFFIX=.sl;;
9089 esac
9090 ;;
9091 CYGWIN*) SHLIB_SUFFIX=.dll;;
9092 *) SHLIB_SUFFIX=.so;;
9093 esac
9094fi
9095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9096$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009097
Guido van Rossum0a516c91994-09-12 10:58:40 +00009098# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009099# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009100# (Shared libraries in this instance are shared modules to be loaded into
9101# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9103$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009104if test -z "$LDSHARED"
9105then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009106 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009107 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009108 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009109 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009110 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009111 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009112 if test "$GCC" = "yes" ; then
9113 LDSHARED='$(CC) -shared'
9114 LDCXXSHARED='$(CXX) -shared'
9115 else
9116 LDSHARED='$(CC) -G'
9117 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009118 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009119 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009120 if test "$GCC" = "yes" ; then
9121 LDSHARED='$(CC) -shared'
9122 LDCXXSHARED='$(CXX) -shared'
9123 else
9124 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009125 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009126 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009127 LDSHARED='$(CC) -bundle'
9128 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009129 if test "$enable_framework" ; then
9130 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009131 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9132 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009133 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009134 else
9135 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009136 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009137 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009138 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009139 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009140 LDSHARED='$(CC) -bundle'
9141 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009142 if test "$enable_framework" ; then
9143 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009144 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9145 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009146 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009147 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009148 # No framework, use the Python app as bundle-loader
9149 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009150 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009151 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009152 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009153 Darwin/*)
9154 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9155 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009156
Ned Deily36820b62014-06-25 13:44:22 -07009157 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9158 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9159 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9160 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9161 if test ${dep_target_major} -eq 10 && \
9162 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009163 then
Ned Deily36820b62014-06-25 13:44:22 -07009164 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009165 LDSHARED='$(CC) -bundle'
9166 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009167 if test "$enable_framework" ; then
9168 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009169 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9170 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009171 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009172 else
9173 # No framework, use the Python app as bundle-loader
9174 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9175 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009176 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009177 fi
Ned Deily36820b62014-06-25 13:44:22 -07009178 else
9179 # building for OS X 10.3 and later
9180 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9181 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9182 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009183 fi
9184 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009185 Linux*|GNU*|QNX*)
9186 LDSHARED='$(CC) -shared'
9187 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009188 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009189 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009190 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009191 LDSHARED='$(CC) -shared'
9192 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009193 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009194 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009195 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009196 OpenBSD*)
9197 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9198 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009199 LDSHARED='$(CC) -shared $(CCSHARED)'
9200 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009201 else
9202 case `uname -r` in
9203 [01].* | 2.[0-7] | 2.[0-7].*)
9204 LDSHARED="ld -Bshareable ${LDFLAGS}"
9205 ;;
9206 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009207 LDSHARED='$(CC) -shared $(CCSHARED)'
9208 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009209 ;;
9210 esac
9211 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009212 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009213 LDSHARED='$(CC) -shared'
9214 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009215 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009216 if test "$GCC" = "yes" ; then
9217 LDSHARED='$(CC) -shared'
9218 LDCXXSHARED='$(CXX) -shared'
9219 else
9220 LDSHARED='$(CC) -G'
9221 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009222 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009223 SCO_SV*)
9224 LDSHARED='$(CC) -Wl,-G,-Bexport'
9225 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9226 CYGWIN*)
9227 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9228 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229 *) LDSHARED="ld";;
9230 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9233$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009234LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009235BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009236# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009237# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9239$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240if test -z "$CCSHARED"
9241then
Guido van Rossum07397971997-04-29 21:49:50 +00009242 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009243 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009244 then CCSHARED="-fPIC";
9245 elif test `uname -p` = sparc;
9246 then CCSHARED="-xcode=pic32";
9247 else CCSHARED="-Kpic";
9248 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009249 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009250 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009251 else CCSHARED="+z";
9252 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009253 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009254 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009255 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009256 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009257 if test "$GCC" = "yes"
9258 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009259 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009260 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009261 SCO_SV*)
9262 if test "$GCC" = "yes"
9263 then CCSHARED="-fPIC"
9264 else CCSHARED="-Kpic -belf"
9265 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009266 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9269$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009270# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009271# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9273$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009274if test -z "$LINKFORSHARED"
9275then
Guido van Rossum07397971997-04-29 21:49:50 +00009276 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009277 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009278 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009279 LINKFORSHARED="-Wl,-E -Wl,+s";;
9280# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009281 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009282 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009283 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009285 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009286
9287 # Issue #18075: the default maximum stack size (8MBytes) is too
9288 # small for the default recursion limit. Increase the stack size
9289 # to ensure that tests don't crash
9290 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9291
Jack Jansene578a632001-08-15 01:27:14 +00009292 if test "$enable_framework"
9293 then
Jack Jansenda49e192005-01-07 13:08:22 +00009294 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009295 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009296 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009297 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009298 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009299 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009300 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009301 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9302 then
9303 LINKFORSHARED="-Wl,--export-dynamic"
9304 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009305 SunOS/5*) case $CC in
9306 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009307 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009308 then
9309 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009310 fi;;
9311 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009312 CYGWIN*)
9313 if test $enable_shared = "no"
9314 then
9315 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9316 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009317 QNX*)
9318 # -Wl,-E causes the symbols to be added to the dynamic
9319 # symbol table so that they can be found when a module
9320 # is loaded. -N 2048K causes the stack size to be set
9321 # to 2048 kilobytes so that the stack doesn't overflow
9322 # when running test_compile.py.
9323 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9327$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328
Michael W. Hudson54241132001-12-07 15:38:26 +00009329
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009330
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9332$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009333if test ! "$LIBRARY" = "$LDLIBRARY"
9334then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009335 case $ac_sys_system in
9336 CYGWIN*)
9337 # Cygwin needs CCSHARED when building extension DLLs
9338 # but not when building the interpreter DLL.
9339 CFLAGSFORSHARED='';;
9340 *)
9341 CFLAGSFORSHARED='$(CCSHARED)'
9342 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9345$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009346
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009347# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9348# library (with --enable-shared).
9349# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009350# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9351# if it is not required, since it creates a dependency of the shared library
9352# to LIBS. This, in turn, means that applications linking the shared libpython
9353# don't need to link LIBS explicitly. The default should be only changed
9354# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9357$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009358case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009359 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009360 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009361esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9363$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009364
9365
Guido van Rossum627b2d71993-12-24 10:39:16 +00009366# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9368$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009369if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009370 $as_echo_n "(cached) " >&6
9371else
9372 ac_check_lib_save_LIBS=$LIBS
9373LIBS="-lsendfile $LIBS"
9374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9375/* end confdefs.h. */
9376
9377/* Override any GCC internal prototype to avoid an error.
9378 Use char because int might match the return type of a GCC
9379 builtin and then its argument prototype would still apply. */
9380#ifdef __cplusplus
9381extern "C"
9382#endif
9383char sendfile ();
9384int
9385main ()
9386{
9387return sendfile ();
9388 ;
9389 return 0;
9390}
9391_ACEOF
9392if ac_fn_c_try_link "$LINENO"; then :
9393 ac_cv_lib_sendfile_sendfile=yes
9394else
9395 ac_cv_lib_sendfile_sendfile=no
9396fi
9397rm -f core conftest.err conftest.$ac_objext \
9398 conftest$ac_exeext conftest.$ac_ext
9399LIBS=$ac_check_lib_save_LIBS
9400fi
9401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9402$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009403if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009404 cat >>confdefs.h <<_ACEOF
9405#define HAVE_LIBSENDFILE 1
9406_ACEOF
9407
9408 LIBS="-lsendfile $LIBS"
9409
9410fi
9411
Matthias Kloseb9621712010-04-24 17:59:49 +00009412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9413$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009414if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009416else
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009418LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422/* Override any GCC internal prototype to avoid an error.
9423 Use char because int might match the return type of a GCC
9424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009425#ifdef __cplusplus
9426extern "C"
9427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009428char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009429int
9430main ()
9431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ;
9434 return 0;
9435}
9436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009439else
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009442rm -f core conftest.err conftest.$ac_objext \
9443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009444LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9447$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009448if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 cat >>confdefs.h <<_ACEOF
9450#define HAVE_LIBDL 1
9451_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009452
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009453 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009454
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009455fi
9456 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9458$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009459if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009461else
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009463LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467/* Override any GCC internal prototype to avoid an error.
9468 Use char because int might match the return type of a GCC
9469 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009470#ifdef __cplusplus
9471extern "C"
9472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009473char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
9476{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 ;
9479 return 0;
9480}
9481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009484else
Matthias Kloseb9621712010-04-24 17:59:49 +00009485 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009487rm -f core conftest.err conftest.$ac_objext \
9488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009489LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9492$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009493if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 cat >>confdefs.h <<_ACEOF
9495#define HAVE_LIBDLD 1
9496_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009497
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009498 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009500fi
9501 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009502
Berker Peksag9a10ff42017-11-08 23:09:16 +03009503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9504$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9506/* end confdefs.h. */
9507#include <uuid/uuid.h>
9508int
9509main ()
9510{
9511
9512#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009513void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009514#endif
9515
9516 ;
9517 return 0;
9518}
9519_ACEOF
9520if ac_fn_c_try_compile "$LINENO"; then :
9521
9522$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9523
9524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9525$as_echo "yes" >&6; }
9526else
9527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9528$as_echo "no" >&6; }
9529
9530fi
9531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9532
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009533# 'Real Time' functions on Solaris
9534# posix4 on Solaris 2.6
9535# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009537$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009538if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009539 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009540else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009541 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009545/* Override any GCC internal prototype to avoid an error.
9546 Use char because int might match the return type of a GCC
9547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548#ifdef __cplusplus
9549extern "C"
9550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009551char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009552int
9553main ()
9554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 ;
9557 return 0;
9558}
9559_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560for ac_lib in '' pthread rt posix4; do
9561 if test -z "$ac_lib"; then
9562 ac_res="none required"
9563 else
9564 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009565 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009567 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570rm -f core conftest.err conftest.$ac_objext \
9571 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009572 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575done
Victor Stinnere0be4232011-10-25 13:06:09 +02009576if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578else
9579 ac_cv_search_sem_init=no
9580fi
9581rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009582LIBS=$ac_func_search_save_LIBS
9583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9585$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009587if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009589
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009590fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009591
Martin v. Löwis519adae2003-09-20 10:47:47 +00009592
Martin v. Löwis19d17342003-06-14 21:03:05 +00009593# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9595$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009596if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009598else
9599 ac_check_lib_save_LIBS=$LIBS
9600LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009602/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604/* Override any GCC internal prototype to avoid an error.
9605 Use char because int might match the return type of a GCC
9606 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009607#ifdef __cplusplus
9608extern "C"
9609#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009610char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009611int
9612main ()
9613{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009615 ;
9616 return 0;
9617}
9618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009619if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009620 ac_cv_lib_intl_textdomain=yes
9621else
Matthias Kloseb9621712010-04-24 17:59:49 +00009622 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009624rm -f core conftest.err conftest.$ac_objext \
9625 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626LIBS=$ac_check_lib_save_LIBS
9627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9629$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009630if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009631
Matthias Kloseb9621712010-04-24 17:59:49 +00009632$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633
Brett Cannonc6d936e2009-06-07 20:09:53 +00009634 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009635fi
9636
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009637
9638# checks for system dependent C++ extensions support
9639case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009640 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9641$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009644
Georg Brandl59e87bd2011-02-15 19:48:59 +00009645 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009646int
9647main ()
9648{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009649loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ;
9651 return 0;
9652}
Matthias Kloseb159a552010-04-25 21:00:44 +00009653
Martin v. Löwis11437992002-04-12 09:54:03 +00009654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009655if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009656
Matthias Kloseb159a552010-04-25 21:00:44 +00009657
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009659
Matthias Kloseb159a552010-04-25 21:00:44 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009661$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009662
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009663else
Matthias Kloseb159a552010-04-25 21:00:44 +00009664
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009666$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009667
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009669rm -f core conftest.err conftest.$ac_objext \
9670 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009671 *) ;;
9672esac
9673
Christian Heimes985ecdc2013-11-20 11:46:18 +01009674# check for systems that require aligned memory access
9675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9676$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009677if ${ac_cv_aligned_required+:} false; then :
9678 $as_echo_n "(cached) " >&6
9679else
9680 if test "$cross_compiling" = yes; then :
9681 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009682else
9683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9684/* end confdefs.h. */
9685
9686int main()
9687{
9688 char s[16];
9689 int i, *p1, *p2;
9690 for (i=0; i < 16; i++)
9691 s[i] = i;
9692 p1 = (int*)(s+1);
9693 p2 = (int*)(s+2);
9694 if (*p1 == *p2)
9695 return 1;
9696 return 0;
9697}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009698_ACEOF
9699if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009700 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009701else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009702 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009703fi
9704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9705 conftest.$ac_objext conftest.beam conftest.$ac_ext
9706fi
9707
9708
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009709fi
9710
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9712$as_echo "$ac_cv_aligned_required" >&6; }
9713if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009714
9715$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9716
9717fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009718
9719# str, bytes and memoryview hash algorithm
9720
9721
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9723$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9724
9725# Check whether --with-hash_algorithm was given.
9726if test "${with_hash_algorithm+set}" = set; then :
9727 withval=$with_hash_algorithm;
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9729$as_echo "$withval" >&6; }
9730case "$withval" in
9731 siphash24)
9732 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9733
9734 ;;
9735 fnv)
9736 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9737
9738 ;;
9739 *)
9740 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9741 ;;
9742esac
9743
9744else
9745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9746$as_echo "default" >&6; }
9747fi
9748
9749
Charles-François Natalid30b0222014-05-08 23:08:51 +01009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9751$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9752
9753# Check whether --with-address_sanitizer was given.
9754if test "${with_address_sanitizer+set}" = set; then :
9755 withval=$with_address_sanitizer;
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9757$as_echo "$withval" >&6; }
9758BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9759LDFLAGS="-fsanitize=address $LDFLAGS"
9760
9761else
9762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9763$as_echo "no" >&6; }
9764fi
9765
9766
Guido van Rossum70c7f481998-03-26 18:44:10 +00009767# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9769$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009770if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009772else
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009774LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778/* Override any GCC internal prototype to avoid an error.
9779 Use char because int might match the return type of a GCC
9780 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009781#ifdef __cplusplus
9782extern "C"
9783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009784char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009785int
9786main ()
9787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ;
9790 return 0;
9791}
9792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009793if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009795else
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009798rm -f core conftest.err conftest.$ac_objext \
9799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009800LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9803$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009804if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009805 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009806fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009807 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9809$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009810if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009812else
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009814LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818/* Override any GCC internal prototype to avoid an error.
9819 Use char because int might match the return type of a GCC
9820 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009821#ifdef __cplusplus
9822extern "C"
9823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009824char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009825int
9826main ()
9827{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 ;
9830 return 0;
9831}
9832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009833if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009835else
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009838rm -f core conftest.err conftest.$ac_objext \
9839 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009840LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9843$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009844if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009845 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009846fi
9847 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009848
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9850$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9856$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009857LIBS="$withval $LIBS"
9858
9859else
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9861$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862fi
9863
Guido van Rossum7f43da71994-08-01 12:15:30 +00009864
Victor Stinner8291b5e2015-03-20 16:03:14 +01009865
9866
9867
9868
9869
9870
9871
9872if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9873 if test -n "$ac_tool_prefix"; then
9874 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9875set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9877$as_echo_n "checking for $ac_word... " >&6; }
9878if ${ac_cv_path_PKG_CONFIG+:} false; then :
9879 $as_echo_n "(cached) " >&6
9880else
9881 case $PKG_CONFIG in
9882 [\\/]* | ?:[\\/]*)
9883 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9884 ;;
9885 *)
9886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9887for as_dir in $PATH
9888do
9889 IFS=$as_save_IFS
9890 test -z "$as_dir" && as_dir=.
9891 for ac_exec_ext in '' $ac_executable_extensions; do
9892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9893 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9895 break 2
9896 fi
9897done
9898 done
9899IFS=$as_save_IFS
9900
9901 ;;
9902esac
9903fi
9904PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9905if test -n "$PKG_CONFIG"; then
9906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9907$as_echo "$PKG_CONFIG" >&6; }
9908else
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9910$as_echo "no" >&6; }
9911fi
9912
9913
9914fi
9915if test -z "$ac_cv_path_PKG_CONFIG"; then
9916 ac_pt_PKG_CONFIG=$PKG_CONFIG
9917 # Extract the first word of "pkg-config", so it can be a program name with args.
9918set dummy pkg-config; ac_word=$2
9919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9920$as_echo_n "checking for $ac_word... " >&6; }
9921if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9922 $as_echo_n "(cached) " >&6
9923else
9924 case $ac_pt_PKG_CONFIG in
9925 [\\/]* | ?:[\\/]*)
9926 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9927 ;;
9928 *)
9929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9930for as_dir in $PATH
9931do
9932 IFS=$as_save_IFS
9933 test -z "$as_dir" && as_dir=.
9934 for ac_exec_ext in '' $ac_executable_extensions; do
9935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9936 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9938 break 2
9939 fi
9940done
9941 done
9942IFS=$as_save_IFS
9943
9944 ;;
9945esac
9946fi
9947ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9948if test -n "$ac_pt_PKG_CONFIG"; then
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9950$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9951else
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953$as_echo "no" >&6; }
9954fi
9955
9956 if test "x$ac_pt_PKG_CONFIG" = x; then
9957 PKG_CONFIG=""
9958 else
9959 case $cross_compiling:$ac_tool_warned in
9960yes:)
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9962$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9963ac_tool_warned=yes ;;
9964esac
9965 PKG_CONFIG=$ac_pt_PKG_CONFIG
9966 fi
9967else
9968 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9969fi
9970
9971fi
9972if test -n "$PKG_CONFIG"; then
9973 _pkg_min_version=0.9.0
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9975$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9976 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9978$as_echo "yes" >&6; }
9979 else
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
9982 PKG_CONFIG=""
9983 fi
9984fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009985
9986# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9988$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009989
9990# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009991if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009992 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009993else
9994 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009995fi
9996
9997
Matthias Kloseb9621712010-04-24 17:59:49 +00009998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9999$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010000
10001# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10003$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010004
10005# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010006if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010007 withval=$with_system_ffi;
10008fi
10009
10010
Zachary Waref40d4dd2016-09-17 01:25:24 -050010011if test "$ac_sys_system" = "Darwin"
10012then
10013 case "$with_system_ffi" in
10014 "")
10015 with_system_ffi="no"
10016 ;;
10017 yes|no)
10018 ;;
10019 *)
10020 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10021 ;;
10022 esac
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10024$as_echo "$with_system_ffi" >&6; }
10025else
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10027$as_echo "yes" >&6; }
10028 if test "$with_system_ffi" != ""
10029 then
10030 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10031$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10032 fi
10033 with_system_ffi="yes"
10034fi
Zachary Ware935043d2016-09-09 17:01:21 -070010035
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010036if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010037 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10038else
10039 LIBFFI_INCLUDEDIR=""
10040fi
10041
10042
Stefan Krah60187b52012-03-23 19:06:27 +010010043# Check for use of the system libmpdec library
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10045$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10046
10047# Check whether --with-system_libmpdec was given.
10048if test "${with_system_libmpdec+set}" = set; then :
10049 withval=$with_system_libmpdec;
10050else
10051 with_system_libmpdec="no"
10052fi
10053
10054
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10056$as_echo "$with_system_libmpdec" >&6; }
10057
Benjamin Peterson076ed002010-10-31 17:11:02 +000010058# Check for support for loadable sqlite extensions
10059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10060$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10061# Check whether --enable-loadable-sqlite-extensions was given.
10062if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10063 enableval=$enable_loadable_sqlite_extensions;
10064else
10065 enable_loadable_sqlite_extensions="no"
10066fi
10067
10068
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10070$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10071
Ned Deilyd819b932013-09-06 01:07:05 -070010072# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10073
10074
10075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10076$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10077
10078# Check whether --with-tcltk-includes was given.
10079if test "${with_tcltk_includes+set}" = set; then :
10080 withval=$with_tcltk_includes;
10081else
10082 with_tcltk_includes="default"
10083fi
10084
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10086$as_echo "$with_tcltk_includes" >&6; }
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10088$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10089
10090# Check whether --with-tcltk-libs was given.
10091if test "${with_tcltk_libs+set}" = set; then :
10092 withval=$with_tcltk_libs;
10093else
10094 with_tcltk_libs="default"
10095fi
10096
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10098$as_echo "$with_tcltk_libs" >&6; }
10099if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10100then
10101 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10102 then
10103 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10104 fi
10105 TCLTK_INCLUDES=""
10106 TCLTK_LIBS=""
10107else
10108 TCLTK_INCLUDES="$with_tcltk_includes"
10109 TCLTK_LIBS="$with_tcltk_libs"
10110fi
10111
Matthias Klose55708cc2009-04-30 08:06:49 +000010112# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10114$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010115
10116# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010118 withval=$with_dbmliborder;
10119if test x$with_dbmliborder = xyes
10120then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010121as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010122else
10123 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10124 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10125 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010126 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010127 fi
10128 done
10129fi
10130fi
10131
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10133$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135
Martin v. Löwis11437992002-04-12 09:54:03 +000010136
10137# Templates for things AC_DEFINEd more than once.
10138# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010139
10140
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010141if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010142then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010143 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010145
10146 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010147elif test "$ac_cv_kpthread" = "yes"
10148then
10149 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010150 if test "$ac_cv_cxx_thread" = "yes"; then
10151 CXX="$CXX -Kpthread"
10152 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010153 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010154elif test "$ac_cv_kthread" = "yes"
10155then
10156 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010157 if test "$ac_cv_cxx_thread" = "yes"; then
10158 CXX="$CXX -Kthread"
10159 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010160 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010161elif test "$ac_cv_pthread" = "yes"
10162then
10163 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010164 if test "$ac_cv_cxx_thread" = "yes"; then
10165 CXX="$CXX -pthread"
10166 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010167 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010168else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010169 if test ! -z "$withval" -a -d "$withval"
10170 then LDFLAGS="$LDFLAGS -L$withval"
10171 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010172
10173 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010174 # define _POSIX_THREADS in unistd.h. Some apparently don't
10175 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10177$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010179/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010180
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010181#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010182#ifdef _POSIX_THREADS
10183yes
10184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
10186_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010189 unistd_defines_pthreads=yes
10190else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010191 unistd_defines_pthreads=no
10192fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010193rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010194
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10196$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010197
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010199
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010200 # Just looking for pthread_create in libpthread is not enough:
10201 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10202 # So we really have to include pthread.h, and then link.
10203 _libs=$LIBS
10204 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10206$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010208/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010209
10210#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010211#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010212
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010213void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010214int
10215main ()
10216{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010217
10218pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 ;
10220 return 0;
10221}
10222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010223if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10226$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010227 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010228
Guido van Rossum02a1c402000-02-25 19:26:31 +000010229else
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010231 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010233if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010234
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010236
Guido van Rossumad678af1998-10-02 14:42:15 +000010237else
Guido van Rossumad678af1998-10-02 14:42:15 +000010238
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10240$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010241if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010243else
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010245LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249/* Override any GCC internal prototype to avoid an error.
10250 Use char because int might match the return type of a GCC
10251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252#ifdef __cplusplus
10253extern "C"
10254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010255char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010256int
10257main ()
10258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 ;
10261 return 0;
10262}
10263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010266else
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269rm -f core conftest.err conftest.$ac_objext \
10270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010271LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10274$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010275if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010276
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010277 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010278 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010279
Greg Steinadf63d62000-07-05 10:38:09 +000010280else
Greg Steinadf63d62000-07-05 10:38:09 +000010281
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10283$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010284if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010286else
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010288LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292/* Override any GCC internal prototype to avoid an error.
10293 Use char because int might match the return type of a GCC
10294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010295#ifdef __cplusplus
10296extern "C"
10297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010298char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010299int
10300main ()
10301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 ;
10304 return 0;
10305}
10306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010309else
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010312rm -f core conftest.err conftest.$ac_objext \
10313 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010314LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10317$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010318if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010319
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010320 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010321 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010322
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010323else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10326$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010327if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010329else
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010331LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335/* Override any GCC internal prototype to avoid an error.
10336 Use char because int might match the return type of a GCC
10337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010338#ifdef __cplusplus
10339extern "C"
10340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010341char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010342int
10343main ()
10344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010345return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010346 ;
10347 return 0;
10348}
10349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010350if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010352else
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010355rm -f core conftest.err conftest.$ac_objext \
10356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010357LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10360$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010361if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010362
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010363 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010364 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010365
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010366else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010367
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10369$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010370if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010372else
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010374LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378/* Override any GCC internal prototype to avoid an error.
10379 Use char because int might match the return type of a GCC
10380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010381#ifdef __cplusplus
10382extern "C"
10383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010384char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010385int
10386main ()
10387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010398rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010400LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10403$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010404if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010406 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010407 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010408
Guido van Rossumb93a8621998-05-07 13:27:32 +000010409else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010410
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010411 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10412
Guido van Rossum2d38f911996-06-26 19:47:01 +000010413fi
10414
Guido van Rossum627b2d71993-12-24 10:39:16 +000010415
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010416fi
10417
Guido van Rossum0be3e491997-05-22 20:33:33 +000010418fi
10419
Guido van Rossum49545951997-12-02 19:28:29 +000010420fi
10421
Guido van Rossumb93a8621998-05-07 13:27:32 +000010422fi
10423
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010425rm -f core conftest.err conftest.$ac_objext \
10426 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10429$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010430if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010432else
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010434LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438/* Override any GCC internal prototype to avoid an error.
10439 Use char because int might match the return type of a GCC
10440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010441#ifdef __cplusplus
10442extern "C"
10443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010444char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010445int
10446main ()
10447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ;
10450 return 0;
10451}
10452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010455else
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010458rm -f core conftest.err conftest.$ac_objext \
10459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010460LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10463$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010464if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010465
Martin v. Löwis130fb172001-07-19 11:00:41 +000010466 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010467
Guido van Rossum627b2d71993-12-24 10:39:16 +000010468fi
10469
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010470
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010471fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010472
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010473if test "$posix_threads" = "yes"; then
10474 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010475
Matthias Kloseb9621712010-04-24 17:59:49 +000010476$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010477
10478 fi
10479
10480 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10481 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010482 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010483$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010484
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010485 ;;
10486 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010487$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010488
10489 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010490 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010491$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010492
10493 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010494 esac
10495
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10497$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010498 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010500else
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010502 ac_cv_pthread_system_supported=no
10503else
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010506
10507 #include <stdio.h>
10508 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010509 void *foo(void *parm) {
10510 return NULL;
10511 }
10512 main() {
10513 pthread_attr_t attr;
10514 pthread_t id;
10515 if (pthread_attr_init(&attr)) exit(-1);
10516 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10517 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10518 exit(0);
10519 }
10520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010521if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010522 ac_cv_pthread_system_supported=yes
10523else
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10527 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010528fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530
Guido van Rossum627b2d71993-12-24 10:39:16 +000010531fi
10532
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10534$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535 if test "$ac_cv_pthread_system_supported" = "yes"; then
10536
Matthias Kloseb9621712010-04-24 17:59:49 +000010537$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010538
10539 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 for ac_func in pthread_sigmask
10541do :
10542 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010543if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010544 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010545#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010547 case $ac_sys_system in
10548 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010549
Matthias Kloseb9621712010-04-24 17:59:49 +000010550$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010551
10552 ;;
10553 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554fi
10555done
10556
pdoxe14679c2017-10-05 00:01:56 -070010557 for ac_func in pthread_getcpuclockid
10558do :
10559 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10560if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10561 cat >>confdefs.h <<_ACEOF
10562#define HAVE_PTHREAD_GETCPUCLOCKID 1
10563_ACEOF
10564
10565fi
10566done
10567
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010568fi
10569
10570
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10574$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010578 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10580$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010581 ipv6=no
10582 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10584$as_echo "yes" >&6; }
10585 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010586
10587 ipv6=yes
10588 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590else
Martin v. Löwis11437992002-04-12 09:54:03 +000010591
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010593/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594 /* AF_INET6 available check */
10595#include <sys/types.h>
10596#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010597int
10598main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010599{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010600int domain = AF_INET6;
10601 ;
10602 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603}
Martin v. Löwis11437992002-04-12 09:54:03 +000010604_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010605if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010606
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10608$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010609 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010610
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010611else
Matthias Kloseb159a552010-04-25 21:00:44 +000010612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010615 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010616
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010617fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010620if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10622$as_echo_n "checking if RFC2553 API is available... " >&6; }
10623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010624/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010625
10626 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010627#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010628int
10629main ()
10630{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010631struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010632 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 ;
10634 return 0;
10635}
Matthias Kloseb159a552010-04-25 21:00:44 +000010636
Martin v. Löwis11437992002-04-12 09:54:03 +000010637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010638if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010639
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010641$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010642 ipv6=yes
10643
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010644else
Matthias Kloseb159a552010-04-25 21:00:44 +000010645
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010647$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010648 ipv6=no
10649
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010652fi
10653
10654if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010656
10657fi
10658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659fi
10660
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661
10662ipv6type=unknown
10663ipv6lib=none
10664ipv6trylibc=no
10665
10666if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10668$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010669 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10670 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010671 case $i in
10672 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010674/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010675
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676#include <netinet/in.h>
10677#ifdef IPV6_INRIA_VERSION
10678yes
10679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010680_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010683 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010685rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010686
10687 ;;
10688 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010691
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010692#include <netinet/in.h>
10693#ifdef __KAME__
10694yes
10695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010696_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010699 ipv6type=$i;
10700 ipv6lib=inet6
10701 ipv6libdir=/usr/local/v6/lib
10702 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010704rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010705
10706 ;;
10707 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010709/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010710
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711#include <features.h>
10712#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10713yes
10714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010715_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718 ipv6type=$i;
10719 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010721rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722
10723 ;;
10724 linux-inet6)
10725 if test -d /usr/inet6; then
10726 ipv6type=$i
10727 ipv6lib=inet6
10728 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010729 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730 fi
10731 ;;
10732 solaris)
10733 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010734 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735 ipv6type=$i
10736 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737 fi
10738 fi
10739 ;;
10740 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010743
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744#include <sys/param.h>
10745#ifdef _TOSHIBA_INET6
10746yes
10747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751 ipv6type=$i;
10752 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010753 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010755rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756
10757 ;;
10758 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010760/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010761
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762#include </usr/local/v6/include/sys/v6config.h>
10763#ifdef __V6D__
10764yes
10765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010766_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769 ipv6type=$i;
10770 ipv6lib=v6;
10771 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010772 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010774rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775
10776 ;;
10777 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781#include <sys/param.h>
10782#ifdef _ZETA_MINAMI_INET6
10783yes
10784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 ipv6type=$i;
10789 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010790 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010792rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793
10794 ;;
10795 esac
10796 if test "$ipv6type" != "unknown"; then
10797 break
10798 fi
10799 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10801$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802fi
10803
10804if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10805 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10806 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10807 echo "using lib$ipv6lib"
10808 else
10809 if test $ipv6trylibc = "yes"; then
10810 echo "using libc"
10811 else
10812 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10813 echo "You need to fetch lib$ipv6lib.a from appropriate"
10814 echo 'ipv6 kit and compile beforehand.'
10815 exit 1
10816 fi
10817 fi
10818fi
10819
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10821$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10823/* end confdefs.h. */
10824 /* CAN_RAW_FD_FRAMES available check */
10825#include <linux/can/raw.h>
10826int
10827main ()
10828{
10829int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10830 ;
10831 return 0;
10832}
10833_ACEOF
10834if ac_fn_c_try_compile "$LINENO"; then :
10835
10836
10837$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10838
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10840$as_echo "yes" >&6; }
10841
10842else
10843
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10845$as_echo "no" >&6; }
10846
10847fi
10848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10849
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010850# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10852$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010854# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010855if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856 withval=$with_doc_strings;
10857fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010858
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010859
10860if test -z "$with_doc_strings"
10861then with_doc_strings="yes"
10862fi
10863if test "$with_doc_strings" != "no"
10864then
10865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010867
10868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10870$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010871
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010872# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10874$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010877if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010878 withval=$with_pymalloc;
10879fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010880
Neil Schemenauera35c6882001-02-27 04:45:05 +000010881
Neil Schemenauer16c22972002-03-22 15:34:49 +000010882if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010883then
10884 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010885fi
10886if test "$with_pymalloc" != "no"
10887then
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010890
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010891 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10894$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010895
Nick Coghlan6ea41862017-06-11 13:16:15 +100010896# Check for --with-c-locale-coercion
10897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10898$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10899
10900# Check whether --with-c-locale-coercion was given.
10901if test "${with_c_locale_coercion+set}" = set; then :
10902 withval=$with_c_locale_coercion;
10903fi
10904
10905
10906if test -z "$with_c_locale_coercion"
10907then
10908 with_c_locale_coercion="yes"
10909fi
10910if test "$with_c_locale_coercion" != "no"
10911then
10912
10913$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10914
10915fi
10916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10917$as_echo "$with_c_locale_coercion" >&6; }
10918
10919# Check for --with-c-locale-warning
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10921$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10922
10923# Check whether --with-c-locale-warning was given.
10924if test "${with_c_locale_warning+set}" = set; then :
10925 withval=$with_c_locale_warning;
10926fi
10927
10928
10929if test -z "$with_c_locale_warning"
10930then
10931 with_c_locale_warning="yes"
10932fi
10933if test "$with_c_locale_warning" != "no"
10934then
10935
10936$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10937
10938fi
10939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10940$as_echo "$with_c_locale_warning" >&6; }
10941
Benjamin Peterson05159c42009-12-03 03:01:27 +000010942# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10944$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010945
10946# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010947if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010948 withval=$with_valgrind;
10949else
10950 with_valgrind=no
10951fi
10952
Matthias Kloseb9621712010-04-24 17:59:49 +000010953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10954$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010955if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 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 +020010957if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010960
10961else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010962 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010963
10964fi
10965
10966
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010967 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010968fi
10969
Łukasz Langaa785c872016-09-09 17:37:37 -070010970# Check for DTrace support
10971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10972$as_echo_n "checking for --with-dtrace... " >&6; }
10973
10974# Check whether --with-dtrace was given.
10975if test "${with_dtrace+set}" = set; then :
10976 withval=$with_dtrace;
10977else
10978 with_dtrace=no
10979fi
10980
10981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
10982$as_echo "$with_dtrace" >&6; }
10983
10984
10985
10986
10987
10988DTRACE=
10989DFLAGS=
10990DTRACE_HEADERS=
10991DTRACE_OBJS=
10992
10993if test "$with_dtrace" = "yes"
10994then
10995 # Extract the first word of "dtrace", so it can be a program name with args.
10996set dummy dtrace; ac_word=$2
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10998$as_echo_n "checking for $ac_word... " >&6; }
10999if ${ac_cv_path_DTRACE+:} false; then :
11000 $as_echo_n "(cached) " >&6
11001else
11002 case $DTRACE in
11003 [\\/]* | ?:[\\/]*)
11004 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11005 ;;
11006 *)
11007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11008for as_dir in $PATH
11009do
11010 IFS=$as_save_IFS
11011 test -z "$as_dir" && as_dir=.
11012 for ac_exec_ext in '' $ac_executable_extensions; do
11013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11014 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11016 break 2
11017 fi
11018done
11019 done
11020IFS=$as_save_IFS
11021
11022 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11023 ;;
11024esac
11025fi
11026DTRACE=$ac_cv_path_DTRACE
11027if test -n "$DTRACE"; then
11028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11029$as_echo "$DTRACE" >&6; }
11030else
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11032$as_echo "no" >&6; }
11033fi
11034
11035
11036 if test "$DTRACE" = "not found"; then
11037 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11038 fi
11039
11040$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11041
11042 DTRACE_HEADERS="Include/pydtrace_probes.h"
11043
11044 # On OS X, DTrace providers do not need to be explicitly compiled and
11045 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11046 # generation flag '-G'. We check for presence of this flag, rather than
11047 # hardcoding support by OS, in the interest of robustness.
11048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11049$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11050if ${ac_cv_dtrace_link+:} false; then :
11051 $as_echo_n "(cached) " >&6
11052else
11053 ac_cv_dtrace_link=no
11054 echo 'BEGIN' > conftest.d
11055 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11056 ac_cv_dtrace_link=yes
11057
11058fi
11059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11060$as_echo "$ac_cv_dtrace_link" >&6; }
11061 if test "$ac_cv_dtrace_link" = "yes"; then
11062 DTRACE_OBJS="Python/pydtrace.o"
11063 fi
11064fi
11065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011066# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011067
Guido van Rossum98935bf2001-09-05 19:13:16 +000011068DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011069
Guido van Rossume97ee181999-12-20 21:27:22 +000011070# the dlopen() function means we might want to use dynload_shlib.o. some
11071# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011072for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011073do :
11074 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011075if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011076 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011077#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011078_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011079
Guido van Rossume97ee181999-12-20 21:27:22 +000011080fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011081done
Guido van Rossume97ee181999-12-20 21:27:22 +000011082
Michael W. Hudson54241132001-12-07 15:38:26 +000011083
Guido van Rossume97ee181999-12-20 21:27:22 +000011084# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11085# loading of modules.
11086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11088$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011089if test -z "$DYNLOADFILE"
11090then
11091 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011092 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11093 if test "$ac_cv_func_dlopen" = yes
11094 then DYNLOADFILE="dynload_shlib.o"
11095 else DYNLOADFILE="dynload_aix.o"
11096 fi
11097 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011098 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011099 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11100 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011101 *)
11102 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11103 # out any dynamic loading
11104 if test "$ac_cv_func_dlopen" = yes
11105 then DYNLOADFILE="dynload_shlib.o"
11106 else DYNLOADFILE="dynload_stub.o"
11107 fi
11108 ;;
11109 esac
11110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11112$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011113if test "$DYNLOADFILE" != "dynload_stub.o"
11114then
Martin v. Löwis11437992002-04-12 09:54:03 +000011115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011117
11118fi
11119
Neil Schemenauer4e425612001-06-19 15:44:15 +000011120# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11121
Michael W. Hudson54241132001-12-07 15:38:26 +000011122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11124$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011125if test -z "$MACHDEP_OBJS"
11126then
Jack Jansene578a632001-08-15 01:27:14 +000011127 MACHDEP_OBJS=$extra_machdep_objs
11128else
11129 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011130fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011131if test -z "$MACHDEP_OBJS"; then
11132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11133$as_echo "none" >&6; }
11134else
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11136$as_echo "$MACHDEP_OBJS" >&6; }
11137fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011138
Guido van Rossum627b2d71993-12-24 10:39:16 +000011139# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011140for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011141 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011142 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011143 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011144 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011145 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011146 if_nameindex \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011147 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011148 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011149 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011150 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011151 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011152 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011153 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011154 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011155 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11156 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011157 sigaction sigaltstack siginterrupt sigpending sigrelse \
11158 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011159 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011160 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011161 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011162do :
11163 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11164ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011165if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011167#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011168_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011170fi
11171done
11172
Michael W. Hudson54241132001-12-07 15:38:26 +000011173
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011174ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11175 #include <dirent.h>
11176"
11177if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11178
11179$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11180
11181fi
11182
11183
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011184# For some functions, having a definition is not sufficient, since
11185# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11187$as_echo_n "checking for chroot... " >&6; }
11188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011189/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011190#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011191int
11192main ()
11193{
11194void *x=chroot
11195 ;
11196 return 0;
11197}
11198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011199if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011200
Matthias Kloseb9621712010-04-24 17:59:49 +000011201$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011202
Matthias Kloseb159a552010-04-25 21:00:44 +000011203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011204$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011205else
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11207$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011208
11209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11212$as_echo_n "checking for link... " >&6; }
11213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011214/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011215#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011216int
11217main ()
11218{
11219void *x=link
11220 ;
11221 return 0;
11222}
11223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011224if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011227
Matthias Kloseb159a552010-04-25 21:00:44 +000011228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011230else
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011233
11234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11237$as_echo_n "checking for symlink... " >&6; }
11238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011239/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011240#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011241int
11242main ()
11243{
11244void *x=symlink
11245 ;
11246 return 0;
11247}
11248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011250
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011252
Matthias Kloseb159a552010-04-25 21:00:44 +000011253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011254$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011255else
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11257$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011258
11259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11262$as_echo_n "checking for fchdir... " >&6; }
11263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011264/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011265#include <unistd.h>
11266int
11267main ()
11268{
11269void *x=fchdir
11270 ;
11271 return 0;
11272}
11273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011277
Matthias Kloseb159a552010-04-25 21:00:44 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011279$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011280else
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11282$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011283
11284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11287$as_echo_n "checking for fsync... " >&6; }
11288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011290#include <unistd.h>
11291int
11292main ()
11293{
11294void *x=fsync
11295 ;
11296 return 0;
11297}
11298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011300
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011302
Matthias Kloseb159a552010-04-25 21:00:44 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011304$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011305else
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011308
11309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11312$as_echo_n "checking for fdatasync... " >&6; }
11313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011315#include <unistd.h>
11316int
11317main ()
11318{
11319void *x=fdatasync
11320 ;
11321 return 0;
11322}
11323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011327
Matthias Kloseb159a552010-04-25 21:00:44 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011330else
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011333
11334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11337$as_echo_n "checking for epoll... " >&6; }
11338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011339/* end confdefs.h. */
11340#include <sys/epoll.h>
11341int
11342main ()
11343{
11344void *x=epoll_create
11345 ;
11346 return 0;
11347}
11348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011352
Matthias Kloseb159a552010-04-25 21:00:44 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011355else
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011358
11359fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11362$as_echo_n "checking for epoll_create1... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11364/* end confdefs.h. */
11365#include <sys/epoll.h>
11366int
11367main ()
11368{
11369void *x=epoll_create1
11370 ;
11371 return 0;
11372}
11373_ACEOF
11374if ac_fn_c_try_compile "$LINENO"; then :
11375
11376$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11377
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11379$as_echo "yes" >&6; }
11380else
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
11383
11384fi
11385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11387$as_echo_n "checking for kqueue... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011389/* end confdefs.h. */
11390
11391#include <sys/types.h>
11392#include <sys/event.h>
11393
11394int
11395main ()
11396{
11397int x=kqueue()
11398 ;
11399 return 0;
11400}
11401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011402if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011403
Matthias Kloseb9621712010-04-24 17:59:49 +000011404$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011405
Matthias Kloseb159a552010-04-25 21:00:44 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011408else
Matthias Kloseb9621712010-04-24 17:59:49 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011411
11412fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11415$as_echo_n "checking for prlimit... " >&6; }
11416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11417/* end confdefs.h. */
11418
11419#include <sys/time.h>
11420#include <sys/resource.h>
11421
11422int
11423main ()
11424{
11425void *x=prlimit
11426 ;
11427 return 0;
11428}
11429_ACEOF
11430if ac_fn_c_try_compile "$LINENO"; then :
11431
11432$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11433
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11435$as_echo "yes" >&6; }
11436else
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11438$as_echo "no" >&6; }
11439
11440fi
11441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11442
Martin v. Löwisd5843682002-11-21 20:41:28 +000011443# On some systems (eg. FreeBSD 5), we would find a definition of the
11444# functions ctermid_r, setgroups in the library, but no prototype
11445# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11446# address to avoid compiler warnings and potential miscompilations
11447# because of the missing prototypes.
11448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11450$as_echo_n "checking for ctermid_r... " >&6; }
11451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011452/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011453
Martin v. Löwisd5843682002-11-21 20:41:28 +000011454#include <stdio.h>
11455
Martin v. Löwisd5843682002-11-21 20:41:28 +000011456int
11457main ()
11458{
11459void* p = ctermid_r
11460 ;
11461 return 0;
11462}
11463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011465
Matthias Kloseb9621712010-04-24 17:59:49 +000011466$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011467
Matthias Kloseb159a552010-04-25 21:00:44 +000011468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011469$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011470else
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11472$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011473
11474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11476
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11478$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011479if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011480 $as_echo_n "(cached) " >&6
11481else
11482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011483/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011484#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011485int
11486main ()
11487{
11488void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011489
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011490 ;
11491 return 0;
11492}
11493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011494if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011495 ac_cv_flock_decl=yes
11496else
11497 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011498
11499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011501
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011502fi
11503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11504$as_echo "$ac_cv_flock_decl" >&6; }
11505if test "x${ac_cv_flock_decl}" = xyes; then
11506 for ac_func in flock
11507do :
11508 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011509if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011510 cat >>confdefs.h <<_ACEOF
11511#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011512_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011513
Antoine Pitroua3000072010-09-07 14:52:42 +000011514else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011516$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011517if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011518 $as_echo_n "(cached) " >&6
11519else
11520 ac_check_lib_save_LIBS=$LIBS
11521LIBS="-lbsd $LIBS"
11522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11523/* end confdefs.h. */
11524
11525/* Override any GCC internal prototype to avoid an error.
11526 Use char because int might match the return type of a GCC
11527 builtin and then its argument prototype would still apply. */
11528#ifdef __cplusplus
11529extern "C"
11530#endif
11531char flock ();
11532int
11533main ()
11534{
11535return flock ();
11536 ;
11537 return 0;
11538}
11539_ACEOF
11540if ac_fn_c_try_link "$LINENO"; then :
11541 ac_cv_lib_bsd_flock=yes
11542else
11543 ac_cv_lib_bsd_flock=no
11544fi
11545rm -f core conftest.err conftest.$ac_objext \
11546 conftest$ac_exeext conftest.$ac_ext
11547LIBS=$ac_check_lib_save_LIBS
11548fi
11549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11550$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011551if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011552 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011553
11554
11555$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11556
11557
11558fi
11559
11560
11561fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011562done
11563
Antoine Pitroua3000072010-09-07 14:52:42 +000011564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11567$as_echo_n "checking for getpagesize... " >&6; }
11568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011569/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011570
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011571#include <unistd.h>
11572
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011573int
11574main ()
11575{
11576void* p = getpagesize
11577 ;
11578 return 0;
11579}
11580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011584
Matthias Kloseb159a552010-04-25 21:00:44 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11589$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011590
11591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011593
Victor Stinner984890f2011-11-24 13:53:38 +010011594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11595$as_echo_n "checking for broken unsetenv... " >&6; }
11596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11597/* end confdefs.h. */
11598
11599#include <stdlib.h>
11600
11601int
11602main ()
11603{
11604int res = unsetenv("DUMMY")
11605 ;
11606 return 0;
11607}
11608_ACEOF
11609if ac_fn_c_try_compile "$LINENO"; then :
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
11612else
11613
11614$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11615
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11617$as_echo "yes" >&6; }
11618
11619fi
11620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11621
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011622for ac_prog in true
11623do
11624 # Extract the first word of "$ac_prog", so it can be a program name with args.
11625set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11627$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011628if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011630else
11631 if test -n "$TRUE"; then
11632 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11633else
11634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11635for as_dir in $PATH
11636do
11637 IFS=$as_save_IFS
11638 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011641 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 $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 +000011643 break 2
11644 fi
11645done
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011647IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011648
11649fi
11650fi
11651TRUE=$ac_cv_prog_TRUE
11652if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11654$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11657$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011658fi
11659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011660
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011661 test -n "$TRUE" && break
11662done
11663test -n "$TRUE" || TRUE="/bin/true"
11664
11665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11667$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011668if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011670else
11671 ac_check_lib_save_LIBS=$LIBS
11672LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011676/* Override any GCC internal prototype to avoid an error.
11677 Use char because int might match the return type of a GCC
11678 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011679#ifdef __cplusplus
11680extern "C"
11681#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011682char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011683int
11684main ()
11685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011686return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011692 ac_cv_lib_c_inet_aton=yes
11693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011696rm -f core conftest.err conftest.$ac_objext \
11697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011698LIBS=$ac_check_lib_save_LIBS
11699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11701$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011702if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011703 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011704else
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11706$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011707if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011708 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011709else
11710 ac_check_lib_save_LIBS=$LIBS
11711LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011713/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715/* Override any GCC internal prototype to avoid an error.
11716 Use char because int might match the return type of a GCC
11717 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011718#ifdef __cplusplus
11719extern "C"
11720#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011721char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011722int
11723main ()
11724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011726 ;
11727 return 0;
11728}
11729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011731 ac_cv_lib_resolv_inet_aton=yes
11732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011735rm -f core conftest.err conftest.$ac_objext \
11736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011737LIBS=$ac_check_lib_save_LIBS
11738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11740$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011741if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011742 cat >>confdefs.h <<_ACEOF
11743#define HAVE_LIBRESOLV 1
11744_ACEOF
11745
11746 LIBS="-lresolv $LIBS"
11747
11748fi
11749
11750
11751fi
11752
11753
Christian Heimesd0764e22007-12-04 15:00:33 +000011754# On Tru64, chflags seems to be present, but calling it will
11755# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11757$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011762 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011765/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011766
Christian Heimesd0764e22007-12-04 15:00:33 +000011767#include <sys/stat.h>
11768#include <unistd.h>
11769int main(int argc, char*argv[])
11770{
11771 if(chflags(argv[0], 0) != 0)
11772 return 1;
11773 return 0;
11774}
Ned Deily3eb67d52011-06-28 00:00:28 -070011775
Christian Heimesd0764e22007-12-04 15:00:33 +000011776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011777if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011778 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011779else
Matthias Kloseb9621712010-04-24 17:59:49 +000011780 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011784fi
11785
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011786
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11789$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011790if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011792if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011793 ac_cv_have_chflags="yes"
11794else
11795 ac_cv_have_chflags="no"
11796fi
11797
11798fi
11799if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011800
Matthias Kloseb9621712010-04-24 17:59:49 +000011801$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011802
11803fi
11804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11806$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011807if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011811 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011814/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011815
Christian Heimesd0764e22007-12-04 15:00:33 +000011816#include <sys/stat.h>
11817#include <unistd.h>
11818int main(int argc, char*argv[])
11819{
11820 if(lchflags(argv[0], 0) != 0)
11821 return 1;
11822 return 0;
11823}
Ned Deily3eb67d52011-06-28 00:00:28 -070011824
Christian Heimesd0764e22007-12-04 15:00:33 +000011825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011826if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011827 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011828else
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011833fi
11834
11835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11838$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011839if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011841if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011842 ac_cv_have_lchflags="yes"
11843else
11844 ac_cv_have_lchflags="no"
11845fi
11846
11847fi
11848if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011851
11852fi
11853
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011854case $ac_sys_system/$ac_sys_release in
11855Darwin/*)
11856 _CUR_CFLAGS="${CFLAGS}"
11857 _CUR_LDFLAGS="${LDFLAGS}"
11858 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11859 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11860 ;;
11861esac
11862
Matthias Kloseb9621712010-04-24 17:59:49 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11864$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011865if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011867else
11868 ac_check_lib_save_LIBS=$LIBS
11869LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011871/* end confdefs.h. */
11872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011873/* Override any GCC internal prototype to avoid an error.
11874 Use char because int might match the return type of a GCC
11875 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011876#ifdef __cplusplus
11877extern "C"
11878#endif
11879char inflateCopy ();
11880int
11881main ()
11882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011883return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011884 ;
11885 return 0;
11886}
11887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011888if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011889 ac_cv_lib_z_inflateCopy=yes
11890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011893rm -f core conftest.err conftest.$ac_objext \
11894 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011895LIBS=$ac_check_lib_save_LIBS
11896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11898$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011899if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011902
11903fi
11904
11905
11906case $ac_sys_system/$ac_sys_release in
11907Darwin/*)
11908 CFLAGS="${_CUR_CFLAGS}"
11909 LDFLAGS="${_CUR_LDFLAGS}"
11910 ;;
11911esac
11912
Matthias Kloseb9621712010-04-24 17:59:49 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11914$as_echo_n "checking for hstrerror... " >&6; }
11915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011916/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011917
Martin v. Löwise9416172003-05-03 10:12:45 +000011918#include <netdb.h>
11919
Martin v. Löwise9416172003-05-03 10:12:45 +000011920int
11921main ()
11922{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011923void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011924 ;
11925 return 0;
11926}
11927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011928if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011931
Matthias Kloseb159a552010-04-25 21:00:44 +000011932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011933$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011934else
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11936$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011937
11938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011939rm -f core conftest.err conftest.$ac_objext \
11940 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11943$as_echo_n "checking for inet_aton... " >&6; }
11944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011945/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011946
Martin v. Löwis86d66262006-02-17 08:40:11 +000011947#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011948#include <sys/socket.h>
11949#include <netinet/in.h>
11950#include <arpa/inet.h>
11951
Martin v. Löwise9416172003-05-03 10:12:45 +000011952int
11953main ()
11954{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011955void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011956 ;
11957 return 0;
11958}
11959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011960if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011963
Matthias Kloseb159a552010-04-25 21:00:44 +000011964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011965$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11968$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011969
11970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011971rm -f core conftest.err conftest.$ac_objext \
11972 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011973
Matthias Kloseb9621712010-04-24 17:59:49 +000011974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11975$as_echo_n "checking for inet_pton... " >&6; }
11976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011977/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011978
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011979#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011980#include <sys/socket.h>
11981#include <netinet/in.h>
11982#include <arpa/inet.h>
11983
Martin v. Löwise9416172003-05-03 10:12:45 +000011984int
11985main ()
11986{
11987void* p = inet_pton
11988 ;
11989 return 0;
11990}
11991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011992if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011995
Matthias Kloseb159a552010-04-25 21:00:44 +000011996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011997$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011998else
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12000$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012001
12002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012004
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012005# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12007$as_echo_n "checking for setgroups... " >&6; }
12008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012010
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012011#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012012#ifdef HAVE_GRP_H
12013#include <grp.h>
12014#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012015
Martin v. Löwisd5843682002-11-21 20:41:28 +000012016int
12017main ()
12018{
12019void* p = setgroups
12020 ;
12021 return 0;
12022}
12023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012024if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012027
Matthias Kloseb159a552010-04-25 21:00:44 +000012028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012029$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012030else
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012033
12034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012037# check for openpty and forkpty
12038
12039for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012040do :
12041 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012042if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012043 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012045_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012047else
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12049$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012050if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012052else
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012054LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058/* Override any GCC internal prototype to avoid an error.
12059 Use char because int might match the return type of a GCC
12060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012061#ifdef __cplusplus
12062extern "C"
12063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012064char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012065int
12066main ()
12067{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 ;
12070 return 0;
12071}
12072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012073if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012074 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012078rm -f core conftest.err conftest.$ac_objext \
12079 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012080LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12083$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012084if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012086 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012087else
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12089$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012090if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012092else
12093 ac_check_lib_save_LIBS=$LIBS
12094LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012096/* end confdefs.h. */
12097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012098/* Override any GCC internal prototype to avoid an error.
12099 Use char because int might match the return type of a GCC
12100 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012101#ifdef __cplusplus
12102extern "C"
12103#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012104char openpty ();
12105int
12106main ()
12107{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012114 ac_cv_lib_bsd_openpty=yes
12115else
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118rm -f core conftest.err conftest.$ac_objext \
12119 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012120LIBS=$ac_check_lib_save_LIBS
12121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12123$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012124if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012126 LIBS="$LIBS -lbsd"
12127fi
12128
12129
12130fi
12131
Fred Drake8cef4cf2000-06-28 16:40:38 +000012132
12133fi
12134done
12135
12136for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012137do :
12138 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012139if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012141#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012142_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012143
Fred Drake8cef4cf2000-06-28 16:40:38 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12146$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012147if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012149else
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012151LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155/* Override any GCC internal prototype to avoid an error.
12156 Use char because int might match the return type of a GCC
12157 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012158#ifdef __cplusplus
12159extern "C"
12160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012161char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012162int
12163main ()
12164{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 ;
12167 return 0;
12168}
12169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012175rm -f core conftest.err conftest.$ac_objext \
12176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012177LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12180$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012181if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012183 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12186$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012187if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012189else
12190 ac_check_lib_save_LIBS=$LIBS
12191LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012193/* end confdefs.h. */
12194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195/* Override any GCC internal prototype to avoid an error.
12196 Use char because int might match the return type of a GCC
12197 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012198#ifdef __cplusplus
12199extern "C"
12200#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012201char forkpty ();
12202int
12203main ()
12204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206 ;
12207 return 0;
12208}
12209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012210if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211 ac_cv_lib_bsd_forkpty=yes
12212else
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215rm -f core conftest.err conftest.$ac_objext \
12216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012217LIBS=$ac_check_lib_save_LIBS
12218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12220$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012223 LIBS="$LIBS -lbsd"
12224fi
12225
12226
12227fi
12228
Fred Drake8cef4cf2000-06-28 16:40:38 +000012229
12230fi
12231done
12232
Jack Jansendd19cf82001-12-06 22:36:17 +000012233
Michael W. Hudson54241132001-12-07 15:38:26 +000012234# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012235for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012236do :
12237 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12238ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012239if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012241#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012242_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012243
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012244fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012245done
12246
Michael W. Hudson54241132001-12-07 15:38:26 +000012247
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012248ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012249if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012250 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012251
Martin v. Löwis1142de32002-03-29 16:28:31 +000012252else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012254 *" dup2.$ac_objext "* ) ;;
12255 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012257esac
12258
Martin v. Löwis1142de32002-03-29 16:28:31 +000012259fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012260
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012261ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012262if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012263 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12264
12265else
12266 case " $LIBOBJS " in
12267 *" strdup.$ac_objext "* ) ;;
12268 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12269 ;;
12270esac
12271
12272fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012273
12274
12275for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012276do :
12277 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012284#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012285int
12286main ()
12287{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012296
Guido van Rossum627b2d71993-12-24 10:39:16 +000012297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012299
Guido van Rossum627b2d71993-12-24 10:39:16 +000012300fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012301done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012302
Jack Jansen150753c2003-03-29 22:07:47 +000012303for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012304do :
12305 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012306if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012307 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012311/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012312#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012313int
12314main ()
12315{
12316setpgrp(0,0);
12317 ;
12318 return 0;
12319}
12320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012322
Matthias Kloseb9621712010-04-24 17:59:49 +000012323$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012324
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012327
12328fi
12329done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012330
Thomas Wouters3a584202000-08-05 23:28:51 +000012331for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012332do :
12333 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012334if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012336#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012339/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012340#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012341int
12342main ()
12343{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 ;
12346 return 0;
12347}
12348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012349if ac_fn_c_try_compile "$LINENO"; then :
12350
Guido van Rossum627b2d71993-12-24 10:39:16 +000012351else
Skip Montanaro6dead952003-09-25 14:50:04 +000012352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012354
Martin v. Löwis11437992002-04-12 09:54:03 +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 Rossum76be6ed1995-01-02 18:33:54 +000012359fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012360done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012361
Michael W. Hudson54241132001-12-07 15:38:26 +000012362
Victor Stinnere0be4232011-10-25 13:06:09 +020012363for ac_func in clock_gettime
12364do :
12365 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12366if test "x$ac_cv_func_clock_gettime" = xyes; then :
12367 cat >>confdefs.h <<_ACEOF
12368#define HAVE_CLOCK_GETTIME 1
12369_ACEOF
12370
12371else
12372
12373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12374$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12375if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12376 $as_echo_n "(cached) " >&6
12377else
12378 ac_check_lib_save_LIBS=$LIBS
12379LIBS="-lrt $LIBS"
12380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12381/* end confdefs.h. */
12382
12383/* Override any GCC internal prototype to avoid an error.
12384 Use char because int might match the return type of a GCC
12385 builtin and then its argument prototype would still apply. */
12386#ifdef __cplusplus
12387extern "C"
12388#endif
12389char clock_gettime ();
12390int
12391main ()
12392{
12393return clock_gettime ();
12394 ;
12395 return 0;
12396}
12397_ACEOF
12398if ac_fn_c_try_link "$LINENO"; then :
12399 ac_cv_lib_rt_clock_gettime=yes
12400else
12401 ac_cv_lib_rt_clock_gettime=no
12402fi
12403rm -f core conftest.err conftest.$ac_objext \
12404 conftest$ac_exeext conftest.$ac_ext
12405LIBS=$ac_check_lib_save_LIBS
12406fi
12407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12408$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12409if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12410
Victor Stinner7efb8332014-08-29 15:41:08 +020012411 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012412 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12413
12414
12415$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12416
12417
12418fi
12419
12420
12421fi
12422done
12423
12424
12425for ac_func in clock_getres
12426do :
12427 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12428if test "x$ac_cv_func_clock_getres" = xyes; then :
12429 cat >>confdefs.h <<_ACEOF
12430#define HAVE_CLOCK_GETRES 1
12431_ACEOF
12432
12433else
12434
12435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12436$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12437if ${ac_cv_lib_rt_clock_getres+:} false; then :
12438 $as_echo_n "(cached) " >&6
12439else
12440 ac_check_lib_save_LIBS=$LIBS
12441LIBS="-lrt $LIBS"
12442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12443/* end confdefs.h. */
12444
12445/* Override any GCC internal prototype to avoid an error.
12446 Use char because int might match the return type of a GCC
12447 builtin and then its argument prototype would still apply. */
12448#ifdef __cplusplus
12449extern "C"
12450#endif
12451char clock_getres ();
12452int
12453main ()
12454{
12455return clock_getres ();
12456 ;
12457 return 0;
12458}
12459_ACEOF
12460if ac_fn_c_try_link "$LINENO"; then :
12461 ac_cv_lib_rt_clock_getres=yes
12462else
12463 ac_cv_lib_rt_clock_getres=no
12464fi
12465rm -f core conftest.err conftest.$ac_objext \
12466 conftest$ac_exeext conftest.$ac_ext
12467LIBS=$ac_check_lib_save_LIBS
12468fi
12469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12470$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12471if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12472
12473 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12474
12475
12476fi
12477
12478
12479fi
12480done
12481
12482
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012483for ac_func in clock_settime
12484do :
12485 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12486if test "x$ac_cv_func_clock_settime" = xyes; then :
12487 cat >>confdefs.h <<_ACEOF
12488#define HAVE_CLOCK_SETTIME 1
12489_ACEOF
12490
12491else
12492
12493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12494$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12495if ${ac_cv_lib_rt_clock_settime+:} false; then :
12496 $as_echo_n "(cached) " >&6
12497else
12498 ac_check_lib_save_LIBS=$LIBS
12499LIBS="-lrt $LIBS"
12500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501/* end confdefs.h. */
12502
12503/* Override any GCC internal prototype to avoid an error.
12504 Use char because int might match the return type of a GCC
12505 builtin and then its argument prototype would still apply. */
12506#ifdef __cplusplus
12507extern "C"
12508#endif
12509char clock_settime ();
12510int
12511main ()
12512{
12513return clock_settime ();
12514 ;
12515 return 0;
12516}
12517_ACEOF
12518if ac_fn_c_try_link "$LINENO"; then :
12519 ac_cv_lib_rt_clock_settime=yes
12520else
12521 ac_cv_lib_rt_clock_settime=no
12522fi
12523rm -f core conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
12525LIBS=$ac_check_lib_save_LIBS
12526fi
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12528$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12529if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12530
12531 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12532
12533
12534fi
12535
12536
12537fi
12538done
12539
12540
Matthias Kloseb9621712010-04-24 17:59:49 +000012541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12542$as_echo_n "checking for major... " >&6; }
12543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012544/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012545
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012546#if defined(MAJOR_IN_MKDEV)
12547#include <sys/mkdev.h>
12548#elif defined(MAJOR_IN_SYSMACROS)
12549#include <sys/sysmacros.h>
12550#else
12551#include <sys/types.h>
12552#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012553
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012554int
12555main ()
12556{
12557
12558 makedev(major(0),minor(0));
12559
12560 ;
12561 return 0;
12562}
12563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012564if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012565
12566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12570$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012571
12572else
Skip Montanaro6dead952003-09-25 14:50:04 +000012573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12575$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012576
12577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012580
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012581# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12582# macro is not defined in android-ndk-r13.
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12584$as_echo_n "checking for lockf... " >&6; }
12585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12586/* end confdefs.h. */
12587#include <unistd.h>
12588int
12589main ()
12590{
12591lockf(0, F_LOCK, 0);
12592 ;
12593 return 0;
12594}
12595_ACEOF
12596if ac_fn_c_try_link "$LINENO"; then :
12597
12598$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12599
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12601$as_echo "yes" >&6; }
12602else
12603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12604$as_echo "no" >&6; }
12605
12606fi
12607rm -f core conftest.err conftest.$ac_objext \
12608 conftest$ac_exeext conftest.$ac_ext
12609
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012610# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012611# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12613$as_echo_n "checking for getaddrinfo... " >&6; }
12614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012615/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012616
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012617#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012618#include <sys/socket.h>
12619#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012620#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012621
Martin v. Löwis11437992002-04-12 09:54:03 +000012622int
12623main ()
12624{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012625getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 ;
12627 return 0;
12628}
12629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012630if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012631 have_getaddrinfo=yes
12632else
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012635rm -f core conftest.err conftest.$ac_objext \
12636 conftest$ac_exeext conftest.$ac_ext
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12638$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012639if test $have_getaddrinfo = yes
12640then
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12642$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012643 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012645else
Matthias Kloseb9621712010-04-24 17:59:49 +000012646 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012647
12648if test "${enable_ipv6+set}" = set; then
12649 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12650else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012651 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012652fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012653else
Matthias Kloseb9621712010-04-24 17:59:49 +000012654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012656
Stefan Krah19c21392012-11-22 23:47:32 +010012657#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012658#include <sys/types.h>
12659#include <netdb.h>
12660#include <string.h>
12661#include <sys/socket.h>
12662#include <netinet/in.h>
12663
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012664int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012665{
12666 int passive, gaierr, inet4 = 0, inet6 = 0;
12667 struct addrinfo hints, *ai, *aitop;
12668 char straddr[INET6_ADDRSTRLEN], strport[16];
12669
12670 for (passive = 0; passive <= 1; passive++) {
12671 memset(&hints, 0, sizeof(hints));
12672 hints.ai_family = AF_UNSPEC;
12673 hints.ai_flags = passive ? AI_PASSIVE : 0;
12674 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012675 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012676 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12677 (void)gai_strerror(gaierr);
12678 goto bad;
12679 }
12680 for (ai = aitop; ai; ai = ai->ai_next) {
12681 if (ai->ai_addr == NULL ||
12682 ai->ai_addrlen == 0 ||
12683 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12684 straddr, sizeof(straddr), strport, sizeof(strport),
12685 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12686 goto bad;
12687 }
12688 switch (ai->ai_family) {
12689 case AF_INET:
12690 if (strcmp(strport, "54321") != 0) {
12691 goto bad;
12692 }
12693 if (passive) {
12694 if (strcmp(straddr, "0.0.0.0") != 0) {
12695 goto bad;
12696 }
12697 } else {
12698 if (strcmp(straddr, "127.0.0.1") != 0) {
12699 goto bad;
12700 }
12701 }
12702 inet4++;
12703 break;
12704 case AF_INET6:
12705 if (strcmp(strport, "54321") != 0) {
12706 goto bad;
12707 }
12708 if (passive) {
12709 if (strcmp(straddr, "::") != 0) {
12710 goto bad;
12711 }
12712 } else {
12713 if (strcmp(straddr, "::1") != 0) {
12714 goto bad;
12715 }
12716 }
12717 inet6++;
12718 break;
12719 case AF_UNSPEC:
12720 goto bad;
12721 break;
12722 default:
12723 /* another family support? */
12724 break;
12725 }
12726 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012727 freeaddrinfo(aitop);
12728 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012729 }
12730
12731 if (!(inet4 == 0 || inet4 == 2))
12732 goto bad;
12733 if (!(inet6 == 0 || inet6 == 2))
12734 goto bad;
12735
12736 if (aitop)
12737 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012738 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012739
12740 bad:
12741 if (aitop)
12742 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012743 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012744}
12745
Martin v. Löwis11437992002-04-12 09:54:03 +000012746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012747if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012748 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012749else
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012755
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012756fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012757
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12761$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12762
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012763if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012764then
12765 if test $ipv6 = yes
12766 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012767 echo 'Fatal: You must get working getaddrinfo() function.'
12768 echo ' or you can specify "--disable-ipv6"'.
12769 exit 1
12770 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012771else
Martin v. Löwis11437992002-04-12 09:54:03 +000012772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012774
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012775fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012776
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012777for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012778do :
12779 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012780if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012782#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012783_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012784
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012785fi
12786done
12787
Michael W. Hudson54241132001-12-07 15:38:26 +000012788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12791$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012792if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012796/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012797#include <sys/types.h>
12798#include <sys/time.h>
12799#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012800
Martin v. Löwis11437992002-04-12 09:54:03 +000012801int
12802main ()
12803{
12804if ((struct tm *) 0)
12805return 0;
12806 ;
12807 return 0;
12808}
12809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012810if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012812else
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12818$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012819if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012822
12823fi
12824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12826$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012827if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012829else
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012831/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832#include <sys/types.h>
12833#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012834
Martin v. Löwis11437992002-04-12 09:54:03 +000012835int
12836main ()
12837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838struct tm tm;
12839 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ;
12842 return 0;
12843}
12844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012845if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846 ac_cv_struct_tm=time.h
12847else
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12853$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012854if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012857
12858fi
12859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860ac_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 +000012861#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863"
Victor Stinnere0be4232011-10-25 13:06:09 +020012864if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
12866cat >>confdefs.h <<_ACEOF
12867#define HAVE_STRUCT_TM_TM_ZONE 1
12868_ACEOF
12869
12870
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012871fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012872
Martin v. Löwis11437992002-04-12 09:54:03 +000012873if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876
12877else
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12879"
Victor Stinnere0be4232011-10-25 13:06:09 +020012880if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882else
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012884fi
12885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012887#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888_ACEOF
12889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12891$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012892if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894else
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012897#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898#if !HAVE_DECL_TZNAME
12899extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
Martin v. Löwis11437992002-04-12 09:54:03 +000012902int
12903main ()
12904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ;
12907 return 0;
12908}
12909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012910if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012911 ac_cv_var_tzname=yes
12912else
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012915rm -f core conftest.err conftest.$ac_objext \
12916 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12919$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012920 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012921
Matthias Kloseb9621712010-04-24 17:59:49 +000012922$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012923
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012924 fi
12925fi
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927ac_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 +020012928if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012929
12930cat >>confdefs.h <<_ACEOF
12931#define HAVE_STRUCT_STAT_ST_RDEV 1
12932_ACEOF
12933
12934
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012935fi
12936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937ac_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 +020012938if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012939
Martin v. Löwis11437992002-04-12 09:54:03 +000012940cat >>confdefs.h <<_ACEOF
12941#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12942_ACEOF
12943
12944
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012945fi
12946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947ac_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 +020012948if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012949
12950cat >>confdefs.h <<_ACEOF
12951#define HAVE_STRUCT_STAT_ST_FLAGS 1
12952_ACEOF
12953
12954
12955fi
12956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957ac_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 +020012958if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012959
12960cat >>confdefs.h <<_ACEOF
12961#define HAVE_STRUCT_STAT_ST_GEN 1
12962_ACEOF
12963
12964
12965fi
12966
Matthias Kloseb9621712010-04-24 17:59:49 +000012967ac_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 +020012968if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012969
12970cat >>confdefs.h <<_ACEOF
12971#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12972_ACEOF
12973
12974
12975fi
12976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977ac_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 +020012978if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012979
Martin v. Löwis11437992002-04-12 09:54:03 +000012980cat >>confdefs.h <<_ACEOF
12981#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12982_ACEOF
12983
12984
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012985fi
12986
Stefan Krah267b6392016-04-26 01:09:18 +020012987ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12988 #include <sys/types.h>
12989 #include <pwd.h>
12990
12991"
12992if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12993
12994cat >>confdefs.h <<_ACEOF
12995#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12996_ACEOF
12997
12998
12999fi
13000ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13001 #include <sys/types.h>
13002 #include <pwd.h>
13003
13004"
13005if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13006
13007cat >>confdefs.h <<_ACEOF
13008#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13009_ACEOF
13010
13011
13012fi
13013
Zachary Ware6a6967e2016-10-01 00:47:27 -050013014# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13015ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13016"
13017if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13018
13019cat >>confdefs.h <<_ACEOF
13020#define HAVE_SIGINFO_T_SI_BAND 1
13021_ACEOF
13022
13023
13024fi
13025
Michael W. Hudson54241132001-12-07 15:38:26 +000013026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13028$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013029if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031else
Matthias Kloseb159a552010-04-25 21:00:44 +000013032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013034/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013035#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013036int
13037main ()
13038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013039return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 ;
13041 return 0;
13042}
13043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013044if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013045 ac_cv_header_time_altzone=yes
13046else
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051fi
13052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13054$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013055if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013058
13059fi
13060
Guido van Rossumda88dad1995-01-26 00:46:29 +000013061was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13063$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013065/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013066
13067#include <sys/types.h>
13068#include <sys/select.h>
13069#include <sys/time.h>
13070
Martin v. Löwis11437992002-04-12 09:54:03 +000013071int
13072main ()
13073{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013074;
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 ;
13076 return 0;
13077}
13078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013079if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
13081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013083
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013084 was_it_defined=yes
13085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13089$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13092$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013093if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013098#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013099int
13100main ()
13101{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013102struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 ;
13104 return 0;
13105}
13106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013108 ac_cv_struct_addrinfo=yes
13109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13113fi
13114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13116$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013117if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120
13121fi
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13124$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013125if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013129/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013130
13131# include <sys/types.h>
13132# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013133int
13134main ()
13135{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013136struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 ;
13138 return 0;
13139}
13140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142 ac_cv_struct_sockaddr_storage=yes
13143else
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13147fi
13148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13150$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013151if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154
13155fi
13156
Christian Heimesdffa3942016-09-05 23:54:41 +020013157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13158$as_echo_n "checking for sockaddr_alg... " >&6; }
13159if ${ac_cv_struct_sockaddr_alg+:} false; then :
13160 $as_echo_n "(cached) " >&6
13161else
13162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13163/* end confdefs.h. */
13164
13165# include <sys/types.h>
13166# include <sys/socket.h>
13167# include <linux/if_alg.h>
13168int
13169main ()
13170{
13171struct sockaddr_alg s
13172 ;
13173 return 0;
13174}
13175_ACEOF
13176if ac_fn_c_try_compile "$LINENO"; then :
13177 ac_cv_struct_sockaddr_alg=yes
13178else
13179 ac_cv_struct_sockaddr_alg=no
13180fi
13181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13182fi
13183
13184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13185$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13186if test $ac_cv_struct_sockaddr_alg = yes; then
13187
13188$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13189
13190fi
13191
Guido van Rossum627b2d71993-12-24 10:39:16 +000013192# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013193
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13195$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013196if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013201$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013202int
13203main ()
13204{
13205static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013206test_array [0] = 0;
13207return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013208
13209 ;
13210 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013211}
Martin v. Löwis11437992002-04-12 09:54:03 +000013212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013213if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013214 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013215else
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13221$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013222if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013224
13225fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13228$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013229if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013233/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235int
13236main ()
13237{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013240 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013242 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013243 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244 char const *const *pcpcc;
13245 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 /* NEC SVR4.0.2 mips cc rejects this. */
13247 struct point {int x, y;};
13248 static struct point const zero = {0,0};
13249 /* AIX XL C 1.02.0.0 rejects this.
13250 It does not let you subtract one const X* pointer from another in
13251 an arm of an if-expression whose if-part is not a constant
13252 expression */
13253 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013254 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256 ++pcpcc;
13257 ppc = (char**) pcpcc;
13258 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013259 { /* SCO 3.2v4 cc rejects this sort of thing. */
13260 char tx;
13261 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013265 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013266 }
13267 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13268 int x[] = {25, 17};
13269 const int *foo = &x[0];
13270 ++foo;
13271 }
13272 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13273 typedef const int *iptr;
13274 iptr p = 0;
13275 ++p;
13276 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013277 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013278 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013279 struct s { int j; const int *ap[3]; } bx;
13280 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 }
13282 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13283 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013284 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013287#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 ;
13290 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013291}
Martin v. Löwis11437992002-04-12 09:54:03 +000013292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013293if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294 ac_cv_c_const=yes
13295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13301$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013302if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305
13306fi
13307
Michael W. Hudson54241132001-12-07 15:38:26 +000013308
Guido van Rossumda88dad1995-01-26 00:46:29 +000013309works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13311$as_echo_n "checking for working signed char... " >&6; }
13312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013314
Martin v. Löwis11437992002-04-12 09:54:03 +000013315int
13316main ()
13317{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 ;
13320 return 0;
13321}
13322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013323if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013324 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013325else
Skip Montanaro6dead952003-09-25 14:50:04 +000013326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013328
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013329
Guido van Rossum7f43da71994-08-01 12:15:30 +000013330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13333$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013334
Guido van Rossumda88dad1995-01-26 00:46:29 +000013335have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13337$as_echo_n "checking for prototypes... " >&6; }
13338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013339/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013340int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013341int
13342main ()
13343{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 ;
13346 return 0;
13347}
13348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013352
Matthias Kloseb159a552010-04-25 21:00:44 +000013353 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13357$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358
Guido van Rossumda88dad1995-01-26 00:46:29 +000013359works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13361$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013363/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013364
13365#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013366int foo(int x, ...) {
13367 va_list va;
13368 va_start(va, x);
13369 va_arg(va, int);
13370 va_arg(va, char *);
13371 va_arg(va, double);
13372 return 0;
13373}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013374
Martin v. Löwis11437992002-04-12 09:54:03 +000013375int
13376main ()
13377{
Guido van Rossum90eea071996-08-30 20:58:57 +000013378return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013379 ;
13380 return 0;
13381}
13382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013388 works=yes
13389
Guido van Rossum627b2d71993-12-24 10:39:16 +000013390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13393$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394
Martin v. Löwisd6320502004-08-12 13:45:08 +000013395# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13397$as_echo_n "checking for socketpair... " >&6; }
13398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013399/* end confdefs.h. */
13400
13401#include <sys/types.h>
13402#include <sys/socket.h>
13403
13404int
13405main ()
13406{
13407void *x=socketpair
13408 ;
13409 return 0;
13410}
13411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013415
Matthias Kloseb159a552010-04-25 21:00:44 +000013416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013417$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013418else
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13420$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013421
13422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013424
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013425# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13427$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013430#include <sys/types.h>
13431#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013432int
13433main ()
13434{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013435struct sockaddr x;
13436x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 ;
13438 return 0;
13439}
13440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_compile "$LINENO"; then :
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13443$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013446
13447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13449$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013450
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013453
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013454# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
13456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013458if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13463$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013464 OLD_CFLAGS=$CFLAGS
13465 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013467/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468
13469# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471int
13472main ()
13473{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013474
13475 char *name;
13476 struct hostent *he, *res;
13477 char buffer[2048];
13478 int buflen = 2048;
13479 int h_errnop;
13480
13481 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013482
13483 ;
13484 return 0;
13485}
13486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013490
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13495$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013496
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013497else
Skip Montanaro6dead952003-09-25 14:50:04 +000013498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13500$as_echo "no" >&6; }
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13502$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013504/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013505
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013506# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
Martin v. Löwis11437992002-04-12 09:54:03 +000013508int
13509main ()
13510{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013511
13512 char *name;
13513 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013514 char buffer[2048];
13515 int buflen = 2048;
13516 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013517
Matthias Kloseb159a552010-04-25 21:00:44 +000013518 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
13520 ;
13521 return 0;
13522}
13523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528
Matthias Kloseb159a552010-04-25 21:00:44 +000013529$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13532$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013534else
Skip Montanaro6dead952003-09-25 14:50:04 +000013535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13537$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13539$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13541/* end confdefs.h. */
13542
13543# include <netdb.h>
13544
13545int
13546main ()
13547{
13548
13549 char *name;
13550 struct hostent *he;
13551 struct hostent_data data;
13552
13553 (void) gethostbyname_r(name, he, &data);
13554
13555 ;
13556 return 0;
13557}
13558_ACEOF
13559if ac_fn_c_try_compile "$LINENO"; then :
13560
13561 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13562
13563
13564$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13565
13566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13567$as_echo "yes" >&6; }
13568
13569else
13570
13571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13572$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013573
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013582 CFLAGS=$OLD_CFLAGS
13583
13584else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 for ac_func in gethostbyname
13587do :
13588 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013589if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013590 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013591#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013592_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013594fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013595done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013596
Michael W. Hudson54241132001-12-07 15:38:26 +000013597
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013598fi
13599
Michael W. Hudson54241132001-12-07 15:38:26 +000013600
13601
13602
13603
13604
13605
Guido van Rossum627b2d71993-12-24 10:39:16 +000013606# checks for system services
13607# (none yet)
13608
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013610ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013611if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013612
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13615$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013616if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618else
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013620LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624/* Override any GCC internal prototype to avoid an error.
13625 Use char because int might match the return type of a GCC
13626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013627#ifdef __cplusplus
13628extern "C"
13629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013630char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013631int
13632main ()
13633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 ;
13636 return 0;
13637}
13638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013640 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013644rm -f core conftest.err conftest.$ac_objext \
13645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13649$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013650if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 cat >>confdefs.h <<_ACEOF
13652#define HAVE_LIBIEEE 1
13653_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013655 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013656
Guido van Rossum627b2d71993-12-24 10:39:16 +000013657fi
13658
Michael W. Hudson54241132001-12-07 15:38:26 +000013659
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013660fi
13661
Michael W. Hudson54241132001-12-07 15:38:26 +000013662
Guido van Rossum7f253911997-05-09 02:42:48 +000013663# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13665$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013667# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013668if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013669 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013670if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013671then
13672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13676$as_echo "yes" >&6; }
13677else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13678$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013679fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013680else
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13682$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013683fi
13684
Guido van Rossum7f253911997-05-09 02:42:48 +000013685
Guido van Rossum7f43da71994-08-01 12:15:30 +000013686# check for --with-libm=...
13687
Guido van Rossum563e7081996-09-10 18:20:48 +000013688case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013689Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013690*) LIBM=-lm
13691esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13693$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013695# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013696if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013698if test "$withval" = no
13699then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13701$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013702elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013703then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13705$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013706else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013707fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013708else
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13710$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711fi
13712
Guido van Rossum7f43da71994-08-01 12:15:30 +000013713
13714# check for --with-libc=...
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13717$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013719# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013720if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013721 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013722if test "$withval" = no
13723then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13725$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013726elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013727then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13729$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013730else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013731fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13734$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013735fi
13736
Guido van Rossum7f43da71994-08-01 12:15:30 +000013737
Stefan Krah1919b7e2012-03-21 18:25:23 +010013738# **************************************
13739# * Check for gcc x64 inline assembler *
13740# **************************************
13741
13742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13743$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13745/* end confdefs.h. */
13746
13747int
13748main ()
13749{
13750
13751 __asm__ __volatile__ ("movq %rcx, %rax");
13752
13753 ;
13754 return 0;
13755}
13756_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013757if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013758 have_gcc_asm_for_x64=yes
13759else
13760 have_gcc_asm_for_x64=no
13761fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013762rm -f core conftest.err conftest.$ac_objext \
13763 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13765$as_echo "$have_gcc_asm_for_x64" >&6; }
13766if test "$have_gcc_asm_for_x64" = yes
13767then
13768
13769$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13770
13771fi
13772
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013773# **************************************************
13774# * Check for various properties of floating point *
13775# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13778$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013779if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013781else
13782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013784 ac_cv_little_endian_double=no
13785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013787/* end confdefs.h. */
13788
13789#include <string.h>
13790int main() {
13791 double x = 9006104071832581.0;
13792 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13793 return 0;
13794 else
13795 return 1;
13796}
13797
13798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013799if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013800 ac_cv_little_endian_double=yes
13801else
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806fi
13807
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013808fi
13809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13811$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013812if test "$ac_cv_little_endian_double" = yes
13813then
13814
Matthias Kloseb9621712010-04-24 17:59:49 +000013815$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816
13817fi
13818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13820$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013821if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013823else
13824
Matthias Kloseb9621712010-04-24 17:59:49 +000013825if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013826 ac_cv_big_endian_double=no
13827else
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829/* end confdefs.h. */
13830
13831#include <string.h>
13832int main() {
13833 double x = 9006104071832581.0;
13834 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13835 return 0;
13836 else
13837 return 1;
13838}
13839
13840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013841if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013842 ac_cv_big_endian_double=yes
13843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013848fi
13849
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013850fi
13851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13853$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854if test "$ac_cv_big_endian_double" = yes
13855then
13856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013858
13859fi
13860
13861# Some ARM platforms use a mixed-endian representation for doubles.
13862# While Python doesn't currently have full support for these platforms
13863# (see e.g., issue 1762561), we can at least make sure that float <-> string
13864# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13866$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013867if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869else
13870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013872 ac_cv_mixed_endian_double=no
13873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013875/* end confdefs.h. */
13876
13877#include <string.h>
13878int main() {
13879 double x = 9006104071832581.0;
13880 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13881 return 0;
13882 else
13883 return 1;
13884}
13885
13886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013887if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013888 ac_cv_mixed_endian_double=yes
13889else
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013894fi
13895
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013896fi
13897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13899$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013900if test "$ac_cv_mixed_endian_double" = yes
13901then
13902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013904
13905fi
13906
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013907# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013908# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013909# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013910# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013911# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013912# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013913
13914# This inline assembler syntax may also work for suncc and icc,
13915# so we try it on all platforms.
13916
Matthias Kloseb9621712010-04-24 17:59:49 +000013917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13918$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013920/* end confdefs.h. */
13921
13922int
13923main ()
13924{
13925
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013926 unsigned short cw;
13927 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13928 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013929
13930 ;
13931 return 0;
13932}
13933_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013934if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013935 have_gcc_asm_for_x87=yes
13936else
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013938fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013939rm -f core conftest.err conftest.$ac_objext \
13940 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13942$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013943if test "$have_gcc_asm_for_x87" = yes
13944then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013947
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13951$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13953/* end confdefs.h. */
13954
13955int
13956main ()
13957{
13958
13959 unsigned int fpcr;
13960 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13961 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13962
13963 ;
13964 return 0;
13965}
13966_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013967if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013968 have_gcc_asm_for_mc68881=yes
13969else
13970 have_gcc_asm_for_mc68881=no
13971fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013972rm -f core conftest.err conftest.$ac_objext \
13973 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13975$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13976if test "$have_gcc_asm_for_mc68881" = yes
13977then
13978
13979$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13980
13981fi
13982
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013983# Detect whether system arithmetic is subject to x87-style double
13984# rounding issues. The result of this test has little meaning on non
13985# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13986# mode is round-to-nearest and double rounding issues are present, and
13987# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13989$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990# $BASECFLAGS may affect the result
13991ac_save_cc="$CC"
13992CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013993if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013994 ac_cv_x87_double_rounding=no
13995else
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013997/* end confdefs.h. */
13998
13999#include <stdlib.h>
14000#include <math.h>
14001int main() {
14002 volatile double x, y, z;
14003 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14004 x = 0.99999999999999989; /* 1-2**-53 */
14005 y = 1./x;
14006 if (y != 1.)
14007 exit(0);
14008 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14009 x = 1e16;
14010 y = 2.99999;
14011 z = x + y;
14012 if (z != 1e16+4.)
14013 exit(0);
14014 /* both tests show evidence of double rounding */
14015 exit(1);
14016}
14017
14018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014019if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014020 ac_cv_x87_double_rounding=no
14021else
Matthias Kloseb9621712010-04-24 17:59:49 +000014022 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014026fi
14027
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014028CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14030$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014031if test "$ac_cv_x87_double_rounding" = yes
14032then
14033
Matthias Kloseb9621712010-04-24 17:59:49 +000014034$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014035
14036fi
14037
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014038# ************************************
14039# * Check for mathematical functions *
14040# ************************************
14041
14042LIBS_SAVE=$LIBS
14043LIBS="$LIBS $LIBM"
14044
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014045for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14046do :
14047 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14048ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014049if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014050 cat >>confdefs.h <<_ACEOF
14051#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14052_ACEOF
14053
14054fi
14055done
14056
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014057for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014058do :
14059 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14060ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014061if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014062 cat >>confdefs.h <<_ACEOF
14063#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14064_ACEOF
14065
14066fi
14067done
14068
14069ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14070"
Victor Stinnere0be4232011-10-25 13:06:09 +020014071if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014072 ac_have_decl=1
14073else
14074 ac_have_decl=0
14075fi
14076
14077cat >>confdefs.h <<_ACEOF
14078#define HAVE_DECL_ISINF $ac_have_decl
14079_ACEOF
14080ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14081"
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014083 ac_have_decl=1
14084else
14085 ac_have_decl=0
14086fi
14087
14088cat >>confdefs.h <<_ACEOF
14089#define HAVE_DECL_ISNAN $ac_have_decl
14090_ACEOF
14091ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14092"
Victor Stinnere0be4232011-10-25 13:06:09 +020014093if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014094 ac_have_decl=1
14095else
14096 ac_have_decl=0
14097fi
14098
14099cat >>confdefs.h <<_ACEOF
14100#define HAVE_DECL_ISFINITE $ac_have_decl
14101_ACEOF
14102
14103
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014104# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14105# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14107$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014108if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014110else
14111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014113 ac_cv_tanh_preserves_zero_sign=no
14114else
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014116/* end confdefs.h. */
14117
14118#include <math.h>
14119#include <stdlib.h>
14120int main() {
14121 /* return 0 if either negative zeros don't exist
14122 on this platform or if negative zeros exist
14123 and tanh(-0.) == -0. */
14124 if (atan2(0., -1.) == atan2(-0., -1.) ||
14125 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14126 else exit(1);
14127}
14128
14129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014130if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014131 ac_cv_tanh_preserves_zero_sign=yes
14132else
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14136 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014137fi
14138
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014139fi
14140
Matthias Kloseb9621712010-04-24 17:59:49 +000014141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14142$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014143if test "$ac_cv_tanh_preserves_zero_sign" = yes
14144then
14145
Matthias Kloseb9621712010-04-24 17:59:49 +000014146$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014147
14148fi
14149
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014150if test "$ac_cv_func_log1p" = yes
14151then
14152 # On some versions of AIX, log1p(-0.) returns 0. instead of
14153 # -0. See issue #9920.
14154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14155$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014156 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014157 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014158else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014159
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014160 if test "$cross_compiling" = yes; then :
14161 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014162else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14164/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014165
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014166 #include <math.h>
14167 #include <stdlib.h>
14168 int main() {
14169 /* Fail if the signs of log1p(-0.) and -0. can be
14170 distinguished. */
14171 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14172 return 0;
14173 else
14174 return 1;
14175 }
14176
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014177_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014178if ac_fn_c_try_run "$LINENO"; then :
14179 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014180else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014181 ac_cv_log1p_drops_zero_sign=yes
14182fi
14183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14184 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014185fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014186
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014187fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014188
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14190$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14191fi
14192if test "$ac_cv_log1p_drops_zero_sign" = yes
14193then
14194
14195$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14196
14197fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014198
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014199LIBS=$LIBS_SAVE
14200
Mark Dickinsona614f042009-11-28 12:48:43 +000014201# For multiprocessing module, check that sem_open
14202# actually works. For FreeBSD versions <= 7.2,
14203# the kernel module that provides POSIX semaphores
14204# isn't loaded by default, so an attempt to call
14205# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14207$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014208if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014210else
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014212 ac_cv_posix_semaphores_enabled=yes
14213else
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014215/* end confdefs.h. */
14216
14217#include <unistd.h>
14218#include <fcntl.h>
14219#include <stdio.h>
14220#include <semaphore.h>
14221#include <sys/stat.h>
14222
14223int main(void) {
14224 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14225 if (a == SEM_FAILED) {
14226 perror("sem_open");
14227 return 1;
14228 }
14229 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014230 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014231 return 0;
14232}
14233
14234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014235if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014236 ac_cv_posix_semaphores_enabled=yes
14237else
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14241 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014242fi
14243
14244
Mark Dickinsona614f042009-11-28 12:48:43 +000014245fi
14246
Matthias Kloseb9621712010-04-24 17:59:49 +000014247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14248$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014249if test $ac_cv_posix_semaphores_enabled = no
14250then
14251
Matthias Kloseb9621712010-04-24 17:59:49 +000014252$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014253
14254fi
14255
Mark Dickinson10683072009-04-18 21:18:19 +000014256# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14258$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014259if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014260 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014261else
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014263 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014264else
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014266/* end confdefs.h. */
14267
14268#include <unistd.h>
14269#include <fcntl.h>
14270#include <stdio.h>
14271#include <semaphore.h>
14272#include <sys/stat.h>
14273
14274int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014275 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014276 int count;
14277 int res;
14278 if(a==SEM_FAILED){
14279 perror("sem_open");
14280 return 1;
14281
14282 }
14283 res = sem_getvalue(a, &count);
14284 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014285 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014286 return res==-1 ? 1 : 0;
14287}
14288
Mark Dickinson10683072009-04-18 21:18:19 +000014289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014291 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014297fi
14298
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014299
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014300fi
14301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14303$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014304if test $ac_cv_broken_sem_getvalue = yes
14305then
14306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014308
14309fi
14310
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014311ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14312"
14313if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14314 ac_have_decl=1
14315else
14316 ac_have_decl=0
14317fi
14318
14319cat >>confdefs.h <<_ACEOF
14320#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14321_ACEOF
14322ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14323"
14324if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14325 ac_have_decl=1
14326else
14327 ac_have_decl=0
14328fi
14329
14330cat >>confdefs.h <<_ACEOF
14331#define HAVE_DECL_RTLD_NOW $ac_have_decl
14332_ACEOF
14333ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14334"
14335if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14336 ac_have_decl=1
14337else
14338 ac_have_decl=0
14339fi
14340
14341cat >>confdefs.h <<_ACEOF
14342#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14343_ACEOF
14344ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14345"
14346if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14347 ac_have_decl=1
14348else
14349 ac_have_decl=0
14350fi
14351
14352cat >>confdefs.h <<_ACEOF
14353#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14354_ACEOF
14355ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14356"
14357if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14358 ac_have_decl=1
14359else
14360 ac_have_decl=0
14361fi
14362
14363cat >>confdefs.h <<_ACEOF
14364#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14365_ACEOF
14366ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14367"
14368if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14369 ac_have_decl=1
14370else
14371 ac_have_decl=0
14372fi
14373
14374cat >>confdefs.h <<_ACEOF
14375#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14376_ACEOF
14377ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14378"
14379if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14380 ac_have_decl=1
14381else
14382 ac_have_decl=0
14383fi
14384
14385cat >>confdefs.h <<_ACEOF
14386#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14387_ACEOF
14388
14389
Mark Dickinsonbd792642009-03-18 20:06:12 +000014390# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14392$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014393# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014394if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014395 enableval=$enable_big_digits; case $enable_big_digits in
14396yes)
14397 enable_big_digits=30 ;;
14398no)
14399 enable_big_digits=15 ;;
1440015|30)
14401 ;;
14402*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014403 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 +000014404esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14406$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014407
14408cat >>confdefs.h <<_ACEOF
14409#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14410_ACEOF
14411
14412
14413else
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14415$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014416fi
14417
14418
Guido van Rossumef2255b2000-03-10 22:30:29 +000014419# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014420ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014421if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014422
14423
Matthias Kloseb9621712010-04-24 17:59:49 +000014424$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014426 wchar_h="yes"
14427
Guido van Rossumef2255b2000-03-10 22:30:29 +000014428else
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014430
14431fi
14432
Michael W. Hudson54241132001-12-07 15:38:26 +000014433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014435# determine wchar_t size
14436if test "$wchar_h" = yes
14437then
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14440# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14441# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14443$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014444if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014446else
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14448"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
Martin v. Löwis11437992002-04-12 09:54:03 +000014450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 if test "$ac_cv_type_wchar_t" = yes; then
14452 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014454as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014455See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456 else
14457 ac_cv_sizeof_wchar_t=0
14458 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014460
Martin v. Löwis11437992002-04-12 09:54:03 +000014461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14463$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464
14465
14466
Martin v. Löwis11437992002-04-12 09:54:03 +000014467cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014468#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014469_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014470
Michael W. Hudson54241132001-12-07 15:38:26 +000014471
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014472fi
14473
Matthias Kloseb9621712010-04-24 17:59:49 +000014474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14475$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014476have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014478/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014479
14480#include <tcl.h>
14481#if TCL_UTF_MAX != 6
14482# error "NOT UCS4_TCL"
14483#endif
14484int
14485main ()
14486{
14487
14488 ;
14489 return 0;
14490}
14491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014492if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014493
14494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014496
14497 have_ucs4_tcl=yes
14498
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14502$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014503
Skip Montanaro6dead952003-09-25 14:50:04 +000014504# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014505if test "$wchar_h" = yes
14506then
14507 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14509$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014510 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014512else
14513
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014515 ac_cv_wchar_t_signed=yes
14516else
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014518/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014519
14520 #include <wchar.h>
14521 int main()
14522 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014523 /* Success: exit code 0 */
14524 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014525 }
14526
14527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014528if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014529 ac_cv_wchar_t_signed=yes
14530else
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014535fi
14536
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014537fi
14538
Matthias Kloseb9621712010-04-24 17:59:49 +000014539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14540$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541fi
14542
Georg Brandl52d168a2008-01-07 18:10:24 +000014543# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014544if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014545 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014546then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014547 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014550
Georg Brandl52d168a2008-01-07 18:10:24 +000014551else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014552 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014553fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14555$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014556
14557# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14559$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014560if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014562else
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 ac_cv_c_bigendian=unknown
14564 # See if we're dealing with a universal compiler.
14565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14566/* end confdefs.h. */
14567#ifndef __APPLE_CC__
14568 not a universal capable compiler
14569 #endif
14570 typedef int dummy;
14571
Skip Montanaro6dead952003-09-25 14:50:04 +000014572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014573if ac_fn_c_try_compile "$LINENO"; then :
14574
14575 # Check for potential -arch flags. It is not universal unless
14576 # there are at least two -arch flags with different values.
14577 ac_arch=
14578 ac_prev=
14579 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14580 if test -n "$ac_prev"; then
14581 case $ac_word in
14582 i?86 | x86_64 | ppc | ppc64)
14583 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14584 ac_arch=$ac_word
14585 else
14586 ac_cv_c_bigendian=universal
14587 break
14588 fi
14589 ;;
14590 esac
14591 ac_prev=
14592 elif test "x$ac_word" = "x-arch"; then
14593 ac_prev=arch
14594 fi
14595 done
14596fi
14597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14598 if test $ac_cv_c_bigendian = unknown; then
14599 # See if sys/param.h defines the BYTE_ORDER macro.
14600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014601/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014602#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605int
14606main ()
14607{
Matthias Kloseb9621712010-04-24 17:59:49 +000014608#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14609 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14610 && LITTLE_ENDIAN)
14611 bogus endian macros
14612 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014613
14614 ;
14615 return 0;
14616}
14617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014618if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014619 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014621/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014622#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014624
Martin v. Löwis11437992002-04-12 09:54:03 +000014625int
14626main ()
14627{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014628#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 not big endian
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 ac_cv_c_bigendian=yes
14638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014642fi
14643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14644 fi
14645 if test $ac_cv_c_bigendian = unknown; then
14646 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014648/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014649#include <limits.h>
14650
Martin v. Löwis11437992002-04-12 09:54:03 +000014651int
14652main ()
14653{
Matthias Kloseb9621712010-04-24 17:59:49 +000014654#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14655 bogus endian macros
14656 #endif
14657
Martin v. Löwis11437992002-04-12 09:54:03 +000014658 ;
14659 return 0;
14660}
14661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014662if ac_fn_c_try_compile "$LINENO"; then :
14663 # It does; now see whether it defined to _BIG_ENDIAN or not.
14664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14665/* end confdefs.h. */
14666#include <limits.h>
14667
14668int
14669main ()
14670{
14671#ifndef _BIG_ENDIAN
14672 not big endian
14673 #endif
14674
14675 ;
14676 return 0;
14677}
14678_ACEOF
14679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014680 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014681else
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14685fi
14686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14687 fi
14688 if test $ac_cv_c_bigendian = unknown; then
14689 # Compile a test program.
14690 if test "$cross_compiling" = yes; then :
14691 # Try to guess by grepping values from an object file.
14692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14693/* end confdefs.h. */
14694short int ascii_mm[] =
14695 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14696 short int ascii_ii[] =
14697 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14698 int use_ascii (int i) {
14699 return ascii_mm[i] + ascii_ii[i];
14700 }
14701 short int ebcdic_ii[] =
14702 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14703 short int ebcdic_mm[] =
14704 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14705 int use_ebcdic (int i) {
14706 return ebcdic_mm[i] + ebcdic_ii[i];
14707 }
14708 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709
Matthias Kloseb9621712010-04-24 17:59:49 +000014710int
14711main ()
14712{
14713return use_ascii (foo) == use_ebcdic (foo);
14714 ;
14715 return 0;
14716}
14717_ACEOF
14718if ac_fn_c_try_compile "$LINENO"; then :
14719 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14720 ac_cv_c_bigendian=yes
14721 fi
14722 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14723 if test "$ac_cv_c_bigendian" = unknown; then
14724 ac_cv_c_bigendian=no
14725 else
14726 # finding both strings is unlikely to happen, but who knows?
14727 ac_cv_c_bigendian=unknown
14728 fi
14729 fi
14730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014732else
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014734/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014736int
14737main ()
14738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 /* Are we little or big endian? From Harbison&Steele. */
14741 union
14742 {
14743 long int l;
14744 char c[sizeof (long int)];
14745 } u;
14746 u.l = 1;
14747 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014748
14749 ;
14750 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014751}
Martin v. Löwis11437992002-04-12 09:54:03 +000014752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014753if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014754 ac_cv_c_bigendian=no
14755else
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014761
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14765$as_echo "$ac_cv_c_bigendian" >&6; }
14766 case $ac_cv_c_bigendian in #(
14767 yes)
14768 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14769;; #(
14770 no)
14771 ;; #(
14772 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014773
Matthias Kloseb9621712010-04-24 17:59:49 +000014774$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014775
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 ;; #(
14777 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014778 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014779 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014781
Michael W. Hudson54241132001-12-07 15:38:26 +000014782
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014783# ABI version string for Python extension modules. This appears between the
14784# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14785# from the following attributes which affect the ABI of this Python build (in
14786# this order):
14787#
14788# * The Python implementation (always 'cpython-' for us)
14789# * The major and minor version numbers
14790# * --with-pydebug (adds a 'd')
14791# * --with-pymalloc (adds a 'm')
14792# * --with-wide-unicode (adds a 'u')
14793#
14794# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014795# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14796# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014797
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14799$as_echo_n "checking ABIFLAGS... " >&6; }
14800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14801$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14803$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014804SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14806$as_echo "$SOABI" >&6; }
14807
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014808
14809case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014810 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014811 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14812 *)
14813 EXT_SUFFIX=${SHLIB_SUFFIX};;
14814esac
14815
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14817$as_echo_n "checking LDVERSION... " >&6; }
14818LDVERSION='$(VERSION)$(ABIFLAGS)'
14819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14820$as_echo "$LDVERSION" >&6; }
14821
doko@python.org87421192013-01-26 11:39:31 +010014822
doko@ubuntu.com55532312016-06-14 08:55:19 +020014823if test x$PLATFORM_TRIPLET = x; then
14824 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14825else
14826 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14827fi
doko@python.org87421192013-01-26 11:39:31 +010014828
14829
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014830# Check whether right shifting a negative integer extends the sign bit
14831# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14833$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014834if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014836else
Martin v. Löwis11437992002-04-12 09:54:03 +000014837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014839 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014840else
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014842/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014843
14844int main()
14845{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014846 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014847}
14848
Martin v. Löwis11437992002-04-12 09:54:03 +000014849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014850if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014851 ac_cv_rshift_extends_sign=yes
14852else
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014857fi
14858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859fi
14860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14862$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014863if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014864then
Martin v. Löwis11437992002-04-12 09:54:03 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014867
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014868fi
14869
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014870# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14872$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014873if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014875else
Martin v. Löwis11437992002-04-12 09:54:03 +000014876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014878/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014879#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014880int
14881main ()
14882{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014883
14884 FILE *f = fopen("/dev/null", "r");
14885 flockfile(f);
14886 getc_unlocked(f);
14887 funlockfile(f);
14888
Martin v. Löwis11437992002-04-12 09:54:03 +000014889 ;
14890 return 0;
14891}
14892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014893if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014894 ac_cv_have_getc_unlocked=yes
14895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 ac_cv_have_getc_unlocked=no
14897fi
14898rm -f core conftest.err conftest.$ac_objext \
14899 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14903$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014904if test "$ac_cv_have_getc_unlocked" = yes
14905then
Martin v. Löwis11437992002-04-12 09:54:03 +000014906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014908
14909fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014910
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014911# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014912# save the value of LIBS so we don't actually link Python with readline
14913LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014914
Gregory P. Smith18820942008-09-07 06:24:49 +000014915# On some systems we need to link readline to a termcap compatible
14916# library. NOTE: Keep the precedence of listed libraries synchronised
14917# with setup.py.
14918py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14920$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014921for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014922 if test -z "$py_libtermcap"; then
14923 READLINE_LIBS="-lreadline"
14924 else
14925 READLINE_LIBS="-lreadline -l$py_libtermcap"
14926 fi
14927 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014929/* end confdefs.h. */
14930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931/* Override any GCC internal prototype to avoid an error.
14932 Use char because int might match the return type of a GCC
14933 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014934#ifdef __cplusplus
14935extern "C"
14936#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014937char readline ();
14938int
14939main ()
14940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014942 ;
14943 return 0;
14944}
14945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014946if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014947 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014949rm -f core conftest.err conftest.$ac_objext \
14950 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014951 if test $py_cv_lib_readline = yes; then
14952 break
14953 fi
14954done
14955# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14956#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014957if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14959$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014960else
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14962$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014965
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014966fi
14967
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014968# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971#include <readline/readline.h>
14972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014973if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014974 have_readline=yes
14975else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014976 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014977
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014978fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014979rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014980if test $have_readline = yes
14981then
Matthias Kloseb9621712010-04-24 17:59:49 +000014982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014983/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014984#include <readline/readline.h>
14985
14986_ACEOF
14987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014991
14992fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014993rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014996/* end confdefs.h. */
14997#include <readline/readline.h>
14998
14999_ACEOF
15000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015004
15005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015006rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015007
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015008fi
15009
Martin v. Löwis0daad592001-09-30 21:09:59 +000015010# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15012$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015013if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015017LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021/* Override any GCC internal prototype to avoid an error.
15022 Use char because int might match the return type of a GCC
15023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015024#ifdef __cplusplus
15025extern "C"
15026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015027char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015028int
15029main ()
15030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 ;
15033 return 0;
15034}
15035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015038else
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015041rm -f core conftest.err conftest.$ac_objext \
15042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015043LIBS=$ac_check_lib_save_LIBS
15044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15046$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015047if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015048
Matthias Kloseb9621712010-04-24 17:59:49 +000015049$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015050
Martin v. Löwis0daad592001-09-30 21:09:59 +000015051fi
15052
Michael W. Hudson54241132001-12-07 15:38:26 +000015053
Thomas Wouters89d996e2007-09-08 17:39:28 +000015054# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15056$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015057if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015059else
15060 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015061LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015063/* end confdefs.h. */
15064
15065/* Override any GCC internal prototype to avoid an error.
15066 Use char because int might match the return type of a GCC
15067 builtin and then its argument prototype would still apply. */
15068#ifdef __cplusplus
15069extern "C"
15070#endif
15071char rl_completion_display_matches_hook ();
15072int
15073main ()
15074{
15075return rl_completion_display_matches_hook ();
15076 ;
15077 return 0;
15078}
15079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015080if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015081 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15082else
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015085rm -f core conftest.err conftest.$ac_objext \
15086 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015087LIBS=$ac_check_lib_save_LIBS
15088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15090$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015091if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015094
15095fi
15096
15097
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015098# also in 4.0, but not in editline
15099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15100$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15101if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15102 $as_echo_n "(cached) " >&6
15103else
15104 ac_check_lib_save_LIBS=$LIBS
15105LIBS="-lreadline $READLINE_LIBS $LIBS"
15106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15107/* end confdefs.h. */
15108
15109/* Override any GCC internal prototype to avoid an error.
15110 Use char because int might match the return type of a GCC
15111 builtin and then its argument prototype would still apply. */
15112#ifdef __cplusplus
15113extern "C"
15114#endif
15115char rl_resize_terminal ();
15116int
15117main ()
15118{
15119return rl_resize_terminal ();
15120 ;
15121 return 0;
15122}
15123_ACEOF
15124if ac_fn_c_try_link "$LINENO"; then :
15125 ac_cv_lib_readline_rl_resize_terminal=yes
15126else
15127 ac_cv_lib_readline_rl_resize_terminal=no
15128fi
15129rm -f core conftest.err conftest.$ac_objext \
15130 conftest$ac_exeext conftest.$ac_ext
15131LIBS=$ac_check_lib_save_LIBS
15132fi
15133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15134$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15135if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15136
15137$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15138
15139fi
15140
15141
Martin v. Löwis0daad592001-09-30 21:09:59 +000015142# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15144$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015145if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015149LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153/* Override any GCC internal prototype to avoid an error.
15154 Use char because int might match the return type of a GCC
15155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015156#ifdef __cplusplus
15157extern "C"
15158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015159char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015160int
15161main ()
15162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ;
15165 return 0;
15166}
15167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015170else
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015173rm -f core conftest.err conftest.$ac_objext \
15174 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015175LIBS=$ac_check_lib_save_LIBS
15176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15178$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015179if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015180
Matthias Kloseb9621712010-04-24 17:59:49 +000015181$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015182
Guido van Rossum353ae582001-07-10 16:45:32 +000015183fi
15184
Jack Jansendd19cf82001-12-06 22:36:17 +000015185
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015186# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015188/* end confdefs.h. */
15189#include <readline/readline.h>
15190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015191if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015192 have_readline=yes
15193else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015194 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015195
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015196fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015197rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015198if test $have_readline = yes
15199then
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201/* end confdefs.h. */
15202#include <readline/readline.h>
15203
15204_ACEOF
15205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207
Matthias Kloseb9621712010-04-24 17:59:49 +000015208$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209
15210fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015211rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015212
15213fi
15214
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15216$as_echo_n "checking for append_history in -lreadline... " >&6; }
15217if ${ac_cv_lib_readline_append_history+:} false; then :
15218 $as_echo_n "(cached) " >&6
15219else
15220 ac_check_lib_save_LIBS=$LIBS
15221LIBS="-lreadline $READLINE_LIBS $LIBS"
15222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15223/* end confdefs.h. */
15224
15225/* Override any GCC internal prototype to avoid an error.
15226 Use char because int might match the return type of a GCC
15227 builtin and then its argument prototype would still apply. */
15228#ifdef __cplusplus
15229extern "C"
15230#endif
15231char append_history ();
15232int
15233main ()
15234{
15235return append_history ();
15236 ;
15237 return 0;
15238}
15239_ACEOF
15240if ac_fn_c_try_link "$LINENO"; then :
15241 ac_cv_lib_readline_append_history=yes
15242else
15243 ac_cv_lib_readline_append_history=no
15244fi
15245rm -f core conftest.err conftest.$ac_objext \
15246 conftest$ac_exeext conftest.$ac_ext
15247LIBS=$ac_check_lib_save_LIBS
15248fi
15249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15250$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15251if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15252
15253$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15254
15255fi
15256
15257
Martin v. Löwis82bca632006-02-10 20:49:30 +000015258# End of readline checks: restore LIBS
15259LIBS=$LIBS_no_readline
15260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15262$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015263if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015265else
Martin v. Löwis11437992002-04-12 09:54:03 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015268 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015269else
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015271/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015272
15273int main()
15274{
15275 int val1 = nice(1);
15276 if (val1 != -1 && val1 == nice(2))
15277 exit(0);
15278 exit(1);
15279}
15280
Martin v. Löwis11437992002-04-12 09:54:03 +000015281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015282if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015283 ac_cv_broken_nice=yes
15284else
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015289fi
15290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291fi
15292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15294$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015295if test "$ac_cv_broken_nice" = yes
15296then
Martin v. Löwis11437992002-04-12 09:54:03 +000015297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015299
15300fi
15301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15303$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015304if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015306else
Matthias Kloseb9621712010-04-24 17:59:49 +000015307 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015308 ac_cv_broken_poll=no
15309else
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015311/* end confdefs.h. */
15312
15313#include <poll.h>
15314
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015315int main()
15316{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015317 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015318 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015319
15320 close (42);
15321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015322 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015323 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015324 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015325 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015326 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015327 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015328 return 1;
15329}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015330
15331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015332if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015333 ac_cv_broken_poll=yes
15334else
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15338 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015341fi
15342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15344$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015345if test "$ac_cv_broken_poll" = yes
15346then
15347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015349
15350fi
15351
Brett Cannon43802422005-02-10 20:48:03 +000015352# 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 +000015353# (which is not required by ISO C or UNIX spec) and/or if we support
15354# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015355ac_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 +000015356#include <$ac_cv_struct_tm>
15357
Matthias Kloseb9621712010-04-24 17:59:49 +000015358"
Victor Stinnere0be4232011-10-25 13:06:09 +020015359if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015360
15361cat >>confdefs.h <<_ACEOF
15362#define HAVE_STRUCT_TM_TM_ZONE 1
15363_ACEOF
15364
15365
15366fi
15367
15368if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015371
15372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15374"
Victor Stinnere0be4232011-10-25 13:06:09 +020015375if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015377else
Matthias Kloseb9621712010-04-24 17:59:49 +000015378 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379fi
15380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015382#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383_ACEOF
15384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15386$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015387if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015389else
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015391/* end confdefs.h. */
15392#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015393#if !HAVE_DECL_TZNAME
15394extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015395#endif
15396
15397int
15398main ()
15399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015401 ;
15402 return 0;
15403}
15404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015405if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015406 ac_cv_var_tzname=yes
15407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015410rm -f core conftest.err conftest.$ac_objext \
15411 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15414$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015415 if test $ac_cv_var_tzname = yes; then
15416
Matthias Kloseb9621712010-04-24 17:59:49 +000015417$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015418
15419 fi
15420fi
15421
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015422
Martin v. Löwis1d459062005-03-14 21:23:33 +000015423# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15425$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015426if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015428else
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015431 ac_cv_working_tzset=no
15432else
Matthias Kloseb9621712010-04-24 17:59:49 +000015433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015434/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015435
15436#include <stdlib.h>
15437#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015438#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015439
15440#if HAVE_TZNAME
15441extern char *tzname[];
15442#endif
15443
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015444int main()
15445{
Brett Cannon18367812003-09-19 00:59:16 +000015446 /* Note that we need to ensure that not only does tzset(3)
15447 do 'something' with localtime, but it works as documented
15448 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015449 This includes making sure that tzname is set properly if
15450 tm->tm_zone does not exist since it is the alternative way
15451 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015452
15453 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015454 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015455 */
15456
Martin v. Löwis1d459062005-03-14 21:23:33 +000015457 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015458 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15459
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015460 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015461 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015462 if (localtime(&groundhogday)->tm_hour != 0)
15463 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015464#if HAVE_TZNAME
15465 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15466 if (strcmp(tzname[0], "UTC") ||
15467 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15468 exit(1);
15469#endif
Brett Cannon18367812003-09-19 00:59:16 +000015470
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015471 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015472 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015473 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015474 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015475#if HAVE_TZNAME
15476 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15477 exit(1);
15478#endif
Brett Cannon18367812003-09-19 00:59:16 +000015479
15480 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15481 tzset();
15482 if (localtime(&groundhogday)->tm_hour != 11)
15483 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015484#if HAVE_TZNAME
15485 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15486 exit(1);
15487#endif
15488
15489#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015490 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15491 exit(1);
15492 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15493 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015494#endif
Brett Cannon18367812003-09-19 00:59:16 +000015495
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015496 exit(0);
15497}
15498
15499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015500if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015501 ac_cv_working_tzset=yes
15502else
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015507fi
15508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509fi
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15512$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015513if test "$ac_cv_working_tzset" = yes
15514then
15515
Matthias Kloseb9621712010-04-24 17:59:49 +000015516$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015517
15518fi
15519
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015520# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15522$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015523if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015525else
Matthias Kloseb9621712010-04-24 17:59:49 +000015526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015527/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015528#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015529int
15530main ()
15531{
15532
15533struct stat st;
15534st.st_mtim.tv_nsec = 1;
15535
15536 ;
15537 return 0;
15538}
15539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015541 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15546fi
15547
Matthias Kloseb9621712010-04-24 17:59:49 +000015548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15549$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015550if test "$ac_cv_stat_tv_nsec" = yes
15551then
15552
Matthias Kloseb9621712010-04-24 17:59:49 +000015553$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015554
15555fi
15556
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015557# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15559$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015560if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015562else
Matthias Kloseb9621712010-04-24 17:59:49 +000015563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015564/* end confdefs.h. */
15565#include <sys/stat.h>
15566int
15567main ()
15568{
15569
15570struct stat st;
15571st.st_mtimespec.tv_nsec = 1;
15572
15573 ;
15574 return 0;
15575}
15576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015578 ac_cv_stat_tv_nsec2=yes
15579else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15583fi
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15586$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015587if test "$ac_cv_stat_tv_nsec2" = yes
15588then
15589
Matthias Kloseb9621712010-04-24 17:59:49 +000015590$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015591
15592fi
15593
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015594# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015595ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015596if test "$cross_compiling" = no; then
15597 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15598fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015599
15600for ac_header in curses.h ncurses.h
15601do :
15602 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15603ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15604if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15605 cat >>confdefs.h <<_ACEOF
15606#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15607_ACEOF
15608
15609fi
15610
15611done
15612
15613
15614# On Solaris, term.h requires curses.h
15615for ac_header in term.h
15616do :
15617 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15618#ifdef HAVE_CURSES_H
15619#include <curses.h>
15620#endif
15621
15622"
15623if test "x$ac_cv_header_term_h" = xyes; then :
15624 cat >>confdefs.h <<_ACEOF
15625#define HAVE_TERM_H 1
15626_ACEOF
15627
15628fi
15629
15630done
15631
15632
Jack Jansen666b1e72001-10-31 12:11:48 +000015633# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15635$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015636if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015637 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015638else
Matthias Kloseb9621712010-04-24 17:59:49 +000015639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015640/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015641#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015642int
15643main ()
15644{
Jack Jansen666b1e72001-10-31 12:11:48 +000015645
15646 int rtn;
15647 rtn = mvwdelch(0,0,0);
15648
Martin v. Löwis11437992002-04-12 09:54:03 +000015649 ;
15650 return 0;
15651}
15652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015653if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015654 ac_cv_mvwdelch_is_expression=yes
15655else
Matthias Kloseb9621712010-04-24 17:59:49 +000015656 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15659fi
15660
Matthias Kloseb9621712010-04-24 17:59:49 +000015661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15662$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015663
15664if test "$ac_cv_mvwdelch_is_expression" = yes
15665then
Martin v. Löwis11437992002-04-12 09:54:03 +000015666
Matthias Kloseb9621712010-04-24 17:59:49 +000015667$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015668
15669fi
15670
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015671# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15672# structs since version 5.7. If the macro is defined as zero before including
15673# [n]curses.h, ncurses will expose fields of the structs regardless of the
15674# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15676$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015677if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015679else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015681/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015682
15683 #define NCURSES_OPAQUE 0
15684 #include <curses.h>
15685
Martin v. Löwis11437992002-04-12 09:54:03 +000015686int
15687main ()
15688{
Jack Jansen666b1e72001-10-31 12:11:48 +000015689
15690 WINDOW *w;
15691 w->_flags = 0;
15692
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 ;
15694 return 0;
15695}
15696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015697if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015698 ac_cv_window_has_flags=yes
15699else
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15703fi
15704
Matthias Kloseb9621712010-04-24 17:59:49 +000015705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15706$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015707
Jack Jansen666b1e72001-10-31 12:11:48 +000015708
15709if test "$ac_cv_window_has_flags" = yes
15710then
Martin v. Löwis11437992002-04-12 09:54:03 +000015711
Matthias Kloseb9621712010-04-24 17:59:49 +000015712$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015713
15714fi
15715
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15717$as_echo_n "checking for is_pad... " >&6; }
15718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15719/* end confdefs.h. */
15720#include <curses.h>
15721int
15722main ()
15723{
15724
15725#ifndef is_pad
15726void *x=is_pad
15727#endif
15728
15729 ;
15730 return 0;
15731}
15732_ACEOF
15733if ac_fn_c_try_compile "$LINENO"; then :
15734
15735$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15736
15737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15738$as_echo "yes" >&6; }
15739else
15740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15741$as_echo "no" >&6; }
15742
15743fi
15744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15747$as_echo_n "checking for is_term_resized... " >&6; }
15748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015749/* end confdefs.h. */
15750#include <curses.h>
15751int
15752main ()
15753{
15754void *x=is_term_resized
15755 ;
15756 return 0;
15757}
15758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015759if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015762
Matthias Kloseb159a552010-04-25 21:00:44 +000015763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015764$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015765else
Matthias Kloseb9621712010-04-24 17:59:49 +000015766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15767$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015768
15769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15771
Matthias Kloseb9621712010-04-24 17:59:49 +000015772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15773$as_echo_n "checking for resize_term... " >&6; }
15774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015775/* end confdefs.h. */
15776#include <curses.h>
15777int
15778main ()
15779{
15780void *x=resize_term
15781 ;
15782 return 0;
15783}
15784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015785if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015786
Matthias Kloseb9621712010-04-24 17:59:49 +000015787$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015788
Matthias Kloseb159a552010-04-25 21:00:44 +000015789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015790$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015791else
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15793$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015794
15795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15797
Matthias Kloseb9621712010-04-24 17:59:49 +000015798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15799$as_echo_n "checking for resizeterm... " >&6; }
15800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015801/* end confdefs.h. */
15802#include <curses.h>
15803int
15804main ()
15805{
15806void *x=resizeterm
15807 ;
15808 return 0;
15809}
15810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015811if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015814
Matthias Kloseb159a552010-04-25 21:00:44 +000015815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015816$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015817else
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15819$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015820
15821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015823
15824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15825$as_echo_n "checking for immedok... " >&6; }
15826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15827/* end confdefs.h. */
15828#include <curses.h>
15829int
15830main ()
15831{
15832
15833#ifndef immedok
15834void *x=immedok
15835#endif
15836
15837 ;
15838 return 0;
15839}
15840_ACEOF
15841if ac_fn_c_try_compile "$LINENO"; then :
15842
15843$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15844
15845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15846$as_echo "yes" >&6; }
15847else
15848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15849$as_echo "no" >&6; }
15850
15851fi
15852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15853
15854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15855$as_echo_n "checking for syncok... " >&6; }
15856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15857/* end confdefs.h. */
15858#include <curses.h>
15859int
15860main ()
15861{
15862
15863#ifndef syncok
15864void *x=syncok
15865#endif
15866
15867 ;
15868 return 0;
15869}
15870_ACEOF
15871if ac_fn_c_try_compile "$LINENO"; then :
15872
15873$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15874
15875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15876$as_echo "yes" >&6; }
15877else
15878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15879$as_echo "no" >&6; }
15880
15881fi
15882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15883
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15885$as_echo_n "checking for wchgat... " >&6; }
15886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15887/* end confdefs.h. */
15888#include <curses.h>
15889int
15890main ()
15891{
15892
15893#ifndef wchgat
15894void *x=wchgat
15895#endif
15896
15897 ;
15898 return 0;
15899}
15900_ACEOF
15901if ac_fn_c_try_compile "$LINENO"; then :
15902
15903$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15904
15905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15906$as_echo "yes" >&6; }
15907else
15908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15909$as_echo "no" >&6; }
15910
15911fi
15912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15913
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15915$as_echo_n "checking for filter... " >&6; }
15916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15917/* end confdefs.h. */
15918#include <curses.h>
15919int
15920main ()
15921{
15922
15923#ifndef filter
15924void *x=filter
15925#endif
15926
15927 ;
15928 return 0;
15929}
15930_ACEOF
15931if ac_fn_c_try_compile "$LINENO"; then :
15932
15933$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15934
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15936$as_echo "yes" >&6; }
15937else
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15939$as_echo "no" >&6; }
15940
15941fi
15942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15943
15944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15945$as_echo_n "checking for has_key... " >&6; }
15946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15947/* end confdefs.h. */
15948#include <curses.h>
15949int
15950main ()
15951{
15952
15953#ifndef has_key
15954void *x=has_key
15955#endif
15956
15957 ;
15958 return 0;
15959}
15960_ACEOF
15961if ac_fn_c_try_compile "$LINENO"; then :
15962
15963$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15964
15965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15966$as_echo "yes" >&6; }
15967else
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15969$as_echo "no" >&6; }
15970
15971fi
15972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15973
15974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15975$as_echo_n "checking for typeahead... " >&6; }
15976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15977/* end confdefs.h. */
15978#include <curses.h>
15979int
15980main ()
15981{
15982
15983#ifndef typeahead
15984void *x=typeahead
15985#endif
15986
15987 ;
15988 return 0;
15989}
15990_ACEOF
15991if ac_fn_c_try_compile "$LINENO"; then :
15992
15993$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15994
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15996$as_echo "yes" >&6; }
15997else
15998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15999$as_echo "no" >&6; }
16000
16001fi
16002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16003
16004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16005$as_echo_n "checking for use_env... " >&6; }
16006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16007/* end confdefs.h. */
16008#include <curses.h>
16009int
16010main ()
16011{
16012
16013#ifndef use_env
16014void *x=use_env
16015#endif
16016
16017 ;
16018 return 0;
16019}
16020_ACEOF
16021if ac_fn_c_try_compile "$LINENO"; then :
16022
16023$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16024
16025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16026$as_echo "yes" >&6; }
16027else
16028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16029$as_echo "no" >&6; }
16030
16031fi
16032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016033# last curses configure check
16034CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016035
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16037$as_echo "$as_me: checking for device files" >&6;}
16038
16039if test "x$cross_compiling" = xyes; then
16040 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16042$as_echo_n "checking for /dev/ptmx... " >&6; }
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16044$as_echo "not set" >&6; }
16045 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16046 fi
16047 if test "${ac_cv_file__dev_ptc+set}" != set; then
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16049$as_echo_n "checking for /dev/ptc... " >&6; }
16050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16051$as_echo "not set" >&6; }
16052 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16053 fi
16054fi
16055
Matthias Kloseb9621712010-04-24 17:59:49 +000016056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16057$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016058if ${ac_cv_file__dev_ptmx+:} false; then :
16059 $as_echo_n "(cached) " >&6
16060else
16061 test "$cross_compiling" = yes &&
16062 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16063if test -r "/dev/ptmx"; then
16064 ac_cv_file__dev_ptmx=yes
16065else
16066 ac_cv_file__dev_ptmx=no
16067fi
16068fi
16069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16070$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16071if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016072
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016073fi
16074
16075if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016076
Matthias Kloseb9621712010-04-24 17:59:49 +000016077$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016078
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16081$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016082if ${ac_cv_file__dev_ptc+:} false; then :
16083 $as_echo_n "(cached) " >&6
16084else
16085 test "$cross_compiling" = yes &&
16086 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16087if test -r "/dev/ptc"; then
16088 ac_cv_file__dev_ptc=yes
16089else
16090 ac_cv_file__dev_ptc=no
16091fi
16092fi
16093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16094$as_echo "$ac_cv_file__dev_ptc" >&6; }
16095if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016096
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016097fi
16098
16099if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016100
Matthias Kloseb9621712010-04-24 17:59:49 +000016101$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016102
Neal Norwitz865400f2003-03-21 01:42:58 +000016103fi
16104
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016105if test $ac_sys_system = Darwin
16106then
16107 LIBS="$LIBS -framework CoreFoundation"
16108fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016109
Matthias Kloseb9621712010-04-24 17:59:49 +000016110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16111$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016112if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016113 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016114else
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016116 ac_cv_have_size_t_format="cross -- assuming yes"
16117
Thomas Wouters477c8d52006-05-27 19:21:47 +000016118else
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016120/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016121
Thomas Wouters477c8d52006-05-27 19:21:47 +000016122#include <stdio.h>
16123#include <stddef.h>
16124#include <string.h>
16125
Christian Heimes2c181612007-12-17 20:04:13 +000016126#ifdef HAVE_SYS_TYPES_H
16127#include <sys/types.h>
16128#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016129
16130#ifdef HAVE_SSIZE_T
16131typedef ssize_t Py_ssize_t;
16132#elif SIZEOF_VOID_P == SIZEOF_LONG
16133typedef long Py_ssize_t;
16134#else
16135typedef int Py_ssize_t;
16136#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016137
Christian Heimes2c181612007-12-17 20:04:13 +000016138int main()
16139{
16140 char buffer[256];
16141
Thomas Wouters477c8d52006-05-27 19:21:47 +000016142 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16143 return 1;
16144
Thomas Wouters89f507f2006-12-13 04:49:30 +000016145 if (strcmp(buffer, "123"))
16146 return 1;
16147
16148 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16149 return 1;
16150
16151 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016152 return 1;
16153
16154 return 0;
16155}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016156
Thomas Wouters477c8d52006-05-27 19:21:47 +000016157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016158if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016159 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016160else
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16164 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016165fi
16166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16169$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016170if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016173
16174fi
16175
Matthias Kloseb9621712010-04-24 17:59:49 +000016176ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016177#ifdef HAVE_SYS_TYPES_H
16178#include <sys/types.h>
16179#endif
16180#ifdef HAVE_SYS_SOCKET_H
16181#include <sys/socket.h>
16182#endif
16183
Matthias Kloseb9621712010-04-24 17:59:49 +000016184"
Victor Stinnere0be4232011-10-25 13:06:09 +020016185if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016186
Martin v. Löwis11437992002-04-12 09:54:03 +000016187else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016188
Matthias Kloseb9621712010-04-24 17:59:49 +000016189$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016190
16191fi
16192
Michael W. Hudson54241132001-12-07 15:38:26 +000016193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16195$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016196if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016197 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016198else
Matthias Kloseb9621712010-04-24 17:59:49 +000016199 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016200 ac_cv_broken_mbstowcs=no
16201else
Matthias Kloseb9621712010-04-24 17:59:49 +000016202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016203/* end confdefs.h. */
16204
Stefan Krah19c21392012-11-22 23:47:32 +010016205#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016206#include<stdlib.h>
16207int main() {
16208 size_t len = -1;
16209 const char *str = "text";
16210 len = mbstowcs(NULL, str, 0);
16211 return (len != 4);
16212}
16213
16214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016215if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016216 ac_cv_broken_mbstowcs=no
16217else
Matthias Kloseb9621712010-04-24 17:59:49 +000016218 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16221 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016222fi
16223
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016224fi
16225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16227$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016228if test "$ac_cv_broken_mbstowcs" = yes
16229then
16230
Matthias Kloseb9621712010-04-24 17:59:49 +000016231$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016232
16233fi
16234
Antoine Pitroub52ec782009-01-25 16:34:23 +000016235# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16237$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238
16239# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016240if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016241 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016242if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016243then
16244
Matthias Kloseb9621712010-04-24 17:59:49 +000016245$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016246
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16248$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016249fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016250if test "$withval" = no
16251then
16252
16253$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16254
Matthias Kloseb9621712010-04-24 17:59:49 +000016255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16256$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016257fi
16258
Antoine Pitrou042b1282010-08-13 21:15:58 +000016259else
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16261$as_echo "no value specified" >&6; }
16262fi
16263
Antoine Pitroub52ec782009-01-25 16:34:23 +000016264
Matthias Kloseb17289e2012-03-15 19:51:34 +010016265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16266$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16267if ${ac_cv_computed_gotos+:} false; then :
16268 $as_echo_n "(cached) " >&6
16269else
16270 if test "$cross_compiling" = yes; then :
16271 if test "${with_computed_gotos+set}" = set; then
16272 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16273 else
16274 ac_cv_computed_gotos=no
16275 fi
16276else
16277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278/* end confdefs.h. */
16279
16280int main(int argc, char **argv)
16281{
16282 static void *targets[1] = { &&LABEL1 };
16283 goto LABEL2;
16284LABEL1:
16285 return 0;
16286LABEL2:
16287 goto *targets[0];
16288 return 1;
16289}
16290
16291_ACEOF
16292if ac_fn_c_try_run "$LINENO"; then :
16293 ac_cv_computed_gotos=yes
16294else
16295 ac_cv_computed_gotos=no
16296fi
16297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16298 conftest.$ac_objext conftest.beam conftest.$ac_ext
16299fi
16300
16301fi
16302
16303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16304$as_echo "$ac_cv_computed_gotos" >&6; }
16305case "$ac_cv_computed_gotos" in yes*)
16306
16307$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16308
16309esac
16310
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016311case $ac_sys_system in
16312AIX*)
16313
16314$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16315 ;;
16316esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016317
Michael W. Hudson54241132001-12-07 15:38:26 +000016318
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016319
16320
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016321for h in `(cd $srcdir;echo Python/thread_*.h)`
16322do
16323 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16324done
16325
Michael W. Hudson54241132001-12-07 15:38:26 +000016326
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016327SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16329$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016330for dir in $SRCDIRS; do
16331 if test ! -d $dir; then
16332 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016333 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016334done
Matthias Kloseb9621712010-04-24 17:59:49 +000016335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16336$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016337
Stefan Krah1919b7e2012-03-21 18:25:23 +010016338# Availability of -O2:
16339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16340$as_echo_n "checking for -O2... " >&6; }
16341saved_cflags="$CFLAGS"
16342CFLAGS="-O2"
16343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16344/* end confdefs.h. */
16345
16346int
16347main ()
16348{
16349
16350
16351 ;
16352 return 0;
16353}
16354_ACEOF
16355if ac_fn_c_try_compile "$LINENO"; then :
16356 have_O2=yes
16357else
16358 have_O2=no
16359fi
16360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16362$as_echo "$have_O2" >&6; }
16363CFLAGS="$saved_cflags"
16364
16365# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16366# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16368$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16369saved_cflags="$CFLAGS"
16370CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16371if test "$have_O2" = no; then
16372 CFLAGS=""
16373fi
16374if test "$cross_compiling" = yes; then :
16375 have_glibc_memmove_bug=undefined
16376else
16377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16378/* end confdefs.h. */
16379
16380#include <stdio.h>
16381#include <stdlib.h>
16382#include <string.h>
16383void foo(void *p, void *q) { memmove(p, q, 19); }
16384int main() {
16385 char a[32] = "123456789000000000";
16386 foo(&a[9], a);
16387 if (strcmp(a, "123456789123456789000000000") != 0)
16388 return 1;
16389 foo(a, &a[9]);
16390 if (strcmp(a, "123456789000000000") != 0)
16391 return 1;
16392 return 0;
16393}
16394
16395_ACEOF
16396if ac_fn_c_try_run "$LINENO"; then :
16397 have_glibc_memmove_bug=no
16398else
16399 have_glibc_memmove_bug=yes
16400fi
16401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16402 conftest.$ac_objext conftest.beam conftest.$ac_ext
16403fi
16404
16405CFLAGS="$saved_cflags"
16406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16407$as_echo "$have_glibc_memmove_bug" >&6; }
16408if test "$have_glibc_memmove_bug" = yes; then
16409
16410$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16411
16412fi
16413
16414if test "$have_gcc_asm_for_x87" = yes; then
16415 # Some versions of gcc miscompile inline asm:
16416 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16417 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16418 case $CC in
16419 *gcc*)
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16421$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16422 saved_cflags="$CFLAGS"
16423 CFLAGS="-O2"
16424 if test "$cross_compiling" = yes; then :
16425 have_ipa_pure_const_bug=undefined
16426else
16427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16428/* end confdefs.h. */
16429
16430 __attribute__((noinline)) int
16431 foo(int *p) {
16432 int r;
16433 asm ( "movl \$6, (%1)\n\t"
16434 "xorl %0, %0\n\t"
16435 : "=r" (r) : "r" (p) : "memory"
16436 );
16437 return r;
16438 }
16439 int main() {
16440 int p = 8;
16441 if ((foo(&p) ? : p) != 6)
16442 return 1;
16443 return 0;
16444 }
16445
16446_ACEOF
16447if ac_fn_c_try_run "$LINENO"; then :
16448 have_ipa_pure_const_bug=no
16449else
16450 have_ipa_pure_const_bug=yes
16451fi
16452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16453 conftest.$ac_objext conftest.beam conftest.$ac_ext
16454fi
16455
16456 CFLAGS="$saved_cflags"
16457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16458$as_echo "$have_ipa_pure_const_bug" >&6; }
16459 if test "$have_ipa_pure_const_bug" = yes; then
16460
16461$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16462
16463 fi
16464 ;;
16465 esac
16466fi
16467
Victor Stinner4f5366e2015-01-09 02:13:19 +010016468# Check for stdatomic.h
16469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16470$as_echo_n "checking for stdatomic.h... " >&6; }
16471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16472/* end confdefs.h. */
16473
16474
16475 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016476 atomic_int value = ATOMIC_VAR_INIT(1);
16477 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016478 int main() {
16479 int loaded_value = atomic_load(&value);
16480 return 0;
16481 }
16482
16483
16484_ACEOF
16485if ac_fn_c_try_link "$LINENO"; then :
16486 have_stdatomic_h=yes
16487else
16488 have_stdatomic_h=no
16489fi
16490rm -f core conftest.err conftest.$ac_objext \
16491 conftest$ac_exeext conftest.$ac_ext
16492
16493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16494$as_echo "$have_stdatomic_h" >&6; }
16495
16496if test "$have_stdatomic_h" = yes; then
16497
16498$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16499
16500fi
16501
16502# Check for GCC >= 4.7 __atomic builtins
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16504$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16506/* end confdefs.h. */
16507
16508
16509 volatile int val = 1;
16510 int main() {
16511 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16512 return 0;
16513 }
16514
16515
16516_ACEOF
16517if ac_fn_c_try_link "$LINENO"; then :
16518 have_builtin_atomic=yes
16519else
16520 have_builtin_atomic=no
16521fi
16522rm -f core conftest.err conftest.$ac_objext \
16523 conftest$ac_exeext conftest.$ac_ext
16524
16525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16526$as_echo "$have_builtin_atomic" >&6; }
16527
16528if test "$have_builtin_atomic" = yes; then
16529
16530$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16531
16532fi
16533
Ned Deily322f5ba2013-11-21 23:01:59 -080016534# ensurepip option
16535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16536$as_echo_n "checking for ensurepip... " >&6; }
16537
16538# Check whether --with-ensurepip was given.
16539if test "${with_ensurepip+set}" = set; then :
16540 withval=$with_ensurepip;
16541else
16542 with_ensurepip=upgrade
16543fi
16544
16545case $with_ensurepip in #(
16546 yes|upgrade) :
16547 ENSUREPIP=upgrade ;; #(
16548 install) :
16549 ENSUREPIP=install ;; #(
16550 no) :
16551 ENSUREPIP=no ;; #(
16552 *) :
16553 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16554esac
16555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16556$as_echo "$ENSUREPIP" >&6; }
16557
16558
Victor Stinner35a97c02015-03-08 02:59:09 +010016559# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16561$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16563/* end confdefs.h. */
16564
16565
16566 #include <dirent.h>
16567
16568 int main() {
16569 struct dirent entry;
16570 return entry.d_type == DT_UNKNOWN;
16571 }
16572
16573
16574_ACEOF
16575if ac_fn_c_try_link "$LINENO"; then :
16576 have_dirent_d_type=yes
16577else
16578 have_dirent_d_type=no
16579fi
16580rm -f core conftest.err conftest.$ac_objext \
16581 conftest$ac_exeext conftest.$ac_ext
16582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16583$as_echo "$have_dirent_d_type" >&6; }
16584
16585if test "$have_dirent_d_type" = yes; then
16586
16587$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16588
16589fi
16590
Victor Stinner9eb57c52015-03-19 22:21:49 +010016591# check if the Linux getrandom() syscall is available
16592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16593$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16595/* end confdefs.h. */
16596
16597
Victor Stinner1b80b242016-04-12 22:34:58 +020016598 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016599 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016600 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016601
16602 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016603 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016604 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016605 const int flags = GRND_NONBLOCK;
16606 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016607 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016608 return 0;
16609 }
16610
16611
16612_ACEOF
16613if ac_fn_c_try_link "$LINENO"; then :
16614 have_getrandom_syscall=yes
16615else
16616 have_getrandom_syscall=no
16617fi
16618rm -f core conftest.err conftest.$ac_objext \
16619 conftest$ac_exeext conftest.$ac_ext
16620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16621$as_echo "$have_getrandom_syscall" >&6; }
16622
16623if test "$have_getrandom_syscall" = yes; then
16624
16625$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16626
16627fi
16628
Victor Stinner3abf44e2015-09-18 15:38:37 +020016629# check if the getrandom() function is available
16630# the test was written for the Solaris function of <sys/random.h>
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16632$as_echo_n "checking for the getrandom() function... " >&6; }
16633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16634/* end confdefs.h. */
16635
16636
16637 #include <sys/random.h>
16638
16639 int main() {
16640 char buffer[1];
16641 const size_t buflen = sizeof(buffer);
16642 const int flags = 0;
16643 /* ignore the result, Python checks for ENOSYS at runtime */
16644 (void)getrandom(buffer, buflen, flags);
16645 return 0;
16646 }
16647
16648
16649_ACEOF
16650if ac_fn_c_try_link "$LINENO"; then :
16651 have_getrandom=yes
16652else
16653 have_getrandom=no
16654fi
16655rm -f core conftest.err conftest.$ac_objext \
16656 conftest$ac_exeext conftest.$ac_ext
16657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16658$as_echo "$have_getrandom" >&6; }
16659
16660if test "$have_getrandom" = yes; then
16661
16662$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16663
16664fi
16665
Guido van Rossum627b2d71993-12-24 10:39:16 +000016666# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016667ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016668
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016669ac_config_files="$ac_config_files Modules/ld_so_aix"
16670
Martin v. Löwis11437992002-04-12 09:54:03 +000016671cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016672# This file is a shell script that caches the results of configure
16673# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016674# scripts and configure runs, see configure's option --config-cache.
16675# It is not useful on other systems. If it contains results you don't
16676# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016677#
Martin v. Löwis11437992002-04-12 09:54:03 +000016678# config.status only pays attention to the cache file if you give it
16679# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016680#
Skip Montanaro6dead952003-09-25 14:50:04 +000016681# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016682# loading this file, other *unset* `ac_cv_foo' will be assigned the
16683# following values.
16684
16685_ACEOF
16686
Guido van Rossumf78abae1997-01-21 22:02:36 +000016687# The following way of writing the cache mishandles newlines in values,
16688# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016690# Ultrix sh set writes to stderr and can't be redirected directly,
16691# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692(
16693 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16694 eval ac_val=\$$ac_var
16695 case $ac_val in #(
16696 *${as_nl}*)
16697 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016698 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16699$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700 esac
16701 case $ac_var in #(
16702 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016703 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16704 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705 esac ;;
16706 esac
16707 done
16708
Martin v. Löwis11437992002-04-12 09:54:03 +000016709 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16711 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016712 # `set' does not quote correctly, so add quotes: double-quote
16713 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016714 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016715 "s/'/'\\\\''/g;
16716 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016718 *)
16719 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722 esac |
16723 sort
16724) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016725 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016729 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16730 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16732 :end' >>confcache
16733if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16734 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016735 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016736 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16737$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016738 if test ! -f "$cache_file" || test -h "$cache_file"; then
16739 cat confcache >"$cache_file"
16740 else
16741 case $cache_file in #(
16742 */* | ?:*)
16743 mv -f confcache "$cache_file"$$ &&
16744 mv -f "$cache_file"$$ "$cache_file" ;; #(
16745 *)
16746 mv -f confcache "$cache_file" ;;
16747 esac
16748 fi
16749 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016750 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016751 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16752$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016753 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016754fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016755rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016756
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016757test "x$prefix" = xNONE && prefix=$ac_default_prefix
16758# Let make expand exec_prefix.
16759test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016761DEFS=-DHAVE_CONFIG_H
16762
Skip Montanaro6dead952003-09-25 14:50:04 +000016763ac_libobjs=
16764ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016765U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016766for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16767 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016769 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16771 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016772 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16773 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016774done
16775LIBOBJS=$ac_libobjs
16776
16777LTLIBOBJS=$ac_ltlibobjs
16778
16779
Martin v. Löwis11437992002-04-12 09:54:03 +000016780
Matthias Kloseb9621712010-04-24 17:59:49 +000016781
Victor Stinnere0be4232011-10-25 13:06:09 +020016782: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016783ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016784ac_clean_files_save=$ac_clean_files
16785ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016786{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16787$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16788as_write_fail=0
16789cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016790#! $SHELL
16791# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016792# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016793# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016794# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016795
Martin v. Löwis11437992002-04-12 09:54:03 +000016796debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016797ac_cs_recheck=false
16798ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016799
Matthias Kloseb9621712010-04-24 17:59:49 +000016800SHELL=\${CONFIG_SHELL-$SHELL}
16801export SHELL
16802_ASEOF
16803cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16804## -------------------- ##
16805## M4sh Initialization. ##
16806## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808# Be more Bourne compatible
16809DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016810if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016811 emulate sh
16812 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016813 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016814 # is contrary to our usage. Disable this feature.
16815 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016817else
Matthias Kloseb9621712010-04-24 17:59:49 +000016818 case `(set -o) 2>/dev/null` in #(
16819 *posix*) :
16820 set -o posix ;; #(
16821 *) :
16822 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016824fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016825
16826
Matthias Kloseb9621712010-04-24 17:59:49 +000016827as_nl='
16828'
16829export as_nl
16830# Printing a long string crashes Solaris 7 /usr/bin/printf.
16831as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16832as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16833as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16834# Prefer a ksh shell builtin over an external printf program on Solaris,
16835# but without wasting forks for bash or zsh.
16836if test -z "$BASH_VERSION$ZSH_VERSION" \
16837 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16838 as_echo='print -r --'
16839 as_echo_n='print -rn --'
16840elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16841 as_echo='printf %s\n'
16842 as_echo_n='printf %s'
16843else
16844 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16845 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16846 as_echo_n='/usr/ucb/echo -n'
16847 else
16848 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16849 as_echo_n_body='eval
16850 arg=$1;
16851 case $arg in #(
16852 *"$as_nl"*)
16853 expr "X$arg" : "X\\(.*\\)$as_nl";
16854 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16855 esac;
16856 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16857 '
16858 export as_echo_n_body
16859 as_echo_n='sh -c $as_echo_n_body as_echo'
16860 fi
16861 export as_echo_body
16862 as_echo='sh -c $as_echo_body as_echo'
16863fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016864
16865# The user is always right.
16866if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016867 PATH_SEPARATOR=:
16868 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16869 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16870 PATH_SEPARATOR=';'
16871 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874
16875# IFS
16876# We need space, tab and new line, in precisely that order. Quoting is
16877# there to prevent editors from complaining about space-tab.
16878# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16879# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880IFS=" "" $as_nl"
16881
16882# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016883as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016884case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885 *[\\/]* ) as_myself=$0 ;;
16886 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016887for as_dir in $PATH
16888do
16889 IFS=$as_save_IFS
16890 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016891 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16892 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895 ;;
16896esac
16897# We did not find ourselves, most probably we were run as `sh COMMAND'
16898# in which case we are not to be found in the path.
16899if test "x$as_myself" = x; then
16900 as_myself=$0
16901fi
16902if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016903 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16904 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905fi
16906
Matthias Kloseb9621712010-04-24 17:59:49 +000016907# Unset variables that we do not need and which cause bugs (e.g. in
16908# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16909# suppresses any "Segmentation fault" message there. '((' could
16910# trigger a bug in pdksh 5.2.14.
16911for as_var in BASH_ENV ENV MAIL MAILPATH
16912do eval test x\${$as_var+set} = xset \
16913 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914done
16915PS1='$ '
16916PS2='> '
16917PS4='+ '
16918
16919# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016920LC_ALL=C
16921export LC_ALL
16922LANGUAGE=C
16923export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016924
Matthias Kloseb9621712010-04-24 17:59:49 +000016925# CDPATH.
16926(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16927
16928
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016929# as_fn_error STATUS ERROR [LINENO LOG_FD]
16930# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016931# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16932# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016933# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016934as_fn_error ()
16935{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016936 as_status=$1; test $as_status -eq 0 && as_status=1
16937 if test "$4"; then
16938 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16939 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016940 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016941 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016942 as_fn_exit $as_status
16943} # as_fn_error
16944
16945
16946# as_fn_set_status STATUS
16947# -----------------------
16948# Set $? to STATUS, without forking.
16949as_fn_set_status ()
16950{
16951 return $1
16952} # as_fn_set_status
16953
16954# as_fn_exit STATUS
16955# -----------------
16956# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16957as_fn_exit ()
16958{
16959 set +e
16960 as_fn_set_status $1
16961 exit $1
16962} # as_fn_exit
16963
16964# as_fn_unset VAR
16965# ---------------
16966# Portably unset VAR.
16967as_fn_unset ()
16968{
16969 { eval $1=; unset $1;}
16970}
16971as_unset=as_fn_unset
16972# as_fn_append VAR VALUE
16973# ----------------------
16974# Append the text in VALUE to the end of the definition contained in VAR. Take
16975# advantage of any shell optimizations that allow amortized linear growth over
16976# repeated appends, instead of the typical quadratic growth present in naive
16977# implementations.
16978if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16979 eval 'as_fn_append ()
16980 {
16981 eval $1+=\$2
16982 }'
16983else
16984 as_fn_append ()
16985 {
16986 eval $1=\$$1\$2
16987 }
16988fi # as_fn_append
16989
16990# as_fn_arith ARG...
16991# ------------------
16992# Perform arithmetic evaluation on the ARGs, and store the result in the
16993# global $as_val. Take advantage of shells that can avoid forks. The arguments
16994# must be portable across $(()) and expr.
16995if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16996 eval 'as_fn_arith ()
16997 {
16998 as_val=$(( $* ))
16999 }'
17000else
17001 as_fn_arith ()
17002 {
17003 as_val=`expr "$@" || test $? -eq 1`
17004 }
17005fi # as_fn_arith
17006
17007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008if expr a : '\(a\)' >/dev/null 2>&1 &&
17009 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17010 as_expr=expr
17011else
17012 as_expr=false
17013fi
17014
17015if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17016 as_basename=basename
17017else
17018 as_basename=false
17019fi
17020
Matthias Kloseb9621712010-04-24 17:59:49 +000017021if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17022 as_dirname=dirname
17023else
17024 as_dirname=false
17025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027as_me=`$as_basename -- "$0" ||
17028$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17029 X"$0" : 'X\(//\)$' \| \
17030 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017031$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017032 sed '/^.*\/\([^/][^/]*\)\/*$/{
17033 s//\1/
17034 q
17035 }
17036 /^X\/\(\/\/\)$/{
17037 s//\1/
17038 q
17039 }
17040 /^X\/\(\/\).*/{
17041 s//\1/
17042 q
17043 }
17044 s/.*/./; q'`
17045
Matthias Kloseb9621712010-04-24 17:59:49 +000017046# Avoid depending upon Character Ranges.
17047as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17048as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17049as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17050as_cr_digits='0123456789'
17051as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052
17053ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017054case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017058 xy) ECHO_C='\c';;
17059 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17060 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017061 esac;;
17062*)
17063 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017064esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017065
Martin v. Löwis11437992002-04-12 09:54:03 +000017066rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067if test -d conf$$.dir; then
17068 rm -f conf$$.dir/conf$$.file
17069else
17070 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017071 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017073if (echo >conf$$.file) 2>/dev/null; then
17074 if ln -s conf$$.file conf$$ 2>/dev/null; then
17075 as_ln_s='ln -s'
17076 # ... but there are two gotchas:
17077 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17078 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017079 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017081 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 elif ln conf$$.file conf$$ 2>/dev/null; then
17083 as_ln_s=ln
17084 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017085 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017086 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017087else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017088 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17091rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017092
Matthias Kloseb9621712010-04-24 17:59:49 +000017093
17094# as_fn_mkdir_p
17095# -------------
17096# Create "$as_dir" as a directory, including parents if necessary.
17097as_fn_mkdir_p ()
17098{
17099
17100 case $as_dir in #(
17101 -*) as_dir=./$as_dir;;
17102 esac
17103 test -d "$as_dir" || eval $as_mkdir_p || {
17104 as_dirs=
17105 while :; do
17106 case $as_dir in #(
17107 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17108 *) as_qdir=$as_dir;;
17109 esac
17110 as_dirs="'$as_qdir' $as_dirs"
17111 as_dir=`$as_dirname -- "$as_dir" ||
17112$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17113 X"$as_dir" : 'X\(//\)[^/]' \| \
17114 X"$as_dir" : 'X\(//\)$' \| \
17115 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17116$as_echo X"$as_dir" |
17117 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17118 s//\1/
17119 q
17120 }
17121 /^X\(\/\/\)[^/].*/{
17122 s//\1/
17123 q
17124 }
17125 /^X\(\/\/\)$/{
17126 s//\1/
17127 q
17128 }
17129 /^X\(\/\).*/{
17130 s//\1/
17131 q
17132 }
17133 s/.*/./; q'`
17134 test -d "$as_dir" && break
17135 done
17136 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017137 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017138
17139
17140} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017141if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017142 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017143else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017144 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017145 as_mkdir_p=false
17146fi
17147
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017148
17149# as_fn_executable_p FILE
17150# -----------------------
17151# Test if FILE is an executable regular file.
17152as_fn_executable_p ()
17153{
17154 test -f "$1" && test -x "$1"
17155} # as_fn_executable_p
17156as_test_x='test -x'
17157as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017158
17159# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017160as_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 +000017161
17162# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017163as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017164
17165
Martin v. Löwis11437992002-04-12 09:54:03 +000017166exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017167## ----------------------------------- ##
17168## Main body of $CONFIG_STATUS script. ##
17169## ----------------------------------- ##
17170_ASEOF
17171test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017172
Matthias Kloseb9621712010-04-24 17:59:49 +000017173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17174# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017175# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176# values after options handling.
17177ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017178This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017179generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017180
17181 CONFIG_FILES = $CONFIG_FILES
17182 CONFIG_HEADERS = $CONFIG_HEADERS
17183 CONFIG_LINKS = $CONFIG_LINKS
17184 CONFIG_COMMANDS = $CONFIG_COMMANDS
17185 $ $0 $@
17186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187on `(hostname || uname -n) 2>/dev/null | sed 1q`
17188"
17189
Martin v. Löwis11437992002-04-12 09:54:03 +000017190_ACEOF
17191
Matthias Kloseb9621712010-04-24 17:59:49 +000017192case $ac_config_files in *"
17193"*) set x $ac_config_files; shift; ac_config_files=$*;;
17194esac
17195
17196case $ac_config_headers in *"
17197"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17198esac
17199
17200
17201cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017202# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017203config_files="$ac_config_files"
17204config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017207
Matthias Kloseb9621712010-04-24 17:59:49 +000017208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017209ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017210\`$as_me' instantiates files and other configuration actions
17211from templates according to the current configuration. Unless the files
17212and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017213
Matthias Kloseb9621712010-04-24 17:59:49 +000017214Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017215
17216 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017218 --config print configuration, then exit
17219 -q, --quiet, --silent
17220 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 -d, --debug don't remove temporary files
17222 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017223 --file=FILE[:TEMPLATE]
17224 instantiate the configuration file FILE
17225 --header=FILE[:TEMPLATE]
17226 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017227
17228Configuration files:
17229$config_files
17230
17231Configuration headers:
17232$config_headers
17233
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017234Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17238ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017239ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017240python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017241configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017242 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017243
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017244Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017245This config.status script is free software; the Free Software Foundation
17246gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247
17248ac_pwd='$ac_pwd'
17249srcdir='$srcdir'
17250INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017251MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017252test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017253_ACEOF
17254
Matthias Kloseb9621712010-04-24 17:59:49 +000017255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17256# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017257ac_need_defaults=:
17258while test $# != 0
17259do
17260 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017261 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17263 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017264 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017266 --*=)
17267 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17268 ac_optarg=
17269 ac_shift=:
17270 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017272 ac_option=$1
17273 ac_optarg=$2
17274 ac_shift=shift
17275 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017276 esac
17277
Skip Montanaro6dead952003-09-25 14:50:04 +000017278 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017280 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17281 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017283 $as_echo "$ac_cs_version"; exit ;;
17284 --config | --confi | --conf | --con | --co | --c )
17285 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 debug=: ;;
17288 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017289 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017290 case $ac_optarg in
17291 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017292 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017293 esac
17294 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 ac_need_defaults=false;;
17296 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017297 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017298 case $ac_optarg in
17299 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17300 esac
17301 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017302 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 --he | --h)
17304 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017305 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017306Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017308 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017309 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17310 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17311 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017312
17313 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017314 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017315Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017316
Matthias Kloseb9621712010-04-24 17:59:49 +000017317 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017319
17320 esac
17321 shift
17322done
17323
Skip Montanaro6dead952003-09-25 14:50:04 +000017324ac_configure_extra_args=
17325
17326if $ac_cs_silent; then
17327 exec 6>/dev/null
17328 ac_configure_extra_args="$ac_configure_extra_args --silent"
17329fi
17330
17331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017333if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017334 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017335 shift
17336 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17337 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017339 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017340fi
17341
Martin v. Löwis11437992002-04-12 09:54:03 +000017342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344exec 5>>config.log
17345{
17346 echo
17347 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17348## Running $as_me. ##
17349_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017356
Matthias Kloseb9621712010-04-24 17:59:49 +000017357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017358
17359# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017360for ac_config_target in $ac_config_targets
17361do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362 case $ac_config_target in
17363 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17364 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17365 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017366 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17367 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017369 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017370 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017371 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372
Victor Stinnere0be4232011-10-25 13:06:09 +020017373 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017374 esac
17375done
17376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377
Martin v. Löwis11437992002-04-12 09:54:03 +000017378# If the user did not use the arguments to specify the items to instantiate,
17379# then the envvar interface is used. Set only those that are not.
17380# We use the long form for the default assignment because of an extremely
17381# bizarre bug on SunOS 4.1.3.
17382if $ac_need_defaults; then
17383 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17384 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17385fi
17386
Skip Montanaro6dead952003-09-25 14:50:04 +000017387# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017389# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390# Hook for its removal unless debugging.
17391# Note that there is a small window in which the directory will not be cleaned:
17392# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017393$debug ||
17394{
Victor Stinnere0be4232011-10-25 13:06:09 +020017395 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017397 : "${ac_tmp:=$tmp}"
17398 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017400 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017401}
Martin v. Löwis11437992002-04-12 09:54:03 +000017402# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017403
Martin v. Löwis11437992002-04-12 09:54:03 +000017404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017406 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017407} ||
17408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 tmp=./conf$$-$RANDOM
17410 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017411} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017412ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017413
Matthias Kloseb9621712010-04-24 17:59:49 +000017414# Set up the scripts for CONFIG_FILES section.
17415# No need to generate them if there are no CONFIG_FILES.
17416# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017418
Matthias Kloseb9621712010-04-24 17:59:49 +000017419
17420ac_cr=`echo X | tr X '\015'`
17421# On cygwin, bash can eat \r inside `` if the user requested igncr.
17422# But we know of no other shell where ac_cr would be empty at this
17423# point, so we can use a bashism as a fallback.
17424if test "x$ac_cr" = x; then
17425 eval ac_cr=\$\'\\r\'
17426fi
17427ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17428if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017429 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017430else
17431 ac_cs_awk_cr=$ac_cr
17432fi
17433
Victor Stinnere0be4232011-10-25 13:06:09 +020017434echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017435_ACEOF
17436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437
Matthias Kloseb9621712010-04-24 17:59:49 +000017438{
17439 echo "cat >conf$$subs.awk <<_ACEOF" &&
17440 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17441 echo "_ACEOF"
17442} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017443 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17444ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445ac_delim='%!_!# '
17446for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017447 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017448 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449
Matthias Kloseb9621712010-04-24 17:59:49 +000017450 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17451 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452 break
17453 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017454 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 else
17456 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017457 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458done
Matthias Kloseb9621712010-04-24 17:59:49 +000017459rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460
Matthias Kloseb9621712010-04-24 17:59:49 +000017461cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017462cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017464sed -n '
17465h
17466s/^/S["/; s/!.*/"]=/
17467p
17468g
17469s/^[^!]*!//
17470:repl
17471t repl
17472s/'"$ac_delim"'$//
17473t delim
17474:nl
17475h
17476s/\(.\{148\}\)..*/\1/
17477t more1
17478s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17479p
17480n
17481b repl
17482:more1
17483s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17484p
17485g
17486s/.\{148\}//
17487t nl
17488:delim
17489h
17490s/\(.\{148\}\)..*/\1/
17491t more2
17492s/["\\]/\\&/g; s/^/"/; s/$/"/
17493p
17494b
17495:more2
17496s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17497p
17498g
17499s/.\{148\}//
17500t delim
17501' <conf$$subs.awk | sed '
17502/^[^""]/{
17503 N
17504 s/\n//
17505}
17506' >>$CONFIG_STATUS || ac_write_fail=1
17507rm -f conf$$subs.awk
17508cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17509_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017510cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 for (key in S) S_is_set[key] = 1
17512 FS = ""
17513
17514}
17515{
17516 line = $ 0
17517 nfields = split(line, field, "@")
17518 substed = 0
17519 len = length(field[1])
17520 for (i = 2; i < nfields; i++) {
17521 key = field[i]
17522 keylen = length(key)
17523 if (S_is_set[key]) {
17524 value = S[key]
17525 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17526 len += length(value) + length(field[++i])
17527 substed = 1
17528 } else
17529 len += 1 + keylen
17530 }
17531
17532 print line
17533}
17534
17535_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17538if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17539 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17540else
17541 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017542fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017543 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017544_ACEOF
17545
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017546# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17547# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548# trailing colons and then remove the whole line if VPATH becomes empty
17549# (actually we leave an empty line to preserve line numbers).
17550if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017551 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17552h
17553s///
17554s/^/:/
17555s/[ ]*$/:/
17556s/:\$(srcdir):/:/g
17557s/:\${srcdir}:/:/g
17558s/:@srcdir@:/:/g
17559s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017561x
17562s/\(=[ ]*\).*/\1/
17563G
17564s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565s/^[^=]*=[ ]*$//
17566}'
17567fi
17568
Matthias Kloseb9621712010-04-24 17:59:49 +000017569cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017570fi # test -n "$CONFIG_FILES"
17571
Matthias Kloseb9621712010-04-24 17:59:49 +000017572# Set up the scripts for CONFIG_HEADERS section.
17573# No need to generate them if there are no CONFIG_HEADERS.
17574# This happens for instance with `./config.status Makefile'.
17575if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017576cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017577BEGIN {
17578_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579
Matthias Kloseb9621712010-04-24 17:59:49 +000017580# Transform confdefs.h into an awk script `defines.awk', embedded as
17581# here-document in config.status, that substitutes the proper values into
17582# config.h.in to produce config.h.
17583
17584# Create a delimiter string that does not exist in confdefs.h, to ease
17585# handling of long lines.
17586ac_delim='%!_!# '
17587for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017588 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17589 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017590 break
17591 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017592 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017593 else
17594 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17595 fi
17596done
17597
17598# For the awk script, D is an array of macro values keyed by name,
17599# likewise P contains macro parameters if any. Preserve backslash
17600# newline sequences.
17601
17602ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17603sed -n '
17604s/.\{148\}/&'"$ac_delim"'/g
17605t rset
17606:rset
17607s/^[ ]*#[ ]*define[ ][ ]*/ /
17608t def
17609d
17610:def
17611s/\\$//
17612t bsnl
17613s/["\\]/\\&/g
17614s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17615D["\1"]=" \3"/p
17616s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17617d
17618:bsnl
17619s/["\\]/\\&/g
17620s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17621D["\1"]=" \3\\\\\\n"\\/p
17622t cont
17623s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17624t cont
17625d
17626:cont
17627n
17628s/.\{148\}/&'"$ac_delim"'/g
17629t clear
17630:clear
17631s/\\$//
17632t bsnlc
17633s/["\\]/\\&/g; s/^/"/; s/$/"/p
17634d
17635:bsnlc
17636s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17637b cont
17638' <confdefs.h | sed '
17639s/'"$ac_delim"'/"\\\
17640"/g' >>$CONFIG_STATUS || ac_write_fail=1
17641
17642cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17643 for (key in D) D_is_set[key] = 1
17644 FS = ""
17645}
17646/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17647 line = \$ 0
17648 split(line, arg, " ")
17649 if (arg[1] == "#") {
17650 defundef = arg[2]
17651 mac1 = arg[3]
17652 } else {
17653 defundef = substr(arg[1], 2)
17654 mac1 = arg[2]
17655 }
17656 split(mac1, mac2, "(") #)
17657 macro = mac2[1]
17658 prefix = substr(line, 1, index(line, defundef) - 1)
17659 if (D_is_set[macro]) {
17660 # Preserve the white space surrounding the "#".
17661 print prefix "define", macro P[macro] D[macro]
17662 next
17663 } else {
17664 # Replace #undef with comments. This is necessary, for example,
17665 # in the case of _POSIX_SOURCE, which is predefined and required
17666 # on some systems where configure will not decide to define it.
17667 if (defundef == "undef") {
17668 print "/*", prefix defundef, macro, "*/"
17669 next
17670 }
17671 }
17672}
17673{ print }
17674_ACAWK
17675_ACEOF
17676cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017677 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017678fi # test -n "$CONFIG_HEADERS"
17679
17680
17681eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17682shift
17683for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017684do
17685 case $ac_tag in
17686 :[FHLC]) ac_mode=$ac_tag; continue;;
17687 esac
17688 case $ac_mode$ac_tag in
17689 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017690 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691 :[FH]-) ac_tag=-:-;;
17692 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17693 esac
17694 ac_save_IFS=$IFS
17695 IFS=:
17696 set x $ac_tag
17697 IFS=$ac_save_IFS
17698 shift
17699 ac_file=$1
17700 shift
17701
17702 case $ac_mode in
17703 :L) ac_source=$1;;
17704 :[FH])
17705 ac_file_inputs=
17706 for ac_f
17707 do
17708 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017709 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710 *) # Look for the file first in the build tree, then in the source tree
17711 # (if the path is not absolute). The absolute path cannot be DOS-style,
17712 # because $ac_f cannot contain `:'.
17713 test -f "$ac_f" ||
17714 case $ac_f in
17715 [\\/$]*) false;;
17716 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17717 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017718 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017720 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17721 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 done
17723
17724 # Let's still pretend it is `configure' which instantiates (i.e., don't
17725 # use $as_me), people would be surprised to read:
17726 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017727 configure_input='Generated from '`
17728 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17729 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 if test x"$ac_file" != x-; then
17731 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017732 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17733$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017735 # Neutralize special characters interpreted by sed in replacement strings.
17736 case $configure_input in #(
17737 *\&* | *\|* | *\\* )
17738 ac_sed_conf_input=`$as_echo "$configure_input" |
17739 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17740 *) ac_sed_conf_input=$configure_input;;
17741 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742
17743 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017744 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17745 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746 esac
17747 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017748 esac
17749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017751$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017752 X"$ac_file" : 'X\(//\)[^/]' \| \
17753 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017755$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17757 s//\1/
17758 q
17759 }
17760 /^X\(\/\/\)[^/].*/{
17761 s//\1/
17762 q
17763 }
17764 /^X\(\/\/\)$/{
17765 s//\1/
17766 q
17767 }
17768 /^X\(\/\).*/{
17769 s//\1/
17770 q
17771 }
17772 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017773 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017774 ac_builddir=.
17775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776case "$ac_dir" in
17777.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17778*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017779 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017781 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782 case $ac_top_builddir_sub in
17783 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17784 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17785 esac ;;
17786esac
17787ac_abs_top_builddir=$ac_pwd
17788ac_abs_builddir=$ac_pwd$ac_dir_suffix
17789# for backward compatibility:
17790ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017791
17792case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017794 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795 ac_top_srcdir=$ac_top_builddir_sub
17796 ac_abs_top_srcdir=$ac_pwd ;;
17797 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017798 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799 ac_top_srcdir=$srcdir
17800 ac_abs_top_srcdir=$srcdir ;;
17801 *) # Relative name.
17802 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17803 ac_top_srcdir=$ac_top_build_prefix$srcdir
17804 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017805esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017807
Martin v. Löwis11437992002-04-12 09:54:03 +000017808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809 case $ac_mode in
17810 :F)
17811 #
17812 # CONFIG_FILE
17813 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017814
17815 case $INSTALL in
17816 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017818 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017819 ac_MKDIR_P=$MKDIR_P
17820 case $MKDIR_P in
17821 [\\/$]* | ?:[\\/]* ) ;;
17822 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17823 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017824_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825
Matthias Kloseb9621712010-04-24 17:59:49 +000017826cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827# If the template does not know about datarootdir, expand it.
17828# FIXME: This hack should be removed a few years after 2.60.
17829ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017830ac_sed_dataroot='
17831/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832 p
17833 q
17834}
17835/@datadir@/p
17836/@docdir@/p
17837/@infodir@/p
17838/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017839/@mandir@/p'
17840case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017841*datarootdir*) ac_datarootdir_seen=yes;;
17842*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17844$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017846cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847 ac_datarootdir_hack='
17848 s&@datadir@&$datadir&g
17849 s&@docdir@&$docdir&g
17850 s&@infodir@&$infodir&g
17851 s&@localedir@&$localedir&g
17852 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017853 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854esac
17855_ACEOF
17856
17857# Neutralize VPATH when `$srcdir' = `.'.
17858# Shell code in configure.ac might set extrasub.
17859# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017860cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17861ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017862$extrasub
17863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017864cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017865:t
17866/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017867s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017869s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870s&@srcdir@&$ac_srcdir&;t t
17871s&@abs_srcdir@&$ac_abs_srcdir&;t t
17872s&@top_srcdir@&$ac_top_srcdir&;t t
17873s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17874s&@builddir@&$ac_builddir&;t t
17875s&@abs_builddir@&$ac_abs_builddir&;t t
17876s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17877s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017878s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017880"
Victor Stinnere0be4232011-10-25 13:06:09 +020017881eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17882 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017885 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17886 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17887 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017888 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017889which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017890$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017891which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017892
Victor Stinnere0be4232011-10-25 13:06:09 +020017893 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017894 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017895 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17896 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017897 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017898 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899 ;;
17900 :H)
17901 #
17902 # CONFIG_HEADER
17903 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017905 {
17906 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017907 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17908 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017909 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017910 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017911 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17912$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017913 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017914 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017915 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017916 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 fi
17918 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017919 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017920 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017921 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017922 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017923 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925
17926 esac
17927
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017928
17929 case $ac_file$ac_mode in
17930 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17931
17932 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933done # for ac_tag
17934
Guido van Rossum627b2d71993-12-24 10:39:16 +000017935
Matthias Kloseb9621712010-04-24 17:59:49 +000017936as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017937_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017938ac_clean_files=$ac_clean_files_save
17939
Matthias Kloseb9621712010-04-24 17:59:49 +000017940test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017941 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017942
Martin v. Löwis11437992002-04-12 09:54:03 +000017943
17944# configure is writing to config.log, and then calls config.status.
17945# config.status does its own redirection, appending to config.log.
17946# Unfortunately, on DOS this fails, as config.log is still kept open
17947# by configure, so config.status won't be able to write to it; its
17948# output is simply discarded. So we exec the FD to /dev/null,
17949# effectively closing config.log, so it can be properly (re)opened and
17950# appended to by config.status. When coming back to configure, we
17951# need to make the FD available again.
17952if test "$no_create" != yes; then
17953 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017954 ac_config_status_args=
17955 test "$silent" = yes &&
17956 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017958 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017959 exec 5>>config.log
17960 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17961 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017962 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017963fi
17964if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17966$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017967fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017968
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017969
Christian Heimes75ed8902013-11-20 01:11:18 +010017970echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017971if test ! -f Modules/Setup
17972then
17973 cp $srcdir/Modules/Setup.dist Modules/Setup
17974fi
17975
Christian Heimes75ed8902013-11-20 01:11:18 +010017976echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017977if test ! -f Modules/Setup.local
17978then
17979 echo "# Edit this file for local setup changes" >Modules/Setup.local
17980fi
17981
Christian Heimes75ed8902013-11-20 01:11:18 +010017982echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017983$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017984 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017985 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017986mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017987
17988if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17989 echo "" >&6
17990 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017991 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 +000017992 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017993 echo "" >&6
17994 echo "" >&6
17995fi
17996