blob: d02675742d27d91d9cd14e6414e3f589ddf33ad0 [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__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005614android_api = __ANDROID_API__
5615arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005616#else
5617#error not Android
5618#endif
5619EOF
5620
5621if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005622 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5623 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5625$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005626 if test -z "$ANDROID_API_LEVEL"; then
5627 echo 'Fatal: you must define __ANDROID_API__'
5628 exit 1
5629 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005630
5631cat >>confdefs.h <<_ACEOF
5632#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5633_ACEOF
5634
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005635
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5637$as_echo_n "checking for the Android arm ABI... " >&6; }
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5639$as_echo "$_arm_arch" >&6; }
5640 if test "$_arm_arch" = 7; then
5641 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5642 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5643 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005644else
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5646$as_echo "not Android" >&6; }
5647fi
5648rm -f conftest.c conftest.out
5649
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650# Check for unsupported systems
5651case $ac_sys_system/$ac_sys_release in
5652atheos*|Linux*/1*)
5653 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5654 echo See README for details.
5655 exit 1;;
5656esac
5657
5658
Matthias Kloseb9621712010-04-24 17:59:49 +00005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5660$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
5662# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005663if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664 withval=$with_suffix;
5665 case $withval in
5666 no) EXEEXT=;;
5667 yes) EXEEXT=.exe;;
5668 *) EXEEXT=$withval;;
5669 esac
5670fi
5671
Matthias Kloseb9621712010-04-24 17:59:49 +00005672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5673$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674
5675# Test whether we're running on a non-case-sensitive system, in which
5676# case we give a warning if no ext is given
5677
Matthias Kloseb9621712010-04-24 17:59:49 +00005678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5679$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680if test ! -d CaseSensitiveTestDir; then
5681mkdir CaseSensitiveTestDir
5682fi
5683
5684if test -d casesensitivetestdir
5685then
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5687$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688 BUILDEXEEXT=.exe
5689else
Matthias Kloseb9621712010-04-24 17:59:49 +00005690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 BUILDEXEEXT=$EXEEXT
5693fi
5694rmdir CaseSensitiveTestDir
5695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696case $ac_sys_system in
5697hp*|HP*)
5698 case $CC in
5699 cc|*/cc) CC="$CC -Ae";;
5700 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701esac
5702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5705$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706if test -z "$LIBRARY"
5707then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005708 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5711$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
5713# LDLIBRARY is the name of the library to link against (as opposed to the
5714# name of the library into which to insert object files). BLDLIBRARY is also
5715# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5716# is blank as the main program is not linked directly against LDLIBRARY.
5717# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5718# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5719# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5720# DLLLIBRARY is the shared (i.e., DLL) library.
5721#
5722# RUNSHARED is used to run shared python without installed libraries
5723#
5724# INSTSONAME is the name of the shared library that will be use to install
5725# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005726#
5727# LDVERSION is the shared library version number, normally the Python version
5728# with the ABI build flags appended.
5729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731
5732
5733
5734
5735
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737LDLIBRARY="$LIBRARY"
5738BLDLIBRARY='$(LDLIBRARY)'
5739INSTSONAME='$(LDLIBRARY)'
5740DLLLIBRARY=''
5741LDLIBRARYDIR=''
5742RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005743LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745# LINKCC is the command that links the python executable -- default is $(CC).
5746# If CXX is set, and if it is needed to link a main function that was
5747# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5748# python might then depend on the C++ runtime
5749# This is altered for AIX in order to build the export list before
5750# linking.
5751
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5753$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754if test -z "$LINKCC"
5755then
5756 LINKCC='$(PURIFY) $(MAINCC)'
5757 case $ac_sys_system in
5758 AIX*)
5759 exp_extra="\"\""
5760 if test $ac_sys_release -ge 5 -o \
5761 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5762 exp_extra="."
5763 fi
5764 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 QNX*)
5766 # qcc must be used because the other compilers do not
5767 # support -N.
5768 LINKCC=qcc;;
5769 esac
5770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5772$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773
5774# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5775# make sure we default having it set to "no": this is used by
5776# distutils.unixccompiler to know if it should add --enable-new-dtags
5777# to linker command lines, and failing to detect GNU ld simply results
5778# in the same bahaviour as before.
5779
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5781$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782ac_prog=ld
5783if test "$GCC" = yes; then
5784 ac_prog=`$CC -print-prog-name=ld`
5785fi
5786case `"$ac_prog" -V 2>&1 < /dev/null` in
5787 *GNU*)
5788 GNULD=yes;;
5789 *)
5790 GNULD=no;;
5791esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5793$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5796$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005798if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 enableval=$enable_shared;
5800fi
5801
5802
5803if test -z "$enable_shared"
5804then
5805 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005806 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 enable_shared="yes";;
5808 *)
5809 enable_shared="no";;
5810 esac
5811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5813$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5816$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005818if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005819 enableval=$enable_profiling;
5820fi
5821
5822if test "x$enable_profiling" = xyes; then
5823 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005824 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826/* end confdefs.h. */
5827int main() { return 0; }
5828_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829if ac_fn_c_try_link "$LINENO"; then :
5830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834rm -f core conftest.err conftest.$ac_objext \
5835 conftest$ac_exeext conftest.$ac_ext
5836 CC="$ac_save_cc"
5837else
5838 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5841$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843if test "x$enable_profiling" = xyes; then
5844 BASECFLAGS="-pg $BASECFLAGS"
5845 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846fi
5847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5849$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
5851# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5852# library that we build, but we do not want to link against it (we
5853# will find it with a -framework option). For this reason there is an
5854# extra variable BLDLIBRARY against which Python and the extension
5855# modules are linked, BLDLIBRARY. This is normally the same as
5856# LDLIBRARY, but empty for MacOSX framework builds.
5857if test "$enable_framework"
5858then
5859 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005860 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861 BLDLIBRARY=''
5862else
5863 BLDLIBRARY='$(LDLIBRARY)'
5864fi
5865
5866# Other platforms follow
5867if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005868 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869
Matthias Kloseb9621712010-04-24 17:59:49 +00005870$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871
5872 case $ac_sys_system in
5873 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005874 LDLIBRARY='libpython$(LDVERSION).dll.a'
5875 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 ;;
5877 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005878 LDLIBRARY='libpython$(LDVERSION).so'
5879 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005880 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005882 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005883 then
5884 PY3LIBRARY=libpython3.so
5885 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005887 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005888 LDLIBRARY='libpython$(LDVERSION).so'
5889 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005890 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005892 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005893 then
5894 PY3LIBRARY=libpython3.so
5895 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ;;
5897 hp*|HP*)
5898 case `uname -m` in
5899 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005900 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
5902 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
5905 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).dylib'
5911 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005914 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005917 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
5919 esac
5920else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005921 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 case $ac_sys_system in
5923 CYGWIN*)
5924 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 ;;
5927 esac
5928fi
5929
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005930if test "$cross_compiling" = yes; then
5931 RUNSHARED=
5932fi
5933
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5935$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005938if test -n "$ac_tool_prefix"; then
5939 for ac_prog in ar aal
5940 do
5941 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5942set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005945if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005946 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947else
5948 if test -n "$AR"; then
5949 ac_cv_prog_AR="$AR" # Let the user override the test.
5950else
5951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5952for as_dir in $PATH
5953do
5954 IFS=$as_save_IFS
5955 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005956 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005957 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005958 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 break 2
5961 fi
5962done
Matthias Kloseb9621712010-04-24 17:59:49 +00005963 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964IFS=$as_save_IFS
5965
5966fi
5967fi
5968AR=$ac_cv_prog_AR
5969if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5971$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972else
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5974$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
5976
5977
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005978 test -n "$AR" && break
5979 done
5980fi
5981if test -z "$AR"; then
5982 ac_ct_AR=$AR
5983 for ac_prog in ar aal
5984do
5985 # Extract the first word of "$ac_prog", so it can be a program name with args.
5986set dummy $ac_prog; ac_word=$2
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5988$as_echo_n "checking for $ac_word... " >&6; }
5989if ${ac_cv_prog_ac_ct_AR+:} false; then :
5990 $as_echo_n "(cached) " >&6
5991else
5992 if test -n "$ac_ct_AR"; then
5993 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5994else
5995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5996for as_dir in $PATH
5997do
5998 IFS=$as_save_IFS
5999 test -z "$as_dir" && as_dir=.
6000 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006002 ac_cv_prog_ac_ct_AR="$ac_prog"
6003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6004 break 2
6005 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006007 done
6008IFS=$as_save_IFS
6009
6010fi
6011fi
6012ac_ct_AR=$ac_cv_prog_ac_ct_AR
6013if test -n "$ac_ct_AR"; then
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6015$as_echo "$ac_ct_AR" >&6; }
6016else
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
6019fi
6020
6021
6022 test -n "$ac_ct_AR" && break
6023done
6024
6025 if test "x$ac_ct_AR" = x; then
6026 AR="ar"
6027 else
6028 case $cross_compiling:$ac_tool_warned in
6029yes:)
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6031$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6032ac_tool_warned=yes ;;
6033esac
6034 AR=$ac_ct_AR
6035 fi
6036fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037
6038
6039# tweak ARFLAGS only if the user didn't set it on the command line
6040
6041if test -z "$ARFLAGS"
6042then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006043 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045
doko@ubuntu.com58844492012-06-30 18:25:32 +02006046if test -n "$ac_tool_prefix"; then
6047 for ac_prog in readelf
6048 do
6049 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6050set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6052$as_echo_n "checking for $ac_word... " >&6; }
6053if ${ac_cv_prog_READELF+:} false; then :
6054 $as_echo_n "(cached) " >&6
6055else
6056 if test -n "$READELF"; then
6057 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6058else
6059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060for as_dir in $PATH
6061do
6062 IFS=$as_save_IFS
6063 test -z "$as_dir" && as_dir=.
6064 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006066 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6068 break 2
6069 fi
6070done
6071 done
6072IFS=$as_save_IFS
6073
6074fi
6075fi
6076READELF=$ac_cv_prog_READELF
6077if test -n "$READELF"; then
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6079$as_echo "$READELF" >&6; }
6080else
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083fi
6084
6085
6086 test -n "$READELF" && break
6087 done
6088fi
6089if test -z "$READELF"; then
6090 ac_ct_READELF=$READELF
6091 for ac_prog in readelf
6092do
6093 # Extract the first word of "$ac_prog", so it can be a program name with args.
6094set dummy $ac_prog; ac_word=$2
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096$as_echo_n "checking for $ac_word... " >&6; }
6097if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6098 $as_echo_n "(cached) " >&6
6099else
6100 if test -n "$ac_ct_READELF"; then
6101 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6102else
6103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6104for as_dir in $PATH
6105do
6106 IFS=$as_save_IFS
6107 test -z "$as_dir" && as_dir=.
6108 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006110 ac_cv_prog_ac_ct_READELF="$ac_prog"
6111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6112 break 2
6113 fi
6114done
6115 done
6116IFS=$as_save_IFS
6117
6118fi
6119fi
6120ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6121if test -n "$ac_ct_READELF"; then
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6123$as_echo "$ac_ct_READELF" >&6; }
6124else
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126$as_echo "no" >&6; }
6127fi
6128
6129
6130 test -n "$ac_ct_READELF" && break
6131done
6132
6133 if test "x$ac_ct_READELF" = x; then
6134 READELF=":"
6135 else
6136 case $cross_compiling:$ac_tool_warned in
6137yes:)
6138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6140ac_tool_warned=yes ;;
6141esac
6142 READELF=$ac_ct_READELF
6143 fi
6144fi
6145
6146if test "$cross_compiling" = yes; then
6147 case "$READELF" in
6148 readelf|:)
6149 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6150 ;;
6151 esac
6152fi
6153
6154
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006157hp*|HP*)
6158 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159 if test -z "$INSTALL"
6160 then
6161 INSTALL="${srcdir}/install-sh -c"
6162 fi
6163esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164# Find a good install program. We prefer a C program (faster),
6165# so one script is as good as another. But avoid the broken or
6166# incompatible versions:
6167# SysV /etc/install, /usr/sbin/install
6168# SunOS /usr/etc/install
6169# IRIX /sbin/install
6170# AIX /bin/install
6171# AmigaOS /C/install, which installs bootblocks on floppy discs
6172# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6173# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6174# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6175# OS/2's system install, which has a completely different semantic
6176# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006177# Reject install programs that cannot install multiple files.
6178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6179$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006181if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183else
6184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6185for as_dir in $PATH
6186do
6187 IFS=$as_save_IFS
6188 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 # Account for people who put trailing slashes in PATH elements.
6190case $as_dir/ in #((
6191 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 /usr/ucb/* ) ;;
6195 *)
6196 # OSF1 and SCO ODT 3.0 have their own names for install.
6197 # Don't use installbsd from OSF since it installs stuff as root
6198 # by default.
6199 for ac_prog in ginstall scoinst install; do
6200 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006201 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 if test $ac_prog = install &&
6203 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6204 # AIX install. It has an incompatible calling convention.
6205 :
6206 elif test $ac_prog = install &&
6207 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6208 # program-specific install script used by HP pwplus--don't use.
6209 :
6210 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 rm -rf conftest.one conftest.two conftest.dir
6212 echo one > conftest.one
6213 echo two > conftest.two
6214 mkdir conftest.dir
6215 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6216 test -s conftest.one && test -s conftest.two &&
6217 test -s conftest.dir/conftest.one &&
6218 test -s conftest.dir/conftest.two
6219 then
6220 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6221 break 3
6222 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223 fi
6224 fi
6225 done
6226 done
6227 ;;
6228esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006229
6230 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231IFS=$as_save_IFS
6232
Matthias Kloseb9621712010-04-24 17:59:49 +00006233rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234
6235fi
6236 if test "${ac_cv_path_install+set}" = set; then
6237 INSTALL=$ac_cv_path_install
6238 else
6239 # As a last resort, use the slow shell script. Don't cache a
6240 # value for INSTALL within a source directory, because that will
6241 # break other packages using the cache if that directory is
6242 # removed, or if the value is a relative name.
6243 INSTALL=$ac_install_sh
6244 fi
6245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6247$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006248
6249# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6250# It thinks the first close brace ends the variable substitution.
6251test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6252
6253test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6254
6255test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6256
Matthias Klose93a0ef12012-03-15 18:08:34 +01006257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6258$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6259if test -z "$MKDIR_P"; then
6260 if ${ac_cv_path_mkdir+:} false; then :
6261 $as_echo_n "(cached) " >&6
6262else
6263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6265do
6266 IFS=$as_save_IFS
6267 test -z "$as_dir" && as_dir=.
6268 for ac_prog in mkdir gmkdir; do
6269 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006270 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006271 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6272 'mkdir (GNU coreutils) '* | \
6273 'mkdir (coreutils) '* | \
6274 'mkdir (fileutils) '4.1*)
6275 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6276 break 3;;
6277 esac
6278 done
6279 done
6280 done
6281IFS=$as_save_IFS
6282
6283fi
6284
6285 test -d ./--version && rmdir ./--version
6286 if test "${ac_cv_path_mkdir+set}" = set; then
6287 MKDIR_P="$ac_cv_path_mkdir -p"
6288 else
6289 # As a last resort, use the slow shell script. Don't cache a
6290 # value for MKDIR_P within a source directory, because that will
6291 # break other packages using the cache if that directory is
6292 # removed, or if the value is a relative name.
6293 MKDIR_P="$ac_install_sh -d"
6294 fi
6295fi
6296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6297$as_echo "$MKDIR_P" >&6; }
6298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299
6300# Not every filesystem supports hard links
6301
6302if test -z "$LN" ; then
6303 case $ac_sys_system in
6304 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305 *) LN=ln;;
6306 esac
6307fi
6308
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006309# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006310
6311ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006312
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6315$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316
6317# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006318if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319 withval=$with_pydebug;
6320if test "$withval" != no
6321then
6322
Matthias Kloseb9621712010-04-24 17:59:49 +00006323$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324
Matthias Kloseb9621712010-04-24 17:59:49 +00006325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6326$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006328 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006329else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331fi
6332else
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335fi
6336
6337
T. Woutersddbfa2c2017-05-23 01:30:49 +02006338# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6339# the ABI. This allows enabling assertions without changing the ABI.
6340assertions='false'
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6342$as_echo_n "checking for --with-assertions... " >&6; }
6343
6344# Check whether --with-assertions was given.
6345if test "${with_assertions+set}" = set; then :
6346 withval=$with_assertions;
6347if test "$withval" != no
6348then
6349 assertions='true'
6350fi
6351fi
6352
6353if test "$assertions" = 'true'; then
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6355$as_echo "yes" >&6; }
6356elif test "$Py_DEBUG" = 'true'; then
6357 assertions='true'
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6359$as_echo "implied by --with-pydebug" >&6; }
6360else
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363fi
6364
Brett Cannon63d98bc2016-09-06 17:12:40 -07006365# Enable optimization flags
6366
6367
6368Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6370$as_echo_n "checking for --enable-optimizations... " >&6; }
6371# Check whether --enable-optimizations was given.
6372if test "${enable_optimizations+set}" = set; then :
6373 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006374if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006375then
6376 Py_OPT='true'
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6378$as_echo "yes" >&6; };
6379else
6380 Py_OPT='false'
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382$as_echo "no" >&6; };
6383fi
6384else
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
6389if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006390 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6391 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006392 # 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 +00006393 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006394 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006395 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006396 DEF_MAKE_RULE="build_all"
6397else
6398 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006399 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006400 DEF_MAKE_RULE="all"
6401fi
6402
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006403# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6405$as_echo_n "checking for --with-lto... " >&6; }
6406
6407# Check whether --with-lto was given.
6408if test "${with_lto+set}" = set; then :
6409 withval=$with_lto;
6410if test "$withval" != no
6411then
6412 Py_LTO='true'
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6414$as_echo "yes" >&6; };
6415else
6416 Py_LTO='false'
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; };
6419fi
6420else
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425if test "$Py_LTO" = 'true' ; then
6426 case $CC in
6427 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006428 case $ac_sys_system in
6429 Darwin*)
6430 # Any changes made here should be reflected in the GCC+Darwin case below
6431 LTOFLAGS="-flto -Wl,-export_dynamic"
6432 ;;
6433 *)
6434 LTOFLAGS="-flto"
6435 ;;
6436 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006437 ;;
6438 *gcc*)
6439 case $ac_sys_system in
6440 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006441 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006442 ;;
6443 *)
6444 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6445 ;;
6446 esac
6447 ;;
6448 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006449 CFLAGS="$CFLAGS $LTOFLAGS"
6450 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006451fi
6452
Brett Cannon7188a3e2015-09-18 15:13:44 -07006453# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006454
6455
6456
6457
6458
Gregory P. Smith799520c2016-09-07 16:10:00 -07006459# Make this work on systems where llvm tools are not installed with their
6460# normal names in the default $PATH (ie: Ubuntu). They exist under the
6461# non-suffixed name in their versioned llvm directory.
6462llvm_bin_dir=''
6463llvm_path="${PATH}"
6464if test "${CC}" = "clang"
6465then
6466 clang_bin=`which clang`
6467 # Some systems install clang elsewhere as a symlink to the real path
6468 # which is where the related llvm tools are located.
6469 if test -L "${clang_bin}"
6470 then
6471 clang_dir=`dirname "${clang_bin}"`
6472 clang_bin=`readlink "${clang_bin}"`
6473 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6474 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6475 fi
6476fi
Zachary Ware5af85642015-12-21 12:09:17 -06006477
Gregory P. Smith799520c2016-09-07 16:10:00 -07006478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6479$as_echo_n "checking target system type... " >&6; }
6480if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006481 $as_echo_n "(cached) " >&6
6482else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 if test "x$target_alias" = x; then
6484 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006485else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006486 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6487 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6488fi
6489
6490fi
6491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6492$as_echo "$ac_cv_target" >&6; }
6493case $ac_cv_target in
6494*-*-*) ;;
6495*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6496esac
6497target=$ac_cv_target
6498ac_save_IFS=$IFS; IFS='-'
6499set x $ac_cv_target
6500shift
6501target_cpu=$1
6502target_vendor=$2
6503shift; shift
6504# Remember, the first character of IFS is used to create $*,
6505# except with old shells:
6506target_os=$*
6507IFS=$ac_save_IFS
6508case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6509
6510
6511# The aliases save the names the user supplied, while $host etc.
6512# will get canonicalized.
6513test -n "$target_alias" &&
6514 test "$program_prefix$program_suffix$program_transform_name" = \
6515 NONENONEs,x,x, &&
6516 program_prefix=${target_alias}-
6517# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6518set dummy $target_alias-llvm-profdata; ac_word=$2
6519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6520$as_echo_n "checking for $ac_word... " >&6; }
6521if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6522 $as_echo_n "(cached) " >&6
6523else
6524 case $LLVM_PROFDATA in
6525 [\\/]* | ?:[\\/]*)
6526 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6527 ;;
6528 *)
6529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6530for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006531do
6532 IFS=$as_save_IFS
6533 test -z "$as_dir" && as_dir=.
6534 for ac_exec_ext in '' $ac_executable_extensions; do
6535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006536 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6538 break 2
6539 fi
6540done
6541 done
6542IFS=$as_save_IFS
6543
Gregory P. Smith799520c2016-09-07 16:10:00 -07006544 ;;
6545esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006546fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006547LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6548if test -n "$LLVM_PROFDATA"; then
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6550$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006551else
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6553$as_echo "no" >&6; }
6554fi
6555
6556
Gregory P. Smith799520c2016-09-07 16:10:00 -07006557if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6558 if test "$build" = "$target"; then
6559 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6560 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6561set dummy llvm-profdata; ac_word=$2
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6563$as_echo_n "checking for $ac_word... " >&6; }
6564if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6565 $as_echo_n "(cached) " >&6
6566else
6567 case $ac_pt_LLVM_PROFDATA in
6568 [\\/]* | ?:[\\/]*)
6569 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6570 ;;
6571 *)
6572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6573for as_dir in ${llvm_path}
6574do
6575 IFS=$as_save_IFS
6576 test -z "$as_dir" && as_dir=.
6577 for ac_exec_ext in '' $ac_executable_extensions; do
6578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6579 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6581 break 2
6582 fi
6583done
6584 done
6585IFS=$as_save_IFS
6586
6587 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6588 ;;
6589esac
6590fi
6591ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6592if test -n "$ac_pt_LLVM_PROFDATA"; then
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6594$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6595else
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6597$as_echo "no" >&6; }
6598fi
6599
6600 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6601 else
6602 LLVM_PROFDATA="''"
6603 fi
6604else
6605 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6606fi
6607
6608
6609if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6610then
6611 LLVM_PROF_FOUND="found"
6612else
6613 LLVM_PROF_FOUND="not-found"
6614fi
6615if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6616then
6617 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6618 if test -n "${found_llvm_profdata}"
6619 then
6620 # llvm-profdata isn't directly in $PATH in some cases.
6621 # https://apple.stackexchange.com/questions/197053/
6622 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6623 LLVM_PROF_FOUND=found
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6625$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6626 fi
6627fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006628LLVM_PROF_ERR=no
6629case $CC in
6630 *clang*)
6631 # Any changes made here should be reflected in the GCC+Darwin case below
6632 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6633 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006634 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006635 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6636 if test $LLVM_PROF_FOUND = not-found
6637 then
6638 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006639 if test "${REQUIRE_PGO}" = "yes"
6640 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006641 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 -07006642 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006643 fi
6644 ;;
6645 *gcc*)
6646 case $ac_sys_system in
6647 Darwin*)
6648 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6649 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006650 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006651 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006652 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006653 then
6654 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006655 if test "${REQUIRE_PGO}" = "yes"
6656 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006657 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 -07006658 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006659 fi
6660 ;;
6661 *)
6662 PGO_PROF_GEN_FLAG="-fprofile-generate"
6663 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6664 LLVM_PROF_MERGER="true"
6665 LLVM_PROF_FILE=""
6666 ;;
6667 esac
6668 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006669 *icc*)
6670 PGO_PROF_GEN_FLAG="-prof-gen"
6671 PGO_PROF_USE_FLAG="-prof-use"
6672 LLVM_PROF_MERGER="true"
6673 LLVM_PROF_FILE=""
6674 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675esac
6676
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6678# merged with this chunk of code?
6679
6680# Optimizer/debugger flags
6681# ------------------------
6682# (The following bit of code is complicated enough - please keep things
6683# indented properly. Just pretend you're editing Python code. ;-)
6684
6685# There are two parallel sets of case statements below, one that checks to
6686# see if OPT was set and one that does BASECFLAGS setting based upon
6687# compiler and platform. BASECFLAGS tweaks need to be made even if the
6688# user set OPT.
6689
6690# tweak OPT based on compiler and platform, only if the user didn't set
6691# it on the command line
6692
Victor Stinner9ed34a82017-05-02 22:35:58 +02006693
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006694if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695then
6696 case $GCC in
6697 yes)
6698 if test "$CC" != 'g++' ; then
6699 STRICT_PROTO="-Wstrict-prototypes"
6700 fi
6701 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6702 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6703 WRAP="-fwrapv"
6704 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006705
Stefan Krahaf04ff22011-12-08 22:20:31 +01006706 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006707 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006708 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006709 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006710 *)
6711 if $CC --version 2>&1 | grep -q clang
6712 then
6713 cc_is_clang=1
6714 else
6715 cc_is_clang=
6716 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006717 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006718
Victor Stinner35f3d242017-04-21 12:35:24 +02006719 if test -n "${cc_is_clang}"
6720 then
6721 # Clang also needs -fwrapv
6722 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006723 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6724 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006725 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006726 fi
6727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728 case $ac_cv_prog_cc_g in
6729 yes)
6730 if test "$Py_DEBUG" = 'true' ; then
6731 # Optimization messes up debuggers, so turn it off for
6732 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006733 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006734 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006735 else
Victor Stinner28205b22017-04-21 11:24:34 +02006736 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006737 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 else
Victor Stinner28205b22017-04-21 11:24:34 +02006739 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740 fi
6741 ;;
6742 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006743 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744 ;;
6745 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006746
Victor Stinner826f83f2017-04-28 15:07:10 +02006747 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749 case $ac_sys_system in
6750 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6751 ;;
6752 esac
6753 ;;
6754
6755 *)
6756 OPT="-O"
6757 ;;
6758 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759fi
6760
6761
6762
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764# The -arch flags for universal builds on OSX
6765UNIVERSAL_ARCH_FLAGS=
6766
6767
6768# tweak BASECFLAGS based on compiler and platform
6769case $GCC in
6770yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006771 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006772
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6774$as_echo_n "checking for -Wextra... " >&6; }
6775 ac_save_cc="$CC"
6776 CC="$CC -Wextra -Werror"
6777 if ${ac_cv_extra_warnings+:} false; then :
6778 $as_echo_n "(cached) " >&6
6779else
6780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6781/* end confdefs.h. */
6782
6783
6784int
6785main ()
6786{
6787
6788 ;
6789 return 0;
6790}
6791
6792_ACEOF
6793if ac_fn_c_try_compile "$LINENO"; then :
6794
6795 ac_cv_extra_warnings=yes
6796
6797else
6798
6799 ac_cv_extra_warnings=no
6800
6801fi
6802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6803fi
6804
6805 CC="$ac_save_cc"
6806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6807$as_echo "$ac_cv_extra_warnings" >&6; }
6808
6809 if test $ac_cv_extra_warnings = yes
6810 then
6811 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6812 fi
6813
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006814 # Python doesn't violate C99 aliasing rules, but older versions of
6815 # GCC produce warnings for legal Python code. Enable
6816 # -fno-strict-aliasing on versions of GCC that support but produce
6817 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6819$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820 ac_save_cc="$CC"
6821 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006822 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006823 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006825else
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006828
Matthias Kloseb159a552010-04-25 21:00:44 +00006829
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006830int
6831main ()
6832{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006833
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006834 ;
6835 return 0;
6836}
Matthias Kloseb159a552010-04-25 21:00:44 +00006837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006839if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006840
6841 CC="$ac_save_cc -fstrict-aliasing"
6842 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006844/* end confdefs.h. */
6845
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006846 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006847int
6848main ()
6849{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006850double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006851 ;
6852 return 0;
6853}
Matthias Kloseb159a552010-04-25 21:00:44 +00006854
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006856if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006857
6858 ac_cv_no_strict_aliasing=no
6859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860else
Matthias Kloseb159a552010-04-25 21:00:44 +00006861
6862 ac_cv_no_strict_aliasing=yes
6863
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006864fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006866
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006867else
Matthias Kloseb159a552010-04-25 21:00:44 +00006868
6869 ac_cv_no_strict_aliasing=no
6870
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006873fi
6874
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006875 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6878$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006879 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880 then
6881 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6882 fi
6883
Zachary Ware5af85642015-12-21 12:09:17 -06006884 # ICC doesn't recognize the option, but only emits a warning
6885 ## XXX does it emit an unused result warning and can it be disabled?
6886 case "$CC" in
6887 *icc*)
6888 ac_cv_disable_unused_result_warning=no
6889 ;;
6890 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6892$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6893 ac_save_cc="$CC"
6894 CC="$CC -Wunused-result -Werror"
6895 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006896 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006897 $as_echo_n "(cached) " >&6
6898else
6899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6900/* end confdefs.h. */
6901
6902
6903int
6904main ()
6905{
6906
6907 ;
6908 return 0;
6909}
6910
6911_ACEOF
6912if ac_fn_c_try_compile "$LINENO"; then :
6913
6914 ac_cv_disable_unused_result_warning=yes
6915
6916else
6917
6918 ac_cv_disable_unused_result_warning=no
6919
6920fi
6921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6922fi
6923
6924 CFLAGS="$save_CFLAGS"
6925 CC="$ac_save_cc"
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6927$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006928 ;;
6929 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006930
6931 if test $ac_cv_disable_unused_result_warning = yes
6932 then
6933 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006934 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6935 fi
6936
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6938$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6939 ac_save_cc="$CC"
6940 CC="$CC -Wunused-parameter -Werror"
6941 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6942 $as_echo_n "(cached) " >&6
6943else
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945/* end confdefs.h. */
6946
6947
6948int
6949main ()
6950{
6951
6952 ;
6953 return 0;
6954}
6955
6956_ACEOF
6957if ac_fn_c_try_compile "$LINENO"; then :
6958
6959 ac_cv_disable_unused_parameter_warning=yes
6960
6961else
6962
6963 ac_cv_disable_unused_parameter_warning=no
6964
6965fi
6966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6967fi
6968
6969 CC="$ac_save_cc"
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6971$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6972
6973 if test $ac_cv_disable_unused_parameter_warning = yes
6974 then
6975 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6976 fi
6977
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6979$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6980 ac_save_cc="$CC"
6981 CC="$CC -Wmissing-field-initializers -Werror"
6982 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6983 $as_echo_n "(cached) " >&6
6984else
6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986/* end confdefs.h. */
6987
6988
6989int
6990main ()
6991{
6992
6993 ;
6994 return 0;
6995}
6996
6997_ACEOF
6998if ac_fn_c_try_compile "$LINENO"; then :
6999
7000 ac_cv_disable_missing_field_initializers=yes
7001
7002else
7003
7004 ac_cv_disable_missing_field_initializers=no
7005
7006fi
7007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7008fi
7009
7010 CC="$ac_save_cc"
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7012$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7013
7014 if test $ac_cv_disable_missing_field_initializers = yes
7015 then
7016 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007017 fi
7018
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7020$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7021 ac_save_cc="$CC"
7022 CC="$CC -Wsign-compare"
7023 save_CFLAGS="$CFLAGS"
7024 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7025 $as_echo_n "(cached) " >&6
7026else
7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7028/* end confdefs.h. */
7029
7030
7031int
7032main ()
7033{
7034
7035 ;
7036 return 0;
7037}
7038
7039_ACEOF
7040if ac_fn_c_try_compile "$LINENO"; then :
7041
7042 ac_cv_enable_sign_compare_warning=yes
7043
7044else
7045
7046 ac_cv_enable_sign_compare_warning=no
7047
7048fi
7049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7050fi
7051
7052 CFLAGS="$save_CFLAGS"
7053 CC="$ac_save_cc"
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7055$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7056
7057 if test $ac_cv_enable_sign_compare_warning = yes
7058 then
7059 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7060 fi
7061
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7063$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7064 ac_save_cc="$CC"
7065 CC="$CC -Wunreachable-code"
7066 save_CFLAGS="$CFLAGS"
7067 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7068 $as_echo_n "(cached) " >&6
7069else
7070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7071/* end confdefs.h. */
7072
7073
7074int
7075main ()
7076{
7077
7078 ;
7079 return 0;
7080}
7081
7082_ACEOF
7083if ac_fn_c_try_compile "$LINENO"; then :
7084
7085 ac_cv_enable_unreachable_code_warning=yes
7086
7087else
7088
7089 ac_cv_enable_unreachable_code_warning=no
7090
7091fi
7092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7093fi
7094
7095 CFLAGS="$save_CFLAGS"
7096 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007097
7098 # Don't enable unreachable code warning in debug mode, since it usually
7099 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007100 # Issue #24324: Unfortunately, the unreachable code warning does not work
7101 # correctly on gcc and has been silently removed from the compiler.
7102 # It is supported on clang but on OS X systems gcc may be an alias
7103 # for clang. Try to determine if the compiler is not really gcc and,
7104 # if so, only then enable the warning.
7105 if test $ac_cv_enable_unreachable_code_warning = yes && \
7106 test "$Py_DEBUG" != "true" && \
7107 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007108 then
7109 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007110 else
7111 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007112 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7114$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007115
Victor Stinner193ee0a2017-02-06 14:24:00 +01007116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7117$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7118 ac_save_cc="$CC"
7119 CC="$CC -Werror=implicit-function-declaration"
7120 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7121 $as_echo_n "(cached) " >&6
7122else
7123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7124/* end confdefs.h. */
7125
7126
7127int
7128main ()
7129{
7130
7131 ;
7132 return 0;
7133}
7134
7135_ACEOF
7136if ac_fn_c_try_compile "$LINENO"; then :
7137
7138 ac_cv_enable_implicit_function_declaration_error=yes
7139
7140else
7141
7142 ac_cv_enable_implicit_function_declaration_error=no
7143
7144fi
7145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7146fi
7147
7148 CC="$ac_save_cc"
7149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7150$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7151
7152 if test $ac_cv_enable_implicit_function_declaration_error = yes
7153 then
7154 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7155 fi
7156
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007157 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7158 # support. Without this, treatment of subnormals doesn't follow
7159 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007160 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007161 alpha*)
7162 BASECFLAGS="$BASECFLAGS -mieee"
7163 ;;
7164 esac
7165
7166 case $ac_sys_system in
7167 SCO_SV*)
7168 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7169 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007170
7171 # is there any other compiler on Darwin besides gcc?
7172 Darwin*)
7173 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7174 # used to be here, but non-Apple gcc doesn't accept them.
7175 if test "${CC}" = gcc
7176 then
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007178$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007179 case "${UNIVERSALSDK}" in
7180 */MacOSX10.4u.sdk)
7181 # Build using 10.4 SDK, force usage of gcc when the
7182 # compiler is gcc, otherwise the user will get very
7183 # confusing error messages when building on OSX 10.6
7184 CC=gcc-4.0
7185 CPP=cpp-4.0
7186 ;;
7187 esac
7188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007189$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007190 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007191
Ned Deily87adb6e2013-10-18 21:09:56 -07007192 if test "${enable_universalsdk}"
7193 then
7194 case "$UNIVERSAL_ARCHS" in
7195 32-bit)
7196 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7197 LIPO_32BIT_FLAGS=""
7198 ARCH_RUN_32BIT=""
7199 ;;
7200 64-bit)
7201 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7202 LIPO_32BIT_FLAGS=""
7203 ARCH_RUN_32BIT="true"
7204 ;;
7205 all)
7206 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7207 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7208 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7209 ;;
7210 intel)
7211 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7212 LIPO_32BIT_FLAGS="-extract i386"
7213 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7214 ;;
7215 intel-32)
7216 UNIVERSAL_ARCH_FLAGS="-arch i386"
7217 LIPO_32BIT_FLAGS=""
7218 ARCH_RUN_32BIT=""
7219 ;;
7220 3-way)
7221 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7222 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7223 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7224 ;;
7225 *)
7226 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7227 ;;
7228 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007229
Ned Deily87adb6e2013-10-18 21:09:56 -07007230 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7231 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7232 if test "${UNIVERSALSDK}" != "/"
7233 then
7234 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7235 fi
7236 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007237
Ned Deily87adb6e2013-10-18 21:09:56 -07007238 # Calculate an appropriate deployment target for this build:
7239 # The deployment target value is used explicitly to enable certain
7240 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007241 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007242 # component of the string returned by distutils.get_platform().
7243 #
7244 # Use the value from:
7245 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7246 # 2. the operating system version of the build machine if >= 10.6
7247 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7248 # below to pick either 10.3, 10.4, or 10.5 as the target.
7249 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007250
Ned Deily87adb6e2013-10-18 21:09:56 -07007251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7252$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007253 cur_target_major=`sw_vers -productVersion | \
7254 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7255 cur_target_minor=`sw_vers -productVersion | \
7256 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7257 cur_target="${cur_target_major}.${cur_target_minor}"
7258 if test ${cur_target_major} -eq 10 && \
7259 test ${cur_target_minor} -ge 3 && \
7260 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007261 then
Ned Deily36820b62014-06-25 13:44:22 -07007262 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007263 cur_target=10.3
7264 if test ${enable_universalsdk}
7265 then
7266 case "$UNIVERSAL_ARCHS" in
7267 all|3-way|intel|64-bit)
7268 # These configurations were first supported in 10.5
7269 cur_target='10.5'
7270 ;;
7271 esac
7272 else
7273 if test `/usr/bin/arch` = "i386"
7274 then
7275 # 10.4 was the first release to support Intel archs
7276 cur_target="10.4"
7277 fi
7278 fi
7279 fi
7280 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007281
Ned Deily87adb6e2013-10-18 21:09:56 -07007282 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7283 # environment with a value that is the same as what we'll use
7284 # in the Makefile to ensure that we'll get the same compiler
7285 # environment during configure and build time.
7286 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7287 export MACOSX_DEPLOYMENT_TARGET
7288 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7290$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007291
Ned Deily87adb6e2013-10-18 21:09:56 -07007292 # end of Darwin* tests
7293 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007294 esac
7295 ;;
7296
7297*)
7298 case $ac_sys_system in
7299 OpenUNIX*|UnixWare*)
7300 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7301 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302 SCO_SV*)
7303 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7304 ;;
7305 esac
7306 ;;
7307esac
7308
Zachary Ware5af85642015-12-21 12:09:17 -06007309# ICC needs -fp-model strict or floats behave badly
7310case "$CC" in
7311*icc*)
7312 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7313 ;;
7314esac
7315
T. Woutersddbfa2c2017-05-23 01:30:49 +02007316if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317 :
7318else
7319 OPT="-DNDEBUG $OPT"
7320fi
7321
7322if test "$ac_arch_flags"
7323then
7324 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7325fi
7326
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007327# On some compilers, pthreads are available without further options
7328# (e.g. MacOS X). On some of these systems, the compiler will not
7329# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7330# So we have to see first whether pthreads are available without
7331# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7333$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007334if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007335 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336else
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338 ac_cv_pthread_is_default=no
7339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341/* end confdefs.h. */
7342
Stefan Krah7dba5942012-11-22 22:49:11 +01007343#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344#include <pthread.h>
7345
7346void* routine(void* p){return NULL;}
7347
7348int main(){
7349 pthread_t p;
7350 if(pthread_create(&p,NULL,routine,NULL)!=0)
7351 return 1;
7352 (void)pthread_detach(p);
7353 return 0;
7354}
7355
7356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007357if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358
7359 ac_cv_pthread_is_default=yes
7360 ac_cv_kthread=no
7361 ac_cv_pthread=no
7362
7363else
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7367 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368fi
7369
7370
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007371fi
7372
Matthias Kloseb9621712010-04-24 17:59:49 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7374$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375
7376
7377if test $ac_cv_pthread_is_default = yes
7378then
7379 ac_cv_kpthread=no
7380else
7381# -Kpthread, if available, provides the right #defines
7382# and linker options to make pthread_create available
7383# Some compilers won't report that they do not support -Kpthread,
7384# so we need to run a program to see whether it really made the
7385# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7387$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007388if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007389 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390else
7391 ac_save_cc="$CC"
7392CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007393if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394 ac_cv_kpthread=no
7395else
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397/* end confdefs.h. */
7398
Stefan Krah7dba5942012-11-22 22:49:11 +01007399#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400#include <pthread.h>
7401
7402void* routine(void* p){return NULL;}
7403
7404int main(){
7405 pthread_t p;
7406 if(pthread_create(&p,NULL,routine,NULL)!=0)
7407 return 1;
7408 (void)pthread_detach(p);
7409 return 0;
7410}
7411
7412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007413if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007414 ac_cv_kpthread=yes
7415else
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420fi
7421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422CC="$ac_save_cc"
7423fi
7424
Matthias Kloseb9621712010-04-24 17:59:49 +00007425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7426$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427fi
7428
7429if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7430then
7431# -Kthread, if available, provides the right #defines
7432# and linker options to make pthread_create available
7433# Some compilers won't report that they do not support -Kthread,
7434# so we need to run a program to see whether it really made the
7435# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7437$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007438if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007439 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440else
7441 ac_save_cc="$CC"
7442CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007443if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444 ac_cv_kthread=no
7445else
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447/* end confdefs.h. */
7448
Stefan Krah7dba5942012-11-22 22:49:11 +01007449#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450#include <pthread.h>
7451
7452void* routine(void* p){return NULL;}
7453
7454int main(){
7455 pthread_t p;
7456 if(pthread_create(&p,NULL,routine,NULL)!=0)
7457 return 1;
7458 (void)pthread_detach(p);
7459 return 0;
7460}
7461
7462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007463if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464 ac_cv_kthread=yes
7465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7469 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470fi
7471
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472CC="$ac_save_cc"
7473fi
7474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7476$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477fi
7478
7479if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7480then
7481# -pthread, if available, provides the right #defines
7482# and linker options to make pthread_create available
7483# Some compilers won't report that they do not support -pthread,
7484# so we need to run a program to see whether it really made the
7485# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7487$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007488if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490else
7491 ac_save_cc="$CC"
7492CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007493if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494 ac_cv_pthread=no
7495else
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497/* end confdefs.h. */
7498
Stefan Krah7dba5942012-11-22 22:49:11 +01007499#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500#include <pthread.h>
7501
7502void* routine(void* p){return NULL;}
7503
7504int main(){
7505 pthread_t p;
7506 if(pthread_create(&p,NULL,routine,NULL)!=0)
7507 return 1;
7508 (void)pthread_detach(p);
7509 return 0;
7510}
7511
7512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007513if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514 ac_cv_pthread=yes
7515else
Matthias Kloseb9621712010-04-24 17:59:49 +00007516 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520fi
7521
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522CC="$ac_save_cc"
7523fi
7524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7526$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527fi
7528
7529# If we have set a CC compiler flag for thread support then
7530# check if it works for CXX, too.
7531ac_cv_cxx_thread=no
7532if test ! -z "$CXX"
7533then
Matthias Kloseb9621712010-04-24 17:59:49 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7535$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536ac_save_cxx="$CXX"
7537
7538if test "$ac_cv_kpthread" = "yes"
7539then
7540 CXX="$CXX -Kpthread"
7541 ac_cv_cxx_thread=yes
7542elif test "$ac_cv_kthread" = "yes"
7543then
7544 CXX="$CXX -Kthread"
7545 ac_cv_cxx_thread=yes
7546elif test "$ac_cv_pthread" = "yes"
7547then
7548 CXX="$CXX -pthread"
7549 ac_cv_cxx_thread=yes
7550fi
7551
7552if test $ac_cv_cxx_thread = yes
7553then
7554 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7555 $CXX -c conftest.$ac_ext 2>&5
7556 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7557 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7558 then
7559 ac_cv_cxx_thread=yes
7560 else
7561 ac_cv_cxx_thread=no
7562 fi
7563 rm -fr conftest*
7564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7566$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
7568CXX="$ac_save_cxx"
7569
7570
7571# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7573$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007574if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576else
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578/* end confdefs.h. */
7579#include <stdlib.h>
7580#include <stdarg.h>
7581#include <string.h>
7582#include <float.h>
7583
7584int
7585main ()
7586{
7587
7588 ;
7589 return 0;
7590}
7591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007592if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593 ac_cv_header_stdc=yes
7594else
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7598
7599if test $ac_cv_header_stdc = yes; then
7600 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602/* end confdefs.h. */
7603#include <string.h>
7604
7605_ACEOF
7606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 $EGREP "memchr" >/dev/null 2>&1; then :
7608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609else
7610 ac_cv_header_stdc=no
7611fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007612rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613
7614fi
7615
7616if test $ac_cv_header_stdc = yes; then
7617 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619/* end confdefs.h. */
7620#include <stdlib.h>
7621
7622_ACEOF
7623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 $EGREP "free" >/dev/null 2>&1; then :
7625
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626else
7627 ac_cv_header_stdc=no
7628fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007629rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630
7631fi
7632
7633if test $ac_cv_header_stdc = yes; then
7634 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636 :
7637else
Matthias Kloseb9621712010-04-24 17:59:49 +00007638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639/* end confdefs.h. */
7640#include <ctype.h>
7641#include <stdlib.h>
7642#if ((' ' & 0x0FF) == 0x020)
7643# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7644# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7645#else
7646# define ISLOWER(c) \
7647 (('a' <= (c) && (c) <= 'i') \
7648 || ('j' <= (c) && (c) <= 'r') \
7649 || ('s' <= (c) && (c) <= 'z'))
7650# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7651#endif
7652
7653#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7654int
7655main ()
7656{
7657 int i;
7658 for (i = 0; i < 256; i++)
7659 if (XOR (islower (i), ISLOWER (i))
7660 || toupper (i) != TOUPPER (i))
7661 return 2;
7662 return 0;
7663}
7664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007665if ac_fn_c_try_run "$LINENO"; then :
7666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667else
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672fi
7673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674fi
7675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7677$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678if test $ac_cv_header_stdc = yes; then
7679
Matthias Kloseb9621712010-04-24 17:59:49 +00007680$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681
7682fi
7683
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007684for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007685fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007686ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007687sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007688unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007689poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007690sys/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 +01007691sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007692sys/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 +01007693sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007694sys/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 -07007695libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007696linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007697sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007698do :
7699 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7700ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007701if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007703#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007704_ACEOF
7705
7706fi
7707
Guido van Rossum627b2d71993-12-24 10:39:16 +00007708done
7709
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007710ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007711for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7714$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007715if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007716 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007717else
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007719/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007720#include <sys/types.h>
7721#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007722
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
7726if ((DIR *) 0)
7727return 0;
7728 ;
7729 return 0;
7730}
7731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007734else
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739eval ac_res=\$$as_ac_Header
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7741$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007742if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007744#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007745_ACEOF
7746
7747ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007750done
7751# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7752if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7754$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007755if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007757else
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762/* Override any GCC internal prototype to avoid an error.
7763 Use char because int might match the return type of a GCC
7764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007765#ifdef __cplusplus
7766extern "C"
7767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007768char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007769int
7770main ()
7771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 ;
7774 return 0;
7775}
7776_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777for ac_lib in '' dir; do
7778 if test -z "$ac_lib"; then
7779 ac_res="none required"
7780 else
7781 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007782 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007787rm -f core conftest.err conftest.$ac_objext \
7788 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007789 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792done
Victor Stinnere0be4232011-10-25 13:06:09 +02007793if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795else
7796 ac_cv_search_opendir=no
7797fi
7798rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007799LIBS=$ac_func_search_save_LIBS
7800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7802$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007804if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007808
Michael W. Hudson54241132001-12-07 15:38:26 +00007809else
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7811$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007812if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007814else
7815 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819/* Override any GCC internal prototype to avoid an error.
7820 Use char because int might match the return type of a GCC
7821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007822#ifdef __cplusplus
7823extern "C"
7824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007825char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007826int
7827main ()
7828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 ;
7831 return 0;
7832}
7833_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834for ac_lib in '' x; do
7835 if test -z "$ac_lib"; then
7836 ac_res="none required"
7837 else
7838 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007839 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844rm -f core conftest.err conftest.$ac_objext \
7845 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007846 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849done
Victor Stinnere0be4232011-10-25 13:06:09 +02007850if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852else
7853 ac_cv_search_opendir=no
7854fi
7855rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007856LIBS=$ac_func_search_save_LIBS
7857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7859$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007864fi
7865
7866fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007867
Matthias Kloseb9621712010-04-24 17:59:49 +00007868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7869$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007870if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007871 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007872else
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007874/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007875#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007876int
7877main ()
7878{
7879return makedev(0, 0);
7880 ;
7881 return 0;
7882}
7883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007884if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007885 ac_cv_header_sys_types_h_makedev=yes
7886else
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889rm -f core conftest.err conftest.$ac_objext \
7890 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007891
7892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7894$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007895
7896if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007897ac_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 +02007898if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007899
Matthias Kloseb9621712010-04-24 17:59:49 +00007900$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007901
7902fi
7903
7904
7905
7906 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007907 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 +02007908if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007911
7912fi
7913
7914
7915 fi
7916fi
7917
Michael W. Hudson54241132001-12-07 15:38:26 +00007918
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007919# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7920# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7921SAVE_CFLAGS=$CFLAGS
7922CFLAGS="-std=c99 $CFLAGS"
7923for ac_header in bluetooth/bluetooth.h
7924do :
7925 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7926if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7927 cat >>confdefs.h <<_ACEOF
7928#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7929_ACEOF
7930
7931fi
7932
7933done
7934
7935CFLAGS=$SAVE_CFLAGS
7936
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007937# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7938for ac_header in net/if.h
7939do :
7940 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7941#ifdef STDC_HEADERS
7942# include <stdlib.h>
7943# include <stddef.h>
7944#else
7945# ifdef HAVE_STDLIB_H
7946# include <stdlib.h>
7947# endif
7948#endif
7949#ifdef HAVE_SYS_SOCKET_H
7950# include <sys/socket.h>
7951#endif
7952
7953"
Victor Stinnere0be4232011-10-25 13:06:09 +02007954if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007955 cat >>confdefs.h <<_ACEOF
7956#define HAVE_NET_IF_H 1
7957_ACEOF
7958
7959fi
7960
7961done
7962
7963
Martin v. Löwis11017b12006-01-14 18:12:57 +00007964# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007965for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007966do :
7967 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 +00007968#ifdef HAVE_ASM_TYPES_H
7969#include <asm/types.h>
7970#endif
7971#ifdef HAVE_SYS_SOCKET_H
7972#include <sys/socket.h>
7973#endif
7974
Matthias Kloseb9621712010-04-24 17:59:49 +00007975"
Victor Stinnere0be4232011-10-25 13:06:09 +02007976if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007977 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007978#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007979_ACEOF
7980
7981fi
7982
7983done
7984
7985
caaveryeffc12f2017-09-06 18:18:10 -04007986for ac_header in linux/vm_sockets.h
7987do :
7988 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7989#ifdef HAVE_SYS_SOCKET_H
7990#include <sys/socket.h>
7991#endif
7992
7993"
7994if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
7995 cat >>confdefs.h <<_ACEOF
7996#define HAVE_LINUX_VM_SOCKETS_H 1
7997_ACEOF
7998
7999fi
8000
8001done
8002
8003
Charles-François Natali47413c12011-10-06 19:47:44 +02008004# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008005for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008006do :
8007 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8008ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8009#ifdef HAVE_SYS_SOCKET_H
8010#include <sys/socket.h>
8011#endif
8012
8013"
8014if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8015 cat >>confdefs.h <<_ACEOF
8016#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8017_ACEOF
8018
8019fi
8020
8021done
8022
8023
Guido van Rossum627b2d71993-12-24 10:39:16 +00008024# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008025was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8027$as_echo_n "checking for clock_t in time.h... " >&6; }
8028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008031
8032_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008035 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008036else
Martin v. Löwis11437992002-04-12 09:54:03 +00008037
8038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008040
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008041
Guido van Rossum627b2d71993-12-24 10:39:16 +00008042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008043rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008044
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8046$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008047
Matthias Kloseb9621712010-04-24 17:59:49 +00008048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8049$as_echo_n "checking for makedev... " >&6; }
8050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008051/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008052
Jesus Cea740f53a2010-04-28 11:35:30 +00008053#if defined(MAJOR_IN_MKDEV)
8054#include <sys/mkdev.h>
8055#elif defined(MAJOR_IN_SYSMACROS)
8056#include <sys/sysmacros.h>
8057#else
8058#include <sys/types.h>
8059#endif
8060
Neal Norwitz11690112002-07-30 01:08:28 +00008061int
8062main ()
8063{
Jesus Cea740f53a2010-04-28 11:35:30 +00008064
8065 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008066 ;
8067 return 0;
8068}
Matthias Kloseb159a552010-04-25 21:00:44 +00008069
Neal Norwitz11690112002-07-30 01:08:28 +00008070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008071if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008072 ac_cv_has_makedev=yes
8073else
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076rm -f core conftest.err conftest.$ac_objext \
8077 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8079$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008080if test "$ac_cv_has_makedev" = "yes"; then
8081
Matthias Kloseb9621712010-04-24 17:59:49 +00008082$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008083
8084fi
8085
Christian Heimes985ecdc2013-11-20 11:46:18 +01008086# byte swapping
8087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8088$as_echo_n "checking for le64toh... " >&6; }
8089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8090/* end confdefs.h. */
8091
8092#ifdef HAVE_ENDIAN_H
8093#include <endian.h>
8094#elif defined(HAVE_SYS_ENDIAN_H)
8095#include <sys/endian.h>
8096#endif
8097
8098int
8099main ()
8100{
8101
8102 le64toh(1)
8103 ;
8104 return 0;
8105}
8106
8107_ACEOF
8108if ac_fn_c_try_link "$LINENO"; then :
8109 ac_cv_has_le64toh=yes
8110else
8111 ac_cv_has_le64toh=no
8112fi
8113rm -f core conftest.err conftest.$ac_objext \
8114 conftest$ac_exeext conftest.$ac_ext
8115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8116$as_echo "$ac_cv_has_le64toh" >&6; }
8117if test "$ac_cv_has_le64toh" = "yes"; then
8118
8119$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8120
8121fi
8122
Martin v. Löwis399a6892002-10-04 10:22:02 +00008123use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008124# Don't use largefile support for GNU/Hurd
8125case $ac_sys_system in GNU*)
8126 use_lfs=no
8127esac
8128
Martin v. Löwis399a6892002-10-04 10:22:02 +00008129if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008130# Two defines needed to enable largefile support on various platforms
8131# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008132case $ac_sys_system/$ac_sys_release in
8133AIX*)
8134
8135$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8136
8137 ;;
8138esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008139
Matthias Kloseb9621712010-04-24 17:59:49 +00008140$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008141
8142
Matthias Kloseb9621712010-04-24 17:59:49 +00008143$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008144
Martin v. Löwis399a6892002-10-04 10:22:02 +00008145fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008146
Guido van Rossum84e7b241996-08-19 21:59:00 +00008147# Add some code to confdefs.h so that the test for off_t works on SCO
8148cat >> confdefs.h <<\EOF
8149#if defined(SCO_DS)
8150#undef _OFF_T
8151#endif
8152EOF
8153
Guido van Rossumef2255b2000-03-10 22:30:29 +00008154# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008155ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008156if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008158else
Martin v. Löwis11437992002-04-12 09:54:03 +00008159
8160cat >>confdefs.h <<_ACEOF
8161#define mode_t int
8162_ACEOF
8163
8164fi
8165
Matthias Kloseb9621712010-04-24 17:59:49 +00008166ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008167if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008169else
Martin v. Löwis11437992002-04-12 09:54:03 +00008170
8171cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008173_ACEOF
8174
8175fi
8176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008178if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008179
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008180else
Martin v. Löwis11437992002-04-12 09:54:03 +00008181
8182cat >>confdefs.h <<_ACEOF
8183#define pid_t int
8184_ACEOF
8185
8186fi
8187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008188
Martin v. Löwis11437992002-04-12 09:54:03 +00008189cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008190#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008191_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008194if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008195
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008196else
Martin v. Löwis11437992002-04-12 09:54:03 +00008197
8198cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008200_ACEOF
8201
8202fi
8203
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8205$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008206if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008207 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008208else
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008210/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008211#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008212
8213_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008216 ac_cv_type_uid_t=yes
8217else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008218 ac_cv_type_uid_t=no
8219fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008220rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008221
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8224$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008225if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008226
Matthias Kloseb9621712010-04-24 17:59:49 +00008227$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008231
8232fi
8233
Mark Dickinson983bc162012-12-02 12:11:38 +00008234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008236if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008239
8240fi
8241
Stefan Krah1919b7e2012-03-21 18:25:23 +01008242ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8243if test "x$ac_cv_type___uint128_t" = xyes; then :
8244
8245$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8246
8247fi
8248
Jack Jansendd19cf82001-12-06 22:36:17 +00008249
Michael W. Hudson54241132001-12-07 15:38:26 +00008250# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008251# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252# The cast to long int works around a bug in the HP C Compiler
8253# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8254# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8255# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8257$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008258if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008260else
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 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 +00008262
Martin v. Löwis11437992002-04-12 09:54:03 +00008263else
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 if test "$ac_cv_type_int" = yes; then
8265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008267as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008268See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269 else
8270 ac_cv_sizeof_int=0
8271 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008273
Martin v. Löwis11437992002-04-12 09:54:03 +00008274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8276$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277
8278
8279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008281#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008282_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008283
8284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285# The cast to long int works around a bug in the HP C Compiler
8286# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8287# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8288# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8290$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008291if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008293else
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 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 +00008295
Martin v. Löwis11437992002-04-12 09:54:03 +00008296else
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 if test "$ac_cv_type_long" = yes; then
8298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008300as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008301See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302 else
8303 ac_cv_sizeof_long=0
8304 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8309$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310
8311
8312
Martin v. Löwis11437992002-04-12 09:54:03 +00008313cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008314#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008315_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008316
8317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318# The cast to long int works around a bug in the HP C Compiler
8319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8321# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8323$as_echo_n "checking size of long long... " >&6; }
8324if ${ac_cv_sizeof_long_long+:} false; then :
8325 $as_echo_n "(cached) " >&6
8326else
8327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8328
8329else
8330 if test "$ac_cv_type_long_long" = yes; then
8331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8333as_fn_error 77 "cannot compute sizeof (long long)
8334See \`config.log' for more details" "$LINENO" 5; }
8335 else
8336 ac_cv_sizeof_long_long=0
8337 fi
8338fi
8339
8340fi
8341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8342$as_echo "$ac_cv_sizeof_long_long" >&6; }
8343
8344
8345
8346cat >>confdefs.h <<_ACEOF
8347#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8348_ACEOF
8349
8350
8351# The cast to long int works around a bug in the HP C Compiler
8352# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8353# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8354# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8356$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008357if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008359else
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 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 +00008361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 if test "$ac_cv_type_void_p" = yes; then
8364 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8365$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008366as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008367See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368 else
8369 ac_cv_sizeof_void_p=0
8370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8375$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376
8377
8378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008380#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008381_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008382
8383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384# The cast to long int works around a bug in the HP C Compiler
8385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8387# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8389$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008390if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 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 +00008394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395else
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 if test "$ac_cv_type_short" = yes; then
8397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008399as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008400See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 else
8402 ac_cv_sizeof_short=0
8403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8408$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409
8410
8411
Martin v. Löwis11437992002-04-12 09:54:03 +00008412cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008413#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008414_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008415
8416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417# The cast to long int works around a bug in the HP C Compiler
8418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8420# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8422$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008423if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 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 +00008427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428else
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 if test "$ac_cv_type_float" = yes; then
8430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008432as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008433See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434 else
8435 ac_cv_sizeof_float=0
8436 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8441$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442
8443
8444
Martin v. Löwis11437992002-04-12 09:54:03 +00008445cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008446#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008447_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008448
8449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450# The cast to long int works around a bug in the HP C Compiler
8451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8453# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8455$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008456if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008458else
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 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 +00008460
Martin v. Löwis11437992002-04-12 09:54:03 +00008461else
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 if test "$ac_cv_type_double" = yes; then
8463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008465as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008466See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467 else
8468 ac_cv_sizeof_double=0
8469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471
Martin v. Löwis11437992002-04-12 09:54:03 +00008472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8474$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475
8476
8477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008479#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008480_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008481
8482
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483# The cast to long int works around a bug in the HP C Compiler
8484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8486# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8488$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008489if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 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 +00008493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 if test "$ac_cv_type_fpos_t" = yes; then
8496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008498as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008499See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500 else
8501 ac_cv_sizeof_fpos_t=0
8502 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504
Martin v. Löwis11437992002-04-12 09:54:03 +00008505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8507$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508
8509
8510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008512#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008513_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008514
Michael W. Hudson54241132001-12-07 15:38:26 +00008515
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516# The cast to long int works around a bug in the HP C Compiler
8517# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8518# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8519# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8521$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008522if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008524else
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 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 +00008526
Martin v. Löwis18e16552006-02-15 17:27:45 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 if test "$ac_cv_type_size_t" = yes; then
8529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008531as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008532See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533 else
8534 ac_cv_sizeof_size_t=0
8535 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008537
Martin v. Löwis18e16552006-02-15 17:27:45 +00008538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8540$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541
8542
8543
Martin v. Löwis18e16552006-02-15 17:27:45 +00008544cat >>confdefs.h <<_ACEOF
8545#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8546_ACEOF
8547
8548
Christian Heimes400adb02008-02-01 08:12:03 +00008549# The cast to long int works around a bug in the HP C Compiler
8550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8552# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8554$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008555if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 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 +00008559
Christian Heimes400adb02008-02-01 08:12:03 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 if test "$ac_cv_type_pid_t" = yes; then
8562 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008564as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008565See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008566 else
8567 ac_cv_sizeof_pid_t=0
8568 fi
8569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570
Christian Heimes400adb02008-02-01 08:12:03 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8573$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008574
8575
8576
8577cat >>confdefs.h <<_ACEOF
8578#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8579_ACEOF
8580
8581
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008582# The cast to long int works around a bug in the HP C Compiler
8583# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8584# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8585# This bug is HP SR number 8606223364.
8586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8587$as_echo_n "checking size of uintptr_t... " >&6; }
8588if ${ac_cv_sizeof_uintptr_t+:} false; then :
8589 $as_echo_n "(cached) " >&6
8590else
8591 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8592
8593else
8594 if test "$ac_cv_type_uintptr_t" = yes; then
8595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8597as_fn_error 77 "cannot compute sizeof (uintptr_t)
8598See \`config.log' for more details" "$LINENO" 5; }
8599 else
8600 ac_cv_sizeof_uintptr_t=0
8601 fi
8602fi
8603
8604fi
8605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8606$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8607
8608
8609
8610cat >>confdefs.h <<_ACEOF
8611#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8612_ACEOF
8613
8614
Michael W. Hudson54241132001-12-07 15:38:26 +00008615
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8617$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008618have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008620/* end confdefs.h. */
8621
8622int
8623main ()
8624{
8625long double x; x = (long double)0;
8626 ;
8627 return 0;
8628}
8629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008630if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008631
8632
Matthias Kloseb9621712010-04-24 17:59:49 +00008633$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008634
8635 have_long_double=yes
8636
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008637fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8640$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008641if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008642# The cast to long int works around a bug in the HP C Compiler
8643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8645# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8647$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008650else
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 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 +00008652
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 if test "$ac_cv_type_long_double" = yes; then
8655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008657as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008658See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008659 else
8660 ac_cv_sizeof_long_double=0
8661 fi
8662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8666$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008667
8668
8669
8670cat >>confdefs.h <<_ACEOF
8671#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8672_ACEOF
8673
8674
8675fi
8676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677# The cast to long int works around a bug in the HP C Compiler
8678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8680# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8682$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008683if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 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 +00008687
Thomas Woutersb2137042007-02-01 18:02:27 +00008688else
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 if test "$ac_cv_type__Bool" = yes; then
8690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008692as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008693See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694 else
8695 ac_cv_sizeof__Bool=0
8696 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008698
Thomas Woutersb2137042007-02-01 18:02:27 +00008699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8701$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702
8703
8704
Thomas Woutersb2137042007-02-01 18:02:27 +00008705cat >>confdefs.h <<_ACEOF
8706#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8707_ACEOF
8708
8709
Thomas Woutersb2137042007-02-01 18:02:27 +00008710
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008711# The cast to long int works around a bug in the HP C Compiler
8712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8716$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008717if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008719else
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008721#ifdef HAVE_SYS_TYPES_H
8722#include <sys/types.h>
8723#endif
8724
Matthias Kloseb9621712010-04-24 17:59:49 +00008725"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008726
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 if test "$ac_cv_type_off_t" = yes; then
8729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008731as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008732See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008733 else
8734 ac_cv_sizeof_off_t=0
8735 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008737
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8740$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008741
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008742
8743
Martin v. Löwis11437992002-04-12 09:54:03 +00008744cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008745#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008746_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008747
Michael W. Hudson54241132001-12-07 15:38:26 +00008748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008749
Matthias Kloseb9621712010-04-24 17:59:49 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8751$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008752if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008753 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008756
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8758$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8761$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008762fi
8763
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764# The cast to long int works around a bug in the HP C Compiler
8765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8769$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008770if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774#ifdef HAVE_SYS_TYPES_H
8775#include <sys/types.h>
8776#endif
8777#ifdef HAVE_TIME_H
8778#include <time.h>
8779#endif
8780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 if test "$ac_cv_type_time_t" = yes; then
8785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008787as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008788See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008789 else
8790 ac_cv_sizeof_time_t=0
8791 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8796$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008798
8799
Martin v. Löwis11437992002-04-12 09:54:03 +00008800cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008801#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008802_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008803
Michael W. Hudson54241132001-12-07 15:38:26 +00008804
8805
Trent Mick635f6fb2000-08-23 21:33:05 +00008806# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008807ac_save_cc="$CC"
8808if test "$ac_cv_kpthread" = "yes"
8809then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008810elif test "$ac_cv_kthread" = "yes"
8811then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008812elif test "$ac_cv_pthread" = "yes"
8813then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008814fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8817$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008818have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008820/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008821
8822 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008823int
8824main ()
8825{
Guido van Rossum12580492000-09-24 16:47:19 +00008826pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 ;
8828 return 0;
8829}
Matthias Kloseb159a552010-04-25 21:00:44 +00008830
Martin v. Löwis11437992002-04-12 09:54:03 +00008831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008833 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8837$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008838if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8842# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8844$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008845if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847else
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008849#ifdef HAVE_PTHREAD_H
8850#include <pthread.h>
8851#endif
8852
Matthias Kloseb9621712010-04-24 17:59:49 +00008853"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855else
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 if test "$ac_cv_type_pthread_t" = yes; then
8857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008859as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008860See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861 else
8862 ac_cv_sizeof_pthread_t=0
8863 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008865
Trent Mick635f6fb2000-08-23 21:33:05 +00008866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8868$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870
8871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008873#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008874_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008875
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008876
Trent Mick635f6fb2000-08-23 21:33:05 +00008877fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008878
8879# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8880# This checking will be unnecessary after removing deprecated TLS API.
8881# The cast to long int works around a bug in the HP C Compiler
8882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8884# This bug is HP SR number 8606223364.
8885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8886$as_echo_n "checking size of pthread_key_t... " >&6; }
8887if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8888 $as_echo_n "(cached) " >&6
8889else
8890 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8891"; then :
8892
8893else
8894 if test "$ac_cv_type_pthread_key_t" = yes; then
8895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8897as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8898See \`config.log' for more details" "$LINENO" 5; }
8899 else
8900 ac_cv_sizeof_pthread_key_t=0
8901 fi
8902fi
8903
8904fi
8905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8906$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8907
8908
8909
8910cat >>confdefs.h <<_ACEOF
8911#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8912_ACEOF
8913
8914
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8916$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8917if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8919/* end confdefs.h. */
8920#include <pthread.h>
8921int
8922main ()
8923{
8924pthread_key_t k; k * 1;
8925 ;
8926 return 0;
8927}
8928_ACEOF
8929if ac_fn_c_try_compile "$LINENO"; then :
8930 ac_pthread_key_t_is_arithmetic_type=yes
8931else
8932 ac_pthread_key_t_is_arithmetic_type=no
8933
8934fi
8935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8937$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8938 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8939
8940$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8941
8942 fi
8943else
8944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8945$as_echo "no" >&6; }
8946fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008947CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008948
Michael W. Hudson54241132001-12-07 15:38:26 +00008949
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008950case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008951 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008952 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8953 ;;
8954 Darwin/*)
8955 OTHER_LIBTOOL_OPT=""
8956 ;;
8957esac
8958
8959
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008960
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008961case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008962 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008963 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8964 if test "${enable_universalsdk}"; then
8965 :
8966 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008967 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008968 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008969 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008970 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008971 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008972 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008973 if test ${gcc_version} '<' 4.0
8974 then
8975 LIBTOOL_CRUFT="-lcc_dynamic"
8976 else
8977 LIBTOOL_CRUFT=""
8978 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008980 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008983/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008984
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008985 #include <unistd.h>
8986 int main(int argc, char*argv[])
8987 {
8988 if (sizeof(long) == 4) {
8989 return 0;
8990 } else {
8991 return 1;
8992 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008993 }
8994
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008996if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997 ac_osx_32bit=yes
8998else
Matthias Kloseb9621712010-04-24 17:59:49 +00008999 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009003fi
9004
9005
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009006 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009007 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009008 i386)
9009 MACOSX_DEFAULT_ARCH="i386"
9010 ;;
9011 ppc)
9012 MACOSX_DEFAULT_ARCH="ppc"
9013 ;;
9014 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009015 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009016 ;;
9017 esac
9018 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009019 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020 i386)
9021 MACOSX_DEFAULT_ARCH="x86_64"
9022 ;;
9023 ppc)
9024 MACOSX_DEFAULT_ARCH="ppc64"
9025 ;;
9026 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009027 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009028 ;;
9029 esac
9030
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009031 fi
9032
9033 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009034 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009035 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009036esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9038$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009039if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009040then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009041 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009043 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009044
Matthias Kloseb9621712010-04-24 17:59:49 +00009045$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009046
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9048$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009049 if test $enable_shared = "yes"
9050 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009051 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 +00009052 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009056fi
9057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9059$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009060case $ac_sys_system/$ac_sys_release in
9061 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9066$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009067 ;;
9068 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9070$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009071 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009072esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009073
Guido van Rossum0a516c91994-09-12 10:58:40 +00009074# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009075
Michael W. Hudson54241132001-12-07 15:38:26 +00009076
9077
9078
9079
Benjamin Peterson99f03762010-04-11 22:15:28 +00009080
Thomas Wouters477c8d52006-05-27 19:21:47 +00009081
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009082# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9083# -- usually .so, .sl on HP-UX, .dll on Cygwin
9084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9085$as_echo_n "checking the extension of shared libraries... " >&6; }
9086if test -z "$SHLIB_SUFFIX"; then
9087 case $ac_sys_system in
9088 hp*|HP*)
9089 case `uname -m` in
9090 ia64) SHLIB_SUFFIX=.so;;
9091 *) SHLIB_SUFFIX=.sl;;
9092 esac
9093 ;;
9094 CYGWIN*) SHLIB_SUFFIX=.dll;;
9095 *) SHLIB_SUFFIX=.so;;
9096 esac
9097fi
9098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9099$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009100
Guido van Rossum0a516c91994-09-12 10:58:40 +00009101# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009102# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009103# (Shared libraries in this instance are shared modules to be loaded into
9104# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9106$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009107if test -z "$LDSHARED"
9108then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009109 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009110 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009111 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009112 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009113 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009115 if test "$GCC" = "yes" ; then
9116 LDSHARED='$(CC) -shared'
9117 LDCXXSHARED='$(CXX) -shared'
9118 else
9119 LDSHARED='$(CC) -G'
9120 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009121 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009122 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009123 if test "$GCC" = "yes" ; then
9124 LDSHARED='$(CC) -shared'
9125 LDCXXSHARED='$(CXX) -shared'
9126 else
9127 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009128 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009129 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009130 LDSHARED='$(CC) -bundle'
9131 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009132 if test "$enable_framework" ; then
9133 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009134 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9135 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009136 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009137 else
9138 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009139 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009141 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009142 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009143 LDSHARED='$(CC) -bundle'
9144 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009145 if test "$enable_framework" ; then
9146 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009147 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9148 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009149 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009150 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009151 # No framework, use the Python app as bundle-loader
9152 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009153 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009154 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009155 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009156 Darwin/*)
9157 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9158 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009159
Ned Deily36820b62014-06-25 13:44:22 -07009160 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9161 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9162 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9163 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9164 if test ${dep_target_major} -eq 10 && \
9165 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009166 then
Ned Deily36820b62014-06-25 13:44:22 -07009167 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009168 LDSHARED='$(CC) -bundle'
9169 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009170 if test "$enable_framework" ; then
9171 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009172 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9173 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009174 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009175 else
9176 # No framework, use the Python app as bundle-loader
9177 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9178 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009180 fi
Ned Deily36820b62014-06-25 13:44:22 -07009181 else
9182 # building for OS X 10.3 and later
9183 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9184 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9185 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009186 fi
9187 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 Linux*|GNU*|QNX*)
9189 LDSHARED='$(CC) -shared'
9190 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009191 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009192 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009193 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009194 LDSHARED='$(CC) -shared'
9195 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009196 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009197 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009198 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009199 OpenBSD*)
9200 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9201 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009202 LDSHARED='$(CC) -shared $(CCSHARED)'
9203 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009204 else
9205 case `uname -r` in
9206 [01].* | 2.[0-7] | 2.[0-7].*)
9207 LDSHARED="ld -Bshareable ${LDFLAGS}"
9208 ;;
9209 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009210 LDSHARED='$(CC) -shared $(CCSHARED)'
9211 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009212 ;;
9213 esac
9214 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009215 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009216 LDSHARED='$(CC) -shared'
9217 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009218 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009219 if test "$GCC" = "yes" ; then
9220 LDSHARED='$(CC) -shared'
9221 LDCXXSHARED='$(CXX) -shared'
9222 else
9223 LDSHARED='$(CC) -G'
9224 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009225 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009226 SCO_SV*)
9227 LDSHARED='$(CC) -Wl,-G,-Bexport'
9228 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9229 CYGWIN*)
9230 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9231 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009232 *) LDSHARED="ld";;
9233 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9236$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009237LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009238BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009239# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009240# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9242$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009243if test -z "$CCSHARED"
9244then
Guido van Rossum07397971997-04-29 21:49:50 +00009245 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009246 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009247 then CCSHARED="-fPIC";
9248 elif test `uname -p` = sparc;
9249 then CCSHARED="-xcode=pic32";
9250 else CCSHARED="-Kpic";
9251 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009252 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009253 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009254 else CCSHARED="+z";
9255 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009256 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009257 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009258 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009259 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009260 if test "$GCC" = "yes"
9261 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009262 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009263 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009264 SCO_SV*)
9265 if test "$GCC" = "yes"
9266 then CCSHARED="-fPIC"
9267 else CCSHARED="-Kpic -belf"
9268 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009269 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9272$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009273# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009274# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9276$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009277if test -z "$LINKFORSHARED"
9278then
Guido van Rossum07397971997-04-29 21:49:50 +00009279 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009280 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009281 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009282 LINKFORSHARED="-Wl,-E -Wl,+s";;
9283# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009284 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009285 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009286 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009288 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009289
9290 # Issue #18075: the default maximum stack size (8MBytes) is too
9291 # small for the default recursion limit. Increase the stack size
9292 # to ensure that tests don't crash
9293 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9294
Jack Jansene578a632001-08-15 01:27:14 +00009295 if test "$enable_framework"
9296 then
Jack Jansenda49e192005-01-07 13:08:22 +00009297 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009298 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009299 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009300 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009301 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009302 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009303 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009304 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9305 then
9306 LINKFORSHARED="-Wl,--export-dynamic"
9307 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009308 SunOS/5*) case $CC in
9309 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009310 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009311 then
9312 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009313 fi;;
9314 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009315 CYGWIN*)
9316 if test $enable_shared = "no"
9317 then
9318 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9319 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009320 QNX*)
9321 # -Wl,-E causes the symbols to be added to the dynamic
9322 # symbol table so that they can be found when a module
9323 # is loaded. -N 2048K causes the stack size to be set
9324 # to 2048 kilobytes so that the stack doesn't overflow
9325 # when running test_compile.py.
9326 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9330$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009331
Michael W. Hudson54241132001-12-07 15:38:26 +00009332
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009333
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9335$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009336if test ! "$LIBRARY" = "$LDLIBRARY"
9337then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009338 case $ac_sys_system in
9339 CYGWIN*)
9340 # Cygwin needs CCSHARED when building extension DLLs
9341 # but not when building the interpreter DLL.
9342 CFLAGSFORSHARED='';;
9343 *)
9344 CFLAGSFORSHARED='$(CCSHARED)'
9345 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9348$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009349
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009350# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9351# library (with --enable-shared).
9352# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009353# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9354# if it is not required, since it creates a dependency of the shared library
9355# to LIBS. This, in turn, means that applications linking the shared libpython
9356# don't need to link LIBS explicitly. The default should be only changed
9357# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9360$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009361case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009362 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009363 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009364esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9366$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009367
9368
Guido van Rossum627b2d71993-12-24 10:39:16 +00009369# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9371$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009372if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009373 $as_echo_n "(cached) " >&6
9374else
9375 ac_check_lib_save_LIBS=$LIBS
9376LIBS="-lsendfile $LIBS"
9377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9378/* end confdefs.h. */
9379
9380/* Override any GCC internal prototype to avoid an error.
9381 Use char because int might match the return type of a GCC
9382 builtin and then its argument prototype would still apply. */
9383#ifdef __cplusplus
9384extern "C"
9385#endif
9386char sendfile ();
9387int
9388main ()
9389{
9390return sendfile ();
9391 ;
9392 return 0;
9393}
9394_ACEOF
9395if ac_fn_c_try_link "$LINENO"; then :
9396 ac_cv_lib_sendfile_sendfile=yes
9397else
9398 ac_cv_lib_sendfile_sendfile=no
9399fi
9400rm -f core conftest.err conftest.$ac_objext \
9401 conftest$ac_exeext conftest.$ac_ext
9402LIBS=$ac_check_lib_save_LIBS
9403fi
9404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9405$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009406if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009407 cat >>confdefs.h <<_ACEOF
9408#define HAVE_LIBSENDFILE 1
9409_ACEOF
9410
9411 LIBS="-lsendfile $LIBS"
9412
9413fi
9414
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9416$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009417if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009418 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009419else
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009421LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425/* Override any GCC internal prototype to avoid an error.
9426 Use char because int might match the return type of a GCC
9427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009428#ifdef __cplusplus
9429extern "C"
9430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009431char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009432int
9433main ()
9434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ;
9437 return 0;
9438}
9439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009442else
Matthias Kloseb9621712010-04-24 17:59:49 +00009443 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009445rm -f core conftest.err conftest.$ac_objext \
9446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009447LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9450$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009451if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 cat >>confdefs.h <<_ACEOF
9453#define HAVE_LIBDL 1
9454_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009455
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009456 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009458fi
9459 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9461$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009462if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009463 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009464else
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009466LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470/* Override any GCC internal prototype to avoid an error.
9471 Use char because int might match the return type of a GCC
9472 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009473#ifdef __cplusplus
9474extern "C"
9475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009476char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009477int
9478main ()
9479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ;
9482 return 0;
9483}
9484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009487else
Matthias Kloseb9621712010-04-24 17:59:49 +00009488 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009490rm -f core conftest.err conftest.$ac_objext \
9491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009492LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9495$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009496if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 cat >>confdefs.h <<_ACEOF
9498#define HAVE_LIBDLD 1
9499_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009500
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009501 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503fi
9504 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009505
Berker Peksag9a10ff42017-11-08 23:09:16 +03009506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9507$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9509/* end confdefs.h. */
9510#include <uuid/uuid.h>
9511int
9512main ()
9513{
9514
9515#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009516void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009517#endif
9518
9519 ;
9520 return 0;
9521}
9522_ACEOF
9523if ac_fn_c_try_compile "$LINENO"; then :
9524
9525$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9526
9527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9528$as_echo "yes" >&6; }
9529else
9530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9531$as_echo "no" >&6; }
9532
9533fi
9534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9535
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009536# 'Real Time' functions on Solaris
9537# posix4 on Solaris 2.6
9538# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009540$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009541if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009542 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009543else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009544 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548/* Override any GCC internal prototype to avoid an error.
9549 Use char because int might match the return type of a GCC
9550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551#ifdef __cplusplus
9552extern "C"
9553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009554char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009555int
9556main ()
9557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 ;
9560 return 0;
9561}
9562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563for ac_lib in '' pthread rt posix4; do
9564 if test -z "$ac_lib"; then
9565 ac_res="none required"
9566 else
9567 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009568 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009573rm -f core conftest.err conftest.$ac_objext \
9574 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009575 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578done
Victor Stinnere0be4232011-10-25 13:06:09 +02009579if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581else
9582 ac_cv_search_sem_init=no
9583fi
9584rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009585LIBS=$ac_func_search_save_LIBS
9586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9588$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009589ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009590if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009591 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009592
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009593fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009594
Martin v. Löwis519adae2003-09-20 10:47:47 +00009595
Martin v. Löwis19d17342003-06-14 21:03:05 +00009596# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9598$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009599if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009601else
9602 ac_check_lib_save_LIBS=$LIBS
9603LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009605/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607/* Override any GCC internal prototype to avoid an error.
9608 Use char because int might match the return type of a GCC
9609 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009610#ifdef __cplusplus
9611extern "C"
9612#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009613char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009614int
9615main ()
9616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009618 ;
9619 return 0;
9620}
9621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009622if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623 ac_cv_lib_intl_textdomain=yes
9624else
Matthias Kloseb9621712010-04-24 17:59:49 +00009625 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009627rm -f core conftest.err conftest.$ac_objext \
9628 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009629LIBS=$ac_check_lib_save_LIBS
9630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9632$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009633if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009634
Matthias Kloseb9621712010-04-24 17:59:49 +00009635$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009636
Brett Cannonc6d936e2009-06-07 20:09:53 +00009637 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009638fi
9639
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009640
9641# checks for system dependent C++ extensions support
9642case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9644$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009647
Georg Brandl59e87bd2011-02-15 19:48:59 +00009648 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009649int
9650main ()
9651{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009652loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 ;
9654 return 0;
9655}
Matthias Kloseb159a552010-04-25 21:00:44 +00009656
Martin v. Löwis11437992002-04-12 09:54:03 +00009657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009658if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009659
Matthias Kloseb159a552010-04-25 21:00:44 +00009660
Matthias Kloseb9621712010-04-24 17:59:49 +00009661$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009662
Matthias Kloseb159a552010-04-25 21:00:44 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009664$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009665
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009666else
Matthias Kloseb159a552010-04-25 21:00:44 +00009667
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009669$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009670
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009672rm -f core conftest.err conftest.$ac_objext \
9673 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009674 *) ;;
9675esac
9676
Christian Heimes985ecdc2013-11-20 11:46:18 +01009677# check for systems that require aligned memory access
9678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9679$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009680if ${ac_cv_aligned_required+:} false; then :
9681 $as_echo_n "(cached) " >&6
9682else
9683 if test "$cross_compiling" = yes; then :
9684 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009685else
9686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9687/* end confdefs.h. */
9688
9689int main()
9690{
9691 char s[16];
9692 int i, *p1, *p2;
9693 for (i=0; i < 16; i++)
9694 s[i] = i;
9695 p1 = (int*)(s+1);
9696 p2 = (int*)(s+2);
9697 if (*p1 == *p2)
9698 return 1;
9699 return 0;
9700}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009701_ACEOF
9702if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009703 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009704else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009705 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009706fi
9707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9708 conftest.$ac_objext conftest.beam conftest.$ac_ext
9709fi
9710
9711
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009712fi
9713
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9715$as_echo "$ac_cv_aligned_required" >&6; }
9716if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009717
9718$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9719
9720fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009721
9722# str, bytes and memoryview hash algorithm
9723
9724
9725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9726$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9727
9728# Check whether --with-hash_algorithm was given.
9729if test "${with_hash_algorithm+set}" = set; then :
9730 withval=$with_hash_algorithm;
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9732$as_echo "$withval" >&6; }
9733case "$withval" in
9734 siphash24)
9735 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9736
9737 ;;
9738 fnv)
9739 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9740
9741 ;;
9742 *)
9743 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9744 ;;
9745esac
9746
9747else
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9749$as_echo "default" >&6; }
9750fi
9751
9752
Charles-François Natalid30b0222014-05-08 23:08:51 +01009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9754$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9755
9756# Check whether --with-address_sanitizer was given.
9757if test "${with_address_sanitizer+set}" = set; then :
9758 withval=$with_address_sanitizer;
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9760$as_echo "$withval" >&6; }
9761BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9762LDFLAGS="-fsanitize=address $LDFLAGS"
9763
9764else
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9766$as_echo "no" >&6; }
9767fi
9768
9769
Guido van Rossum70c7f481998-03-26 18:44:10 +00009770# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9772$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009773if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009775else
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009777LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009784#ifdef __cplusplus
9785extern "C"
9786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009787char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009788int
9789main ()
9790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 ;
9793 return 0;
9794}
9795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009798else
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801rm -f core conftest.err conftest.$ac_objext \
9802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9806$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009807if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009808 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009809fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009810 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9812$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009813if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009815else
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009817LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821/* Override any GCC internal prototype to avoid an error.
9822 Use char because int might match the return type of a GCC
9823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824#ifdef __cplusplus
9825extern "C"
9826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009827char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009828int
9829main ()
9830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 ;
9833 return 0;
9834}
9835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009838else
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009841rm -f core conftest.err conftest.$ac_objext \
9842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009843LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9846$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009847if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009848 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009849fi
9850 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009851
Matthias Kloseb9621712010-04-24 17:59:49 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9853$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009856if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9859$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009860LIBS="$withval $LIBS"
9861
9862else
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865fi
9866
Guido van Rossum7f43da71994-08-01 12:15:30 +00009867
Victor Stinner8291b5e2015-03-20 16:03:14 +01009868
9869
9870
9871
9872
9873
9874
9875if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9876 if test -n "$ac_tool_prefix"; then
9877 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9878set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9880$as_echo_n "checking for $ac_word... " >&6; }
9881if ${ac_cv_path_PKG_CONFIG+:} false; then :
9882 $as_echo_n "(cached) " >&6
9883else
9884 case $PKG_CONFIG in
9885 [\\/]* | ?:[\\/]*)
9886 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9887 ;;
9888 *)
9889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9890for as_dir in $PATH
9891do
9892 IFS=$as_save_IFS
9893 test -z "$as_dir" && as_dir=.
9894 for ac_exec_ext in '' $ac_executable_extensions; do
9895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9896 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9898 break 2
9899 fi
9900done
9901 done
9902IFS=$as_save_IFS
9903
9904 ;;
9905esac
9906fi
9907PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9908if test -n "$PKG_CONFIG"; then
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9910$as_echo "$PKG_CONFIG" >&6; }
9911else
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914fi
9915
9916
9917fi
9918if test -z "$ac_cv_path_PKG_CONFIG"; then
9919 ac_pt_PKG_CONFIG=$PKG_CONFIG
9920 # Extract the first word of "pkg-config", so it can be a program name with args.
9921set dummy pkg-config; ac_word=$2
9922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9923$as_echo_n "checking for $ac_word... " >&6; }
9924if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9925 $as_echo_n "(cached) " >&6
9926else
9927 case $ac_pt_PKG_CONFIG in
9928 [\\/]* | ?:[\\/]*)
9929 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9930 ;;
9931 *)
9932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9933for as_dir in $PATH
9934do
9935 IFS=$as_save_IFS
9936 test -z "$as_dir" && as_dir=.
9937 for ac_exec_ext in '' $ac_executable_extensions; do
9938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9939 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9941 break 2
9942 fi
9943done
9944 done
9945IFS=$as_save_IFS
9946
9947 ;;
9948esac
9949fi
9950ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9951if test -n "$ac_pt_PKG_CONFIG"; then
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9953$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9954else
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9956$as_echo "no" >&6; }
9957fi
9958
9959 if test "x$ac_pt_PKG_CONFIG" = x; then
9960 PKG_CONFIG=""
9961 else
9962 case $cross_compiling:$ac_tool_warned in
9963yes:)
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9965$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9966ac_tool_warned=yes ;;
9967esac
9968 PKG_CONFIG=$ac_pt_PKG_CONFIG
9969 fi
9970else
9971 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9972fi
9973
9974fi
9975if test -n "$PKG_CONFIG"; then
9976 _pkg_min_version=0.9.0
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9978$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9979 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9981$as_echo "yes" >&6; }
9982 else
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985 PKG_CONFIG=""
9986 fi
9987fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009988
9989# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9991$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009992
9993# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009994if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009995 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009996else
9997 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009998fi
9999
10000
Matthias Kloseb9621712010-04-24 17:59:49 +000010001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10002$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010003
10004# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10006$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010007
10008# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010009if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010010 withval=$with_system_ffi;
10011fi
10012
10013
Zachary Waref40d4dd2016-09-17 01:25:24 -050010014if test "$ac_sys_system" = "Darwin"
10015then
10016 case "$with_system_ffi" in
10017 "")
10018 with_system_ffi="no"
10019 ;;
10020 yes|no)
10021 ;;
10022 *)
10023 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10024 ;;
10025 esac
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10027$as_echo "$with_system_ffi" >&6; }
10028else
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10030$as_echo "yes" >&6; }
10031 if test "$with_system_ffi" != ""
10032 then
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10034$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10035 fi
10036 with_system_ffi="yes"
10037fi
Zachary Ware935043d2016-09-09 17:01:21 -070010038
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010039if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010040 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10041else
10042 LIBFFI_INCLUDEDIR=""
10043fi
10044
10045
Stefan Krah60187b52012-03-23 19:06:27 +010010046# Check for use of the system libmpdec library
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10048$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10049
10050# Check whether --with-system_libmpdec was given.
10051if test "${with_system_libmpdec+set}" = set; then :
10052 withval=$with_system_libmpdec;
10053else
10054 with_system_libmpdec="no"
10055fi
10056
10057
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10059$as_echo "$with_system_libmpdec" >&6; }
10060
Benjamin Peterson076ed002010-10-31 17:11:02 +000010061# Check for support for loadable sqlite extensions
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10063$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10064# Check whether --enable-loadable-sqlite-extensions was given.
10065if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10066 enableval=$enable_loadable_sqlite_extensions;
10067else
10068 enable_loadable_sqlite_extensions="no"
10069fi
10070
10071
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10073$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10074
Ned Deilyd819b932013-09-06 01:07:05 -070010075# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10076
10077
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10079$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10080
10081# Check whether --with-tcltk-includes was given.
10082if test "${with_tcltk_includes+set}" = set; then :
10083 withval=$with_tcltk_includes;
10084else
10085 with_tcltk_includes="default"
10086fi
10087
10088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10089$as_echo "$with_tcltk_includes" >&6; }
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10091$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10092
10093# Check whether --with-tcltk-libs was given.
10094if test "${with_tcltk_libs+set}" = set; then :
10095 withval=$with_tcltk_libs;
10096else
10097 with_tcltk_libs="default"
10098fi
10099
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10101$as_echo "$with_tcltk_libs" >&6; }
10102if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10103then
10104 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10105 then
10106 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10107 fi
10108 TCLTK_INCLUDES=""
10109 TCLTK_LIBS=""
10110else
10111 TCLTK_INCLUDES="$with_tcltk_includes"
10112 TCLTK_LIBS="$with_tcltk_libs"
10113fi
10114
Matthias Klose55708cc2009-04-30 08:06:49 +000010115# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10117$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010118
10119# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010120if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010121 withval=$with_dbmliborder;
10122if test x$with_dbmliborder = xyes
10123then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010124as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010125else
10126 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10127 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10128 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010129 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010130 fi
10131 done
10132fi
10133fi
10134
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10136$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138
Martin v. Löwis11437992002-04-12 09:54:03 +000010139
10140# Templates for things AC_DEFINEd more than once.
10141# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010142
10143
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010144if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010145then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010146 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010148
10149 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010150elif test "$ac_cv_kpthread" = "yes"
10151then
10152 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010153 if test "$ac_cv_cxx_thread" = "yes"; then
10154 CXX="$CXX -Kpthread"
10155 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010156 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010157elif test "$ac_cv_kthread" = "yes"
10158then
10159 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010160 if test "$ac_cv_cxx_thread" = "yes"; then
10161 CXX="$CXX -Kthread"
10162 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010163 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010164elif test "$ac_cv_pthread" = "yes"
10165then
10166 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010167 if test "$ac_cv_cxx_thread" = "yes"; then
10168 CXX="$CXX -pthread"
10169 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010171else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010172 if test ! -z "$withval" -a -d "$withval"
10173 then LDFLAGS="$LDFLAGS -L$withval"
10174 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010175
10176 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010177 # define _POSIX_THREADS in unistd.h. Some apparently don't
10178 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10180$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010182/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010183
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010184#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010185#ifdef _POSIX_THREADS
10186yes
10187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
10189_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010192 unistd_defines_pthreads=yes
10193else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010194 unistd_defines_pthreads=no
10195fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010196rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010197
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10199$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010200
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010202
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010203 # Just looking for pthread_create in libpthread is not enough:
10204 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10205 # So we really have to include pthread.h, and then link.
10206 _libs=$LIBS
10207 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10209$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010211/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010212
10213#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010214#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010215
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010216void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
10219{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010220
10221pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 ;
10223 return 0;
10224}
10225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010226if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010227
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10229$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010230 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010231
Guido van Rossum02a1c402000-02-25 19:26:31 +000010232else
Martin v. Löwis11437992002-04-12 09:54:03 +000010233
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010234 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010236if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010237
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010238 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010239
Guido van Rossumad678af1998-10-02 14:42:15 +000010240else
Guido van Rossumad678af1998-10-02 14:42:15 +000010241
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10243$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010244if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010246else
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010248LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252/* Override any GCC internal prototype to avoid an error.
10253 Use char because int might match the return type of a GCC
10254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010255#ifdef __cplusplus
10256extern "C"
10257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010258char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010259int
10260main ()
10261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 ;
10264 return 0;
10265}
10266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010269else
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010272rm -f core conftest.err conftest.$ac_objext \
10273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010274LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10277$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010278if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010279
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010280 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010281 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010282
Greg Steinadf63d62000-07-05 10:38:09 +000010283else
Greg Steinadf63d62000-07-05 10:38:09 +000010284
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10286$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010287if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010289else
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010291LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295/* Override any GCC internal prototype to avoid an error.
10296 Use char because int might match the return type of a GCC
10297 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010298#ifdef __cplusplus
10299extern "C"
10300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010301char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010302int
10303main ()
10304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ;
10307 return 0;
10308}
10309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010310if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010312else
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010315rm -f core conftest.err conftest.$ac_objext \
10316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010317LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10320$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010321if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010322
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010323 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010324 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010325
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010326else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010327
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10329$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010330if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010332else
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010334LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338/* Override any GCC internal prototype to avoid an error.
10339 Use char because int might match the return type of a GCC
10340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010341#ifdef __cplusplus
10342extern "C"
10343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010344char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010345int
10346main ()
10347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ;
10350 return 0;
10351}
10352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010355else
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358rm -f core conftest.err conftest.$ac_objext \
10359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010360LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10363$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010364if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010367 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010368
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010369else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010370
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10372$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010373if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010375else
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010377LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010381/* Override any GCC internal prototype to avoid an error.
10382 Use char because int might match the return type of a GCC
10383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010384#ifdef __cplusplus
10385extern "C"
10386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010387char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010388int
10389main ()
10390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 ;
10393 return 0;
10394}
10395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010398else
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010401rm -f core conftest.err conftest.$ac_objext \
10402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010403LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10406$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010407if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010408
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010409 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010410 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010411
Guido van Rossumb93a8621998-05-07 13:27:32 +000010412else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010413
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010414 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10415
Guido van Rossum2d38f911996-06-26 19:47:01 +000010416fi
10417
Guido van Rossum627b2d71993-12-24 10:39:16 +000010418
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010419fi
10420
Guido van Rossum0be3e491997-05-22 20:33:33 +000010421fi
10422
Guido van Rossum49545951997-12-02 19:28:29 +000010423fi
10424
Guido van Rossumb93a8621998-05-07 13:27:32 +000010425fi
10426
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428rm -f core conftest.err conftest.$ac_objext \
10429 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010430
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10432$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010433if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010435else
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010437LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441/* Override any GCC internal prototype to avoid an error.
10442 Use char because int might match the return type of a GCC
10443 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010444#ifdef __cplusplus
10445extern "C"
10446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010447char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010448int
10449main ()
10450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 ;
10453 return 0;
10454}
10455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010456if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010458else
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010461rm -f core conftest.err conftest.$ac_objext \
10462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010463LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10466$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010467if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010468
Martin v. Löwis130fb172001-07-19 11:00:41 +000010469 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010470
Guido van Rossum627b2d71993-12-24 10:39:16 +000010471fi
10472
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010473
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010474fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010475
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010476if test "$posix_threads" = "yes"; then
10477 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010480
10481 fi
10482
10483 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10484 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010485 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010486$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010487
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010488 ;;
10489 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010490$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010491
10492 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010493 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010495
10496 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010497 esac
10498
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10500$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010501 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010502 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010503else
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010505 ac_cv_pthread_system_supported=no
10506else
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010508/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010509
10510 #include <stdio.h>
10511 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010512 void *foo(void *parm) {
10513 return NULL;
10514 }
10515 main() {
10516 pthread_attr_t attr;
10517 pthread_t id;
10518 if (pthread_attr_init(&attr)) exit(-1);
10519 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10520 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10521 exit(0);
10522 }
10523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010524if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010525 ac_cv_pthread_system_supported=yes
10526else
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010531fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533
Guido van Rossum627b2d71993-12-24 10:39:16 +000010534fi
10535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10537$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010538 if test "$ac_cv_pthread_system_supported" = "yes"; then
10539
Matthias Kloseb9621712010-04-24 17:59:49 +000010540$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010541
10542 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 for ac_func in pthread_sigmask
10544do :
10545 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010546if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010547 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010548#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010549_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010550 case $ac_sys_system in
10551 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552
Matthias Kloseb9621712010-04-24 17:59:49 +000010553$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010554
10555 ;;
10556 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010557fi
10558done
10559
pdoxe14679c2017-10-05 00:01:56 -070010560 for ac_func in pthread_getcpuclockid
10561do :
10562 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10563if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10564 cat >>confdefs.h <<_ACEOF
10565#define HAVE_PTHREAD_GETCPUCLOCKID 1
10566_ACEOF
10567
10568fi
10569done
10570
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010571fi
10572
10573
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010574# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010575
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10577$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010581 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10583$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010584 ipv6=no
10585 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10587$as_echo "yes" >&6; }
10588 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589
10590 ipv6=yes
10591 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010593else
Martin v. Löwis11437992002-04-12 09:54:03 +000010594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010597 /* AF_INET6 available check */
10598#include <sys/types.h>
10599#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010600int
10601main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010602{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010603int domain = AF_INET6;
10604 ;
10605 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606}
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010608if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010609
Matthias Kloseb9621712010-04-24 17:59:49 +000010610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10611$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010612 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010613
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010614else
Matthias Kloseb159a552010-04-25 21:00:44 +000010615
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010618 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010619
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010620fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010623if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10625$as_echo_n "checking if RFC2553 API is available... " >&6; }
10626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010627/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010628
10629 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010630#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010631int
10632main ()
10633{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010634struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010635 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 ;
10637 return 0;
10638}
Matthias Kloseb159a552010-04-25 21:00:44 +000010639
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010641if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010642
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010644$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010645 ipv6=yes
10646
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010647else
Matthias Kloseb159a552010-04-25 21:00:44 +000010648
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010650$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010651 ipv6=no
10652
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010655fi
10656
10657if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010659
10660fi
10661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662fi
10663
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010664
10665ipv6type=unknown
10666ipv6lib=none
10667ipv6trylibc=no
10668
10669if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10671$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010672 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10673 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010674 case $i in
10675 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010677/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679#include <netinet/in.h>
10680#ifdef IPV6_INRIA_VERSION
10681yes
10682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010683_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010686 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010688rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689
10690 ;;
10691 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695#include <netinet/in.h>
10696#ifdef __KAME__
10697yes
10698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010699_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010700if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702 ipv6type=$i;
10703 ipv6lib=inet6
10704 ipv6libdir=/usr/local/v6/lib
10705 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010706fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010707rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708
10709 ;;
10710 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010712/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010713
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714#include <features.h>
10715#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10716yes
10717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010718_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010721 ipv6type=$i;
10722 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010724rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725
10726 ;;
10727 linux-inet6)
10728 if test -d /usr/inet6; then
10729 ipv6type=$i
10730 ipv6lib=inet6
10731 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010732 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733 fi
10734 ;;
10735 solaris)
10736 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010737 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738 ipv6type=$i
10739 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010740 fi
10741 fi
10742 ;;
10743 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010745/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010746
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747#include <sys/param.h>
10748#ifdef _TOSHIBA_INET6
10749yes
10750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010751_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754 ipv6type=$i;
10755 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010756 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010758rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759
10760 ;;
10761 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010763/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010764
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765#include </usr/local/v6/include/sys/v6config.h>
10766#ifdef __V6D__
10767yes
10768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010769_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772 ipv6type=$i;
10773 ipv6lib=v6;
10774 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010775 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010777rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778
10779 ;;
10780 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010782/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010783
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784#include <sys/param.h>
10785#ifdef _ZETA_MINAMI_INET6
10786yes
10787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010788_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791 ipv6type=$i;
10792 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010793 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010795rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796
10797 ;;
10798 esac
10799 if test "$ipv6type" != "unknown"; then
10800 break
10801 fi
10802 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10804$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805fi
10806
10807if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10808 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10809 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10810 echo "using lib$ipv6lib"
10811 else
10812 if test $ipv6trylibc = "yes"; then
10813 echo "using libc"
10814 else
10815 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10816 echo "You need to fetch lib$ipv6lib.a from appropriate"
10817 echo 'ipv6 kit and compile beforehand.'
10818 exit 1
10819 fi
10820 fi
10821fi
10822
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10824$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10826/* end confdefs.h. */
10827 /* CAN_RAW_FD_FRAMES available check */
10828#include <linux/can/raw.h>
10829int
10830main ()
10831{
10832int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10833 ;
10834 return 0;
10835}
10836_ACEOF
10837if ac_fn_c_try_compile "$LINENO"; then :
10838
10839
10840$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10841
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10843$as_echo "yes" >&6; }
10844
10845else
10846
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10848$as_echo "no" >&6; }
10849
10850fi
10851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10852
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010853# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10855$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010858if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859 withval=$with_doc_strings;
10860fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010861
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010862
10863if test -z "$with_doc_strings"
10864then with_doc_strings="yes"
10865fi
10866if test "$with_doc_strings" != "no"
10867then
10868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010870
10871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10873$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010874
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010875# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10877$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010879# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010880if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010881 withval=$with_pymalloc;
10882fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010883
Neil Schemenauera35c6882001-02-27 04:45:05 +000010884
Neil Schemenauer16c22972002-03-22 15:34:49 +000010885if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010886then
10887 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010888fi
10889if test "$with_pymalloc" != "no"
10890then
Martin v. Löwis11437992002-04-12 09:54:03 +000010891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010893
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010894 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10897$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010898
Nick Coghlan6ea41862017-06-11 13:16:15 +100010899# Check for --with-c-locale-coercion
10900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10901$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10902
10903# Check whether --with-c-locale-coercion was given.
10904if test "${with_c_locale_coercion+set}" = set; then :
10905 withval=$with_c_locale_coercion;
10906fi
10907
10908
10909if test -z "$with_c_locale_coercion"
10910then
10911 with_c_locale_coercion="yes"
10912fi
10913if test "$with_c_locale_coercion" != "no"
10914then
10915
10916$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10917
10918fi
10919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10920$as_echo "$with_c_locale_coercion" >&6; }
10921
10922# Check for --with-c-locale-warning
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10924$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10925
10926# Check whether --with-c-locale-warning was given.
10927if test "${with_c_locale_warning+set}" = set; then :
10928 withval=$with_c_locale_warning;
10929fi
10930
10931
10932if test -z "$with_c_locale_warning"
10933then
10934 with_c_locale_warning="yes"
10935fi
10936if test "$with_c_locale_warning" != "no"
10937then
10938
10939$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10940
10941fi
10942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10943$as_echo "$with_c_locale_warning" >&6; }
10944
Benjamin Peterson05159c42009-12-03 03:01:27 +000010945# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10947$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010948
10949# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010951 withval=$with_valgrind;
10952else
10953 with_valgrind=no
10954fi
10955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10957$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010958if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 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 +020010960if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010963
10964else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010965 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010966
10967fi
10968
10969
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010970 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010971fi
10972
Łukasz Langaa785c872016-09-09 17:37:37 -070010973# Check for DTrace support
10974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10975$as_echo_n "checking for --with-dtrace... " >&6; }
10976
10977# Check whether --with-dtrace was given.
10978if test "${with_dtrace+set}" = set; then :
10979 withval=$with_dtrace;
10980else
10981 with_dtrace=no
10982fi
10983
10984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
10985$as_echo "$with_dtrace" >&6; }
10986
10987
10988
10989
10990
10991DTRACE=
10992DFLAGS=
10993DTRACE_HEADERS=
10994DTRACE_OBJS=
10995
10996if test "$with_dtrace" = "yes"
10997then
10998 # Extract the first word of "dtrace", so it can be a program name with args.
10999set dummy dtrace; ac_word=$2
11000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11001$as_echo_n "checking for $ac_word... " >&6; }
11002if ${ac_cv_path_DTRACE+:} false; then :
11003 $as_echo_n "(cached) " >&6
11004else
11005 case $DTRACE in
11006 [\\/]* | ?:[\\/]*)
11007 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11008 ;;
11009 *)
11010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11011for as_dir in $PATH
11012do
11013 IFS=$as_save_IFS
11014 test -z "$as_dir" && as_dir=.
11015 for ac_exec_ext in '' $ac_executable_extensions; do
11016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11017 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11019 break 2
11020 fi
11021done
11022 done
11023IFS=$as_save_IFS
11024
11025 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11026 ;;
11027esac
11028fi
11029DTRACE=$ac_cv_path_DTRACE
11030if test -n "$DTRACE"; then
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11032$as_echo "$DTRACE" >&6; }
11033else
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11035$as_echo "no" >&6; }
11036fi
11037
11038
11039 if test "$DTRACE" = "not found"; then
11040 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11041 fi
11042
11043$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11044
11045 DTRACE_HEADERS="Include/pydtrace_probes.h"
11046
11047 # On OS X, DTrace providers do not need to be explicitly compiled and
11048 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11049 # generation flag '-G'. We check for presence of this flag, rather than
11050 # hardcoding support by OS, in the interest of robustness.
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11052$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11053if ${ac_cv_dtrace_link+:} false; then :
11054 $as_echo_n "(cached) " >&6
11055else
11056 ac_cv_dtrace_link=no
11057 echo 'BEGIN' > conftest.d
11058 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11059 ac_cv_dtrace_link=yes
11060
11061fi
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11063$as_echo "$ac_cv_dtrace_link" >&6; }
11064 if test "$ac_cv_dtrace_link" = "yes"; then
11065 DTRACE_OBJS="Python/pydtrace.o"
11066 fi
11067fi
11068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011069# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011070
Guido van Rossum98935bf2001-09-05 19:13:16 +000011071DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011072
Guido van Rossume97ee181999-12-20 21:27:22 +000011073# the dlopen() function means we might want to use dynload_shlib.o. some
11074# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011075for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011076do :
11077 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011078if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011079 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011080#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011081_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011082
Guido van Rossume97ee181999-12-20 21:27:22 +000011083fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011084done
Guido van Rossume97ee181999-12-20 21:27:22 +000011085
Michael W. Hudson54241132001-12-07 15:38:26 +000011086
Guido van Rossume97ee181999-12-20 21:27:22 +000011087# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11088# loading of modules.
11089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11091$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011092if test -z "$DYNLOADFILE"
11093then
11094 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011095 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11096 if test "$ac_cv_func_dlopen" = yes
11097 then DYNLOADFILE="dynload_shlib.o"
11098 else DYNLOADFILE="dynload_aix.o"
11099 fi
11100 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011101 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011102 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11103 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011104 *)
11105 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11106 # out any dynamic loading
11107 if test "$ac_cv_func_dlopen" = yes
11108 then DYNLOADFILE="dynload_shlib.o"
11109 else DYNLOADFILE="dynload_stub.o"
11110 fi
11111 ;;
11112 esac
11113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11115$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011116if test "$DYNLOADFILE" != "dynload_stub.o"
11117then
Martin v. Löwis11437992002-04-12 09:54:03 +000011118
Matthias Kloseb9621712010-04-24 17:59:49 +000011119$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011120
11121fi
11122
Neil Schemenauer4e425612001-06-19 15:44:15 +000011123# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11124
Michael W. Hudson54241132001-12-07 15:38:26 +000011125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11127$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011128if test -z "$MACHDEP_OBJS"
11129then
Jack Jansene578a632001-08-15 01:27:14 +000011130 MACHDEP_OBJS=$extra_machdep_objs
11131else
11132 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011133fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011134if test -z "$MACHDEP_OBJS"; then
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11136$as_echo "none" >&6; }
11137else
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11139$as_echo "$MACHDEP_OBJS" >&6; }
11140fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011141
Guido van Rossum627b2d71993-12-24 10:39:16 +000011142# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011143for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011144 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011145 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011146 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011147 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011148 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011149 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011150 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011151 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011152 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011153 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011154 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011155 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011156 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011157 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011158 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11159 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011160 sigaction sigaltstack siginterrupt sigpending sigrelse \
11161 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011162 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011163 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011164 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011165do :
11166 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11167ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011168if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011169 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011170#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011171_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011172
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011173fi
11174done
11175
Michael W. Hudson54241132001-12-07 15:38:26 +000011176
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011177ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11178 #include <dirent.h>
11179"
11180if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11181
11182$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11183
11184fi
11185
11186
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011187# For some functions, having a definition is not sufficient, since
11188# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11190$as_echo_n "checking for chroot... " >&6; }
11191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011192/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011193#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011194int
11195main ()
11196{
11197void *x=chroot
11198 ;
11199 return 0;
11200}
11201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011203
Matthias Kloseb9621712010-04-24 17:59:49 +000011204$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011205
Matthias Kloseb159a552010-04-25 21:00:44 +000011206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011208else
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11210$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211
11212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11215$as_echo_n "checking for link... " >&6; }
11216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011218#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011219int
11220main ()
11221{
11222void *x=link
11223 ;
11224 return 0;
11225}
11226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011227if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011228
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011230
Matthias Kloseb159a552010-04-25 21:00:44 +000011231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011232$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011233else
Matthias Kloseb9621712010-04-24 17:59:49 +000011234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11235$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011236
11237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11240$as_echo_n "checking for symlink... " >&6; }
11241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011242/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011243#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011244int
11245main ()
11246{
11247void *x=symlink
11248 ;
11249 return 0;
11250}
11251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011253
Matthias Kloseb9621712010-04-24 17:59:49 +000011254$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011255
Matthias Kloseb159a552010-04-25 21:00:44 +000011256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011257$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011258else
Matthias Kloseb9621712010-04-24 17:59:49 +000011259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11260$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011261
11262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11265$as_echo_n "checking for fchdir... " >&6; }
11266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011268#include <unistd.h>
11269int
11270main ()
11271{
11272void *x=fchdir
11273 ;
11274 return 0;
11275}
11276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011280
Matthias Kloseb159a552010-04-25 21:00:44 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011283else
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11285$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011286
11287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11290$as_echo_n "checking for fsync... " >&6; }
11291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011293#include <unistd.h>
11294int
11295main ()
11296{
11297void *x=fsync
11298 ;
11299 return 0;
11300}
11301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011303
Matthias Kloseb9621712010-04-24 17:59:49 +000011304$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011305
Matthias Kloseb159a552010-04-25 21:00:44 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011307$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011308else
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11310$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011311
11312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11315$as_echo_n "checking for fdatasync... " >&6; }
11316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011318#include <unistd.h>
11319int
11320main ()
11321{
11322void *x=fdatasync
11323 ;
11324 return 0;
11325}
11326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011330
Matthias Kloseb159a552010-04-25 21:00:44 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011333else
Matthias Kloseb9621712010-04-24 17:59:49 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011336
11337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11340$as_echo_n "checking for epoll... " >&6; }
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011342/* end confdefs.h. */
11343#include <sys/epoll.h>
11344int
11345main ()
11346{
11347void *x=epoll_create
11348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011355
Matthias Kloseb159a552010-04-25 21:00:44 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011358else
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011361
11362fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11365$as_echo_n "checking for epoll_create1... " >&6; }
11366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11367/* end confdefs.h. */
11368#include <sys/epoll.h>
11369int
11370main ()
11371{
11372void *x=epoll_create1
11373 ;
11374 return 0;
11375}
11376_ACEOF
11377if ac_fn_c_try_compile "$LINENO"; then :
11378
11379$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11380
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11382$as_echo "yes" >&6; }
11383else
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
11386
11387fi
11388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11390$as_echo_n "checking for kqueue... " >&6; }
11391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011392/* end confdefs.h. */
11393
11394#include <sys/types.h>
11395#include <sys/event.h>
11396
11397int
11398main ()
11399{
11400int x=kqueue()
11401 ;
11402 return 0;
11403}
11404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011405if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011408
Matthias Kloseb159a552010-04-25 21:00:44 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011410$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011411else
Matthias Kloseb9621712010-04-24 17:59:49 +000011412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011414
11415fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11418$as_echo_n "checking for prlimit... " >&6; }
11419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11420/* end confdefs.h. */
11421
11422#include <sys/time.h>
11423#include <sys/resource.h>
11424
11425int
11426main ()
11427{
11428void *x=prlimit
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433if ac_fn_c_try_compile "$LINENO"; then :
11434
11435$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11436
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11438$as_echo "yes" >&6; }
11439else
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11441$as_echo "no" >&6; }
11442
11443fi
11444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11445
Martin v. Löwisd5843682002-11-21 20:41:28 +000011446# On some systems (eg. FreeBSD 5), we would find a definition of the
11447# functions ctermid_r, setgroups in the library, but no prototype
11448# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11449# address to avoid compiler warnings and potential miscompilations
11450# because of the missing prototypes.
11451
Matthias Kloseb9621712010-04-24 17:59:49 +000011452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11453$as_echo_n "checking for ctermid_r... " >&6; }
11454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011455/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011456
Martin v. Löwisd5843682002-11-21 20:41:28 +000011457#include <stdio.h>
11458
Martin v. Löwisd5843682002-11-21 20:41:28 +000011459int
11460main ()
11461{
11462void* p = ctermid_r
11463 ;
11464 return 0;
11465}
11466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011470
Matthias Kloseb159a552010-04-25 21:00:44 +000011471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011472$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011473else
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11475$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011476
11477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11479
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11481$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011482if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011483 $as_echo_n "(cached) " >&6
11484else
11485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011487#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011488int
11489main ()
11490{
11491void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011492
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011493 ;
11494 return 0;
11495}
11496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011497if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011498 ac_cv_flock_decl=yes
11499else
11500 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011501
11502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011504
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011505fi
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11507$as_echo "$ac_cv_flock_decl" >&6; }
11508if test "x${ac_cv_flock_decl}" = xyes; then
11509 for ac_func in flock
11510do :
11511 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011512if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011513 cat >>confdefs.h <<_ACEOF
11514#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011515_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011516
Antoine Pitroua3000072010-09-07 14:52:42 +000011517else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011519$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011520if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011521 $as_echo_n "(cached) " >&6
11522else
11523 ac_check_lib_save_LIBS=$LIBS
11524LIBS="-lbsd $LIBS"
11525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11526/* end confdefs.h. */
11527
11528/* Override any GCC internal prototype to avoid an error.
11529 Use char because int might match the return type of a GCC
11530 builtin and then its argument prototype would still apply. */
11531#ifdef __cplusplus
11532extern "C"
11533#endif
11534char flock ();
11535int
11536main ()
11537{
11538return flock ();
11539 ;
11540 return 0;
11541}
11542_ACEOF
11543if ac_fn_c_try_link "$LINENO"; then :
11544 ac_cv_lib_bsd_flock=yes
11545else
11546 ac_cv_lib_bsd_flock=no
11547fi
11548rm -f core conftest.err conftest.$ac_objext \
11549 conftest$ac_exeext conftest.$ac_ext
11550LIBS=$ac_check_lib_save_LIBS
11551fi
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11553$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011554if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011555 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011556
11557
11558$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11559
11560
11561fi
11562
11563
11564fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011565done
11566
Antoine Pitroua3000072010-09-07 14:52:42 +000011567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11570$as_echo_n "checking for getpagesize... " >&6; }
11571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011572/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011573
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011574#include <unistd.h>
11575
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011576int
11577main ()
11578{
11579void* p = getpagesize
11580 ;
11581 return 0;
11582}
11583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011587
Matthias Kloseb159a552010-04-25 21:00:44 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011589$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011593
11594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011596
Victor Stinner984890f2011-11-24 13:53:38 +010011597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11598$as_echo_n "checking for broken unsetenv... " >&6; }
11599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11600/* end confdefs.h. */
11601
11602#include <stdlib.h>
11603
11604int
11605main ()
11606{
11607int res = unsetenv("DUMMY")
11608 ;
11609 return 0;
11610}
11611_ACEOF
11612if ac_fn_c_try_compile "$LINENO"; then :
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11614$as_echo "no" >&6; }
11615else
11616
11617$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11618
11619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11620$as_echo "yes" >&6; }
11621
11622fi
11623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11624
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011625for ac_prog in true
11626do
11627 # Extract the first word of "$ac_prog", so it can be a program name with args.
11628set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11630$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011631if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011633else
11634 if test -n "$TRUE"; then
11635 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11636else
11637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11638for as_dir in $PATH
11639do
11640 IFS=$as_save_IFS
11641 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011644 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 $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 +000011646 break 2
11647 fi
11648done
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011651
11652fi
11653fi
11654TRUE=$ac_cv_prog_TRUE
11655if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11657$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011658else
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011661fi
11662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011664 test -n "$TRUE" && break
11665done
11666test -n "$TRUE" || TRUE="/bin/true"
11667
11668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11670$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011671if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011673else
11674 ac_check_lib_save_LIBS=$LIBS
11675LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011677/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679/* Override any GCC internal prototype to avoid an error.
11680 Use char because int might match the return type of a GCC
11681 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011682#ifdef __cplusplus
11683extern "C"
11684#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011685char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011686int
11687main ()
11688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011690 ;
11691 return 0;
11692}
11693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011695 ac_cv_lib_c_inet_aton=yes
11696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011699rm -f core conftest.err conftest.$ac_objext \
11700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011701LIBS=$ac_check_lib_save_LIBS
11702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11704$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011705if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011706 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011707else
Matthias Kloseb9621712010-04-24 17:59:49 +000011708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11709$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011710if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011712else
11713 ac_check_lib_save_LIBS=$LIBS
11714LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011716/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011718/* Override any GCC internal prototype to avoid an error.
11719 Use char because int might match the return type of a GCC
11720 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011721#ifdef __cplusplus
11722extern "C"
11723#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011724char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011725int
11726main ()
11727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011728return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011729 ;
11730 return 0;
11731}
11732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011734 ac_cv_lib_resolv_inet_aton=yes
11735else
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011738rm -f core conftest.err conftest.$ac_objext \
11739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011740LIBS=$ac_check_lib_save_LIBS
11741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11743$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011744if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011745 cat >>confdefs.h <<_ACEOF
11746#define HAVE_LIBRESOLV 1
11747_ACEOF
11748
11749 LIBS="-lresolv $LIBS"
11750
11751fi
11752
11753
11754fi
11755
11756
Christian Heimesd0764e22007-12-04 15:00:33 +000011757# On Tru64, chflags seems to be present, but calling it will
11758# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11760$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011765 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011768/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011769
Christian Heimesd0764e22007-12-04 15:00:33 +000011770#include <sys/stat.h>
11771#include <unistd.h>
11772int main(int argc, char*argv[])
11773{
11774 if(chflags(argv[0], 0) != 0)
11775 return 1;
11776 return 0;
11777}
Ned Deily3eb67d52011-06-28 00:00:28 -070011778
Christian Heimesd0764e22007-12-04 15:00:33 +000011779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011781 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011787fi
11788
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011789
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11792$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011793if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011795if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011796 ac_cv_have_chflags="yes"
11797else
11798 ac_cv_have_chflags="no"
11799fi
11800
11801fi
11802if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011803
Matthias Kloseb9621712010-04-24 17:59:49 +000011804$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011805
11806fi
11807
Matthias Kloseb9621712010-04-24 17:59:49 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11809$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011810if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011814 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011817/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011818
Christian Heimesd0764e22007-12-04 15:00:33 +000011819#include <sys/stat.h>
11820#include <unistd.h>
11821int main(int argc, char*argv[])
11822{
11823 if(lchflags(argv[0], 0) != 0)
11824 return 1;
11825 return 0;
11826}
Ned Deily3eb67d52011-06-28 00:00:28 -070011827
Christian Heimesd0764e22007-12-04 15:00:33 +000011828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011830 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011836fi
11837
11838
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11841$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011842if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011844if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011845 ac_cv_have_lchflags="yes"
11846else
11847 ac_cv_have_lchflags="no"
11848fi
11849
11850fi
11851if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011852
Matthias Kloseb9621712010-04-24 17:59:49 +000011853$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011854
11855fi
11856
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011857case $ac_sys_system/$ac_sys_release in
11858Darwin/*)
11859 _CUR_CFLAGS="${CFLAGS}"
11860 _CUR_LDFLAGS="${LDFLAGS}"
11861 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11862 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11863 ;;
11864esac
11865
Matthias Kloseb9621712010-04-24 17:59:49 +000011866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11867$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011868if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011870else
11871 ac_check_lib_save_LIBS=$LIBS
11872LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011874/* end confdefs.h. */
11875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011876/* Override any GCC internal prototype to avoid an error.
11877 Use char because int might match the return type of a GCC
11878 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011879#ifdef __cplusplus
11880extern "C"
11881#endif
11882char inflateCopy ();
11883int
11884main ()
11885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011887 ;
11888 return 0;
11889}
11890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011892 ac_cv_lib_z_inflateCopy=yes
11893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011896rm -f core conftest.err conftest.$ac_objext \
11897 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011898LIBS=$ac_check_lib_save_LIBS
11899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11901$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011902if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011905
11906fi
11907
11908
11909case $ac_sys_system/$ac_sys_release in
11910Darwin/*)
11911 CFLAGS="${_CUR_CFLAGS}"
11912 LDFLAGS="${_CUR_LDFLAGS}"
11913 ;;
11914esac
11915
Matthias Kloseb9621712010-04-24 17:59:49 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11917$as_echo_n "checking for hstrerror... " >&6; }
11918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011919/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011920
Martin v. Löwise9416172003-05-03 10:12:45 +000011921#include <netdb.h>
11922
Martin v. Löwise9416172003-05-03 10:12:45 +000011923int
11924main ()
11925{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011926void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011927 ;
11928 return 0;
11929}
11930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011931if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011934
Matthias Kloseb159a552010-04-25 21:00:44 +000011935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011936$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011937else
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11939$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011940
11941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011942rm -f core conftest.err conftest.$ac_objext \
11943 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011944
Matthias Kloseb9621712010-04-24 17:59:49 +000011945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11946$as_echo_n "checking for inet_aton... " >&6; }
11947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011948/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011949
Martin v. Löwis86d66262006-02-17 08:40:11 +000011950#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011951#include <sys/socket.h>
11952#include <netinet/in.h>
11953#include <arpa/inet.h>
11954
Martin v. Löwise9416172003-05-03 10:12:45 +000011955int
11956main ()
11957{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011958void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011959 ;
11960 return 0;
11961}
11962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011966
Matthias Kloseb159a552010-04-25 21:00:44 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011968$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011969else
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11971$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011972
11973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011974rm -f core conftest.err conftest.$ac_objext \
11975 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11978$as_echo_n "checking for inet_pton... " >&6; }
11979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011980/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011981
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011982#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011983#include <sys/socket.h>
11984#include <netinet/in.h>
11985#include <arpa/inet.h>
11986
Martin v. Löwise9416172003-05-03 10:12:45 +000011987int
11988main ()
11989{
11990void* p = inet_pton
11991 ;
11992 return 0;
11993}
11994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011996
Matthias Kloseb9621712010-04-24 17:59:49 +000011997$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011998
Matthias Kloseb159a552010-04-25 21:00:44 +000011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012000$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012001else
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12003$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012004
12005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012007
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012008# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12010$as_echo_n "checking for setgroups... " >&6; }
12011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012012/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012013
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012014#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012015#ifdef HAVE_GRP_H
12016#include <grp.h>
12017#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012018
Martin v. Löwisd5843682002-11-21 20:41:28 +000012019int
12020main ()
12021{
12022void* p = setgroups
12023 ;
12024 return 0;
12025}
12026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012027if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012030
Matthias Kloseb159a552010-04-25 21:00:44 +000012031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012032$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012033else
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12035$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012036
12037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012040# check for openpty and forkpty
12041
12042for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012043do :
12044 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012045if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012046 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012047#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012048_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12052$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012053if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012055else
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012057LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061/* Override any GCC internal prototype to avoid an error.
12062 Use char because int might match the return type of a GCC
12063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012064#ifdef __cplusplus
12065extern "C"
12066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012067char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012068int
12069main ()
12070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012077 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012081rm -f core conftest.err conftest.$ac_objext \
12082 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012083LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12086$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012087if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012089 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12092$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012095else
12096 ac_check_lib_save_LIBS=$LIBS
12097LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012099/* end confdefs.h. */
12100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101/* Override any GCC internal prototype to avoid an error.
12102 Use char because int might match the return type of a GCC
12103 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012104#ifdef __cplusplus
12105extern "C"
12106#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012107char openpty ();
12108int
12109main ()
12110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012112 ;
12113 return 0;
12114}
12115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012117 ac_cv_lib_bsd_openpty=yes
12118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121rm -f core conftest.err conftest.$ac_objext \
12122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012123LIBS=$ac_check_lib_save_LIBS
12124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12126$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012127if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012129 LIBS="$LIBS -lbsd"
12130fi
12131
12132
12133fi
12134
Fred Drake8cef4cf2000-06-28 16:40:38 +000012135
12136fi
12137done
12138
12139for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012140do :
12141 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012142if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012145_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012146
Fred Drake8cef4cf2000-06-28 16:40:38 +000012147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12149$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012152else
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012154LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158/* Override any GCC internal prototype to avoid an error.
12159 Use char because int might match the return type of a GCC
12160 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012161#ifdef __cplusplus
12162extern "C"
12163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012164char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012165int
12166main ()
12167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 ;
12170 return 0;
12171}
12172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012174 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178rm -f core conftest.err conftest.$ac_objext \
12179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012180LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12183$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012184if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012187else
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12189$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012190if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012192else
12193 ac_check_lib_save_LIBS=$LIBS
12194LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012196/* end confdefs.h. */
12197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198/* Override any GCC internal prototype to avoid an error.
12199 Use char because int might match the return type of a GCC
12200 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012201#ifdef __cplusplus
12202extern "C"
12203#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012204char forkpty ();
12205int
12206main ()
12207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012209 ;
12210 return 0;
12211}
12212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012214 ac_cv_lib_bsd_forkpty=yes
12215else
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012218rm -f core conftest.err conftest.$ac_objext \
12219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220LIBS=$ac_check_lib_save_LIBS
12221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12223$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012224if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012226 LIBS="$LIBS -lbsd"
12227fi
12228
12229
12230fi
12231
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232
12233fi
12234done
12235
Jack Jansendd19cf82001-12-06 22:36:17 +000012236
Michael W. Hudson54241132001-12-07 15:38:26 +000012237# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012238for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012239do :
12240 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12241ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012242if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012245_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012246
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012247fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012248done
12249
Michael W. Hudson54241132001-12-07 15:38:26 +000012250
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012251ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012252if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012253 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012254
Martin v. Löwis1142de32002-03-29 16:28:31 +000012255else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012257 *" dup2.$ac_objext "* ) ;;
12258 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012260esac
12261
Martin v. Löwis1142de32002-03-29 16:28:31 +000012262fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012263
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012264ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012265if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012266 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12267
12268else
12269 case " $LIBOBJS " in
12270 *" strdup.$ac_objext "* ) ;;
12271 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12272 ;;
12273esac
12274
12275fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012276
12277
12278for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012279do :
12280 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012281if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012286/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012287#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012288int
12289main ()
12290{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012291getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 ;
12293 return 0;
12294}
12295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012299
Guido van Rossum627b2d71993-12-24 10:39:16 +000012300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012302
Guido van Rossum627b2d71993-12-24 10:39:16 +000012303fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012304done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012305
Jack Jansen150753c2003-03-29 22:07:47 +000012306for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012307do :
12308 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012310 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012311#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012315#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012316int
12317main ()
12318{
12319setpgrp(0,0);
12320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012325
Matthias Kloseb9621712010-04-24 17:59:49 +000012326$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012327
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012330
12331fi
12332done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012333
Thomas Wouters3a584202000-08-05 23:28:51 +000012334for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012335do :
12336 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012337if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012342/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012343#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012344int
12345main ()
12346{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012347gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012348 ;
12349 return 0;
12350}
12351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012352if ac_fn_c_try_compile "$LINENO"; then :
12353
Guido van Rossum627b2d71993-12-24 10:39:16 +000012354else
Skip Montanaro6dead952003-09-25 14:50:04 +000012355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012357
Martin v. Löwis11437992002-04-12 09:54:03 +000012358
Guido van Rossum627b2d71993-12-24 10:39:16 +000012359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012361
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012362fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012363done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012364
Michael W. Hudson54241132001-12-07 15:38:26 +000012365
Victor Stinnere0be4232011-10-25 13:06:09 +020012366for ac_func in clock_gettime
12367do :
12368 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12369if test "x$ac_cv_func_clock_gettime" = xyes; then :
12370 cat >>confdefs.h <<_ACEOF
12371#define HAVE_CLOCK_GETTIME 1
12372_ACEOF
12373
12374else
12375
12376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12377$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12378if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12379 $as_echo_n "(cached) " >&6
12380else
12381 ac_check_lib_save_LIBS=$LIBS
12382LIBS="-lrt $LIBS"
12383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12384/* end confdefs.h. */
12385
12386/* Override any GCC internal prototype to avoid an error.
12387 Use char because int might match the return type of a GCC
12388 builtin and then its argument prototype would still apply. */
12389#ifdef __cplusplus
12390extern "C"
12391#endif
12392char clock_gettime ();
12393int
12394main ()
12395{
12396return clock_gettime ();
12397 ;
12398 return 0;
12399}
12400_ACEOF
12401if ac_fn_c_try_link "$LINENO"; then :
12402 ac_cv_lib_rt_clock_gettime=yes
12403else
12404 ac_cv_lib_rt_clock_gettime=no
12405fi
12406rm -f core conftest.err conftest.$ac_objext \
12407 conftest$ac_exeext conftest.$ac_ext
12408LIBS=$ac_check_lib_save_LIBS
12409fi
12410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12411$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12412if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12413
Victor Stinner7efb8332014-08-29 15:41:08 +020012414 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012415 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12416
12417
12418$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12419
12420
12421fi
12422
12423
12424fi
12425done
12426
12427
12428for ac_func in clock_getres
12429do :
12430 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12431if test "x$ac_cv_func_clock_getres" = xyes; then :
12432 cat >>confdefs.h <<_ACEOF
12433#define HAVE_CLOCK_GETRES 1
12434_ACEOF
12435
12436else
12437
12438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12439$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12440if ${ac_cv_lib_rt_clock_getres+:} false; then :
12441 $as_echo_n "(cached) " >&6
12442else
12443 ac_check_lib_save_LIBS=$LIBS
12444LIBS="-lrt $LIBS"
12445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446/* end confdefs.h. */
12447
12448/* Override any GCC internal prototype to avoid an error.
12449 Use char because int might match the return type of a GCC
12450 builtin and then its argument prototype would still apply. */
12451#ifdef __cplusplus
12452extern "C"
12453#endif
12454char clock_getres ();
12455int
12456main ()
12457{
12458return clock_getres ();
12459 ;
12460 return 0;
12461}
12462_ACEOF
12463if ac_fn_c_try_link "$LINENO"; then :
12464 ac_cv_lib_rt_clock_getres=yes
12465else
12466 ac_cv_lib_rt_clock_getres=no
12467fi
12468rm -f core conftest.err conftest.$ac_objext \
12469 conftest$ac_exeext conftest.$ac_ext
12470LIBS=$ac_check_lib_save_LIBS
12471fi
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12473$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12474if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12475
12476 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12477
12478
12479fi
12480
12481
12482fi
12483done
12484
12485
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012486for ac_func in clock_settime
12487do :
12488 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12489if test "x$ac_cv_func_clock_settime" = xyes; then :
12490 cat >>confdefs.h <<_ACEOF
12491#define HAVE_CLOCK_SETTIME 1
12492_ACEOF
12493
12494else
12495
12496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12497$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12498if ${ac_cv_lib_rt_clock_settime+:} false; then :
12499 $as_echo_n "(cached) " >&6
12500else
12501 ac_check_lib_save_LIBS=$LIBS
12502LIBS="-lrt $LIBS"
12503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12504/* end confdefs.h. */
12505
12506/* Override any GCC internal prototype to avoid an error.
12507 Use char because int might match the return type of a GCC
12508 builtin and then its argument prototype would still apply. */
12509#ifdef __cplusplus
12510extern "C"
12511#endif
12512char clock_settime ();
12513int
12514main ()
12515{
12516return clock_settime ();
12517 ;
12518 return 0;
12519}
12520_ACEOF
12521if ac_fn_c_try_link "$LINENO"; then :
12522 ac_cv_lib_rt_clock_settime=yes
12523else
12524 ac_cv_lib_rt_clock_settime=no
12525fi
12526rm -f core conftest.err conftest.$ac_objext \
12527 conftest$ac_exeext conftest.$ac_ext
12528LIBS=$ac_check_lib_save_LIBS
12529fi
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12531$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12532if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12533
12534 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12535
12536
12537fi
12538
12539
12540fi
12541done
12542
12543
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12545$as_echo_n "checking for major... " >&6; }
12546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012548
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012549#if defined(MAJOR_IN_MKDEV)
12550#include <sys/mkdev.h>
12551#elif defined(MAJOR_IN_SYSMACROS)
12552#include <sys/sysmacros.h>
12553#else
12554#include <sys/types.h>
12555#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012556
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012557int
12558main ()
12559{
12560
12561 makedev(major(0),minor(0));
12562
12563 ;
12564 return 0;
12565}
12566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012568
12569
Matthias Kloseb9621712010-04-24 17:59:49 +000012570$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12573$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012574
12575else
Skip Montanaro6dead952003-09-25 14:50:04 +000012576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12578$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012579
12580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012581rm -f core conftest.err conftest.$ac_objext \
12582 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012583
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012584# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012585# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12587$as_echo_n "checking for getaddrinfo... " >&6; }
12588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012590
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012591#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012592#include <sys/socket.h>
12593#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012594#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012595
Martin v. Löwis11437992002-04-12 09:54:03 +000012596int
12597main ()
12598{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012599getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 ;
12601 return 0;
12602}
12603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012604if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012605 have_getaddrinfo=yes
12606else
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012609rm -f core conftest.err conftest.$ac_objext \
12610 conftest$ac_exeext conftest.$ac_ext
12611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12612$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012613if test $have_getaddrinfo = yes
12614then
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12616$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012617 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012618 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012619else
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012621
12622if test "${enable_ipv6+set}" = set; then
12623 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12624else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012625 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012626fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012629/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012630
Stefan Krah19c21392012-11-22 23:47:32 +010012631#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012632#include <sys/types.h>
12633#include <netdb.h>
12634#include <string.h>
12635#include <sys/socket.h>
12636#include <netinet/in.h>
12637
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012638int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012639{
12640 int passive, gaierr, inet4 = 0, inet6 = 0;
12641 struct addrinfo hints, *ai, *aitop;
12642 char straddr[INET6_ADDRSTRLEN], strport[16];
12643
12644 for (passive = 0; passive <= 1; passive++) {
12645 memset(&hints, 0, sizeof(hints));
12646 hints.ai_family = AF_UNSPEC;
12647 hints.ai_flags = passive ? AI_PASSIVE : 0;
12648 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012649 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012650 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12651 (void)gai_strerror(gaierr);
12652 goto bad;
12653 }
12654 for (ai = aitop; ai; ai = ai->ai_next) {
12655 if (ai->ai_addr == NULL ||
12656 ai->ai_addrlen == 0 ||
12657 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12658 straddr, sizeof(straddr), strport, sizeof(strport),
12659 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12660 goto bad;
12661 }
12662 switch (ai->ai_family) {
12663 case AF_INET:
12664 if (strcmp(strport, "54321") != 0) {
12665 goto bad;
12666 }
12667 if (passive) {
12668 if (strcmp(straddr, "0.0.0.0") != 0) {
12669 goto bad;
12670 }
12671 } else {
12672 if (strcmp(straddr, "127.0.0.1") != 0) {
12673 goto bad;
12674 }
12675 }
12676 inet4++;
12677 break;
12678 case AF_INET6:
12679 if (strcmp(strport, "54321") != 0) {
12680 goto bad;
12681 }
12682 if (passive) {
12683 if (strcmp(straddr, "::") != 0) {
12684 goto bad;
12685 }
12686 } else {
12687 if (strcmp(straddr, "::1") != 0) {
12688 goto bad;
12689 }
12690 }
12691 inet6++;
12692 break;
12693 case AF_UNSPEC:
12694 goto bad;
12695 break;
12696 default:
12697 /* another family support? */
12698 break;
12699 }
12700 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012701 freeaddrinfo(aitop);
12702 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012703 }
12704
12705 if (!(inet4 == 0 || inet4 == 2))
12706 goto bad;
12707 if (!(inet6 == 0 || inet6 == 2))
12708 goto bad;
12709
12710 if (aitop)
12711 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012712 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012713
12714 bad:
12715 if (aitop)
12716 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012717 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012718}
12719
Martin v. Löwis11437992002-04-12 09:54:03 +000012720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012721if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012722 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012723else
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012730fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012731
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12735$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12736
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012737if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012738then
12739 if test $ipv6 = yes
12740 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012741 echo 'Fatal: You must get working getaddrinfo() function.'
12742 echo ' or you can specify "--disable-ipv6"'.
12743 exit 1
12744 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012745else
Martin v. Löwis11437992002-04-12 09:54:03 +000012746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012748
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012749fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012750
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012751for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012752do :
12753 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012754if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012756#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012757_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012758
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012759fi
12760done
12761
Michael W. Hudson54241132001-12-07 15:38:26 +000012762
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12765$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012766if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012768else
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012770/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012771#include <sys/types.h>
12772#include <sys/time.h>
12773#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012774
Martin v. Löwis11437992002-04-12 09:54:03 +000012775int
12776main ()
12777{
12778if ((struct tm *) 0)
12779return 0;
12780 ;
12781 return 0;
12782}
12783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012784if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012785 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012786else
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12792$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012793if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
Matthias Kloseb9621712010-04-24 17:59:49 +000012795$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012796
12797fi
12798
Matthias Kloseb9621712010-04-24 17:59:49 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12800$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012801if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012803else
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012805/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012806#include <sys/types.h>
12807#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012808
Martin v. Löwis11437992002-04-12 09:54:03 +000012809int
12810main ()
12811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812struct tm tm;
12813 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ;
12816 return 0;
12817}
12818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012819if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012820 ac_cv_struct_tm=time.h
12821else
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12827$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012828if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012831
12832fi
12833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834ac_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 +000012835#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837"
Victor Stinnere0be4232011-10-25 13:06:09 +020012838if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012839
12840cat >>confdefs.h <<_ACEOF
12841#define HAVE_STRUCT_TM_TM_ZONE 1
12842_ACEOF
12843
12844
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012845fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012846
Martin v. Löwis11437992002-04-12 09:54:03 +000012847if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012850
12851else
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12853"
Victor Stinnere0be4232011-10-25 13:06:09 +020012854if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012856else
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858fi
12859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012861#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862_ACEOF
12863
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12865$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012866if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868else
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012870/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012871#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872#if !HAVE_DECL_TZNAME
12873extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
Martin v. Löwis11437992002-04-12 09:54:03 +000012876int
12877main ()
12878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 ;
12881 return 0;
12882}
12883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885 ac_cv_var_tzname=yes
12886else
Matthias Kloseb9621712010-04-24 17:59:49 +000012887 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012889rm -f core conftest.err conftest.$ac_objext \
12890 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12893$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012894 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012897
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012898 fi
12899fi
12900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901ac_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 +020012902if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012903
12904cat >>confdefs.h <<_ACEOF
12905#define HAVE_STRUCT_STAT_ST_RDEV 1
12906_ACEOF
12907
12908
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012909fi
12910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911ac_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 +020012912if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012913
Martin v. Löwis11437992002-04-12 09:54:03 +000012914cat >>confdefs.h <<_ACEOF
12915#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12916_ACEOF
12917
12918
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012919fi
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921ac_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 +020012922if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012923
12924cat >>confdefs.h <<_ACEOF
12925#define HAVE_STRUCT_STAT_ST_FLAGS 1
12926_ACEOF
12927
12928
12929fi
12930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931ac_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 +020012932if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012933
12934cat >>confdefs.h <<_ACEOF
12935#define HAVE_STRUCT_STAT_ST_GEN 1
12936_ACEOF
12937
12938
12939fi
12940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941ac_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 +020012942if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012943
12944cat >>confdefs.h <<_ACEOF
12945#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12946_ACEOF
12947
12948
12949fi
12950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951ac_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 +020012952if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012953
Martin v. Löwis11437992002-04-12 09:54:03 +000012954cat >>confdefs.h <<_ACEOF
12955#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12956_ACEOF
12957
12958
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012959fi
12960
Stefan Krah267b6392016-04-26 01:09:18 +020012961ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12962 #include <sys/types.h>
12963 #include <pwd.h>
12964
12965"
12966if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12967
12968cat >>confdefs.h <<_ACEOF
12969#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12970_ACEOF
12971
12972
12973fi
12974ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12975 #include <sys/types.h>
12976 #include <pwd.h>
12977
12978"
12979if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12980
12981cat >>confdefs.h <<_ACEOF
12982#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12983_ACEOF
12984
12985
12986fi
12987
Zachary Ware6a6967e2016-10-01 00:47:27 -050012988# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
12989ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
12990"
12991if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
12992
12993cat >>confdefs.h <<_ACEOF
12994#define HAVE_SIGINFO_T_SI_BAND 1
12995_ACEOF
12996
12997
12998fi
12999
Michael W. Hudson54241132001-12-07 15:38:26 +000013000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13002$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013003if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005else
Matthias Kloseb159a552010-04-25 21:00:44 +000013006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013008/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013009#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013010int
13011main ()
13012{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013013return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 ;
13015 return 0;
13016}
13017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013018if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013019 ac_cv_header_time_altzone=yes
13020else
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025fi
13026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13028$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013029if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032
13033fi
13034
Guido van Rossumda88dad1995-01-26 00:46:29 +000013035was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13037$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013039/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013040
13041#include <sys/types.h>
13042#include <sys/select.h>
13043#include <sys/time.h>
13044
Martin v. Löwis11437992002-04-12 09:54:03 +000013045int
13046main ()
13047{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048;
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 ;
13050 return 0;
13051}
13052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013054
13055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013058 was_it_defined=yes
13059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13063$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13066$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013067if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013071/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013072#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013073int
13074main ()
13075{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013076struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013077 ;
13078 return 0;
13079}
13080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013081if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013082 ac_cv_struct_addrinfo=yes
13083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13087fi
13088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13090$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013091if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013094
13095fi
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13098$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013099if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013101else
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013103/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013104
13105# include <sys/types.h>
13106# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013107int
13108main ()
13109{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013110struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 ;
13112 return 0;
13113}
13114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013116 ac_cv_struct_sockaddr_storage=yes
13117else
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13121fi
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13124$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013125if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013128
13129fi
13130
Christian Heimesdffa3942016-09-05 23:54:41 +020013131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13132$as_echo_n "checking for sockaddr_alg... " >&6; }
13133if ${ac_cv_struct_sockaddr_alg+:} false; then :
13134 $as_echo_n "(cached) " >&6
13135else
13136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13137/* end confdefs.h. */
13138
13139# include <sys/types.h>
13140# include <sys/socket.h>
13141# include <linux/if_alg.h>
13142int
13143main ()
13144{
13145struct sockaddr_alg s
13146 ;
13147 return 0;
13148}
13149_ACEOF
13150if ac_fn_c_try_compile "$LINENO"; then :
13151 ac_cv_struct_sockaddr_alg=yes
13152else
13153 ac_cv_struct_sockaddr_alg=no
13154fi
13155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13156fi
13157
13158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13159$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13160if test $ac_cv_struct_sockaddr_alg = yes; then
13161
13162$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13163
13164fi
13165
Guido van Rossum627b2d71993-12-24 10:39:16 +000013166# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13169$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013170if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013175$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013176int
13177main ()
13178{
13179static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013180test_array [0] = 0;
13181return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
13183 ;
13184 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013185}
Martin v. Löwis11437992002-04-12 09:54:03 +000013186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013187if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013188 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13195$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013198
13199fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13202$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013203if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013207/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013208
Martin v. Löwis11437992002-04-12 09:54:03 +000013209int
13210main ()
13211{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013212
Martin v. Löwis11437992002-04-12 09:54:03 +000013213#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013214 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013216 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218 char const *const *pcpcc;
13219 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 /* NEC SVR4.0.2 mips cc rejects this. */
13221 struct point {int x, y;};
13222 static struct point const zero = {0,0};
13223 /* AIX XL C 1.02.0.0 rejects this.
13224 It does not let you subtract one const X* pointer from another in
13225 an arm of an if-expression whose if-part is not a constant
13226 expression */
13227 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230 ++pcpcc;
13231 ppc = (char**) pcpcc;
13232 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013233 { /* SCO 3.2v4 cc rejects this sort of thing. */
13234 char tx;
13235 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013237
Martin v. Löwis11437992002-04-12 09:54:03 +000013238 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 }
13241 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13242 int x[] = {25, 17};
13243 const int *foo = &x[0];
13244 ++foo;
13245 }
13246 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13247 typedef const int *iptr;
13248 iptr p = 0;
13249 ++p;
13250 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013251 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013253 struct s { int j; const int *ap[3]; } bx;
13254 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 }
13256 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13257 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013261#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013262
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ;
13264 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013265}
Martin v. Löwis11437992002-04-12 09:54:03 +000013266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268 ac_cv_c_const=yes
13269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13275$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279
13280fi
13281
Michael W. Hudson54241132001-12-07 15:38:26 +000013282
Guido van Rossumda88dad1995-01-26 00:46:29 +000013283works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13285$as_echo_n "checking for working signed char... " >&6; }
13286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013287/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289int
13290main ()
13291{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013292signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 ;
13294 return 0;
13295}
13296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013297if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013298 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013299else
Skip Montanaro6dead952003-09-25 14:50:04 +000013300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013302
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013303
Guido van Rossum7f43da71994-08-01 12:15:30 +000013304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13307$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013308
Guido van Rossumda88dad1995-01-26 00:46:29 +000013309have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13311$as_echo_n "checking for prototypes... " >&6; }
13312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013314int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013315int
13316main ()
13317{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318return foo(10);
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 :
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
Matthias Kloseb159a552010-04-25 21:00:44 +000013327 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13331$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332
Guido van Rossumda88dad1995-01-26 00:46:29 +000013333works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13335$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013337/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013338
13339#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013340int foo(int x, ...) {
13341 va_list va;
13342 va_start(va, x);
13343 va_arg(va, int);
13344 va_arg(va, char *);
13345 va_arg(va, double);
13346 return 0;
13347}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349int
13350main ()
13351{
Guido van Rossum90eea071996-08-30 20:58:57 +000013352return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013353 ;
13354 return 0;
13355}
13356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013358
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013362 works=yes
13363
Guido van Rossum627b2d71993-12-24 10:39:16 +000013364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13367$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368
Martin v. Löwisd6320502004-08-12 13:45:08 +000013369# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13371$as_echo_n "checking for socketpair... " >&6; }
13372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013373/* end confdefs.h. */
13374
13375#include <sys/types.h>
13376#include <sys/socket.h>
13377
13378int
13379main ()
13380{
13381void *x=socketpair
13382 ;
13383 return 0;
13384}
13385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013389
Matthias Kloseb159a552010-04-25 21:00:44 +000013390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013391$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013392else
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13394$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013395
13396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013398
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013399# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13401$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013403/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013404#include <sys/types.h>
13405#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013406int
13407main ()
13408{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013409struct sockaddr x;
13410x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_compile "$LINENO"; then :
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13417$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013420
13421else
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13423$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013424
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013427
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013428# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013432if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13437$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013438 OLD_CFLAGS=$CFLAGS
13439 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013441/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013442
13443# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
Martin v. Löwis11437992002-04-12 09:54:03 +000013445int
13446main ()
13447{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013448
13449 char *name;
13450 struct hostent *he, *res;
13451 char buffer[2048];
13452 int buflen = 2048;
13453 int h_errnop;
13454
13455 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013456
13457 ;
13458 return 0;
13459}
13460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013461if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013464
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13469$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013471else
Skip Montanaro6dead952003-09-25 14:50:04 +000013472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13474$as_echo "no" >&6; }
13475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13476$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013478/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013480# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013481
Martin v. Löwis11437992002-04-12 09:54:03 +000013482int
13483main ()
13484{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013485
13486 char *name;
13487 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013488 char buffer[2048];
13489 int buflen = 2048;
13490 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013491
Matthias Kloseb159a552010-04-25 21:00:44 +000013492 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013493
13494 ;
13495 return 0;
13496}
13497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013498if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013501
Martin v. Löwis11437992002-04-12 09:54:03 +000013502
Matthias Kloseb159a552010-04-25 21:00:44 +000013503$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13506$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013508else
Skip Montanaro6dead952003-09-25 14:50:04 +000013509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13511$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13513$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13515/* end confdefs.h. */
13516
13517# include <netdb.h>
13518
13519int
13520main ()
13521{
13522
13523 char *name;
13524 struct hostent *he;
13525 struct hostent_data data;
13526
13527 (void) gethostbyname_r(name, he, &data);
13528
13529 ;
13530 return 0;
13531}
13532_ACEOF
13533if ac_fn_c_try_compile "$LINENO"; then :
13534
13535 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13536
13537
13538$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13539
13540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13541$as_echo "yes" >&6; }
13542
13543else
13544
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13546$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013556 CFLAGS=$OLD_CFLAGS
13557
13558else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 for ac_func in gethostbyname
13561do :
13562 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013563if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013565#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013566_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013568fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013569done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013570
Michael W. Hudson54241132001-12-07 15:38:26 +000013571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013572fi
13573
Michael W. Hudson54241132001-12-07 15:38:26 +000013574
13575
13576
13577
13578
13579
Guido van Rossum627b2d71993-12-24 10:39:16 +000013580# checks for system services
13581# (none yet)
13582
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013583# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013584ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013585if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013586
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13589$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013590if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013592else
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013594LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598/* Override any GCC internal prototype to avoid an error.
13599 Use char because int might match the return type of a GCC
13600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013601#ifdef __cplusplus
13602extern "C"
13603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013604char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013605int
13606main ()
13607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013609 ;
13610 return 0;
13611}
13612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013618rm -f core conftest.err conftest.$ac_objext \
13619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013620LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13623$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013624if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 cat >>confdefs.h <<_ACEOF
13626#define HAVE_LIBIEEE 1
13627_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013628
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013629 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013630
Guido van Rossum627b2d71993-12-24 10:39:16 +000013631fi
13632
Michael W. Hudson54241132001-12-07 15:38:26 +000013633
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013634fi
13635
Michael W. Hudson54241132001-12-07 15:38:26 +000013636
Guido van Rossum7f253911997-05-09 02:42:48 +000013637# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13639$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013644if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013645then
13646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13650$as_echo "yes" >&6; }
13651else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13652$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013653fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013654else
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13656$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657fi
13658
Guido van Rossum7f253911997-05-09 02:42:48 +000013659
Guido van Rossum7f43da71994-08-01 12:15:30 +000013660# check for --with-libm=...
13661
Guido van Rossum563e7081996-09-10 18:20:48 +000013662case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013663Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013664*) LIBM=-lm
13665esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13667$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013669# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013670if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013671 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013672if test "$withval" = no
13673then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13675$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013676elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013677then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13679$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013680else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013681fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013682else
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13684$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013685fi
13686
Guido van Rossum7f43da71994-08-01 12:15:30 +000013687
13688# check for --with-libc=...
13689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13691$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013693# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013694if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013695 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013696if test "$withval" = no
13697then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13699$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013700elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013701then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13703$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013704else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013705fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13708$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709fi
13710
Guido van Rossum7f43da71994-08-01 12:15:30 +000013711
Stefan Krah1919b7e2012-03-21 18:25:23 +010013712# **************************************
13713# * Check for gcc x64 inline assembler *
13714# **************************************
13715
13716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13717$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13719/* end confdefs.h. */
13720
13721int
13722main ()
13723{
13724
13725 __asm__ __volatile__ ("movq %rcx, %rax");
13726
13727 ;
13728 return 0;
13729}
13730_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013731if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013732 have_gcc_asm_for_x64=yes
13733else
13734 have_gcc_asm_for_x64=no
13735fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013736rm -f core conftest.err conftest.$ac_objext \
13737 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13739$as_echo "$have_gcc_asm_for_x64" >&6; }
13740if test "$have_gcc_asm_for_x64" = yes
13741then
13742
13743$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13744
13745fi
13746
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013747# **************************************************
13748# * Check for various properties of floating point *
13749# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13752$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013753if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013755else
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013758 ac_cv_little_endian_double=no
13759else
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761/* end confdefs.h. */
13762
13763#include <string.h>
13764int main() {
13765 double x = 9006104071832581.0;
13766 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13767 return 0;
13768 else
13769 return 1;
13770}
13771
13772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013773if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013774 ac_cv_little_endian_double=yes
13775else
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013780fi
13781
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013782fi
13783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13785$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013786if test "$ac_cv_little_endian_double" = yes
13787then
13788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013790
13791fi
13792
Matthias Kloseb9621712010-04-24 17:59:49 +000013793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13794$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013795if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013797else
13798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013800 ac_cv_big_endian_double=no
13801else
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803/* end confdefs.h. */
13804
13805#include <string.h>
13806int main() {
13807 double x = 9006104071832581.0;
13808 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13809 return 0;
13810 else
13811 return 1;
13812}
13813
13814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013815if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816 ac_cv_big_endian_double=yes
13817else
Matthias Kloseb9621712010-04-24 17:59:49 +000013818 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013822fi
13823
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013824fi
13825
Matthias Kloseb9621712010-04-24 17:59:49 +000013826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13827$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013828if test "$ac_cv_big_endian_double" = yes
13829then
13830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013832
13833fi
13834
13835# Some ARM platforms use a mixed-endian representation for doubles.
13836# While Python doesn't currently have full support for these platforms
13837# (see e.g., issue 1762561), we can at least make sure that float <-> string
13838# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13840$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013841if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013843else
13844
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013846 ac_cv_mixed_endian_double=no
13847else
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013849/* end confdefs.h. */
13850
13851#include <string.h>
13852int main() {
13853 double x = 9006104071832581.0;
13854 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13855 return 0;
13856 else
13857 return 1;
13858}
13859
13860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013861if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013862 ac_cv_mixed_endian_double=yes
13863else
Matthias Kloseb9621712010-04-24 17:59:49 +000013864 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013868fi
13869
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013870fi
13871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13873$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013874if test "$ac_cv_mixed_endian_double" = yes
13875then
13876
Matthias Kloseb9621712010-04-24 17:59:49 +000013877$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013878
13879fi
13880
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013881# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013882# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013883# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013884# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013885# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013886# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013887
13888# This inline assembler syntax may also work for suncc and icc,
13889# so we try it on all platforms.
13890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13892$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013894/* end confdefs.h. */
13895
13896int
13897main ()
13898{
13899
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013900 unsigned short cw;
13901 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13902 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903
13904 ;
13905 return 0;
13906}
13907_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013908if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909 have_gcc_asm_for_x87=yes
13910else
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013912fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013913rm -f core conftest.err conftest.$ac_objext \
13914 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13916$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013917if test "$have_gcc_asm_for_x87" = yes
13918then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013922fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013923
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13925$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13927/* end confdefs.h. */
13928
13929int
13930main ()
13931{
13932
13933 unsigned int fpcr;
13934 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13935 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13936
13937 ;
13938 return 0;
13939}
13940_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013941if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013942 have_gcc_asm_for_mc68881=yes
13943else
13944 have_gcc_asm_for_mc68881=no
13945fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013946rm -f core conftest.err conftest.$ac_objext \
13947 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13949$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13950if test "$have_gcc_asm_for_mc68881" = yes
13951then
13952
13953$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13954
13955fi
13956
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013957# Detect whether system arithmetic is subject to x87-style double
13958# rounding issues. The result of this test has little meaning on non
13959# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13960# mode is round-to-nearest and double rounding issues are present, and
13961# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13963$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964# $BASECFLAGS may affect the result
13965ac_save_cc="$CC"
13966CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013968 ac_cv_x87_double_rounding=no
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013971/* end confdefs.h. */
13972
13973#include <stdlib.h>
13974#include <math.h>
13975int main() {
13976 volatile double x, y, z;
13977 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13978 x = 0.99999999999999989; /* 1-2**-53 */
13979 y = 1./x;
13980 if (y != 1.)
13981 exit(0);
13982 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13983 x = 1e16;
13984 y = 2.99999;
13985 z = x + y;
13986 if (z != 1e16+4.)
13987 exit(0);
13988 /* both tests show evidence of double rounding */
13989 exit(1);
13990}
13991
13992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013993if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013994 ac_cv_x87_double_rounding=no
13995else
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13999 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014000fi
14001
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014002CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14004$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014005if test "$ac_cv_x87_double_rounding" = yes
14006then
14007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014009
14010fi
14011
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014012# ************************************
14013# * Check for mathematical functions *
14014# ************************************
14015
14016LIBS_SAVE=$LIBS
14017LIBS="$LIBS $LIBM"
14018
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014019for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14020do :
14021 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14022ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014023if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014024 cat >>confdefs.h <<_ACEOF
14025#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14026_ACEOF
14027
14028fi
14029done
14030
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014031for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014032do :
14033 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14034ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014035if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014036 cat >>confdefs.h <<_ACEOF
14037#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14038_ACEOF
14039
14040fi
14041done
14042
14043ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14044"
Victor Stinnere0be4232011-10-25 13:06:09 +020014045if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014046 ac_have_decl=1
14047else
14048 ac_have_decl=0
14049fi
14050
14051cat >>confdefs.h <<_ACEOF
14052#define HAVE_DECL_ISINF $ac_have_decl
14053_ACEOF
14054ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14055"
Victor Stinnere0be4232011-10-25 13:06:09 +020014056if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014057 ac_have_decl=1
14058else
14059 ac_have_decl=0
14060fi
14061
14062cat >>confdefs.h <<_ACEOF
14063#define HAVE_DECL_ISNAN $ac_have_decl
14064_ACEOF
14065ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14066"
Victor Stinnere0be4232011-10-25 13:06:09 +020014067if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014068 ac_have_decl=1
14069else
14070 ac_have_decl=0
14071fi
14072
14073cat >>confdefs.h <<_ACEOF
14074#define HAVE_DECL_ISFINITE $ac_have_decl
14075_ACEOF
14076
14077
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014078# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14079# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14081$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014084else
14085
Matthias Kloseb9621712010-04-24 17:59:49 +000014086if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014087 ac_cv_tanh_preserves_zero_sign=no
14088else
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014090/* end confdefs.h. */
14091
14092#include <math.h>
14093#include <stdlib.h>
14094int main() {
14095 /* return 0 if either negative zeros don't exist
14096 on this platform or if negative zeros exist
14097 and tanh(-0.) == -0. */
14098 if (atan2(0., -1.) == atan2(-0., -1.) ||
14099 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14100 else exit(1);
14101}
14102
14103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014104if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014105 ac_cv_tanh_preserves_zero_sign=yes
14106else
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014111fi
14112
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014113fi
14114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14116$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014117if test "$ac_cv_tanh_preserves_zero_sign" = yes
14118then
14119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014121
14122fi
14123
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014124if test "$ac_cv_func_log1p" = yes
14125then
14126 # On some versions of AIX, log1p(-0.) returns 0. instead of
14127 # -0. See issue #9920.
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14129$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014130 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014131 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014132else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014133
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014134 if test "$cross_compiling" = yes; then :
14135 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014136else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14138/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014139
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014140 #include <math.h>
14141 #include <stdlib.h>
14142 int main() {
14143 /* Fail if the signs of log1p(-0.) and -0. can be
14144 distinguished. */
14145 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14146 return 0;
14147 else
14148 return 1;
14149 }
14150
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014151_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014152if ac_fn_c_try_run "$LINENO"; then :
14153 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014154else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014155 ac_cv_log1p_drops_zero_sign=yes
14156fi
14157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14158 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014159fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014160
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014161fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014162
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14164$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14165fi
14166if test "$ac_cv_log1p_drops_zero_sign" = yes
14167then
14168
14169$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14170
14171fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014172
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014173LIBS=$LIBS_SAVE
14174
Mark Dickinsona614f042009-11-28 12:48:43 +000014175# For multiprocessing module, check that sem_open
14176# actually works. For FreeBSD versions <= 7.2,
14177# the kernel module that provides POSIX semaphores
14178# isn't loaded by default, so an attempt to call
14179# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14181$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014182if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014184else
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014186 ac_cv_posix_semaphores_enabled=yes
14187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014189/* end confdefs.h. */
14190
14191#include <unistd.h>
14192#include <fcntl.h>
14193#include <stdio.h>
14194#include <semaphore.h>
14195#include <sys/stat.h>
14196
14197int main(void) {
14198 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14199 if (a == SEM_FAILED) {
14200 perror("sem_open");
14201 return 1;
14202 }
14203 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014204 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014205 return 0;
14206}
14207
14208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014209if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014210 ac_cv_posix_semaphores_enabled=yes
14211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014216fi
14217
14218
Mark Dickinsona614f042009-11-28 12:48:43 +000014219fi
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14222$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014223if test $ac_cv_posix_semaphores_enabled = no
14224then
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014227
14228fi
14229
Mark Dickinson10683072009-04-18 21:18:19 +000014230# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14232$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014233if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014235else
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014237 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014238else
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014240/* end confdefs.h. */
14241
14242#include <unistd.h>
14243#include <fcntl.h>
14244#include <stdio.h>
14245#include <semaphore.h>
14246#include <sys/stat.h>
14247
14248int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014249 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014250 int count;
14251 int res;
14252 if(a==SEM_FAILED){
14253 perror("sem_open");
14254 return 1;
14255
14256 }
14257 res = sem_getvalue(a, &count);
14258 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014259 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014260 return res==-1 ? 1 : 0;
14261}
14262
Mark Dickinson10683072009-04-18 21:18:19 +000014263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014264if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014265 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014266else
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14270 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014271fi
14272
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014274fi
14275
Matthias Kloseb9621712010-04-24 17:59:49 +000014276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14277$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014278if test $ac_cv_broken_sem_getvalue = yes
14279then
14280
Matthias Kloseb9621712010-04-24 17:59:49 +000014281$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014282
14283fi
14284
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014285ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14286"
14287if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14288 ac_have_decl=1
14289else
14290 ac_have_decl=0
14291fi
14292
14293cat >>confdefs.h <<_ACEOF
14294#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14295_ACEOF
14296ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14297"
14298if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14299 ac_have_decl=1
14300else
14301 ac_have_decl=0
14302fi
14303
14304cat >>confdefs.h <<_ACEOF
14305#define HAVE_DECL_RTLD_NOW $ac_have_decl
14306_ACEOF
14307ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14308"
14309if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14310 ac_have_decl=1
14311else
14312 ac_have_decl=0
14313fi
14314
14315cat >>confdefs.h <<_ACEOF
14316#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14317_ACEOF
14318ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14319"
14320if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14321 ac_have_decl=1
14322else
14323 ac_have_decl=0
14324fi
14325
14326cat >>confdefs.h <<_ACEOF
14327#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14328_ACEOF
14329ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14330"
14331if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14332 ac_have_decl=1
14333else
14334 ac_have_decl=0
14335fi
14336
14337cat >>confdefs.h <<_ACEOF
14338#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14339_ACEOF
14340ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14341"
14342if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14343 ac_have_decl=1
14344else
14345 ac_have_decl=0
14346fi
14347
14348cat >>confdefs.h <<_ACEOF
14349#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14350_ACEOF
14351ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14352"
14353if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14354 ac_have_decl=1
14355else
14356 ac_have_decl=0
14357fi
14358
14359cat >>confdefs.h <<_ACEOF
14360#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14361_ACEOF
14362
14363
Mark Dickinsonbd792642009-03-18 20:06:12 +000014364# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14366$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014367# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014368if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014369 enableval=$enable_big_digits; case $enable_big_digits in
14370yes)
14371 enable_big_digits=30 ;;
14372no)
14373 enable_big_digits=15 ;;
1437415|30)
14375 ;;
14376*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014377 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 +000014378esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14380$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014381
14382cat >>confdefs.h <<_ACEOF
14383#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14384_ACEOF
14385
14386
14387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14389$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014390fi
14391
14392
Guido van Rossumef2255b2000-03-10 22:30:29 +000014393# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014394ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014395if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
14397
Matthias Kloseb9621712010-04-24 17:59:49 +000014398$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014400 wchar_h="yes"
14401
Guido van Rossumef2255b2000-03-10 22:30:29 +000014402else
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014404
14405fi
14406
Michael W. Hudson54241132001-12-07 15:38:26 +000014407
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014409# determine wchar_t size
14410if test "$wchar_h" = yes
14411then
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14414# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14415# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14417$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014418if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014420else
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14422"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014423
Martin v. Löwis11437992002-04-12 09:54:03 +000014424else
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 if test "$ac_cv_type_wchar_t" = yes; then
14426 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14427$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014428as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014429See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430 else
14431 ac_cv_sizeof_wchar_t=0
14432 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014434
Martin v. Löwis11437992002-04-12 09:54:03 +000014435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14437$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438
14439
14440
Martin v. Löwis11437992002-04-12 09:54:03 +000014441cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014442#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014444
Michael W. Hudson54241132001-12-07 15:38:26 +000014445
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014446fi
14447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14449$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014450have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014452/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014453
14454#include <tcl.h>
14455#if TCL_UTF_MAX != 6
14456# error "NOT UCS4_TCL"
14457#endif
14458int
14459main ()
14460{
14461
14462 ;
14463 return 0;
14464}
14465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014466if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014467
14468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014470
14471 have_ucs4_tcl=yes
14472
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14476$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014477
Skip Montanaro6dead952003-09-25 14:50:04 +000014478# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014479if test "$wchar_h" = yes
14480then
14481 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14483$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014484 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014486else
14487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014489 ac_cv_wchar_t_signed=yes
14490else
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014492/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014493
14494 #include <wchar.h>
14495 int main()
14496 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014497 /* Success: exit code 0 */
14498 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014499 }
14500
14501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014502if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014503 ac_cv_wchar_t_signed=yes
14504else
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014509fi
14510
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014511fi
14512
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14514$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515fi
14516
Georg Brandl52d168a2008-01-07 18:10:24 +000014517# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014518if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014519 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014520then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014521 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014524
Georg Brandl52d168a2008-01-07 18:10:24 +000014525else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014526 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014527fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14529$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014530
14531# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14533$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014534if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014536else
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 ac_cv_c_bigendian=unknown
14538 # See if we're dealing with a universal compiler.
14539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540/* end confdefs.h. */
14541#ifndef __APPLE_CC__
14542 not a universal capable compiler
14543 #endif
14544 typedef int dummy;
14545
Skip Montanaro6dead952003-09-25 14:50:04 +000014546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014547if ac_fn_c_try_compile "$LINENO"; then :
14548
14549 # Check for potential -arch flags. It is not universal unless
14550 # there are at least two -arch flags with different values.
14551 ac_arch=
14552 ac_prev=
14553 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14554 if test -n "$ac_prev"; then
14555 case $ac_word in
14556 i?86 | x86_64 | ppc | ppc64)
14557 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14558 ac_arch=$ac_word
14559 else
14560 ac_cv_c_bigendian=universal
14561 break
14562 fi
14563 ;;
14564 esac
14565 ac_prev=
14566 elif test "x$ac_word" = "x-arch"; then
14567 ac_prev=arch
14568 fi
14569 done
14570fi
14571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14572 if test $ac_cv_c_bigendian = unknown; then
14573 # See if sys/param.h defines the BYTE_ORDER macro.
14574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014575/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014576#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014578
Martin v. Löwis11437992002-04-12 09:54:03 +000014579int
14580main ()
14581{
Matthias Kloseb9621712010-04-24 17:59:49 +000014582#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14583 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14584 && LITTLE_ENDIAN)
14585 bogus endian macros
14586 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014587
14588 ;
14589 return 0;
14590}
14591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014592if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014593 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014595/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014596#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014598
Martin v. Löwis11437992002-04-12 09:54:03 +000014599int
14600main ()
14601{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014602#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 not big endian
14604 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014605
14606 ;
14607 return 0;
14608}
14609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014610if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014611 ac_cv_c_bigendian=yes
14612else
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014616fi
14617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14618 fi
14619 if test $ac_cv_c_bigendian = unknown; then
14620 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014622/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014623#include <limits.h>
14624
Martin v. Löwis11437992002-04-12 09:54:03 +000014625int
14626main ()
14627{
Matthias Kloseb9621712010-04-24 17:59:49 +000014628#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14629 bogus endian macros
14630 #endif
14631
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ;
14633 return 0;
14634}
14635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014636if ac_fn_c_try_compile "$LINENO"; then :
14637 # It does; now see whether it defined to _BIG_ENDIAN or not.
14638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14639/* end confdefs.h. */
14640#include <limits.h>
14641
14642int
14643main ()
14644{
14645#ifndef _BIG_ENDIAN
14646 not big endian
14647 #endif
14648
14649 ;
14650 return 0;
14651}
14652_ACEOF
14653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014654 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014655else
Matthias Kloseb9621712010-04-24 17:59:49 +000014656 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14659fi
14660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14661 fi
14662 if test $ac_cv_c_bigendian = unknown; then
14663 # Compile a test program.
14664 if test "$cross_compiling" = yes; then :
14665 # Try to guess by grepping values from an object file.
14666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14667/* end confdefs.h. */
14668short int ascii_mm[] =
14669 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14670 short int ascii_ii[] =
14671 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14672 int use_ascii (int i) {
14673 return ascii_mm[i] + ascii_ii[i];
14674 }
14675 short int ebcdic_ii[] =
14676 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14677 short int ebcdic_mm[] =
14678 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14679 int use_ebcdic (int i) {
14680 return ebcdic_mm[i] + ebcdic_ii[i];
14681 }
14682 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683
Matthias Kloseb9621712010-04-24 17:59:49 +000014684int
14685main ()
14686{
14687return use_ascii (foo) == use_ebcdic (foo);
14688 ;
14689 return 0;
14690}
14691_ACEOF
14692if ac_fn_c_try_compile "$LINENO"; then :
14693 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14694 ac_cv_c_bigendian=yes
14695 fi
14696 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14697 if test "$ac_cv_c_bigendian" = unknown; then
14698 ac_cv_c_bigendian=no
14699 else
14700 # finding both strings is unlikely to happen, but who knows?
14701 ac_cv_c_bigendian=unknown
14702 fi
14703 fi
14704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014706else
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014708/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014710int
14711main ()
14712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 /* Are we little or big endian? From Harbison&Steele. */
14715 union
14716 {
14717 long int l;
14718 char c[sizeof (long int)];
14719 } u;
14720 u.l = 1;
14721 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722
14723 ;
14724 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014725}
Martin v. Löwis11437992002-04-12 09:54:03 +000014726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014727if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014728 ac_cv_c_bigendian=no
14729else
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14739$as_echo "$ac_cv_c_bigendian" >&6; }
14740 case $ac_cv_c_bigendian in #(
14741 yes)
14742 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14743;; #(
14744 no)
14745 ;; #(
14746 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014747
Matthias Kloseb9621712010-04-24 17:59:49 +000014748$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 ;; #(
14751 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014752 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014753 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014755
Michael W. Hudson54241132001-12-07 15:38:26 +000014756
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014757# ABI version string for Python extension modules. This appears between the
14758# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14759# from the following attributes which affect the ABI of this Python build (in
14760# this order):
14761#
14762# * The Python implementation (always 'cpython-' for us)
14763# * The major and minor version numbers
14764# * --with-pydebug (adds a 'd')
14765# * --with-pymalloc (adds a 'm')
14766# * --with-wide-unicode (adds a 'u')
14767#
14768# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014769# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14770# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014771
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14773$as_echo_n "checking ABIFLAGS... " >&6; }
14774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14775$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14777$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014778SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14780$as_echo "$SOABI" >&6; }
14781
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014782
14783case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014784 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014785 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14786 *)
14787 EXT_SUFFIX=${SHLIB_SUFFIX};;
14788esac
14789
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14791$as_echo_n "checking LDVERSION... " >&6; }
14792LDVERSION='$(VERSION)$(ABIFLAGS)'
14793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14794$as_echo "$LDVERSION" >&6; }
14795
doko@python.org87421192013-01-26 11:39:31 +010014796
doko@ubuntu.com55532312016-06-14 08:55:19 +020014797if test x$PLATFORM_TRIPLET = x; then
14798 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14799else
14800 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14801fi
doko@python.org87421192013-01-26 11:39:31 +010014802
14803
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014804# Check whether right shifting a negative integer extends the sign bit
14805# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14807$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014808if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014810else
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014813 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014814else
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014816/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014817
14818int main()
14819{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014820 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014821}
14822
Martin v. Löwis11437992002-04-12 09:54:03 +000014823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014824if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014825 ac_cv_rshift_extends_sign=yes
14826else
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014831fi
14832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833fi
14834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14836$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014837if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014838then
Martin v. Löwis11437992002-04-12 09:54:03 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014841
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014842fi
14843
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014844# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14846$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014847if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014849else
Martin v. Löwis11437992002-04-12 09:54:03 +000014850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014852/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014853#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014854int
14855main ()
14856{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014857
14858 FILE *f = fopen("/dev/null", "r");
14859 flockfile(f);
14860 getc_unlocked(f);
14861 funlockfile(f);
14862
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 ;
14864 return 0;
14865}
14866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014867if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014868 ac_cv_have_getc_unlocked=yes
14869else
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 ac_cv_have_getc_unlocked=no
14871fi
14872rm -f core conftest.err conftest.$ac_objext \
14873 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875
Matthias Kloseb9621712010-04-24 17:59:49 +000014876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14877$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014878if test "$ac_cv_have_getc_unlocked" = yes
14879then
Martin v. Löwis11437992002-04-12 09:54:03 +000014880
Matthias Kloseb9621712010-04-24 17:59:49 +000014881$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014882
14883fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014884
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014885# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014886# save the value of LIBS so we don't actually link Python with readline
14887LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014888
Gregory P. Smith18820942008-09-07 06:24:49 +000014889# On some systems we need to link readline to a termcap compatible
14890# library. NOTE: Keep the precedence of listed libraries synchronised
14891# with setup.py.
14892py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14894$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014895for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014896 if test -z "$py_libtermcap"; then
14897 READLINE_LIBS="-lreadline"
14898 else
14899 READLINE_LIBS="-lreadline -l$py_libtermcap"
14900 fi
14901 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014903/* end confdefs.h. */
14904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905/* Override any GCC internal prototype to avoid an error.
14906 Use char because int might match the return type of a GCC
14907 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014908#ifdef __cplusplus
14909extern "C"
14910#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014911char readline ();
14912int
14913main ()
14914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014916 ;
14917 return 0;
14918}
14919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014920if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014921 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014923rm -f core conftest.err conftest.$ac_objext \
14924 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014925 if test $py_cv_lib_readline = yes; then
14926 break
14927 fi
14928done
14929# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14930#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014931if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14933$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014934else
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14936$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014937
Matthias Kloseb9621712010-04-24 17:59:49 +000014938$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014939
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014940fi
14941
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014942# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014944/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014945#include <readline/readline.h>
14946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014947if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014948 have_readline=yes
14949else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014950 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014951
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014952fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014953rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014954if test $have_readline = yes
14955then
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014957/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014958#include <readline/readline.h>
14959
14960_ACEOF
14961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014965
14966fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014967rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014968
Matthias Kloseb9621712010-04-24 17:59:49 +000014969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014970/* end confdefs.h. */
14971#include <readline/readline.h>
14972
14973_ACEOF
14974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014978
14979fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014980rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014981
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014982fi
14983
Martin v. Löwis0daad592001-09-30 21:09:59 +000014984# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14986$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014987if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014989else
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014991LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995/* Override any GCC internal prototype to avoid an error.
14996 Use char because int might match the return type of a GCC
14997 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014998#ifdef __cplusplus
14999extern "C"
15000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015001char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015002int
15003main ()
15004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 ;
15007 return 0;
15008}
15009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015015rm -f core conftest.err conftest.$ac_objext \
15016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015017LIBS=$ac_check_lib_save_LIBS
15018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15020$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015021if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015022
Matthias Kloseb9621712010-04-24 17:59:49 +000015023$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015024
Martin v. Löwis0daad592001-09-30 21:09:59 +000015025fi
15026
Michael W. Hudson54241132001-12-07 15:38:26 +000015027
Thomas Wouters89d996e2007-09-08 17:39:28 +000015028# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15030$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015031if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015033else
15034 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015035LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015037/* end confdefs.h. */
15038
15039/* Override any GCC internal prototype to avoid an error.
15040 Use char because int might match the return type of a GCC
15041 builtin and then its argument prototype would still apply. */
15042#ifdef __cplusplus
15043extern "C"
15044#endif
15045char rl_completion_display_matches_hook ();
15046int
15047main ()
15048{
15049return rl_completion_display_matches_hook ();
15050 ;
15051 return 0;
15052}
15053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015054if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015055 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15056else
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015059rm -f core conftest.err conftest.$ac_objext \
15060 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015061LIBS=$ac_check_lib_save_LIBS
15062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15064$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015065if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015066
Matthias Kloseb9621712010-04-24 17:59:49 +000015067$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015068
15069fi
15070
15071
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015072# also in 4.0, but not in editline
15073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15074$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15075if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15076 $as_echo_n "(cached) " >&6
15077else
15078 ac_check_lib_save_LIBS=$LIBS
15079LIBS="-lreadline $READLINE_LIBS $LIBS"
15080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15081/* end confdefs.h. */
15082
15083/* Override any GCC internal prototype to avoid an error.
15084 Use char because int might match the return type of a GCC
15085 builtin and then its argument prototype would still apply. */
15086#ifdef __cplusplus
15087extern "C"
15088#endif
15089char rl_resize_terminal ();
15090int
15091main ()
15092{
15093return rl_resize_terminal ();
15094 ;
15095 return 0;
15096}
15097_ACEOF
15098if ac_fn_c_try_link "$LINENO"; then :
15099 ac_cv_lib_readline_rl_resize_terminal=yes
15100else
15101 ac_cv_lib_readline_rl_resize_terminal=no
15102fi
15103rm -f core conftest.err conftest.$ac_objext \
15104 conftest$ac_exeext conftest.$ac_ext
15105LIBS=$ac_check_lib_save_LIBS
15106fi
15107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15108$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15109if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15110
15111$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15112
15113fi
15114
15115
Martin v. Löwis0daad592001-09-30 21:09:59 +000015116# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15118$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015119if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015121else
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015123LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127/* Override any GCC internal prototype to avoid an error.
15128 Use char because int might match the return type of a GCC
15129 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015130#ifdef __cplusplus
15131extern "C"
15132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015133char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015134int
15135main ()
15136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015138 ;
15139 return 0;
15140}
15141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015142if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015144else
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015147rm -f core conftest.err conftest.$ac_objext \
15148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015149LIBS=$ac_check_lib_save_LIBS
15150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15152$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015153if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015154
Matthias Kloseb9621712010-04-24 17:59:49 +000015155$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015156
Guido van Rossum353ae582001-07-10 16:45:32 +000015157fi
15158
Jack Jansendd19cf82001-12-06 22:36:17 +000015159
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015160# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015162/* end confdefs.h. */
15163#include <readline/readline.h>
15164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015165if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015166 have_readline=yes
15167else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015168 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015169
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015170fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015171rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172if test $have_readline = yes
15173then
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015175/* end confdefs.h. */
15176#include <readline/readline.h>
15177
15178_ACEOF
15179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015183
15184fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015185rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015186
15187fi
15188
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15190$as_echo_n "checking for append_history in -lreadline... " >&6; }
15191if ${ac_cv_lib_readline_append_history+:} false; then :
15192 $as_echo_n "(cached) " >&6
15193else
15194 ac_check_lib_save_LIBS=$LIBS
15195LIBS="-lreadline $READLINE_LIBS $LIBS"
15196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15197/* end confdefs.h. */
15198
15199/* Override any GCC internal prototype to avoid an error.
15200 Use char because int might match the return type of a GCC
15201 builtin and then its argument prototype would still apply. */
15202#ifdef __cplusplus
15203extern "C"
15204#endif
15205char append_history ();
15206int
15207main ()
15208{
15209return append_history ();
15210 ;
15211 return 0;
15212}
15213_ACEOF
15214if ac_fn_c_try_link "$LINENO"; then :
15215 ac_cv_lib_readline_append_history=yes
15216else
15217 ac_cv_lib_readline_append_history=no
15218fi
15219rm -f core conftest.err conftest.$ac_objext \
15220 conftest$ac_exeext conftest.$ac_ext
15221LIBS=$ac_check_lib_save_LIBS
15222fi
15223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15224$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15225if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15226
15227$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15228
15229fi
15230
15231
Martin v. Löwis82bca632006-02-10 20:49:30 +000015232# End of readline checks: restore LIBS
15233LIBS=$LIBS_no_readline
15234
Matthias Kloseb9621712010-04-24 17:59:49 +000015235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15236$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015237if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015239else
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
Matthias Kloseb9621712010-04-24 17:59:49 +000015241if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015242 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015243else
Matthias Kloseb9621712010-04-24 17:59:49 +000015244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015245/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015246
15247int main()
15248{
15249 int val1 = nice(1);
15250 if (val1 != -1 && val1 == nice(2))
15251 exit(0);
15252 exit(1);
15253}
15254
Martin v. Löwis11437992002-04-12 09:54:03 +000015255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015256if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015257 ac_cv_broken_nice=yes
15258else
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015263fi
15264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265fi
15266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15268$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015269if test "$ac_cv_broken_nice" = yes
15270then
Martin v. Löwis11437992002-04-12 09:54:03 +000015271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015273
15274fi
15275
Matthias Kloseb9621712010-04-24 17:59:49 +000015276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15277$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015278if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015280else
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015282 ac_cv_broken_poll=no
15283else
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015285/* end confdefs.h. */
15286
15287#include <poll.h>
15288
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015289int main()
15290{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015291 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015292 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015293
15294 close (42);
15295
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015296 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015297 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015298 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015299 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015300 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015301 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015302 return 1;
15303}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015304
15305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015306if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015307 ac_cv_broken_poll=yes
15308else
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15312 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015315fi
15316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15318$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015319if test "$ac_cv_broken_poll" = yes
15320then
15321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015323
15324fi
15325
Brett Cannon43802422005-02-10 20:48:03 +000015326# 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 +000015327# (which is not required by ISO C or UNIX spec) and/or if we support
15328# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015329ac_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 +000015330#include <$ac_cv_struct_tm>
15331
Matthias Kloseb9621712010-04-24 17:59:49 +000015332"
Victor Stinnere0be4232011-10-25 13:06:09 +020015333if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015334
15335cat >>confdefs.h <<_ACEOF
15336#define HAVE_STRUCT_TM_TM_ZONE 1
15337_ACEOF
15338
15339
15340fi
15341
15342if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15343
Matthias Kloseb9621712010-04-24 17:59:49 +000015344$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015345
15346else
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15348"
Victor Stinnere0be4232011-10-25 13:06:09 +020015349if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353fi
15354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015356#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357_ACEOF
15358
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15360$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015361if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015363else
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015365/* end confdefs.h. */
15366#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367#if !HAVE_DECL_TZNAME
15368extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015369#endif
15370
15371int
15372main ()
15373{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015375 ;
15376 return 0;
15377}
15378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015379if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015380 ac_cv_var_tzname=yes
15381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015384rm -f core conftest.err conftest.$ac_objext \
15385 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15388$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015389 if test $ac_cv_var_tzname = yes; then
15390
Matthias Kloseb9621712010-04-24 17:59:49 +000015391$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015392
15393 fi
15394fi
15395
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015396
Martin v. Löwis1d459062005-03-14 21:23:33 +000015397# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15399$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015400if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015402else
15403
Matthias Kloseb9621712010-04-24 17:59:49 +000015404if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015405 ac_cv_working_tzset=no
15406else
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015408/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015409
15410#include <stdlib.h>
15411#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015412#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015413
15414#if HAVE_TZNAME
15415extern char *tzname[];
15416#endif
15417
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015418int main()
15419{
Brett Cannon18367812003-09-19 00:59:16 +000015420 /* Note that we need to ensure that not only does tzset(3)
15421 do 'something' with localtime, but it works as documented
15422 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015423 This includes making sure that tzname is set properly if
15424 tm->tm_zone does not exist since it is the alternative way
15425 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015426
15427 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015428 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015429 */
15430
Martin v. Löwis1d459062005-03-14 21:23:33 +000015431 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015432 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15433
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015434 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015435 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015436 if (localtime(&groundhogday)->tm_hour != 0)
15437 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015438#if HAVE_TZNAME
15439 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15440 if (strcmp(tzname[0], "UTC") ||
15441 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15442 exit(1);
15443#endif
Brett Cannon18367812003-09-19 00:59:16 +000015444
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015445 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015446 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015447 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015448 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015449#if HAVE_TZNAME
15450 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15451 exit(1);
15452#endif
Brett Cannon18367812003-09-19 00:59:16 +000015453
15454 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15455 tzset();
15456 if (localtime(&groundhogday)->tm_hour != 11)
15457 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015458#if HAVE_TZNAME
15459 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15460 exit(1);
15461#endif
15462
15463#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015464 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15465 exit(1);
15466 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15467 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015468#endif
Brett Cannon18367812003-09-19 00:59:16 +000015469
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015470 exit(0);
15471}
15472
15473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015474if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015475 ac_cv_working_tzset=yes
15476else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015481fi
15482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015483fi
15484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15486$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015487if test "$ac_cv_working_tzset" = yes
15488then
15489
Matthias Kloseb9621712010-04-24 17:59:49 +000015490$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015491
15492fi
15493
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015494# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15496$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015497if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015499else
Matthias Kloseb9621712010-04-24 17:59:49 +000015500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015501/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015502#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015503int
15504main ()
15505{
15506
15507struct stat st;
15508st.st_mtim.tv_nsec = 1;
15509
15510 ;
15511 return 0;
15512}
15513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015515 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15520fi
15521
Matthias Kloseb9621712010-04-24 17:59:49 +000015522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15523$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015524if test "$ac_cv_stat_tv_nsec" = yes
15525then
15526
Matthias Kloseb9621712010-04-24 17:59:49 +000015527$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015528
15529fi
15530
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015531# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15533$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015534if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015536else
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015538/* end confdefs.h. */
15539#include <sys/stat.h>
15540int
15541main ()
15542{
15543
15544struct stat st;
15545st.st_mtimespec.tv_nsec = 1;
15546
15547 ;
15548 return 0;
15549}
15550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015552 ac_cv_stat_tv_nsec2=yes
15553else
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15557fi
15558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15560$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015561if test "$ac_cv_stat_tv_nsec2" = yes
15562then
15563
Matthias Kloseb9621712010-04-24 17:59:49 +000015564$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015565
15566fi
15567
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015568# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015569ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015570if test "$cross_compiling" = no; then
15571 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15572fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015573
15574for ac_header in curses.h ncurses.h
15575do :
15576 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15577ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15578if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15579 cat >>confdefs.h <<_ACEOF
15580#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15581_ACEOF
15582
15583fi
15584
15585done
15586
15587
15588# On Solaris, term.h requires curses.h
15589for ac_header in term.h
15590do :
15591 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15592#ifdef HAVE_CURSES_H
15593#include <curses.h>
15594#endif
15595
15596"
15597if test "x$ac_cv_header_term_h" = xyes; then :
15598 cat >>confdefs.h <<_ACEOF
15599#define HAVE_TERM_H 1
15600_ACEOF
15601
15602fi
15603
15604done
15605
15606
Jack Jansen666b1e72001-10-31 12:11:48 +000015607# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15609$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015610if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015611 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015612else
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015614/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015615#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015616int
15617main ()
15618{
Jack Jansen666b1e72001-10-31 12:11:48 +000015619
15620 int rtn;
15621 rtn = mvwdelch(0,0,0);
15622
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 ;
15624 return 0;
15625}
15626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015627if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015628 ac_cv_mvwdelch_is_expression=yes
15629else
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15633fi
15634
Matthias Kloseb9621712010-04-24 17:59:49 +000015635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15636$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015637
15638if test "$ac_cv_mvwdelch_is_expression" = yes
15639then
Martin v. Löwis11437992002-04-12 09:54:03 +000015640
Matthias Kloseb9621712010-04-24 17:59:49 +000015641$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015642
15643fi
15644
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015645# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15646# structs since version 5.7. If the macro is defined as zero before including
15647# [n]curses.h, ncurses will expose fields of the structs regardless of the
15648# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15650$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015651if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015653else
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015655/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015656
15657 #define NCURSES_OPAQUE 0
15658 #include <curses.h>
15659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660int
15661main ()
15662{
Jack Jansen666b1e72001-10-31 12:11:48 +000015663
15664 WINDOW *w;
15665 w->_flags = 0;
15666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 ;
15668 return 0;
15669}
15670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015671if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015672 ac_cv_window_has_flags=yes
15673else
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15677fi
15678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15680$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015681
Jack Jansen666b1e72001-10-31 12:11:48 +000015682
15683if test "$ac_cv_window_has_flags" = yes
15684then
Martin v. Löwis11437992002-04-12 09:54:03 +000015685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015687
15688fi
15689
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15691$as_echo_n "checking for is_pad... " >&6; }
15692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15693/* end confdefs.h. */
15694#include <curses.h>
15695int
15696main ()
15697{
15698
15699#ifndef is_pad
15700void *x=is_pad
15701#endif
15702
15703 ;
15704 return 0;
15705}
15706_ACEOF
15707if ac_fn_c_try_compile "$LINENO"; then :
15708
15709$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15710
15711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15712$as_echo "yes" >&6; }
15713else
15714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15715$as_echo "no" >&6; }
15716
15717fi
15718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15721$as_echo_n "checking for is_term_resized... " >&6; }
15722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015723/* end confdefs.h. */
15724#include <curses.h>
15725int
15726main ()
15727{
15728void *x=is_term_resized
15729 ;
15730 return 0;
15731}
15732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015736
Matthias Kloseb159a552010-04-25 21:00:44 +000015737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015738$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015739else
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15741$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015742
15743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744rm -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 resize_term" >&5
15747$as_echo_n "checking for resize_term... " >&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=resize_term
15755 ;
15756 return 0;
15757}
15758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015759if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761$as_echo "#define HAVE_CURSES_RESIZE_TERM 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 resizeterm" >&5
15773$as_echo_n "checking for resizeterm... " >&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=resizeterm
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_RESIZETERM 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
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015797
15798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15799$as_echo_n "checking for immedok... " >&6; }
15800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15801/* end confdefs.h. */
15802#include <curses.h>
15803int
15804main ()
15805{
15806
15807#ifndef immedok
15808void *x=immedok
15809#endif
15810
15811 ;
15812 return 0;
15813}
15814_ACEOF
15815if ac_fn_c_try_compile "$LINENO"; then :
15816
15817$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15818
15819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15820$as_echo "yes" >&6; }
15821else
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15823$as_echo "no" >&6; }
15824
15825fi
15826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15827
15828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15829$as_echo_n "checking for syncok... " >&6; }
15830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15831/* end confdefs.h. */
15832#include <curses.h>
15833int
15834main ()
15835{
15836
15837#ifndef syncok
15838void *x=syncok
15839#endif
15840
15841 ;
15842 return 0;
15843}
15844_ACEOF
15845if ac_fn_c_try_compile "$LINENO"; then :
15846
15847$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15848
15849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15850$as_echo "yes" >&6; }
15851else
15852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15853$as_echo "no" >&6; }
15854
15855fi
15856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15857
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15859$as_echo_n "checking for wchgat... " >&6; }
15860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861/* end confdefs.h. */
15862#include <curses.h>
15863int
15864main ()
15865{
15866
15867#ifndef wchgat
15868void *x=wchgat
15869#endif
15870
15871 ;
15872 return 0;
15873}
15874_ACEOF
15875if ac_fn_c_try_compile "$LINENO"; then :
15876
15877$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15878
15879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15880$as_echo "yes" >&6; }
15881else
15882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15883$as_echo "no" >&6; }
15884
15885fi
15886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15887
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15889$as_echo_n "checking for filter... " >&6; }
15890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15891/* end confdefs.h. */
15892#include <curses.h>
15893int
15894main ()
15895{
15896
15897#ifndef filter
15898void *x=filter
15899#endif
15900
15901 ;
15902 return 0;
15903}
15904_ACEOF
15905if ac_fn_c_try_compile "$LINENO"; then :
15906
15907$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15908
15909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15910$as_echo "yes" >&6; }
15911else
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15913$as_echo "no" >&6; }
15914
15915fi
15916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15917
15918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15919$as_echo_n "checking for has_key... " >&6; }
15920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15921/* end confdefs.h. */
15922#include <curses.h>
15923int
15924main ()
15925{
15926
15927#ifndef has_key
15928void *x=has_key
15929#endif
15930
15931 ;
15932 return 0;
15933}
15934_ACEOF
15935if ac_fn_c_try_compile "$LINENO"; then :
15936
15937$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15938
15939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15940$as_echo "yes" >&6; }
15941else
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15943$as_echo "no" >&6; }
15944
15945fi
15946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15947
15948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15949$as_echo_n "checking for typeahead... " >&6; }
15950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951/* end confdefs.h. */
15952#include <curses.h>
15953int
15954main ()
15955{
15956
15957#ifndef typeahead
15958void *x=typeahead
15959#endif
15960
15961 ;
15962 return 0;
15963}
15964_ACEOF
15965if ac_fn_c_try_compile "$LINENO"; then :
15966
15967$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15968
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15970$as_echo "yes" >&6; }
15971else
15972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15973$as_echo "no" >&6; }
15974
15975fi
15976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15977
15978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15979$as_echo_n "checking for use_env... " >&6; }
15980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15981/* end confdefs.h. */
15982#include <curses.h>
15983int
15984main ()
15985{
15986
15987#ifndef use_env
15988void *x=use_env
15989#endif
15990
15991 ;
15992 return 0;
15993}
15994_ACEOF
15995if ac_fn_c_try_compile "$LINENO"; then :
15996
15997$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15998
15999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16000$as_echo "yes" >&6; }
16001else
16002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16003$as_echo "no" >&6; }
16004
16005fi
16006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016007# last curses configure check
16008CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016009
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16011$as_echo "$as_me: checking for device files" >&6;}
16012
16013if test "x$cross_compiling" = xyes; then
16014 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16016$as_echo_n "checking for /dev/ptmx... " >&6; }
16017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16018$as_echo "not set" >&6; }
16019 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16020 fi
16021 if test "${ac_cv_file__dev_ptc+set}" != set; then
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16023$as_echo_n "checking for /dev/ptc... " >&6; }
16024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16025$as_echo "not set" >&6; }
16026 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16027 fi
16028fi
16029
Matthias Kloseb9621712010-04-24 17:59:49 +000016030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16031$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016032if ${ac_cv_file__dev_ptmx+:} false; then :
16033 $as_echo_n "(cached) " >&6
16034else
16035 test "$cross_compiling" = yes &&
16036 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16037if test -r "/dev/ptmx"; then
16038 ac_cv_file__dev_ptmx=yes
16039else
16040 ac_cv_file__dev_ptmx=no
16041fi
16042fi
16043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16044$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16045if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016046
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016047fi
16048
16049if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016050
Matthias Kloseb9621712010-04-24 17:59:49 +000016051$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016052
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16055$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016056if ${ac_cv_file__dev_ptc+:} false; then :
16057 $as_echo_n "(cached) " >&6
16058else
16059 test "$cross_compiling" = yes &&
16060 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16061if test -r "/dev/ptc"; then
16062 ac_cv_file__dev_ptc=yes
16063else
16064 ac_cv_file__dev_ptc=no
16065fi
16066fi
16067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16068$as_echo "$ac_cv_file__dev_ptc" >&6; }
16069if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016070
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016071fi
16072
16073if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016074
Matthias Kloseb9621712010-04-24 17:59:49 +000016075$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016076
Neal Norwitz865400f2003-03-21 01:42:58 +000016077fi
16078
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016079if test $ac_sys_system = Darwin
16080then
16081 LIBS="$LIBS -framework CoreFoundation"
16082fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016083
Matthias Kloseb9621712010-04-24 17:59:49 +000016084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16085$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016086if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016087 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016088else
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016090 ac_cv_have_size_t_format="cross -- assuming yes"
16091
Thomas Wouters477c8d52006-05-27 19:21:47 +000016092else
Matthias Kloseb9621712010-04-24 17:59:49 +000016093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016094/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016095
Thomas Wouters477c8d52006-05-27 19:21:47 +000016096#include <stdio.h>
16097#include <stddef.h>
16098#include <string.h>
16099
Christian Heimes2c181612007-12-17 20:04:13 +000016100#ifdef HAVE_SYS_TYPES_H
16101#include <sys/types.h>
16102#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016103
16104#ifdef HAVE_SSIZE_T
16105typedef ssize_t Py_ssize_t;
16106#elif SIZEOF_VOID_P == SIZEOF_LONG
16107typedef long Py_ssize_t;
16108#else
16109typedef int Py_ssize_t;
16110#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016111
Christian Heimes2c181612007-12-17 20:04:13 +000016112int main()
16113{
16114 char buffer[256];
16115
Thomas Wouters477c8d52006-05-27 19:21:47 +000016116 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16117 return 1;
16118
Thomas Wouters89f507f2006-12-13 04:49:30 +000016119 if (strcmp(buffer, "123"))
16120 return 1;
16121
16122 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16123 return 1;
16124
16125 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016126 return 1;
16127
16128 return 0;
16129}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016130
Thomas Wouters477c8d52006-05-27 19:21:47 +000016131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016132if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016133 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016134else
Matthias Kloseb9621712010-04-24 17:59:49 +000016135 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016139fi
16140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16143$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016144if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016145
Matthias Kloseb9621712010-04-24 17:59:49 +000016146$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016147
16148fi
16149
Matthias Kloseb9621712010-04-24 17:59:49 +000016150ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016151#ifdef HAVE_SYS_TYPES_H
16152#include <sys/types.h>
16153#endif
16154#ifdef HAVE_SYS_SOCKET_H
16155#include <sys/socket.h>
16156#endif
16157
Matthias Kloseb9621712010-04-24 17:59:49 +000016158"
Victor Stinnere0be4232011-10-25 13:06:09 +020016159if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016160
Martin v. Löwis11437992002-04-12 09:54:03 +000016161else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016162
Matthias Kloseb9621712010-04-24 17:59:49 +000016163$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016164
16165fi
16166
Michael W. Hudson54241132001-12-07 15:38:26 +000016167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16169$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016170if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016171 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016172else
Matthias Kloseb9621712010-04-24 17:59:49 +000016173 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016174 ac_cv_broken_mbstowcs=no
16175else
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016177/* end confdefs.h. */
16178
Stefan Krah19c21392012-11-22 23:47:32 +010016179#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016180#include<stdlib.h>
16181int main() {
16182 size_t len = -1;
16183 const char *str = "text";
16184 len = mbstowcs(NULL, str, 0);
16185 return (len != 4);
16186}
16187
16188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016189if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016190 ac_cv_broken_mbstowcs=no
16191else
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16195 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016196fi
16197
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016198fi
16199
Matthias Kloseb9621712010-04-24 17:59:49 +000016200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16201$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016202if test "$ac_cv_broken_mbstowcs" = yes
16203then
16204
Matthias Kloseb9621712010-04-24 17:59:49 +000016205$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016206
16207fi
16208
Antoine Pitroub52ec782009-01-25 16:34:23 +000016209# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16211$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016212
16213# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016214if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016215 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016216if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016217then
16218
Matthias Kloseb9621712010-04-24 17:59:49 +000016219$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016220
Matthias Kloseb9621712010-04-24 17:59:49 +000016221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16222$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016223fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016224if test "$withval" = no
16225then
16226
16227$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16228
Matthias Kloseb9621712010-04-24 17:59:49 +000016229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16230$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016231fi
16232
Antoine Pitrou042b1282010-08-13 21:15:58 +000016233else
16234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16235$as_echo "no value specified" >&6; }
16236fi
16237
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238
Matthias Kloseb17289e2012-03-15 19:51:34 +010016239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16240$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16241if ${ac_cv_computed_gotos+:} false; then :
16242 $as_echo_n "(cached) " >&6
16243else
16244 if test "$cross_compiling" = yes; then :
16245 if test "${with_computed_gotos+set}" = set; then
16246 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16247 else
16248 ac_cv_computed_gotos=no
16249 fi
16250else
16251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16252/* end confdefs.h. */
16253
16254int main(int argc, char **argv)
16255{
16256 static void *targets[1] = { &&LABEL1 };
16257 goto LABEL2;
16258LABEL1:
16259 return 0;
16260LABEL2:
16261 goto *targets[0];
16262 return 1;
16263}
16264
16265_ACEOF
16266if ac_fn_c_try_run "$LINENO"; then :
16267 ac_cv_computed_gotos=yes
16268else
16269 ac_cv_computed_gotos=no
16270fi
16271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16272 conftest.$ac_objext conftest.beam conftest.$ac_ext
16273fi
16274
16275fi
16276
16277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16278$as_echo "$ac_cv_computed_gotos" >&6; }
16279case "$ac_cv_computed_gotos" in yes*)
16280
16281$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16282
16283esac
16284
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016285case $ac_sys_system in
16286AIX*)
16287
16288$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16289 ;;
16290esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016291
Michael W. Hudson54241132001-12-07 15:38:26 +000016292
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016293
16294
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016295for h in `(cd $srcdir;echo Python/thread_*.h)`
16296do
16297 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16298done
16299
Michael W. Hudson54241132001-12-07 15:38:26 +000016300
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016301SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16303$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016304for dir in $SRCDIRS; do
16305 if test ! -d $dir; then
16306 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016307 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016308done
Matthias Kloseb9621712010-04-24 17:59:49 +000016309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16310$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016311
Stefan Krah1919b7e2012-03-21 18:25:23 +010016312# Availability of -O2:
16313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16314$as_echo_n "checking for -O2... " >&6; }
16315saved_cflags="$CFLAGS"
16316CFLAGS="-O2"
16317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16318/* end confdefs.h. */
16319
16320int
16321main ()
16322{
16323
16324
16325 ;
16326 return 0;
16327}
16328_ACEOF
16329if ac_fn_c_try_compile "$LINENO"; then :
16330 have_O2=yes
16331else
16332 have_O2=no
16333fi
16334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16336$as_echo "$have_O2" >&6; }
16337CFLAGS="$saved_cflags"
16338
16339# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16340# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16342$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16343saved_cflags="$CFLAGS"
16344CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16345if test "$have_O2" = no; then
16346 CFLAGS=""
16347fi
16348if test "$cross_compiling" = yes; then :
16349 have_glibc_memmove_bug=undefined
16350else
16351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16352/* end confdefs.h. */
16353
16354#include <stdio.h>
16355#include <stdlib.h>
16356#include <string.h>
16357void foo(void *p, void *q) { memmove(p, q, 19); }
16358int main() {
16359 char a[32] = "123456789000000000";
16360 foo(&a[9], a);
16361 if (strcmp(a, "123456789123456789000000000") != 0)
16362 return 1;
16363 foo(a, &a[9]);
16364 if (strcmp(a, "123456789000000000") != 0)
16365 return 1;
16366 return 0;
16367}
16368
16369_ACEOF
16370if ac_fn_c_try_run "$LINENO"; then :
16371 have_glibc_memmove_bug=no
16372else
16373 have_glibc_memmove_bug=yes
16374fi
16375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16376 conftest.$ac_objext conftest.beam conftest.$ac_ext
16377fi
16378
16379CFLAGS="$saved_cflags"
16380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16381$as_echo "$have_glibc_memmove_bug" >&6; }
16382if test "$have_glibc_memmove_bug" = yes; then
16383
16384$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16385
16386fi
16387
16388if test "$have_gcc_asm_for_x87" = yes; then
16389 # Some versions of gcc miscompile inline asm:
16390 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16391 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16392 case $CC in
16393 *gcc*)
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16395$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16396 saved_cflags="$CFLAGS"
16397 CFLAGS="-O2"
16398 if test "$cross_compiling" = yes; then :
16399 have_ipa_pure_const_bug=undefined
16400else
16401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16402/* end confdefs.h. */
16403
16404 __attribute__((noinline)) int
16405 foo(int *p) {
16406 int r;
16407 asm ( "movl \$6, (%1)\n\t"
16408 "xorl %0, %0\n\t"
16409 : "=r" (r) : "r" (p) : "memory"
16410 );
16411 return r;
16412 }
16413 int main() {
16414 int p = 8;
16415 if ((foo(&p) ? : p) != 6)
16416 return 1;
16417 return 0;
16418 }
16419
16420_ACEOF
16421if ac_fn_c_try_run "$LINENO"; then :
16422 have_ipa_pure_const_bug=no
16423else
16424 have_ipa_pure_const_bug=yes
16425fi
16426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16427 conftest.$ac_objext conftest.beam conftest.$ac_ext
16428fi
16429
16430 CFLAGS="$saved_cflags"
16431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16432$as_echo "$have_ipa_pure_const_bug" >&6; }
16433 if test "$have_ipa_pure_const_bug" = yes; then
16434
16435$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16436
16437 fi
16438 ;;
16439 esac
16440fi
16441
Victor Stinner4f5366e2015-01-09 02:13:19 +010016442# Check for stdatomic.h
16443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16444$as_echo_n "checking for stdatomic.h... " >&6; }
16445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16446/* end confdefs.h. */
16447
16448
16449 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016450 atomic_int value = ATOMIC_VAR_INIT(1);
16451 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016452 int main() {
16453 int loaded_value = atomic_load(&value);
16454 return 0;
16455 }
16456
16457
16458_ACEOF
16459if ac_fn_c_try_link "$LINENO"; then :
16460 have_stdatomic_h=yes
16461else
16462 have_stdatomic_h=no
16463fi
16464rm -f core conftest.err conftest.$ac_objext \
16465 conftest$ac_exeext conftest.$ac_ext
16466
16467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16468$as_echo "$have_stdatomic_h" >&6; }
16469
16470if test "$have_stdatomic_h" = yes; then
16471
16472$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16473
16474fi
16475
16476# Check for GCC >= 4.7 __atomic builtins
16477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16478$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16480/* end confdefs.h. */
16481
16482
16483 volatile int val = 1;
16484 int main() {
16485 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16486 return 0;
16487 }
16488
16489
16490_ACEOF
16491if ac_fn_c_try_link "$LINENO"; then :
16492 have_builtin_atomic=yes
16493else
16494 have_builtin_atomic=no
16495fi
16496rm -f core conftest.err conftest.$ac_objext \
16497 conftest$ac_exeext conftest.$ac_ext
16498
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16500$as_echo "$have_builtin_atomic" >&6; }
16501
16502if test "$have_builtin_atomic" = yes; then
16503
16504$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16505
16506fi
16507
Ned Deily322f5ba2013-11-21 23:01:59 -080016508# ensurepip option
16509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16510$as_echo_n "checking for ensurepip... " >&6; }
16511
16512# Check whether --with-ensurepip was given.
16513if test "${with_ensurepip+set}" = set; then :
16514 withval=$with_ensurepip;
16515else
16516 with_ensurepip=upgrade
16517fi
16518
16519case $with_ensurepip in #(
16520 yes|upgrade) :
16521 ENSUREPIP=upgrade ;; #(
16522 install) :
16523 ENSUREPIP=install ;; #(
16524 no) :
16525 ENSUREPIP=no ;; #(
16526 *) :
16527 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16528esac
16529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16530$as_echo "$ENSUREPIP" >&6; }
16531
16532
Victor Stinner35a97c02015-03-08 02:59:09 +010016533# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16535$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16537/* end confdefs.h. */
16538
16539
16540 #include <dirent.h>
16541
16542 int main() {
16543 struct dirent entry;
16544 return entry.d_type == DT_UNKNOWN;
16545 }
16546
16547
16548_ACEOF
16549if ac_fn_c_try_link "$LINENO"; then :
16550 have_dirent_d_type=yes
16551else
16552 have_dirent_d_type=no
16553fi
16554rm -f core conftest.err conftest.$ac_objext \
16555 conftest$ac_exeext conftest.$ac_ext
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16557$as_echo "$have_dirent_d_type" >&6; }
16558
16559if test "$have_dirent_d_type" = yes; then
16560
16561$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16562
16563fi
16564
Victor Stinner9eb57c52015-03-19 22:21:49 +010016565# check if the Linux getrandom() syscall is available
16566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16567$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16569/* end confdefs.h. */
16570
16571
Victor Stinner1b80b242016-04-12 22:34:58 +020016572 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016573 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016574 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016575
16576 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016577 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016578 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016579 const int flags = GRND_NONBLOCK;
16580 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016581 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016582 return 0;
16583 }
16584
16585
16586_ACEOF
16587if ac_fn_c_try_link "$LINENO"; then :
16588 have_getrandom_syscall=yes
16589else
16590 have_getrandom_syscall=no
16591fi
16592rm -f core conftest.err conftest.$ac_objext \
16593 conftest$ac_exeext conftest.$ac_ext
16594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16595$as_echo "$have_getrandom_syscall" >&6; }
16596
16597if test "$have_getrandom_syscall" = yes; then
16598
16599$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16600
16601fi
16602
Victor Stinner3abf44e2015-09-18 15:38:37 +020016603# check if the getrandom() function is available
16604# the test was written for the Solaris function of <sys/random.h>
16605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16606$as_echo_n "checking for the getrandom() function... " >&6; }
16607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16608/* end confdefs.h. */
16609
16610
16611 #include <sys/random.h>
16612
16613 int main() {
16614 char buffer[1];
16615 const size_t buflen = sizeof(buffer);
16616 const int flags = 0;
16617 /* ignore the result, Python checks for ENOSYS at runtime */
16618 (void)getrandom(buffer, buflen, flags);
16619 return 0;
16620 }
16621
16622
16623_ACEOF
16624if ac_fn_c_try_link "$LINENO"; then :
16625 have_getrandom=yes
16626else
16627 have_getrandom=no
16628fi
16629rm -f core conftest.err conftest.$ac_objext \
16630 conftest$ac_exeext conftest.$ac_ext
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16632$as_echo "$have_getrandom" >&6; }
16633
16634if test "$have_getrandom" = yes; then
16635
16636$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16637
16638fi
16639
Guido van Rossum627b2d71993-12-24 10:39:16 +000016640# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016641ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016642
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016643ac_config_files="$ac_config_files Modules/ld_so_aix"
16644
Martin v. Löwis11437992002-04-12 09:54:03 +000016645cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016646# This file is a shell script that caches the results of configure
16647# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016648# scripts and configure runs, see configure's option --config-cache.
16649# It is not useful on other systems. If it contains results you don't
16650# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016651#
Martin v. Löwis11437992002-04-12 09:54:03 +000016652# config.status only pays attention to the cache file if you give it
16653# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016654#
Skip Montanaro6dead952003-09-25 14:50:04 +000016655# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016656# loading this file, other *unset* `ac_cv_foo' will be assigned the
16657# following values.
16658
16659_ACEOF
16660
Guido van Rossumf78abae1997-01-21 22:02:36 +000016661# The following way of writing the cache mishandles newlines in values,
16662# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016664# Ultrix sh set writes to stderr and can't be redirected directly,
16665# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016666(
16667 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16668 eval ac_val=\$$ac_var
16669 case $ac_val in #(
16670 *${as_nl}*)
16671 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016672 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16673$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674 esac
16675 case $ac_var in #(
16676 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016677 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16678 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016679 esac ;;
16680 esac
16681 done
16682
Martin v. Löwis11437992002-04-12 09:54:03 +000016683 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16685 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016686 # `set' does not quote correctly, so add quotes: double-quote
16687 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016689 "s/'/'\\\\''/g;
16690 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 *)
16693 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696 esac |
16697 sort
16698) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016701 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016703 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16704 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16706 :end' >>confcache
16707if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16708 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016709 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016710 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16711$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016712 if test ! -f "$cache_file" || test -h "$cache_file"; then
16713 cat confcache >"$cache_file"
16714 else
16715 case $cache_file in #(
16716 */* | ?:*)
16717 mv -f confcache "$cache_file"$$ &&
16718 mv -f "$cache_file"$$ "$cache_file" ;; #(
16719 *)
16720 mv -f confcache "$cache_file" ;;
16721 esac
16722 fi
16723 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016724 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016725 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16726$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016727 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016728fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016729rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016730
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016731test "x$prefix" = xNONE && prefix=$ac_default_prefix
16732# Let make expand exec_prefix.
16733test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016735DEFS=-DHAVE_CONFIG_H
16736
Skip Montanaro6dead952003-09-25 14:50:04 +000016737ac_libobjs=
16738ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016739U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016740for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16741 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016743 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16745 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016746 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16747 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016748done
16749LIBOBJS=$ac_libobjs
16750
16751LTLIBOBJS=$ac_ltlibobjs
16752
16753
Martin v. Löwis11437992002-04-12 09:54:03 +000016754
Matthias Kloseb9621712010-04-24 17:59:49 +000016755
Victor Stinnere0be4232011-10-25 13:06:09 +020016756: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016757ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016758ac_clean_files_save=$ac_clean_files
16759ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016760{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16761$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16762as_write_fail=0
16763cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016764#! $SHELL
16765# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016766# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016767# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016768# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016769
Martin v. Löwis11437992002-04-12 09:54:03 +000016770debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016771ac_cs_recheck=false
16772ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016773
Matthias Kloseb9621712010-04-24 17:59:49 +000016774SHELL=\${CONFIG_SHELL-$SHELL}
16775export SHELL
16776_ASEOF
16777cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16778## -------------------- ##
16779## M4sh Initialization. ##
16780## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016782# Be more Bourne compatible
16783DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016784if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016785 emulate sh
16786 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016787 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016788 # is contrary to our usage. Disable this feature.
16789 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016791else
Matthias Kloseb9621712010-04-24 17:59:49 +000016792 case `(set -o) 2>/dev/null` in #(
16793 *posix*) :
16794 set -o posix ;; #(
16795 *) :
16796 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016797esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016798fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016799
16800
Matthias Kloseb9621712010-04-24 17:59:49 +000016801as_nl='
16802'
16803export as_nl
16804# Printing a long string crashes Solaris 7 /usr/bin/printf.
16805as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16806as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16807as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16808# Prefer a ksh shell builtin over an external printf program on Solaris,
16809# but without wasting forks for bash or zsh.
16810if test -z "$BASH_VERSION$ZSH_VERSION" \
16811 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16812 as_echo='print -r --'
16813 as_echo_n='print -rn --'
16814elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16815 as_echo='printf %s\n'
16816 as_echo_n='printf %s'
16817else
16818 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16819 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16820 as_echo_n='/usr/ucb/echo -n'
16821 else
16822 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16823 as_echo_n_body='eval
16824 arg=$1;
16825 case $arg in #(
16826 *"$as_nl"*)
16827 expr "X$arg" : "X\\(.*\\)$as_nl";
16828 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16829 esac;
16830 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16831 '
16832 export as_echo_n_body
16833 as_echo_n='sh -c $as_echo_n_body as_echo'
16834 fi
16835 export as_echo_body
16836 as_echo='sh -c $as_echo_body as_echo'
16837fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016838
16839# The user is always right.
16840if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016841 PATH_SEPARATOR=:
16842 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16843 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16844 PATH_SEPARATOR=';'
16845 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016848
16849# IFS
16850# We need space, tab and new line, in precisely that order. Quoting is
16851# there to prevent editors from complaining about space-tab.
16852# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16853# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016854IFS=" "" $as_nl"
16855
16856# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016857as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016858case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859 *[\\/]* ) as_myself=$0 ;;
16860 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016861for as_dir in $PATH
16862do
16863 IFS=$as_save_IFS
16864 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016865 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16866 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016867IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869 ;;
16870esac
16871# We did not find ourselves, most probably we were run as `sh COMMAND'
16872# in which case we are not to be found in the path.
16873if test "x$as_myself" = x; then
16874 as_myself=$0
16875fi
16876if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016877 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16878 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879fi
16880
Matthias Kloseb9621712010-04-24 17:59:49 +000016881# Unset variables that we do not need and which cause bugs (e.g. in
16882# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16883# suppresses any "Segmentation fault" message there. '((' could
16884# trigger a bug in pdksh 5.2.14.
16885for as_var in BASH_ENV ENV MAIL MAILPATH
16886do eval test x\${$as_var+set} = xset \
16887 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888done
16889PS1='$ '
16890PS2='> '
16891PS4='+ '
16892
16893# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016894LC_ALL=C
16895export LC_ALL
16896LANGUAGE=C
16897export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898
Matthias Kloseb9621712010-04-24 17:59:49 +000016899# CDPATH.
16900(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16901
16902
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016903# as_fn_error STATUS ERROR [LINENO LOG_FD]
16904# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016905# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16906# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016907# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016908as_fn_error ()
16909{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016910 as_status=$1; test $as_status -eq 0 && as_status=1
16911 if test "$4"; then
16912 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16913 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016914 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016915 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016916 as_fn_exit $as_status
16917} # as_fn_error
16918
16919
16920# as_fn_set_status STATUS
16921# -----------------------
16922# Set $? to STATUS, without forking.
16923as_fn_set_status ()
16924{
16925 return $1
16926} # as_fn_set_status
16927
16928# as_fn_exit STATUS
16929# -----------------
16930# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16931as_fn_exit ()
16932{
16933 set +e
16934 as_fn_set_status $1
16935 exit $1
16936} # as_fn_exit
16937
16938# as_fn_unset VAR
16939# ---------------
16940# Portably unset VAR.
16941as_fn_unset ()
16942{
16943 { eval $1=; unset $1;}
16944}
16945as_unset=as_fn_unset
16946# as_fn_append VAR VALUE
16947# ----------------------
16948# Append the text in VALUE to the end of the definition contained in VAR. Take
16949# advantage of any shell optimizations that allow amortized linear growth over
16950# repeated appends, instead of the typical quadratic growth present in naive
16951# implementations.
16952if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16953 eval 'as_fn_append ()
16954 {
16955 eval $1+=\$2
16956 }'
16957else
16958 as_fn_append ()
16959 {
16960 eval $1=\$$1\$2
16961 }
16962fi # as_fn_append
16963
16964# as_fn_arith ARG...
16965# ------------------
16966# Perform arithmetic evaluation on the ARGs, and store the result in the
16967# global $as_val. Take advantage of shells that can avoid forks. The arguments
16968# must be portable across $(()) and expr.
16969if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16970 eval 'as_fn_arith ()
16971 {
16972 as_val=$(( $* ))
16973 }'
16974else
16975 as_fn_arith ()
16976 {
16977 as_val=`expr "$@" || test $? -eq 1`
16978 }
16979fi # as_fn_arith
16980
16981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982if expr a : '\(a\)' >/dev/null 2>&1 &&
16983 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16984 as_expr=expr
16985else
16986 as_expr=false
16987fi
16988
16989if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16990 as_basename=basename
16991else
16992 as_basename=false
16993fi
16994
Matthias Kloseb9621712010-04-24 17:59:49 +000016995if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16996 as_dirname=dirname
16997else
16998 as_dirname=false
16999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017001as_me=`$as_basename -- "$0" ||
17002$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17003 X"$0" : 'X\(//\)$' \| \
17004 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017005$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006 sed '/^.*\/\([^/][^/]*\)\/*$/{
17007 s//\1/
17008 q
17009 }
17010 /^X\/\(\/\/\)$/{
17011 s//\1/
17012 q
17013 }
17014 /^X\/\(\/\).*/{
17015 s//\1/
17016 q
17017 }
17018 s/.*/./; q'`
17019
Matthias Kloseb9621712010-04-24 17:59:49 +000017020# Avoid depending upon Character Ranges.
17021as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17022as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17023as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17024as_cr_digits='0123456789'
17025as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026
17027ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017028case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017030 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017032 xy) ECHO_C='\c';;
17033 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17034 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035 esac;;
17036*)
17037 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017039
Martin v. Löwis11437992002-04-12 09:54:03 +000017040rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017041if test -d conf$$.dir; then
17042 rm -f conf$$.dir/conf$$.file
17043else
17044 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017045 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017047if (echo >conf$$.file) 2>/dev/null; then
17048 if ln -s conf$$.file conf$$ 2>/dev/null; then
17049 as_ln_s='ln -s'
17050 # ... but there are two gotchas:
17051 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17052 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017053 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017054 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017055 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 elif ln conf$$.file conf$$ 2>/dev/null; then
17057 as_ln_s=ln
17058 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017059 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017060 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017061else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017062 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17065rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017066
Matthias Kloseb9621712010-04-24 17:59:49 +000017067
17068# as_fn_mkdir_p
17069# -------------
17070# Create "$as_dir" as a directory, including parents if necessary.
17071as_fn_mkdir_p ()
17072{
17073
17074 case $as_dir in #(
17075 -*) as_dir=./$as_dir;;
17076 esac
17077 test -d "$as_dir" || eval $as_mkdir_p || {
17078 as_dirs=
17079 while :; do
17080 case $as_dir in #(
17081 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17082 *) as_qdir=$as_dir;;
17083 esac
17084 as_dirs="'$as_qdir' $as_dirs"
17085 as_dir=`$as_dirname -- "$as_dir" ||
17086$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17087 X"$as_dir" : 'X\(//\)[^/]' \| \
17088 X"$as_dir" : 'X\(//\)$' \| \
17089 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17090$as_echo X"$as_dir" |
17091 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17092 s//\1/
17093 q
17094 }
17095 /^X\(\/\/\)[^/].*/{
17096 s//\1/
17097 q
17098 }
17099 /^X\(\/\/\)$/{
17100 s//\1/
17101 q
17102 }
17103 /^X\(\/\).*/{
17104 s//\1/
17105 q
17106 }
17107 s/.*/./; q'`
17108 test -d "$as_dir" && break
17109 done
17110 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017111 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017112
17113
17114} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017115if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017116 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017117else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017118 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017119 as_mkdir_p=false
17120fi
17121
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017122
17123# as_fn_executable_p FILE
17124# -----------------------
17125# Test if FILE is an executable regular file.
17126as_fn_executable_p ()
17127{
17128 test -f "$1" && test -x "$1"
17129} # as_fn_executable_p
17130as_test_x='test -x'
17131as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017132
17133# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134as_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 +000017135
17136# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017137as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017138
17139
Martin v. Löwis11437992002-04-12 09:54:03 +000017140exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017141## ----------------------------------- ##
17142## Main body of $CONFIG_STATUS script. ##
17143## ----------------------------------- ##
17144_ASEOF
17145test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017146
Matthias Kloseb9621712010-04-24 17:59:49 +000017147cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17148# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017149# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150# values after options handling.
17151ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017152This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017153generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
17155 CONFIG_FILES = $CONFIG_FILES
17156 CONFIG_HEADERS = $CONFIG_HEADERS
17157 CONFIG_LINKS = $CONFIG_LINKS
17158 CONFIG_COMMANDS = $CONFIG_COMMANDS
17159 $ $0 $@
17160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017161on `(hostname || uname -n) 2>/dev/null | sed 1q`
17162"
17163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164_ACEOF
17165
Matthias Kloseb9621712010-04-24 17:59:49 +000017166case $ac_config_files in *"
17167"*) set x $ac_config_files; shift; ac_config_files=$*;;
17168esac
17169
17170case $ac_config_headers in *"
17171"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17172esac
17173
17174
17175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017176# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017177config_files="$ac_config_files"
17178config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017181
Matthias Kloseb9621712010-04-24 17:59:49 +000017182cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017183ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017184\`$as_me' instantiates files and other configuration actions
17185from templates according to the current configuration. Unless the files
17186and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017187
Matthias Kloseb9621712010-04-24 17:59:49 +000017188Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017189
17190 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017192 --config print configuration, then exit
17193 -q, --quiet, --silent
17194 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017195 -d, --debug don't remove temporary files
17196 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017197 --file=FILE[:TEMPLATE]
17198 instantiate the configuration file FILE
17199 --header=FILE[:TEMPLATE]
17200 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017201
17202Configuration files:
17203$config_files
17204
17205Configuration headers:
17206$config_headers
17207
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017208Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017211cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17212ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017213ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017214python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017215configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017216 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017217
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017218Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017219This config.status script is free software; the Free Software Foundation
17220gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221
17222ac_pwd='$ac_pwd'
17223srcdir='$srcdir'
17224INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017225MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017226test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017227_ACEOF
17228
Matthias Kloseb9621712010-04-24 17:59:49 +000017229cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17230# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017231ac_need_defaults=:
17232while test $# != 0
17233do
17234 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017235 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17237 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017238 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017239 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017240 --*=)
17241 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17242 ac_optarg=
17243 ac_shift=:
17244 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017245 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017246 ac_option=$1
17247 ac_optarg=$2
17248 ac_shift=shift
17249 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 esac
17251
Skip Montanaro6dead952003-09-25 14:50:04 +000017252 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017254 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17255 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017257 $as_echo "$ac_cs_version"; exit ;;
17258 --config | --confi | --conf | --con | --co | --c )
17259 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017261 debug=: ;;
17262 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017263 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017264 case $ac_optarg in
17265 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017266 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017267 esac
17268 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017269 ac_need_defaults=false;;
17270 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017271 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017272 case $ac_optarg in
17273 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17274 esac
17275 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017276 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 --he | --h)
17278 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017279 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017280Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017282 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017283 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17284 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17285 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017286
17287 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017288 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017289Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017290
Matthias Kloseb9621712010-04-24 17:59:49 +000017291 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017293
17294 esac
17295 shift
17296done
17297
Skip Montanaro6dead952003-09-25 14:50:04 +000017298ac_configure_extra_args=
17299
17300if $ac_cs_silent; then
17301 exec 6>/dev/null
17302 ac_configure_extra_args="$ac_configure_extra_args --silent"
17303fi
17304
17305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017307if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017308 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017309 shift
17310 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17311 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017313 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017314fi
17315
Martin v. Löwis11437992002-04-12 09:54:03 +000017316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017317cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318exec 5>>config.log
17319{
17320 echo
17321 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17322## Running $as_me. ##
17323_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017324 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017330
Matthias Kloseb9621712010-04-24 17:59:49 +000017331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017332
17333# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017334for ac_config_target in $ac_config_targets
17335do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336 case $ac_config_target in
17337 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17338 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17339 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017340 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17341 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017343 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017344 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017345 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346
Victor Stinnere0be4232011-10-25 13:06:09 +020017347 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 esac
17349done
17350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351
Martin v. Löwis11437992002-04-12 09:54:03 +000017352# If the user did not use the arguments to specify the items to instantiate,
17353# then the envvar interface is used. Set only those that are not.
17354# We use the long form for the default assignment because of an extremely
17355# bizarre bug on SunOS 4.1.3.
17356if $ac_need_defaults; then
17357 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17358 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17359fi
17360
Skip Montanaro6dead952003-09-25 14:50:04 +000017361# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017363# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364# Hook for its removal unless debugging.
17365# Note that there is a small window in which the directory will not be cleaned:
17366# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017367$debug ||
17368{
Victor Stinnere0be4232011-10-25 13:06:09 +020017369 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017371 : "${ac_tmp:=$tmp}"
17372 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017374 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017375}
Martin v. Löwis11437992002-04-12 09:54:03 +000017376# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017377
Martin v. Löwis11437992002-04-12 09:54:03 +000017378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017380 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017381} ||
17382{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383 tmp=./conf$$-$RANDOM
17384 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017385} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017386ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017387
Matthias Kloseb9621712010-04-24 17:59:49 +000017388# Set up the scripts for CONFIG_FILES section.
17389# No need to generate them if there are no CONFIG_FILES.
17390# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017392
Matthias Kloseb9621712010-04-24 17:59:49 +000017393
17394ac_cr=`echo X | tr X '\015'`
17395# On cygwin, bash can eat \r inside `` if the user requested igncr.
17396# But we know of no other shell where ac_cr would be empty at this
17397# point, so we can use a bashism as a fallback.
17398if test "x$ac_cr" = x; then
17399 eval ac_cr=\$\'\\r\'
17400fi
17401ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17402if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017403 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017404else
17405 ac_cs_awk_cr=$ac_cr
17406fi
17407
Victor Stinnere0be4232011-10-25 13:06:09 +020017408echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017409_ACEOF
17410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411
Matthias Kloseb9621712010-04-24 17:59:49 +000017412{
17413 echo "cat >conf$$subs.awk <<_ACEOF" &&
17414 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17415 echo "_ACEOF"
17416} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017417 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17418ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419ac_delim='%!_!# '
17420for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017421 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017422 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423
Matthias Kloseb9621712010-04-24 17:59:49 +000017424 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17425 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 break
17427 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017428 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 else
17430 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017431 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432done
Matthias Kloseb9621712010-04-24 17:59:49 +000017433rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434
Matthias Kloseb9621712010-04-24 17:59:49 +000017435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017436cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017438sed -n '
17439h
17440s/^/S["/; s/!.*/"]=/
17441p
17442g
17443s/^[^!]*!//
17444:repl
17445t repl
17446s/'"$ac_delim"'$//
17447t delim
17448:nl
17449h
17450s/\(.\{148\}\)..*/\1/
17451t more1
17452s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17453p
17454n
17455b repl
17456:more1
17457s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17458p
17459g
17460s/.\{148\}//
17461t nl
17462:delim
17463h
17464s/\(.\{148\}\)..*/\1/
17465t more2
17466s/["\\]/\\&/g; s/^/"/; s/$/"/
17467p
17468b
17469:more2
17470s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17471p
17472g
17473s/.\{148\}//
17474t delim
17475' <conf$$subs.awk | sed '
17476/^[^""]/{
17477 N
17478 s/\n//
17479}
17480' >>$CONFIG_STATUS || ac_write_fail=1
17481rm -f conf$$subs.awk
17482cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17483_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017484cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017485 for (key in S) S_is_set[key] = 1
17486 FS = ""
17487
17488}
17489{
17490 line = $ 0
17491 nfields = split(line, field, "@")
17492 substed = 0
17493 len = length(field[1])
17494 for (i = 2; i < nfields; i++) {
17495 key = field[i]
17496 keylen = length(key)
17497 if (S_is_set[key]) {
17498 value = S[key]
17499 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17500 len += length(value) + length(field[++i])
17501 substed = 1
17502 } else
17503 len += 1 + keylen
17504 }
17505
17506 print line
17507}
17508
17509_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17512if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17513 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17514else
17515 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017516fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017517 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017518_ACEOF
17519
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017520# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17521# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522# trailing colons and then remove the whole line if VPATH becomes empty
17523# (actually we leave an empty line to preserve line numbers).
17524if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017525 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17526h
17527s///
17528s/^/:/
17529s/[ ]*$/:/
17530s/:\$(srcdir):/:/g
17531s/:\${srcdir}:/:/g
17532s/:@srcdir@:/:/g
17533s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017535x
17536s/\(=[ ]*\).*/\1/
17537G
17538s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539s/^[^=]*=[ ]*$//
17540}'
17541fi
17542
Matthias Kloseb9621712010-04-24 17:59:49 +000017543cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017544fi # test -n "$CONFIG_FILES"
17545
Matthias Kloseb9621712010-04-24 17:59:49 +000017546# Set up the scripts for CONFIG_HEADERS section.
17547# No need to generate them if there are no CONFIG_HEADERS.
17548# This happens for instance with `./config.status Makefile'.
17549if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017550cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017551BEGIN {
17552_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553
Matthias Kloseb9621712010-04-24 17:59:49 +000017554# Transform confdefs.h into an awk script `defines.awk', embedded as
17555# here-document in config.status, that substitutes the proper values into
17556# config.h.in to produce config.h.
17557
17558# Create a delimiter string that does not exist in confdefs.h, to ease
17559# handling of long lines.
17560ac_delim='%!_!# '
17561for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017562 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17563 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017564 break
17565 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017566 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017567 else
17568 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17569 fi
17570done
17571
17572# For the awk script, D is an array of macro values keyed by name,
17573# likewise P contains macro parameters if any. Preserve backslash
17574# newline sequences.
17575
17576ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17577sed -n '
17578s/.\{148\}/&'"$ac_delim"'/g
17579t rset
17580:rset
17581s/^[ ]*#[ ]*define[ ][ ]*/ /
17582t def
17583d
17584:def
17585s/\\$//
17586t bsnl
17587s/["\\]/\\&/g
17588s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17589D["\1"]=" \3"/p
17590s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17591d
17592:bsnl
17593s/["\\]/\\&/g
17594s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17595D["\1"]=" \3\\\\\\n"\\/p
17596t cont
17597s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17598t cont
17599d
17600:cont
17601n
17602s/.\{148\}/&'"$ac_delim"'/g
17603t clear
17604:clear
17605s/\\$//
17606t bsnlc
17607s/["\\]/\\&/g; s/^/"/; s/$/"/p
17608d
17609:bsnlc
17610s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17611b cont
17612' <confdefs.h | sed '
17613s/'"$ac_delim"'/"\\\
17614"/g' >>$CONFIG_STATUS || ac_write_fail=1
17615
17616cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17617 for (key in D) D_is_set[key] = 1
17618 FS = ""
17619}
17620/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17621 line = \$ 0
17622 split(line, arg, " ")
17623 if (arg[1] == "#") {
17624 defundef = arg[2]
17625 mac1 = arg[3]
17626 } else {
17627 defundef = substr(arg[1], 2)
17628 mac1 = arg[2]
17629 }
17630 split(mac1, mac2, "(") #)
17631 macro = mac2[1]
17632 prefix = substr(line, 1, index(line, defundef) - 1)
17633 if (D_is_set[macro]) {
17634 # Preserve the white space surrounding the "#".
17635 print prefix "define", macro P[macro] D[macro]
17636 next
17637 } else {
17638 # Replace #undef with comments. This is necessary, for example,
17639 # in the case of _POSIX_SOURCE, which is predefined and required
17640 # on some systems where configure will not decide to define it.
17641 if (defundef == "undef") {
17642 print "/*", prefix defundef, macro, "*/"
17643 next
17644 }
17645 }
17646}
17647{ print }
17648_ACAWK
17649_ACEOF
17650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017651 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017652fi # test -n "$CONFIG_HEADERS"
17653
17654
17655eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17656shift
17657for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658do
17659 case $ac_tag in
17660 :[FHLC]) ac_mode=$ac_tag; continue;;
17661 esac
17662 case $ac_mode$ac_tag in
17663 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017664 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665 :[FH]-) ac_tag=-:-;;
17666 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17667 esac
17668 ac_save_IFS=$IFS
17669 IFS=:
17670 set x $ac_tag
17671 IFS=$ac_save_IFS
17672 shift
17673 ac_file=$1
17674 shift
17675
17676 case $ac_mode in
17677 :L) ac_source=$1;;
17678 :[FH])
17679 ac_file_inputs=
17680 for ac_f
17681 do
17682 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017683 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017684 *) # Look for the file first in the build tree, then in the source tree
17685 # (if the path is not absolute). The absolute path cannot be DOS-style,
17686 # because $ac_f cannot contain `:'.
17687 test -f "$ac_f" ||
17688 case $ac_f in
17689 [\\/$]*) false;;
17690 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17691 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017692 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017694 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17695 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017696 done
17697
17698 # Let's still pretend it is `configure' which instantiates (i.e., don't
17699 # use $as_me), people would be surprised to read:
17700 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017701 configure_input='Generated from '`
17702 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17703 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 if test x"$ac_file" != x-; then
17705 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017706 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17707$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017709 # Neutralize special characters interpreted by sed in replacement strings.
17710 case $configure_input in #(
17711 *\&* | *\|* | *\\* )
17712 ac_sed_conf_input=`$as_echo "$configure_input" |
17713 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17714 *) ac_sed_conf_input=$configure_input;;
17715 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716
17717 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017718 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17719 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 esac
17721 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017722 esac
17723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017725$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017726 X"$ac_file" : 'X\(//\)[^/]' \| \
17727 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017729$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17731 s//\1/
17732 q
17733 }
17734 /^X\(\/\/\)[^/].*/{
17735 s//\1/
17736 q
17737 }
17738 /^X\(\/\/\)$/{
17739 s//\1/
17740 q
17741 }
17742 /^X\(\/\).*/{
17743 s//\1/
17744 q
17745 }
17746 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017747 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017748 ac_builddir=.
17749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750case "$ac_dir" in
17751.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17752*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017755 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756 case $ac_top_builddir_sub in
17757 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17758 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17759 esac ;;
17760esac
17761ac_abs_top_builddir=$ac_pwd
17762ac_abs_builddir=$ac_pwd$ac_dir_suffix
17763# for backward compatibility:
17764ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017765
17766case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017768 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769 ac_top_srcdir=$ac_top_builddir_sub
17770 ac_abs_top_srcdir=$ac_pwd ;;
17771 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017772 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773 ac_top_srcdir=$srcdir
17774 ac_abs_top_srcdir=$srcdir ;;
17775 *) # Relative name.
17776 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17777 ac_top_srcdir=$ac_top_build_prefix$srcdir
17778 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017779esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017781
Martin v. Löwis11437992002-04-12 09:54:03 +000017782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783 case $ac_mode in
17784 :F)
17785 #
17786 # CONFIG_FILE
17787 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017788
17789 case $INSTALL in
17790 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017791 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017792 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017793 ac_MKDIR_P=$MKDIR_P
17794 case $MKDIR_P in
17795 [\\/$]* | ?:[\\/]* ) ;;
17796 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17797 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017798_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799
Matthias Kloseb9621712010-04-24 17:59:49 +000017800cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801# If the template does not know about datarootdir, expand it.
17802# FIXME: This hack should be removed a few years after 2.60.
17803ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017804ac_sed_dataroot='
17805/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 p
17807 q
17808}
17809/@datadir@/p
17810/@docdir@/p
17811/@infodir@/p
17812/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017813/@mandir@/p'
17814case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815*datarootdir*) ac_datarootdir_seen=yes;;
17816*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17818$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017820cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821 ac_datarootdir_hack='
17822 s&@datadir@&$datadir&g
17823 s&@docdir@&$docdir&g
17824 s&@infodir@&$infodir&g
17825 s&@localedir@&$localedir&g
17826 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017827 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828esac
17829_ACEOF
17830
17831# Neutralize VPATH when `$srcdir' = `.'.
17832# Shell code in configure.ac might set extrasub.
17833# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017834cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17835ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017836$extrasub
17837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017839:t
17840/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017841s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017843s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844s&@srcdir@&$ac_srcdir&;t t
17845s&@abs_srcdir@&$ac_abs_srcdir&;t t
17846s&@top_srcdir@&$ac_top_srcdir&;t t
17847s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17848s&@builddir@&$ac_builddir&;t t
17849s&@abs_builddir@&$ac_abs_builddir&;t t
17850s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17851s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017852s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017854"
Victor Stinnere0be4232011-10-25 13:06:09 +020017855eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17856 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017859 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17860 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17861 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017863which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017864$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017865which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017866
Victor Stinnere0be4232011-10-25 13:06:09 +020017867 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017868 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017869 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17870 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017871 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017872 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873 ;;
17874 :H)
17875 #
17876 # CONFIG_HEADER
17877 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017879 {
17880 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017881 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17882 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017883 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017884 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17886$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017888 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017889 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017890 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 fi
17892 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017893 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017894 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017895 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899
17900 esac
17901
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017902
17903 case $ac_file$ac_mode in
17904 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17905
17906 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907done # for ac_tag
17908
Guido van Rossum627b2d71993-12-24 10:39:16 +000017909
Matthias Kloseb9621712010-04-24 17:59:49 +000017910as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017911_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017912ac_clean_files=$ac_clean_files_save
17913
Matthias Kloseb9621712010-04-24 17:59:49 +000017914test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017915 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017916
Martin v. Löwis11437992002-04-12 09:54:03 +000017917
17918# configure is writing to config.log, and then calls config.status.
17919# config.status does its own redirection, appending to config.log.
17920# Unfortunately, on DOS this fails, as config.log is still kept open
17921# by configure, so config.status won't be able to write to it; its
17922# output is simply discarded. So we exec the FD to /dev/null,
17923# effectively closing config.log, so it can be properly (re)opened and
17924# appended to by config.status. When coming back to configure, we
17925# need to make the FD available again.
17926if test "$no_create" != yes; then
17927 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017928 ac_config_status_args=
17929 test "$silent" = yes &&
17930 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017931 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017932 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017933 exec 5>>config.log
17934 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17935 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017936 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017937fi
17938if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17940$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017941fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017942
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017943
Christian Heimes75ed8902013-11-20 01:11:18 +010017944echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017945if test ! -f Modules/Setup
17946then
17947 cp $srcdir/Modules/Setup.dist Modules/Setup
17948fi
17949
Christian Heimes75ed8902013-11-20 01:11:18 +010017950echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017951if test ! -f Modules/Setup.local
17952then
17953 echo "# Edit this file for local setup changes" >Modules/Setup.local
17954fi
17955
Christian Heimes75ed8902013-11-20 01:11:18 +010017956echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017957$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017958 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017959 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017960mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017961
17962if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17963 echo "" >&6
17964 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017965 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 +000017966 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017967 echo "" >&6
17968 echo "" >&6
17969fi
17970